This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 688
eth_estimateGas
does not use blockchain's adjustedTime
#3528
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uh oh!
There was an error while loading. Please reload this page.
In the blockchain, when a block is being prepared to be mined, the timestamp is adjusted by the chain's internal offset:
However,
eth_estimateGas
just uses the parent block's timestamp:This is particularly annoying if you are using Truffle to test a contract that is time dependent because truffle calls an
eth_estimateGas
before sending your actual transaction. If you useevm_setTime
to the time needed for your contract to do what it needs to do, the actual transaction would pass, but Truffle doesn't let you get that far because theeth_estimateGas
fails beforehand.The text was updated successfully, but these errors were encountered: