Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
fix: snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
marktoda committed Aug 28, 2024
1 parent 877f227 commit 0cc4cb9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/manySstore.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
49284
70348
2 changes: 1 addition & 1 deletion .forge-snapshots/singleSstore.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27395
48459
2 changes: 1 addition & 1 deletion .forge-snapshots/singleSstoreClosure.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25205
46269
2 changes: 1 addition & 1 deletion .forge-snapshots/singleSstoreLastCall.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22365
43429
2 changes: 1 addition & 1 deletion .forge-snapshots/sstoreClosure.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
47094
68158
12 changes: 6 additions & 6 deletions test/GasSnapshot.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract GasSnapshotTest is Test, GasSnapshot {
snapEnd();

string memory value = vm.readLine(".forge-snapshots/singleSstore.snap");
assertEq(value, "27395");
assertEq(value, "48459");
}

function testSingleSstoreLastCall() public {
Expand All @@ -35,21 +35,21 @@ contract GasSnapshotTest is Test, GasSnapshot {

string memory value = vm.readLine(".forge-snapshots/singleSstoreLastCall.snap");
// includes 21,000 overhead for transaction, 20,000 clean SSTORE
assertEq(value, "22365");
assertEq(value, "43429");
}

function testSingleSstoreClosure() public {
snap("singleSstoreClosure", simpleOperations.singleSstore);

string memory value = vm.readLine(".forge-snapshots/singleSstoreClosure.snap");
assertEq(value, "25205");
assertEq(value, "46269");
}

function testManySstoreClosure() public {
snap("sstoreClosure", simpleOperations.manySstore);

string memory value = vm.readLine(".forge-snapshots/sstoreClosure.snap");
assertEq(value, "47094");
assertEq(value, "68158");
}

function testInternalClosure() public {
Expand Down Expand Up @@ -96,7 +96,7 @@ contract GasSnapshotTest is Test, GasSnapshot {
snapEnd();

string memory value = vm.readLine(".forge-snapshots/manySstore.snap");
assertEq(value, "49284");
assertEq(value, "70348");
}

function testSnapshotCodeSize() public {
Expand Down Expand Up @@ -132,7 +132,7 @@ contract GasSnapshotTest is Test, GasSnapshot {
// preloaded with the wrong value
snapStart("checkManySstore");
simpleOperations.manySstore();
vm.expectRevert(abi.encodeWithSelector(GasSnapshot.GasMismatch.selector, 1, 52761));
vm.expectRevert(abi.encodeWithSelector(GasSnapshot.GasMismatch.selector, 1, 73825));
snapEnd();
}

Expand Down

0 comments on commit 0cc4cb9

Please sign in to comment.