-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore: rename snapshot
to be more specific
#8945
Conversation
snapshot
to be more specific
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.
lgtm, code refactored to reflect types of snapshot, cheatcodes marked as deprecated with replacement / helper fns to use same logic for both new and deprecated cheatcodes, no change in forge snapshot
cmd syntax
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.
all of these seem fine,
the deprecation notice is great and this doesn't break afaict, but ptal @DaniPopes
/// `snapshot` is being deprecated in favor of `snapshotState`. It will be removed in future versions. | ||
#[cheatcode(group = Evm, safety = Unsafe, status = Deprecated(Some("replaced by `snapshotState`")))] | ||
function snapshot() external returns (uint256 snapshotId); |
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.
seems fine
cc @DaniPopes would be great to get this reviewed / merged if you find time for it, thanks! |
Sorry, forgot, LGMT |
Can someone please update |
### 🕓 Changelog The Foundry PR [#8945](foundry-rs/foundry#8945) introduced a renaming of the `snapshot` and `revertTo` cheat codes to `snapshotState` and `revertToState`, respectively. This PR aligns our test suite with the newly revised cheat codes. --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
### 🕓 Changelog The Foundry PR [#8945](foundry-rs/foundry#8945) introduced a renaming of the `snapshot` and `revertTo` cheat codes, now referred to as `snapshotState` and `revertToState`. In response, this PR updates our test suite—specifically the `ERC721Test` contract—to align with these revised cheat codes. Additionally, `ethers` has been upgraded to the latest version [`6.13.3`](https://github.com/ethers-io/ethers.js/releases/tag/v6.13.3), and all submodules have been updated to their most recent available commits. --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Motivation
Goal is to clarify the difference between
forge snapshot
,state snapshots
andgas snapshots
as we re-use the terminology. This is in preparation for #8952.Splits out the snapshot renaming incl. cheatcode deprecation (with shared implementation) originally part of #8755 as there was consensus on this proposed change and it de-clutters the PR making it easier to review.
The new
gas snapshot
PR can be found here: #8952 and branches off of here.Related:
Solution
Should include no user-facing breaking changes, yields deprecation warning as added here: #8883