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

Update core #343

Merged
merged 4 commits into from
Sep 5, 2024
Merged
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/BaseActionsRouter_mock10commands.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59216
59219
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129314
129463
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131232
131381
Original file line number Diff line number Diff line change
@@ -1 +1 @@
123437
123586
Original file line number Diff line number Diff line change
@@ -1 +1 @@
123579
123728
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_empty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50179
50181
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_empty_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50179
50181
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125084
125092
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124645
124652
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131935
131944
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131496
131505
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
145670
145679
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154233
154245
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154233
154245
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withTakePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
153696
153708
Original file line number Diff line number Diff line change
@@ -1 +1 @@
111481
111488
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119114
119126
Original file line number Diff line number Diff line change
@@ -1 +1 @@
118577
118589
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_burnEmpty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
134624
134633
Original file line number Diff line number Diff line change
@@ -1 +1 @@
127773
127780
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131801
131813
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_take_take.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119690
119702
Original file line number Diff line number Diff line change
@@ -1 +1 @@
158393
158430
Original file line number Diff line number Diff line change
@@ -1 +1 @@
157475
157512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
140223
140257
Original file line number Diff line number Diff line change
@@ -1 +1 @@
136002
136028
Original file line number Diff line number Diff line change
@@ -1 +1 @@
176706
176737
Original file line number Diff line number Diff line change
@@ -1 +1 @@
147388
147413
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
364087
364121
Original file line number Diff line number Diff line change
@@ -1 +1 @@
372467
372502
Original file line number Diff line number Diff line change
@@ -1 +1 @@
371833
371867
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickLower.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
316932
316969
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickUpper.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
317602
317639
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
243171
243208
Original file line number Diff line number Diff line change
@@ -1 +1 @@
418079
418116
Original file line number Diff line number Diff line change
@@ -1 +1 @@
322963
323000
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
419485
419522
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_withSettlePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
418685
418722
Original file line number Diff line number Diff line change
@@ -1 +1 @@
463653
463694
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2256
2259
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7994
8003
2 changes: 1 addition & 1 deletion .forge-snapshots/StateView_extsload_getPositionInfo.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2826
2829
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2543
2546
2 changes: 1 addition & 1 deletion .forge-snapshots/StateView_extsload_getTickInfo.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2758
2761
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115185
115331
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115511
115652
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_oneForZero.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124326
124470
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_zeroForOne.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
130044
130193
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn2Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
179052
179333
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn2Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
169903
170186
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn3Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
228039
228452
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
218914
219329
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactInputSingle.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129314
129463
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactInputSingle_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
114455
114601
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactInputSingle_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
114750
114891
Original file line number Diff line number Diff line change
@@ -1 +1 @@
121413
121594
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut1Hop_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
116563
116716
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut1Hop_oneForZero.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125378
125534
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut1Hop_zeroForOne.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129295
129479
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut2Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
179123
179451
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut2Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
175158
175511
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
228958
229430
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
225017
225514
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
220167
220636
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOutputSingle.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
128565
128749
Original file line number Diff line number Diff line change
@@ -1 +1 @@
120683
120864
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOutputSingle_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115908
116061
5 changes: 5 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ evm_version = "cancun"
gas_limit = "3000000000"
fuzz_runs = 10_000

[profile.debug]
via_ir = false
optimizer_runs = 200
fuzz.runs = 100

[profile.ci]
fuzz_runs = 100_000

Expand Down
2 changes: 1 addition & 1 deletion lib/v4-core
Submodule v4-core updated 54 files
+1 −1 .forge-snapshots/add liquidity to already existing position with salt.snap
+1 −1 .forge-snapshots/addLiquidity CA fee.snap
+1 −1 .forge-snapshots/addLiquidity with empty hook.snap
+1 −1 .forge-snapshots/addLiquidity with native token.snap
+1 −1 .forge-snapshots/create new liquidity to a position with salt.snap
+1 −1 .forge-snapshots/donate gas with 1 token.snap
+1 −1 .forge-snapshots/donate gas with 2 tokens.snap
+1 −1 .forge-snapshots/erc20 collect protocol fees.snap
+1 −1 .forge-snapshots/extsload getFeeGrowthGlobals.snap
+1 −1 .forge-snapshots/extsload getPositionInfo.snap
+1 −1 .forge-snapshots/extsload getTickFeeGrowthOutside.snap
+1 −1 .forge-snapshots/extsload getTickInfo.snap
+1 −1 .forge-snapshots/initialize.snap
+1 −1 .forge-snapshots/native collect protocol fees.snap
+1 −1 .forge-snapshots/poolManager bytecode size.snap
+1 −1 .forge-snapshots/removeLiquidity CA fee.snap
+1 −1 .forge-snapshots/removeLiquidity with empty hook.snap
+1 −1 .forge-snapshots/removeLiquidity with native token.snap
+1 −1 .forge-snapshots/simple addLiquidity second addition same range.snap
+1 −1 .forge-snapshots/simple addLiquidity.snap
+1 −1 .forge-snapshots/simple removeLiquidity some liquidity remains.snap
+1 −1 .forge-snapshots/simple removeLiquidity.snap
+1 −1 .forge-snapshots/simple swap with native.snap
+1 −1 .forge-snapshots/simple swap.snap
+1 −1 .forge-snapshots/swap CA custom curve + swap noop.snap
+1 −1 .forge-snapshots/swap CA fee on unspecified.snap
+1 −1 .forge-snapshots/swap against liquidity with native token.snap
+1 −1 .forge-snapshots/swap against liquidity.snap
+1 −1 .forge-snapshots/swap burn 6909 for input.snap
+1 −1 .forge-snapshots/swap burn native 6909 for input.snap
+1 −1 .forge-snapshots/swap mint native output as 6909.snap
+1 −1 .forge-snapshots/swap mint output as 6909.snap
+1 −1 .forge-snapshots/swap skips hook call if hook is caller.snap
+1 −1 .forge-snapshots/swap with dynamic fee.snap
+1 −1 .forge-snapshots/swap with hooks.snap
+1 −1 .forge-snapshots/swap with lp fee and protocol fee.snap
+1 −1 .forge-snapshots/swap with return dynamic fee.snap
+1 −1 .forge-snapshots/update dynamic fee in before swap.snap
+ docs/security/Known_Effects_of_Hook_Permissions.pdf
+ docs/security/audits/DRAFT_ABDK_audit_core.pdf
+ docs/security/audits/DRAFT_Certora_audit_core.pdf
+ docs/security/audits/DRAFT_Spearbit_audit_core.pdf
+ docs/security/audits/OpenZeppelin_audit_core.pdf
+ docs/security/audits/TrailOfBits_audit_core.pdf
+0 −0 docs/whitepaper/latex/main-zh.tex
+0 −0 docs/whitepaper/latex/main.bib
+0 −0 docs/whitepaper/latex/main.tex
+ docs/whitepaper/whitepaper-v4.pdf
+ docs/whitepaper/whitepaper-zh.pdf
+20 −18 src/PoolManager.sol
+19 −17 src/libraries/Pool.sol
+12 −4 src/libraries/TickMath.sol
+5 −5 test/Tick.t.sol
+2 −2 test/libraries/Pool.t.sol
Loading