-
Notifications
You must be signed in to change notification settings - Fork 32
refactor: rename snapshot to state snapshot #917
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
Conversation
🦋 Changeset detectedLatest commit: 860b6dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Pull Request Overview
This PR refactors the code to rename “snapshot” to “state snapshot” as part of a backport. Key changes include renaming variables, functions, and types from “snapshot” to “state_snapshot”, updating associated documentation, and adjusting references in cheatcodes and tests.
Reviewed Changes
Copilot reviewed 13 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/foundry/evm/core/src/fork/database.rs | Renamed snapshot-related fields and methods to their state snapshot counterparts. |
| crates/foundry/evm/core/src/backend/snapshot.rs | Updated snapshot types and actions to the new state snapshot variants. |
| crates/foundry/evm/core/src/backend/mod.rs | Replaced snapshot operations with state snapshot operations with minor doc updates. |
| crates/foundry/evm/core/src/backend/in_memory_db.rs | Updated field name from snapshots to state_snapshots. |
| crates/foundry/evm/core/src/backend/cow.rs | Adjusted snapshot method calls to state snapshot equivalents. |
| crates/foundry/cheatcodes/src/evm.rs | Renamed cheatcode functions and inner helpers for snapshot operations. |
| crates/cheatcodes/spec/src/vm.rs | Updated cheatcode interface methods and deprecation annotations accordingly. |
| crates/edr_solidity_tests/tests/it/repros.rs | Updated test name to reflect new revert method naming. |
| .changeset/long-eagles-thank.md | Updated changeset note to document the deprecation and renaming of snapshot cheatcodes. |
Files not reviewed (11)
- crates/edr_solidity_tests/tests/testdata/cheats/Vm.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/cheats/Prevrandao.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/cheats/Snapshots.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/cheats/StateSnapshots.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/cheats/loadAllocs.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/repros/Issue2984.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/repros/Issue3055.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/repros/Issue3792.t.sol: Language not supported
- crates/edr_solidity_tests/tests/testdata/default/repros/Issue6355.t.sol: Language not supported
- crates/foundry/cheatcodes/assets/cheatcodes.json: Language not supported
- crates/foundry/cheatcodes/assets/cheatcodes.schema.json: Language not supported
Comments suppressed due to low confidence (1)
crates/foundry/evm/core/src/backend/mod.rs:92
- There is a typo in the documentation: "napshots" should be spelled "snapshots".
/// A state snapshot is associated with a new unique id that's created for
be1aa6d to
d4a7935
Compare
1d230af to
7f34517
Compare
Co-authored-by: Francisco Giordano <[email protected]>
d4a7935 to
dbf7021
Compare
|
Hardhat tests are known to be failing on |
Backports foundry-rs/foundry#8945