Getting :gas required exceeds allowance (10000000) or always failing transaction exception on testnet
See original GitHub issueSo whenever I’m calling any function from my frontend on testnet my gasPrice is 1 GWEI by default
And on testnet(working fine on Buidler local EVM) most of my functions are giving below errors:
inpage.js:1 MetaMask - RPC Error: gas required exceeds allowance (10000000) or always failing transaction {code: -32000, message: "gas required exceeds allowance (10000000) or always failing transaction"} contribution-modal-widgets.js:99 Contribution Error Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"code":-32000,"message":"gas required exceeds allowance (10000000) or always failing transaction"}, method="estimateGas", transaction={"from":"0xeAD9C93b79Ae7C1591b1FB5323BD777E86e150r4","to":"0x2e1739C5D061082e85E1d6D17f91e2d56bDF3Bf2","data":"0x0d87ec9b0000000000000000000000000000000000000000000000000000000000989680"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.0.9) at Logger.makeError (ethers.umd.js:3659) at Logger.throwError (ethers.umd.js:3668) at checkError (ethers.umd.js:24041) at Web3Provider.<anonymous> (ethers.umd.js:24415) at step (ethers.umd.js:23992) at Object.throw (ethers.umd.js:23973) at rejected (ethers.umd.js:23965)
Tried a lot of things to make it work, even provided hardcoded gas but that did not work. I’m testing my dapp on testnet right now and I’m on the verge of deploying on mainnet but because of this issue I’m not able to deploy it on mainnet.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
If you are passing a lot of gas and still if you get this, it probably means that
always failing transaction
is the case. You can look for any require statemenets in your contract that might be causing the fail?@ShivamDev31 Heya! I don’t quite understand. What do you mean by the gas price is always 1 GWEI and the gas limit is too high? The gas price and gas limit are not really related other than they are both used so compute the fee of a transaction…