-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add compilation restrictions #921
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"addLiquidity CA fee": "170695", | ||
"removeLiquidity CA fee": "141199", | ||
"swap CA custom curve + swap noop": "124402", | ||
"swap CA fee on unspecified": "154572" | ||
"addLiquidity CA fee": "173566", | ||
"removeLiquidity CA fee": "143871", | ||
"swap CA custom curve + swap noop": "127015", | ||
"swap CA fee on unspecified": "157035" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"ERC6909Claims approve": "46323", | ||
"ERC6909Claims burn": "29389", | ||
"ERC6909Claims mint": "46603", | ||
"ERC6909Claims transfer": "51756", | ||
"ERC6909Claims transferFrom as operator": "54437", | ||
"ERC6909Claims transferFrom with approval": "59939", | ||
"ERC6909Claims transferFrom with infinite approval": "56770" | ||
"ERC6909Claims approve": "46468", | ||
"ERC6909Claims burn": "29404", | ||
"ERC6909Claims mint": "46779", | ||
"ERC6909Claims transfer": "52010", | ||
"ERC6909Claims transferFrom as operator": "54615", | ||
"ERC6909Claims transferFrom with approval": "60137", | ||
"ERC6909Claims transferFrom with infinite approval": "56951" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"sparse external sload": "2164" | ||
"sparse external sload": "2051" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"add liquidity to already existing position with salt": "144401", | ||
"create new liquidity to a position with salt": "292593" | ||
"add liquidity to already existing position with salt": "146620", | ||
"create new liquidity to a position with salt": "294812" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
{ | ||
"addLiquidity with empty hook": "274012", | ||
"addLiquidity with native token": "135001", | ||
"donate gas with 1 token": "106214", | ||
"donate gas with 2 tokens": "145510", | ||
"erc20 collect protocol fees": "57500", | ||
"addLiquidity with empty hook": "276767", | ||
"addLiquidity with native token": "137147", | ||
"donate gas with 1 token": "107761", | ||
"donate gas with 2 tokens": "147192", | ||
"erc20 collect protocol fees": "57572", | ||
"native collect protocol fees": "59643", | ||
"poolManager bytecode size": "24009", | ||
"removeLiquidity with empty hook": "130613", | ||
"removeLiquidity with native token": "112523", | ||
"simple addLiquidity": "161276", | ||
"simple addLiquidity second addition same range": "98731", | ||
"simple removeLiquidity": "85099", | ||
"simple removeLiquidity some liquidity remains": "92986", | ||
"simple swap": "123144", | ||
"simple swap with native": "108434", | ||
"swap against liquidity": "116527", | ||
"swap against liquidity with native token": "105569", | ||
"swap burn 6909 for input": "129285", | ||
"swap burn native 6909 for input": "118672", | ||
"swap mint native output as 6909": "139620", | ||
"swap mint output as 6909": "154985", | ||
"swap with hooks": "132165" | ||
"removeLiquidity with empty hook": "133378", | ||
"removeLiquidity with native token": "114112", | ||
"simple addLiquidity": "162479", | ||
"simple addLiquidity second addition same range": "99934", | ||
"simple removeLiquidity": "86182", | ||
"simple removeLiquidity some liquidity remains": "94069", | ||
"simple swap": "124307", | ||
"simple swap with native": "109435", | ||
"swap against liquidity": "118370", | ||
"swap against liquidity with native token": "107379", | ||
"swap burn 6909 for input": "130941", | ||
"swap burn native 6909 for input": "120409", | ||
"swap mint native output as 6909": "141471", | ||
"swap mint output as 6909": "156740", | ||
"swap with hooks": "134556" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"set protocol fee": "31730" | ||
"set protocol fee": "32395" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"swap skips hook call if hook is caller": "206030" | ||
"swap skips hook call if hook is caller": "209529" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"getAmount0Delta_gasCostForAmount0WhereRoundUpIsFalse": "243", | ||
"getAmount0Delta_gasCostForAmount0WhereRoundUpIsTrue": "360", | ||
"getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse": "229", | ||
"getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue": "264", | ||
"getNextSqrtPriceFromInput_zeroForOneEqualsFalseGas": "316", | ||
"getNextSqrtPriceFromInput_zeroForOneEqualsTrueGas": "539", | ||
"getNextSqrtPriceFromOutput_zeroForOneEqualsFalseGas": "544", | ||
"getNextSqrtPriceFromOutput_zeroForOneEqualsTrueGas": "214" | ||
"getAmount0Delta_gasCostForAmount0WhereRoundUpIsFalse": "345", | ||
"getAmount0Delta_gasCostForAmount0WhereRoundUpIsTrue": "481", | ||
"getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse": "281", | ||
"getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue": "282", | ||
"getNextSqrtPriceFromInput_zeroForOneEqualsFalseGas": "411", | ||
"getNextSqrtPriceFromInput_zeroForOneEqualsTrueGas": "602", | ||
"getNextSqrtPriceFromOutput_zeroForOneEqualsFalseGas": "650", | ||
"getNextSqrtPriceFromOutput_zeroForOneEqualsTrueGas": "285" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"SwapMath_oneForZero_exactInCapped": "1188", | ||
"SwapMath_oneForZero_exactInPartial": "1274", | ||
"SwapMath_oneForZero_exactOutCapped": "1001", | ||
"SwapMath_oneForZero_exactOutPartial": "1565", | ||
"SwapMath_zeroForOne_exactInCapped": "1126", | ||
"SwapMath_zeroForOne_exactInPartial": "1439", | ||
"SwapMath_zeroForOne_exactOutCapped": "919", | ||
"SwapMath_zeroForOne_exactOutPartial": "1133" | ||
"SwapMath_oneForZero_exactInCapped": "1499", | ||
"SwapMath_oneForZero_exactInPartial": "1635", | ||
"SwapMath_oneForZero_exactOutCapped": "1255", | ||
"SwapMath_oneForZero_exactOutPartial": "1961", | ||
"SwapMath_zeroForOne_exactInCapped": "1590", | ||
"SwapMath_zeroForOne_exactInPartial": "1916", | ||
"SwapMath_zeroForOne_exactOutCapped": "1346", | ||
"SwapMath_zeroForOne_exactOutPartial": "1686" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"getReserves": "3973" | ||
"getReserves": "3891" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"BitMathLeastSignificantBitMaxUint128": "648", | ||
"BitMathLeastSignificantBitMaxUint256": "648", | ||
"BitMathLeastSignificantBitSmallNumber": "25", | ||
"BitMathMostSignificantBitMaxUint128": "648", | ||
"BitMathMostSignificantBitMaxUint256": "648", | ||
"BitMathMostSignificantBitSmallNumber": "14" | ||
"BitMathLeastSignificantBitMaxUint128": "718", | ||
"BitMathLeastSignificantBitMaxUint256": "712", | ||
"BitMathLeastSignificantBitSmallNumber": "99", | ||
"BitMathMostSignificantBitMaxUint128": "757", | ||
"BitMathMostSignificantBitMaxUint256": "751", | ||
"BitMathMostSignificantBitSmallNumber": "138" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"NoDelegateCall": "51" | ||
"NoDelegateCall": "41" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"swap with dynamic fee": "139153", | ||
"update dynamic fee in before swap": "147743" | ||
"swap with dynamic fee": "140996", | ||
"update dynamic fee in before swap": "150033" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"swap with return dynamic fee": "145475" | ||
"swap with return dynamic fee": "147636" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"flipTick_flippingATickThatResultsInDeletingAWord": "5109", | ||
"flipTick_flippingFirstTickInWordToInitialized": "22209", | ||
"flipTick_flippingSecondTickInWordToInitialized": "5178", | ||
"nextInitializedTickWithinOneWord_lteFalse_forEntireWord": "2263", | ||
"nextInitializedTickWithinOneWord_lteFalse_justBelowBoundary": "2252", | ||
"nextInitializedTickWithinOneWord_lteFalse_onBoundary": "2281", | ||
"nextInitializedTickWithinOneWord_lteTrue_forEntireWord": "2258", | ||
"nextInitializedTickWithinOneWord_lteTrue_justBelowBoundary": "2242", | ||
"nextInitializedTickWithinOneWord_lteTrue_onBoundary_gas": "2287" | ||
"flipTick_flippingATickThatResultsInDeletingAWord": "5168", | ||
"flipTick_flippingFirstTickInWordToInitialized": "22268", | ||
"flipTick_flippingSecondTickInWordToInitialized": "5280", | ||
"nextInitializedTickWithinOneWord_lteFalse_forEntireWord": "2436", | ||
"nextInitializedTickWithinOneWord_lteFalse_justBelowBoundary": "2436", | ||
"nextInitializedTickWithinOneWord_lteFalse_onBoundary": "2436", | ||
"nextInitializedTickWithinOneWord_lteTrue_forEntireWord": "2441", | ||
"nextInitializedTickWithinOneWord_lteTrue_justBelowBoundary": "2632", | ||
"nextInitializedTickWithinOneWord_lteTrue_onBoundary_gas": "2441" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"TickMathGetSqrtPriceAtTick": "72349", | ||
"TickMathGetTickAtSqrtPrice": "195022" | ||
"TickMathGetSqrtPriceAtTick": "74639", | ||
"TickMathGetTickAtSqrtPrice": "211308" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"tickSpacingToMaxLiquidityPerTick_gasCost60TickSpacing": "25", | ||
"tickSpacingToMaxLiquidityPerTick_gasCostMaxTickSpacing": "25", | ||
"tickSpacingToMaxLiquidityPerTick_gasCostMinTickSpacing": "25" | ||
"tickSpacingToMaxLiquidityPerTick_gasCost60TickSpacing": "65", | ||
"tickSpacingToMaxLiquidityPerTick_gasCostMaxTickSpacing": "73", | ||
"tickSpacingToMaxLiquidityPerTick_gasCostMinTickSpacing": "65" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why cant you do it as it was before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's somewhat of a problem. But we can probably also migrate periphery to use briefcase instead of v4 directly?
If we deploy the pool manager using the
new
keyword instead of assembly, then the tests run against a version of the pool that is compiled without IR, so the bytecode of the pool manager will be different.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does
new
not use ir @gretzke ? Didn't know thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of the compilation restriction we set up (
{ paths = "**/test/**", via_ir = false }
). It means that all test files are compiled without IR. If a contract is imported to be deployed using thenew
keyword, it means that this contract is also compiled without IR for the scope of this test and thus tests run against a version compiled without IR. Which is fine in itself but if we want to run tests against the bytecode that will be deployed later on chain we need to avoid importing the contract directly and instead load the bytecode from the file that was compiled with IR.