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

feat(cheatcodes): getBlockNumber and getBlockTimestamp #6630

Merged
merged 8 commits into from
Dec 21, 2023

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Dec 20, 2023

Motivation

Closes #6180

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, this acts like a blockbox so the compiler doesn't inline it.

can we add a note to the docs about this?

crates/cheatcodes/spec/src/vm.rs Outdated Show resolved Hide resolved
@Evalir Evalir merged commit cb6c44d into master Dec 21, 2023
19 checks passed
@Evalir Evalir deleted the evalir/timestamp-height-cheatcodes branch December 21, 2023 03:46
@ZeroEkkusu
Copy link
Contributor

ZeroEkkusu commented Mar 12, 2024

Just a heads up that this is not documented in a visible place, yet can result in false passing tests.
It needs to be documented in warp, skip, rewind, and any other places where the block timestamp/number is changed.

image

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

Successfully merging this pull request may close these issues.

block.timestamp bugs when using skip
5 participants