Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forked block timestamp accuracy #357

Open
antazoey opened this issue Dec 31, 2024 · 1 comment
Open

forked block timestamp accuracy #357

antazoey opened this issue Dec 31, 2024 · 1 comment

Comments

@antazoey
Copy link

antazoey commented Dec 31, 2024

Right now, the timestamp in blocks when forking is off, and I have some contracts that depend on accurate timestamps.

(block_identifier set to 7341111)

ape console --network ethereum:sepolia-fork:boa
In [2]: chain.provider.get_block("latest")
Out[2]: <Block number=7341111 hash=0xc61bfb0ab4b8b326506c6f2d335ccde96c3a5c64161a2cbc964c2004bc61e8e8>

In [3]: chain.provider.get_block("latest").timestamp
Out[3]: 1735604927
ape console --network ethereum:sepolia-fork:foundry
In [4]: chain.provider.get_block(7341111).timestamp
Out[4]: 1734992352
@antazoey
Copy link
Author

I think I might have not been using the .patch , that was maybe my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant