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

Add salt to modifyLiquidity params #608

Merged
merged 22 commits into from
May 9, 2024
Merged

Add salt to modifyLiquidity params #608

merged 22 commits into from
May 9, 2024

Conversation

snreynolds
Copy link
Member

Related Issue

Which issue does this pull request resolve?

Description of changes

@snreynolds
Copy link
Member Author

To see the gas diff with lastCallGas use-lastCallGas...salt

Copy link

github-actions bot commented Apr 24, 2024

Forge code coverage:

File % Lines % Statements % Branches % Funcs
src/ERC6909.sol 91.30% (21/23) 85.71% (24/28) 100.00% (4/4) 85.71% (6/7)
src/ERC6909Claims.sol 100.00% (6/6) 100.00% (8/8) 100.00% (4/4) 100.00% (1/1)
src/Extsload.sol 0.00% (0/3) 0.00% (0/4) 100.00% (0/0) 0.00% (0/2)
src/NoDelegateCall.sol 100.00% (3/3) 100.00% (5/5) 100.00% (2/2) 100.00% (3/3)
src/PoolManager.sol 93.98% (78/83) 92.37% (109/118) 96.67% (29/30) 82.14% (23/28)
src/ProtocolFees.sol 100.00% (20/20) 97.06% (33/34) 91.67% (11/12) 100.00% (6/6)
src/libraries/BitMath.sol 100.00% (47/47) 100.00% (57/57) 100.00% (36/36) 100.00% (2/2)
src/libraries/CurrencyDelta.sol 100.00% (4/4) 100.00% (6/6) 100.00% (0/0) 100.00% (3/3)
src/libraries/CurrencySettleTake.sol 100.00% (8/8) 100.00% (7/7) 50.00% (2/4) 100.00% (2/2)
src/libraries/FullMath.sol 100.00% (29/29) 100.00% (33/33) 100.00% (8/8) 100.00% (2/2)
src/libraries/Hooks.sol 100.00% (42/42) 98.72% (77/78) 96.67% (29/30) 100.00% (15/15)
src/libraries/LPFeeLibrary.sol 100.00% (5/5) 100.00% (9/9) 100.00% (4/4) 100.00% (3/3)
src/libraries/LiquidityMath.sol 100.00% (2/2) 100.00% (1/1) 100.00% (1/1) 100.00% (1/1)
src/libraries/Lock.sol 100.00% (4/4) 100.00% (4/4) 100.00% (0/0) 100.00% (3/3)
src/libraries/NonZeroDeltaCount.sol 100.00% (6/6) 100.00% (6/6) 100.00% (0/0) 100.00% (3/3)
src/libraries/Pool.sol 99.35% (153/154) 98.19% (163/166) 94.44% (85/90) 100.00% (13/13)
src/libraries/PoolGetters.sol 100.00% (3/3) 100.00% (3/3) 100.00% (0/0) 100.00% (3/3)
src/libraries/Position.sol 100.00% (14/14) 100.00% (16/16) 100.00% (6/6) 100.00% (2/2)
src/libraries/ProtocolFeeLibrary.sol 100.00% (10/10) 100.00% (18/18) 100.00% (4/4) 100.00% (4/4)
src/libraries/Reserves.sol 100.00% (8/8) 100.00% (13/13) 100.00% (6/6) 100.00% (3/3)
src/libraries/SafeCast.sol 100.00% (8/8) 100.00% (14/14) 100.00% (8/8) 100.00% (4/4)
src/libraries/SqrtPriceMath.sol 100.00% (32/32) 98.48% (65/66) 83.33% (20/24) 100.00% (8/8)
src/libraries/SwapMath.sol 100.00% (23/23) 100.00% (30/30) 100.00% (12/12) 100.00% (1/1)
src/libraries/TickBitmap.sol 100.00% (19/19) 100.00% (34/34) 100.00% (6/6) 100.00% (3/3)
src/libraries/TickMath.sol 97.87% (92/94) 97.30% (144/148) 97.83% (45/46) 50.00% (2/4)
src/libraries/UnsafeMath.sol 100.00% (1/1) 100.00% (1/1) 100.00% (0/0) 100.00% (1/1)
src/types/BalanceDelta.sol 100.00% (2/2) 100.00% (2/2) 100.00% (0/0) 100.00% (2/2)
src/types/Currency.sol 100.00% (15/15) 91.67% (22/24) 80.00% (8/10) 100.00% (6/6)
src/types/PoolId.sol 100.00% (1/1) 100.00% (1/1) 100.00% (0/0) 100.00% (1/1)
Total 80.97% (1153/1424) 80.36% (1563/1945) 60.24% (456/757) 72.25% (250/346)

Copy link
Collaborator

@saucepoint saucepoint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes make sense! just some feedback around improving tests

generally: would replace assertGt with assertEq

test/ModifyLiquidity.t.sol Outdated Show resolved Hide resolved
test/ModifyLiquidity.t.sol Outdated Show resolved Hide resolved
test/ModifyLiquidity.t.sol Outdated Show resolved Hide resolved
test/ModifyLiquidity.t.sol Show resolved Hide resolved
test/ModifyLiquidity.t.sol Show resolved Hide resolved
test/PoolManager.t.sol Outdated Show resolved Hide resolved
@hensha256 hensha256 linked an issue May 8, 2024 that may be closed by this pull request
Copy link
Contributor

@shuhuiluo shuhuiluo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

saucepoint
saucepoint previously approved these changes May 9, 2024
Copy link
Collaborator

@saucepoint saucepoint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

Copy link
Contributor

@hensha256 hensha256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits but looking great!

src/libraries/Position.sol Outdated Show resolved Hide resolved
test/PoolManager.t.sol Outdated Show resolved Hide resolved
test/libraries/Position.t.sol Outdated Show resolved Hide resolved
test/ModifyLiquidity.t.sol Outdated Show resolved Hide resolved
test/ModifyLiquidity.t.sol Outdated Show resolved Hide resolved
@snreynolds snreynolds merged commit 241e025 into main May 9, 2024
6 checks passed
@snreynolds snreynolds deleted the add-salt branch May 9, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore adding a salt parameter to position
4 participants