You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: gas snapshots over arbitrary sections (foundry-rs#8952)
* update internal naming
* further internals
* deprecate cheats
* update Solidity tests and add dedicated test for testing deprecated cheatcodes
* clarify gas snapshots
* fix build
* final fixes
* fix build
* fix repro 6355 rename
* add gas snapshot setup from foundry-rs#8755
* fix build + clippy warnings
* fix cheatcodes
* account for fixed CREATE / CALL gas cost
* remove import
* add stipend
* recalculate after a - b setup
* clear call_stipend, update tests
* avoid double counting external calls
* update cheatcodes, remove debug prints
* enable assertions
* clean up tests
* clean up test names
* remove snapshot directory on `forge clean`
* do not remove all snapshots by default due to multiple test suites being able to be ran concurrently or sequentially + optimize gas snapshots check - skip if none were captured
* handle edge case where we ask to compare but file does not exist, remove snapshot directory at a top level before test suites are ran
* fix path issue when attempting removal
* Update crates/cheatcodes/src/evm.rs
Co-authored-by: Arsenii Kulikov <[email protected]>
* Update crates/cheatcodes/src/inspector.rs
Co-authored-by: Arsenii Kulikov <[email protected]>
* refactor, apply recommended changes for last_snapshot_group, last_snapshot_name
* remove gas snapshots from fuzz tests for now: this is largely due to it conflicting with the FORGE_SNAPSHOT_CHECK where it is highly likely that with different fuzzed input the gas measurement differs as well. In the future it would be an idea to capture the average gas
* fix clippy
* avoid setting to 0 unnecessarily
* use if let Some
* improve comments, clarify use of last_gas_used != 0
* fix merge conflict issue
* fix arg ordering to address group naming regression
* fix import
* move snapshot name derivation to helper
* only skip initial call w/ overhead, no special handling for call frames
* add flare test
* style nits + use helper method
---------
Co-authored-by: Arsenii Kulikov <[email protected]>
0 commit comments