question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting :gas required exceeds allowance (10000000) or always failing transaction exception on testnet

See original GitHub issue

So whenever I’m calling any function from my frontend on testnet my gasPrice is 1 GWEI by default image

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:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
zemsecommented, Sep 24, 2020

gas required exceeds allowance (10000000) or always failing transaction

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?

0reactions
ricmoocommented, Oct 6, 2020

@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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gas Required Exceeds Allowance or Always Failing Transaction
This error can occur when interacting with a contract, and means that MyCrypto could not estimate the gas limit for your transaction.
Read more >
How to fix "gas required exceeds allowance (9998602) or ...
If a transaction gets tested for about the block limit amount of gas (i.e. for mainnet currently 10 million) and it still fails, ......
Read more >
Gas Required Exceeds Allowance 30000000 Issue - ADocLib
Basically I was getting the following error: gas required exceeds allowance or always failing transaction. The first thing to check is whether your....
Read more >
Ethereum Remix: gas required exceeds allowance (30000000 ...
I'm trying to deploy a smart contract on BSC Testnet but the Remix IDE throws me error below:.
Read more >
Ethereum error codes
... 2018 · zemse mentioned this issue on Sep 24, 2020 Getting :gas required exceeds allowance (10000000) or always failing transaction exception on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found