When calling a contract function, I am getting the common unable to estimate gaslimit error message: Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ].

The thing is, the error message appears after the contract interraction has been completed. I have checked and made sure all the desired outcomes of the contract interraction has been achieved.

Long story short, the interraction I am making involves transferring NFTs and as a result the user has to sign twice, once to approve and once to actually send. The error message appears after both signings. And as said, the contract interraction is successful (NFT is sent).

I have tried adding a manual gas limit. However, if I set the limit low (still higher than what's actually needed), the interraction fails. If I set it high (3e7), it the gas price becomes insanely high (up to 10 ethers).

What is happening?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.