How To Solve “Gas Estimation Errored” Message in Smart Contract

The transaction execution will likely fail

Sabit
Auditor Brainpower

--

How To Solve “Gas estimation failed Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? The execution failed due to an exception. Reverted”
Photo by Kelly Sikkema on Unsplash

Do you get this message when connecting a smart contract to your MetaMask from Remix or another IDE?

Gas estimation failed

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
The execution failed due to an exception. Reverted

The warning message showed up several times when I was working on a crowdfunding project in Remix.

It will ask you to either send the transaction or cancel the transaction. You can send the transaction and your smart contract will still connect to your MetaMask. But the transaction will keep failing.

Once the IDE tells you ‘the transaction will likely fail’ with the exact words as above, your smart contract has got no chance.

I used the popular Ropsten, Rinkeby and Kovan testnets but no way.

It took me a while before I could figure out the cause of the ‘Gas estimation errored’ message. Here’s the reason.

Ethereum is shutting down Ropsten and Rinkeby testnets. It means the testnets are no longer maintained by the organization. The Kovan testnet already suffered…

--

--