Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Implement evm_increaseTime and evm_setNextBlockTimestamp #93
feat: Implement evm_increaseTime and evm_setNextBlockTimestamp #93
Changes from 3 commits
697bb07
84842db
bdec706
3dc83fe
74a5cad
7c1594d
0a2acdd
b58f67e
058c0e8
8edf0c1
35ec403
e3daa6e
3c31378
5b11ae3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's actually a need for both here. Ganache only supports evm_setTime, while Hardhat only support evm_setNextBlockTimestamp ... but I think they both do the same thing. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can either implement
evm_setTime
in this PR, or leave the line here in this table.Also, it looks like this change leaves 2 rows/entries for
evm_setNextBlockTimestamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah they do exactly the same thing with the following differences:
setNextBlockTimestamp
allows only setting a timestamp forward in future, whilesetTime
supports setting it backwards.setNextBlockTimestamp
returns the newly set timestamp in response, whereassetTime
returns the difference between the current and the new timestamp.AFAIK
setTime
can be seen as a superset ofsetNextBlockTimestamp
and from most examples out there no one seems to be using the return value to do anything meaningful.I'm fine with supporting both, though it must be explicitly mentioned (to avoid any confusion for users) that these two achieve the same result and are mostly arising out of API differences between hardhat and ganache - though it does tend to make our API interface a bit messy.