alchemyplatform / hello-world-tutorial

28 stars 24 forks source link

Error: cannot estimate gas #4

Open enriqueiturriagaa opened 2 years ago

enriqueiturriagaa commented 2 years ago

I am getting an error when I try to interact with the contract. I can read from the contract just fine, but when I call the update message function I am getting this error:

const error: any = new 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 ] (error={"reason":"execution reverted","code":"UNPREDICTABLE_GAS_LIMIT","method":"estimateGas","transaction":{"from": ...

I tried adding the gasLimit to the transaction, changing the gasLimit in the hardhat config, but nothing.