When attempting to query my smart contract using hardhat, i’m getting the following issues
“cannot estimate gas; transaction may fail or may require manual gas limit”. code=code=UNPREDICTABLE_GAS_LIMIT
I am attempting to query a public constant variable.
I can’t seem to figure out why this is happening. Thanks
1 Like
Hi @Dellybro,
There shouldn’t be a gas cost to read a public constant. I am not sure why that is happening.
How are you doing the query?
@abcoathup I realized this was actually my mistake, i was using an incorrect contract address and attempting to access a getter that doesn’t exist in the contract therefore hardhat can’t estimate the gas.
1 Like