[Ethereum] This transaction is expected to fail. Trying to execute it is expected to be expensive but fail, and is not recommended


Metamask is giving me that error. I am on ropsten network, I never had this issue before and I have enough funds:

enter image description here

I have tried multiple times still getting same error. While it says "I will try anyway", confirm button was disabled

Best Answer

What probably happens is that Metamask runs a static call to the contract with the same parameters, to simulate what would happen if the transaction took place. If it notices that the static call reverts, it gives you this error - because most likely the real transaction would revert as well.

So most likely there is something in the code which causes a revert with the given parameters.

Related Topic