diff --git a/.forge-snapshots/addLiquidity with empty hook.snap b/.forge-snapshots/addLiquidity with empty hook.snap index 4d9e26af4..6baa07286 100644 --- a/.forge-snapshots/addLiquidity with empty hook.snap +++ b/.forge-snapshots/addLiquidity with empty hook.snap @@ -1 +1 @@ -312204 \ No newline at end of file +302768 \ No newline at end of file diff --git a/.forge-snapshots/addLiquidity with native token.snap b/.forge-snapshots/addLiquidity with native token.snap index 8caad895a..03583a1b7 100644 --- a/.forge-snapshots/addLiquidity with native token.snap +++ b/.forge-snapshots/addLiquidity with native token.snap @@ -1 +1 @@ -192383 \ No newline at end of file +176959 \ No newline at end of file diff --git a/.forge-snapshots/addLiquidity.snap b/.forge-snapshots/addLiquidity.snap index d472f77eb..243457283 100644 --- a/.forge-snapshots/addLiquidity.snap +++ b/.forge-snapshots/addLiquidity.snap @@ -1 +1 @@ -192364 \ No newline at end of file +175916 \ No newline at end of file diff --git a/.forge-snapshots/donate gas with 1 token.snap b/.forge-snapshots/donate gas with 1 token.snap index 497799e9d..5ed12c3ed 100644 --- a/.forge-snapshots/donate gas with 1 token.snap +++ b/.forge-snapshots/donate gas with 1 token.snap @@ -1 +1 @@ -132101 \ No newline at end of file +134957 \ No newline at end of file diff --git a/.forge-snapshots/donate gas with 2 tokens.snap b/.forge-snapshots/donate gas with 2 tokens.snap index 191a5f6cc..33c0adc82 100644 --- a/.forge-snapshots/donate gas with 2 tokens.snap +++ b/.forge-snapshots/donate gas with 2 tokens.snap @@ -1 +1 @@ -177195 \ No newline at end of file +170663 \ No newline at end of file diff --git a/.forge-snapshots/erc20 collect protocol fees.snap b/.forge-snapshots/erc20 collect protocol fees.snap index 36cf22341..398f333aa 100644 --- a/.forge-snapshots/erc20 collect protocol fees.snap +++ b/.forge-snapshots/erc20 collect protocol fees.snap @@ -1 +1 @@ -24938 \ No newline at end of file +57950 \ No newline at end of file diff --git a/.forge-snapshots/initialize.snap b/.forge-snapshots/initialize.snap index 7610c108e..d6015f966 100644 --- a/.forge-snapshots/initialize.snap +++ b/.forge-snapshots/initialize.snap @@ -1 +1 @@ -51816 \ No newline at end of file +74444 \ No newline at end of file diff --git a/.forge-snapshots/isolate transient store warm.snap b/.forge-snapshots/isolate transient store warm.snap new file mode 100644 index 000000000..c5316a94d --- /dev/null +++ b/.forge-snapshots/isolate transient store warm.snap @@ -0,0 +1 @@ +848 \ No newline at end of file diff --git a/.forge-snapshots/native collect protocol fees.snap b/.forge-snapshots/native collect protocol fees.snap index 5d4c1b5c0..1466e3c8a 100644 --- a/.forge-snapshots/native collect protocol fees.snap +++ b/.forge-snapshots/native collect protocol fees.snap @@ -1 +1 @@ -36611 \ No newline at end of file +60083 \ No newline at end of file diff --git a/.forge-snapshots/removeLiquidity with empty hook.snap b/.forge-snapshots/removeLiquidity with empty hook.snap index 03a4b298a..efb0ef8cc 100644 --- a/.forge-snapshots/removeLiquidity with empty hook.snap +++ b/.forge-snapshots/removeLiquidity with empty hook.snap @@ -1 +1 @@ -98981 \ No newline at end of file +168898 \ No newline at end of file diff --git a/.forge-snapshots/removeLiquidity with native token.snap b/.forge-snapshots/removeLiquidity with native token.snap index 2f798c7f3..997890363 100644 --- a/.forge-snapshots/removeLiquidity with native token.snap +++ b/.forge-snapshots/removeLiquidity with native token.snap @@ -1 +1 @@ -200354 \ No newline at end of file +183564 \ No newline at end of file diff --git a/.forge-snapshots/removeLiquidity.snap b/.forge-snapshots/removeLiquidity.snap index 446dc1e6a..56612605f 100644 --- a/.forge-snapshots/removeLiquidity.snap +++ b/.forge-snapshots/removeLiquidity.snap @@ -1 +1 @@ -196631 \ No newline at end of file +179439 \ No newline at end of file diff --git a/.forge-snapshots/simple swap with native.snap b/.forge-snapshots/simple swap with native.snap index 49a6cadc6..5d6687f24 100644 --- a/.forge-snapshots/simple swap with native.snap +++ b/.forge-snapshots/simple swap with native.snap @@ -1 +1 @@ -187262 \ No newline at end of file +172427 \ No newline at end of file diff --git a/.forge-snapshots/simple swap.snap b/.forge-snapshots/simple swap.snap index ef822892e..a1a119384 100644 --- a/.forge-snapshots/simple swap.snap +++ b/.forge-snapshots/simple swap.snap @@ -1 +1 @@ -195802 \ No newline at end of file +179834 \ No newline at end of file diff --git a/.forge-snapshots/storage store warm.snap b/.forge-snapshots/storage store warm.snap index 3f7ea5fb7..23c8efd02 100644 --- a/.forge-snapshots/storage store warm.snap +++ b/.forge-snapshots/storage store warm.snap @@ -1 +1 @@ -895 \ No newline at end of file +27139 \ No newline at end of file diff --git a/.forge-snapshots/storge store.snap b/.forge-snapshots/storge store.snap index e4628e02f..703940ddf 100644 --- a/.forge-snapshots/storge store.snap +++ b/.forge-snapshots/storge store.snap @@ -1 +1 @@ -27399 \ No newline at end of file +48743 \ No newline at end of file diff --git a/.forge-snapshots/swap against liquidity with native token.snap b/.forge-snapshots/swap against liquidity with native token.snap index 4d45aad81..60d84d7cf 100644 --- a/.forge-snapshots/swap against liquidity with native token.snap +++ b/.forge-snapshots/swap against liquidity with native token.snap @@ -1 +1 @@ -117921 \ No newline at end of file +148182 \ No newline at end of file diff --git a/.forge-snapshots/swap against liquidity.snap b/.forge-snapshots/swap against liquidity.snap index cbccba423..14a8f906c 100644 --- a/.forge-snapshots/swap against liquidity.snap +++ b/.forge-snapshots/swap against liquidity.snap @@ -1 +1 @@ -105388 \ No newline at end of file +148285 \ No newline at end of file diff --git a/.forge-snapshots/swap burn 6909 for input.snap b/.forge-snapshots/swap burn 6909 for input.snap index 42da3737c..f16c33c6e 100644 --- a/.forge-snapshots/swap burn 6909 for input.snap +++ b/.forge-snapshots/swap burn 6909 for input.snap @@ -1 +1 @@ -125537 \ No newline at end of file +157371 \ No newline at end of file diff --git a/.forge-snapshots/swap burn native 6909 for input.snap b/.forge-snapshots/swap burn native 6909 for input.snap index 46b36f0b1..0b2d8618f 100644 --- a/.forge-snapshots/swap burn native 6909 for input.snap +++ b/.forge-snapshots/swap burn native 6909 for input.snap @@ -1 +1 @@ -121490 \ No newline at end of file +148751 \ No newline at end of file diff --git a/.forge-snapshots/swap mint native output as 6909.snap b/.forge-snapshots/swap mint native output as 6909.snap index b95954a3f..ab3e68459 100644 --- a/.forge-snapshots/swap mint native output as 6909.snap +++ b/.forge-snapshots/swap mint native output as 6909.snap @@ -1 +1 @@ -189820 \ No newline at end of file +173600 \ No newline at end of file diff --git a/.forge-snapshots/swap mint output as 6909.snap b/.forge-snapshots/swap mint output as 6909.snap index 28bdbec02..698b17630 100644 --- a/.forge-snapshots/swap mint output as 6909.snap +++ b/.forge-snapshots/swap mint output as 6909.snap @@ -1 +1 @@ -206629 \ No newline at end of file +190649 \ No newline at end of file diff --git a/.forge-snapshots/swap with dynamic fee.snap b/.forge-snapshots/swap with dynamic fee.snap index 7f5e42e36..1cf6d9016 100644 --- a/.forge-snapshots/swap with dynamic fee.snap +++ b/.forge-snapshots/swap with dynamic fee.snap @@ -1 +1 @@ -138693 \ No newline at end of file +172029 \ No newline at end of file diff --git a/.forge-snapshots/swap with hooks.snap b/.forge-snapshots/swap with hooks.snap index c9668bc0a..cb8073a51 100644 --- a/.forge-snapshots/swap with hooks.snap +++ b/.forge-snapshots/swap with hooks.snap @@ -1 +1 @@ -105366 \ No newline at end of file +148273 \ No newline at end of file diff --git a/.forge-snapshots/transient store.snap b/.forge-snapshots/transient store.snap index 6a454d92b..32b8ac86a 100644 --- a/.forge-snapshots/transient store.snap +++ b/.forge-snapshots/transient store.snap @@ -1 +1 @@ -5363 \ No newline at end of file +26707 \ No newline at end of file diff --git a/.forge-snapshots/update dynamic fee in before swap.snap b/.forge-snapshots/update dynamic fee in before swap.snap index 142caca13..98a00da72 100644 --- a/.forge-snapshots/update dynamic fee in before swap.snap +++ b/.forge-snapshots/update dynamic fee in before swap.snap @@ -1 +1 @@ -189695 \ No newline at end of file +182943 \ No newline at end of file diff --git a/test/TransientTest.t.sol b/test/TransientTest.t.sol index 18abb72b9..0549010a6 100644 --- a/test/TransientTest.t.sol +++ b/test/TransientTest.t.sol @@ -18,7 +18,7 @@ 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); @@ -26,6 +26,18 @@ contract TransientTest is Test, GasSnapshot { 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);