Skip to content

Commit

Permalink
Merge pull request #2 from rvagg/rvagg/snapshots
Browse files Browse the repository at this point in the history
fix: update snapshots, nv23
  • Loading branch information
tzapu authored Aug 28, 2024
2 parents 6ac907b + 5214c20 commit 2b70d87
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 831 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"node": ">=10"
},
"dependencies": {
"bignumber.js": "^9.1.2",
"dotenv": "^16.0.3"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions test/__snapshots__/BitMath.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`BitMath #leastSignificantBit gas cost of max uint128 1`] = `80742`;
exports[`BitMath #leastSignificantBit gas cost of max uint128 1`] = `73067`;

exports[`BitMath #leastSignificantBit gas cost of max uint256 1`] = `80598`;
exports[`BitMath #leastSignificantBit gas cost of max uint256 1`] = `72955`;

exports[`BitMath #leastSignificantBit gas cost of smaller number 1`] = `82558`;
exports[`BitMath #leastSignificantBit gas cost of smaller number 1`] = `74847`;

exports[`BitMath #mostSignificantBit gas cost of max uint128 1`] = `89886`;
exports[`BitMath #mostSignificantBit gas cost of max uint128 1`] = `84171`;

exports[`BitMath #mostSignificantBit gas cost of max uint256 1`] = `94502`;
exports[`BitMath #mostSignificantBit gas cost of max uint256 1`] = `88359`;

exports[`BitMath #mostSignificantBit gas cost of smaller number 1`] = `69534`;
exports[`BitMath #mostSignificantBit gas cost of smaller number 1`] = `65007`;
4 changes: 2 additions & 2 deletions test/__snapshots__/LiquidityMath.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`LiquidityMath #addDelta gas add 1`] = `46920`;
exports[`LiquidityMath #addDelta gas add 1`] = `41944`;

exports[`LiquidityMath #addDelta gas sub 1`] = `48508`;
exports[`LiquidityMath #addDelta gas sub 1`] = `43488`;
2 changes: 1 addition & 1 deletion test/__snapshots__/NoDelegateCall.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`NoDelegateCall runtime overhead 1`] = `11249`;
exports[`NoDelegateCall runtime overhead 1`] = `10937`;
30 changes: 15 additions & 15 deletions test/__snapshots__/Oracle.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Oracle #observe before initialization gas for observe since most recent 1`] = `821509`;
exports[`Oracle #observe before initialization gas for observe since most recent 1`] = `737040`;

exports[`Oracle #observe before initialization gas for single observation at current time 1`] = `547267`;
exports[`Oracle #observe before initialization gas for single observation at current time 1`] = `495230`;

exports[`Oracle #observe before initialization gas for single observation at current time counterfactually computed 1`] = `673842`;
exports[`Oracle #observe before initialization gas for single observation at current time counterfactually computed 1`] = `606777`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 fetch many values 1`] = `
Object {
Expand All @@ -29,17 +29,17 @@ Object {
}
`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas all of last 20 seconds 1`] = `28868446`;
exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas all of last 20 seconds 1`] = `26358352`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas between oldest and oldest + 1 1`] = `2888490`;
exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas between oldest and oldest + 1 1`] = `2685824`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas latest equal 1`] = `1113465`;
exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas latest equal 1`] = `1045162`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas latest transform 1`] = `1113465`;
exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas latest transform 1`] = `1045162`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas middle 1`] = `2936442`;
exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas middle 1`] = `2728889`;

exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas oldest 1`] = `2811248`;
exports[`Oracle #observe initialized with 5 observations with starting time of 5 gas oldest 1`] = `2617718`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 fetch many values 1`] = `
Object {
Expand All @@ -64,14 +64,14 @@ Object {
}
`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas all of last 20 seconds 1`] = `28868446`;
exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas all of last 20 seconds 1`] = `26358352`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas between oldest and oldest + 1 1`] = `2888490`;
exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas between oldest and oldest + 1 1`] = `2685824`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas latest equal 1`] = `1113465`;
exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas latest equal 1`] = `1045162`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas latest transform 1`] = `1113465`;
exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas latest transform 1`] = `1045162`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas middle 1`] = `2936442`;
exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas middle 1`] = `2728889`;

exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas oldest 1`] = `2811248`;
exports[`Oracle #observe initialized with 5 observations with starting time of 4294967291 gas oldest 1`] = `2617718`;
16 changes: 8 additions & 8 deletions test/__snapshots__/SqrtPriceMath.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`SqrtPriceMath #getAmount0Delta gas cost for amount0 where roundUp = true 1`] = `263523`;
exports[`SqrtPriceMath #getAmount0Delta gas cost for amount0 where roundUp = true 1`] = `239559`;

exports[`SqrtPriceMath #getAmount0Delta gas cost for amount0 where roundUp = true 2`] = `171679`;
exports[`SqrtPriceMath #getAmount0Delta gas cost for amount0 where roundUp = true 2`] = `154403`;

exports[`SqrtPriceMath #getAmount1Delta gas cost for amount0 where roundUp = false 1`] = `171679`;
exports[`SqrtPriceMath #getAmount1Delta gas cost for amount0 where roundUp = false 1`] = `154403`;

exports[`SqrtPriceMath #getAmount1Delta gas cost for amount0 where roundUp = true 1`] = `263523`;
exports[`SqrtPriceMath #getAmount1Delta gas cost for amount0 where roundUp = true 1`] = `239559`;

exports[`SqrtPriceMath #getNextSqrtPriceFromInput zeroForOne = false gas 1`] = `128796`;
exports[`SqrtPriceMath #getNextSqrtPriceFromInput zeroForOne = false gas 1`] = `116768`;

exports[`SqrtPriceMath #getNextSqrtPriceFromInput zeroForOne = true gas 1`] = `259615`;
exports[`SqrtPriceMath #getNextSqrtPriceFromInput zeroForOne = true gas 1`] = `232551`;

exports[`SqrtPriceMath #getNextSqrtPriceFromOutput zeroForOne = false gas 1`] = `277399`;
exports[`SqrtPriceMath #getNextSqrtPriceFromOutput zeroForOne = false gas 1`] = `248623`;

exports[`SqrtPriceMath #getNextSqrtPriceFromOutput zeroForOne = true gas 1`] = `130128`;
exports[`SqrtPriceMath #getNextSqrtPriceFromOutput zeroForOne = true gas 1`] = `119412`;
16 changes: 8 additions & 8 deletions test/__snapshots__/SwapMath.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`SwapMath #computeSwapStep gas swap one for zero exact in capped 1`] = `596496`;
exports[`SwapMath #computeSwapStep gas swap one for zero exact in capped 1`] = `525835`;

exports[`SwapMath #computeSwapStep gas swap one for zero exact in partial 1`] = `725268`;
exports[`SwapMath #computeSwapStep gas swap one for zero exact in partial 1`] = `640103`;

exports[`SwapMath #computeSwapStep gas swap one for zero exact out capped 1`] = `530516`;
exports[`SwapMath #computeSwapStep gas swap one for zero exact out capped 1`] = `467967`;

exports[`SwapMath #computeSwapStep gas swap one for zero exact out partial 1`] = `725268`;
exports[`SwapMath #computeSwapStep gas swap one for zero exact out partial 1`] = `640103`;

exports[`SwapMath #computeSwapStep gas swap zero for one exact in capped 1`] = `633408`;
exports[`SwapMath #computeSwapStep gas swap zero for one exact in capped 1`] = `561331`;

exports[`SwapMath #computeSwapStep gas swap zero for one exact in partial 1`] = `976938`;
exports[`SwapMath #computeSwapStep gas swap zero for one exact in partial 1`] = `871577`;

exports[`SwapMath #computeSwapStep gas swap zero for one exact out capped 1`] = `567428`;
exports[`SwapMath #computeSwapStep gas swap zero for one exact out capped 1`] = `503463`;

exports[`SwapMath #computeSwapStep gas swap zero for one exact out partial 1`] = `976938`;
exports[`SwapMath #computeSwapStep gas swap zero for one exact out partial 1`] = `871577`;
18 changes: 9 additions & 9 deletions test/__snapshots__/TickBitmap.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`TickBitmap #flipTick gas cost of flipping a tick that results in deleting a word 1`] = `4647927`;
exports[`TickBitmap #flipTick gas cost of flipping a tick that results in deleting a word 1`] = `4563819`;

exports[`TickBitmap #flipTick gas cost of flipping first tick in word to initialized 1`] = `4800492`;
exports[`TickBitmap #flipTick gas cost of flipping first tick in word to initialized 1`] = `4711781`;

exports[`TickBitmap #flipTick gas cost of flipping second tick in word to initialized 1`] = `4823723`;
exports[`TickBitmap #flipTick gas cost of flipping second tick in word to initialized 1`] = `4734733`;

exports[`TickBitmap #nextInitializedTickWithinOneWord lte = false gas cost for entire word 1`] = `146753`;
exports[`TickBitmap #nextInitializedTickWithinOneWord lte = false gas cost for entire word 1`] = `129837`;

exports[`TickBitmap #nextInitializedTickWithinOneWord lte = false gas cost just below boundary 1`] = `403085`;
exports[`TickBitmap #nextInitializedTickWithinOneWord lte = false gas cost just below boundary 1`] = `381630`;

exports[`TickBitmap #nextInitializedTickWithinOneWord lte = false gas cost on boundary 1`] = `400853`;
exports[`TickBitmap #nextInitializedTickWithinOneWord lte = false gas cost on boundary 1`] = `379618`;

exports[`TickBitmap #nextInitializedTickWithinOneWord lte = true gas cost for entire word 1`] = `140225`;
exports[`TickBitmap #nextInitializedTickWithinOneWord lte = true gas cost for entire word 1`] = `123013`;

exports[`TickBitmap #nextInitializedTickWithinOneWord lte = true gas cost just below boundary 1`] = `458124`;
exports[`TickBitmap #nextInitializedTickWithinOneWord lte = true gas cost just below boundary 1`] = `431792`;

exports[`TickBitmap #nextInitializedTickWithinOneWord lte = true gas cost on boundary 1`] = `394713`;
exports[`TickBitmap #nextInitializedTickWithinOneWord lte = true gas cost on boundary 1`] = `373250`;
Loading

0 comments on commit 2b70d87

Please sign in to comment.