-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
_priority:P1High priorityHigh prioritytype:KREnd-to-end implementation of a KREnd-to-end implementation of a KR
Description
Describe the issue
Add support for gas snapshots in Solidity tests. This includes:
-
Test function gas snapshots: Store gas usage for each test function in a
.gas-snapshotfile (unit tests: single value, fuzz tests: average & median, invariant tests: skipped) -
Snapshot cheatcodes: Store gas usage or arbitrary values at specific points in tests using cheatcodes (
startSnapshotGas,stopSnapshotGas,snapshotGasLastCall,snapshotValue). Values are stored insnapshots/{group}.jsonfiles. The cheatcodes themselves are already implemented in EDR.
Both features are controlled by new CLI flags:
--snapshot: Generate/update snapshot files--snapshot-check: Validate current values against stored snapshots, exit with non-zero code on mismatch
See the design doc for details.
Sub-issues
Metadata
Metadata
Assignees
Labels
_priority:P1High priorityHigh prioritytype:KREnd-to-end implementation of a KREnd-to-end implementation of a KR
Type
Projects
Status
Backlog