Skip to content
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

run using --isolate #515

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
312204
302768
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
192383
176959
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
192364
175916
2 changes: 1 addition & 1 deletion .forge-snapshots/donate gas with 1 token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132101
134957
2 changes: 1 addition & 1 deletion .forge-snapshots/donate gas with 2 tokens.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
177195
170663
2 changes: 1 addition & 1 deletion .forge-snapshots/erc20 collect protocol fees.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24938
57950
2 changes: 1 addition & 1 deletion .forge-snapshots/initialize.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
51816
74444
1 change: 1 addition & 0 deletions .forge-snapshots/isolate transient store warm.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
848
2 changes: 1 addition & 1 deletion .forge-snapshots/native collect protocol fees.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
36611
60083
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
98981
168898
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
200354
183564
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
196631
179439
2 changes: 1 addition & 1 deletion .forge-snapshots/simple swap with native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
187262
172427
2 changes: 1 addition & 1 deletion .forge-snapshots/simple swap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
195802
179834
2 changes: 1 addition & 1 deletion .forge-snapshots/storage store warm.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
895
27139
2 changes: 1 addition & 1 deletion .forge-snapshots/storge store.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27399
48743
Original file line number Diff line number Diff line change
@@ -1 +1 @@
117921
148182
2 changes: 1 addition & 1 deletion .forge-snapshots/swap against liquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
105388
148285
2 changes: 1 addition & 1 deletion .forge-snapshots/swap burn 6909 for input.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125537
157371
2 changes: 1 addition & 1 deletion .forge-snapshots/swap burn native 6909 for input.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
121490
148751
2 changes: 1 addition & 1 deletion .forge-snapshots/swap mint native output as 6909.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
189820
173600
2 changes: 1 addition & 1 deletion .forge-snapshots/swap mint output as 6909.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
206629
190649
2 changes: 1 addition & 1 deletion .forge-snapshots/swap with dynamic fee.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
138693
172029
2 changes: 1 addition & 1 deletion .forge-snapshots/swap with hooks.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
105366
148273
2 changes: 1 addition & 1 deletion .forge-snapshots/transient store.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5363
26707
2 changes: 1 addition & 1 deletion .forge-snapshots/update dynamic fee in before swap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
189695
182943
14 changes: 13 additions & 1 deletion test/TransientTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,26 @@ contract TransientTest is Test, GasSnapshot {
snapEnd();
}

function test_gas_transient_set_warm() public {
function test_regular_gas_transient_set_warm() public {
storageLib.tstore(1, 2);
snapStart("transient store warm");
storageLib.tstore(1, 3);
snapEnd();
assertEq(storageLib.tload(1), 3);
}

function _test_gas_transient_set_warm() public {
storageLib.tstore(1, 2);
snapStart("isolate transient store warm");
storageLib.tstore(1, 3);
snapEnd();
assertEq(storageLib.tload(1), 3);
}

function test_isolate_gas_transient_set_warm() public {
this._test_gas_transient_set_warm();
}

function test_gas_transient_get() public {
snapStart("transient load");
uint256 val = storageLib.tload(1);
Expand Down
Loading