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

[Feature]: Allow setting block::timestamp in unit tests #6

Open
1 task done
qalisander opened this issue Oct 14, 2024 · 1 comment
Open
1 task done

[Feature]: Allow setting block::timestamp in unit tests #6

qalisander opened this issue Oct 14, 2024 · 1 comment

Comments

@qalisander
Copy link
Member

What is the feature you would like to see?

Could be helpful in such contracts testing such as VestingWallet

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
@ggonzalez94 ggonzalez94 transferred this issue from OpenZeppelin/rust-contracts-stylus Dec 17, 2024
@0xNeshi
Copy link
Collaborator

0xNeshi commented Feb 11, 2025

Default value should be same as in Foundry, which is 1.
https://book.getfoundry.sh/reference/config/testing#block_timestamp

We need to handle the timestamp interval (block time), i.e. different transactions in the same test case should not have the same timestamp, even when the initial value is manually set.

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

No branches or pull requests

2 participants