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

Position descriptor #353

Merged
merged 53 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2434576
position descriptor stuff
dianakocsis Aug 20, 2024
c423b33
messy checkpoint
snreynolds Aug 28, 2024
e497389
update subscribers
snreynolds Aug 28, 2024
830fdf5
stack too deep, permit error
snreynolds Aug 28, 2024
8eb66b3
use packed, no via-ir, but stack too deep concerning for tests
snreynolds Aug 29, 2024
7e8fc42
use external
snreynolds Aug 29, 2024
f94823f
review comments
snreynolds Aug 29, 2024
a77fb26
merge confs
snreynolds Aug 29, 2024
547c893
clear lower 8 bits on unsubscribe
snreynolds Aug 29, 2024
e695f43
move _pay, minimize diff
snreynolds Aug 29, 2024
df58a26
pr comments
snreynolds Aug 29, 2024
d6d1353
fix: test_fuzz_erc721Permit_SignatureDeadlineExpired
snreynolds Aug 29, 2024
7fd6b5b
naming
snreynolds Aug 29, 2024
84cc704
fix
snreynolds Aug 29, 2024
ec4ebdd
natspec
snreynolds Aug 29, 2024
5a88042
fix: stack too deep in tests
snreynolds Aug 29, 2024
fe1d709
remove console
snreynolds Aug 29, 2024
31a22de
merge main
snreynolds Aug 29, 2024
ca37b8c
move PositionConfig to shared testing infra
snreynolds Aug 29, 2024
ec14729
remove pool key checker lib
snreynolds Aug 29, 2024
21ae901
pr commmeeennnnttsss
snreynolds Aug 29, 2024
b29c5fe
fmt
snreynolds Aug 29, 2024
a2bc1b2
Merge branch 'main' into position-descriptor
dianakocsis Sep 3, 2024
e6315a3
pass in pd to posm
dianakocsis Sep 4, 2024
e7eb9f0
descriptooooor
dianakocsis Sep 18, 2024
69208ec
new files
dianakocsis Sep 18, 2024
e6dfb70
commentsss
dianakocsis Sep 18, 2024
9b723c3
Merge branch 'main' into position-descriptor
dianakocsis Sep 18, 2024
7d69f53
format
dianakocsis Sep 18, 2024
0ba4e38
fix comment
dianakocsis Sep 18, 2024
2b518bf
warnings
dianakocsis Sep 19, 2024
04b719a
more fixes
dianakocsis Sep 19, 2024
7e110cc
priority
dianakocsis Sep 19, 2024
924d12e
update core to fix snapshots
dianakocsis Sep 19, 2024
a6af3b7
re-add files
dianakocsis Sep 19, 2024
69af352
deploy script
dianakocsis Sep 20, 2024
04b458e
does this work
dianakocsis Sep 20, 2024
9ff5137
format
dianakocsis Sep 20, 2024
8506989
merge main
dianakocsis Sep 23, 2024
4542c59
pass in string directly
dianakocsis Sep 23, 2024
d0b81fe
remove extra check
dianakocsis Sep 23, 2024
4d53d2a
comments, selector, and reference
dianakocsis Sep 24, 2024
e4ccd57
Merge branch 'main' into position-descriptor
dianakocsis Sep 24, 2024
a4892e3
some changes
dianakocsis Sep 26, 2024
c08ccd9
more fixes
dianakocsis Sep 26, 2024
40904b0
format
dianakocsis Sep 26, 2024
8a6033e
more review changes
dianakocsis Oct 1, 2024
6ff9887
add safeerc20metadata file
dianakocsis Oct 1, 2024
8ea6b67
updates
dianakocsis Oct 2, 2024
072102f
format
dianakocsis Oct 2, 2024
bd90cee
currency name plus more tests
dianakocsis Oct 4, 2024
f72f195
invalid token id
dianakocsis Oct 7, 2024
c10da46
re-add comments
dianakocsis Oct 7, 2024
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/PositionManager_burn_empty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50413
50481
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 @@
50413
50481
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125551
125609
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124998
125056
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132404
132462
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131851
131909
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
146253
146326
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154819
154892
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154819
154892
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withTakePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154140
154213
Original file line number Diff line number Diff line change
@@ -1 +1 @@
111948
112006
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119700
119773
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119021
119094
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_burnEmpty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
135200
135259
Original file line number Diff line number Diff line change
@@ -1 +1 @@
128348
128406
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132387
132460
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 @@
120276
120349
Original file line number Diff line number Diff line change
@@ -1 +1 @@
159004
159077
Original file line number Diff line number Diff line change
@@ -1 +1 @@
157944
158017
Original file line number Diff line number Diff line change
@@ -1 +1 @@
140831
140904
Original file line number Diff line number Diff line change
@@ -1 +1 @@
136318
136403
Original file line number Diff line number Diff line change
@@ -1 +1 @@
177311
177384
Original file line number Diff line number Diff line change
@@ -1 +1 @@
147987
148060
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
364704
364765
Original file line number Diff line number Diff line change
@@ -1 +1 @@
373227
373288
Original file line number Diff line number Diff line change
@@ -1 +1 @@
372450
372511
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickLower.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
317552
317613
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickUpper.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
318222
318283
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
243791
243852
Original file line number Diff line number Diff line change
@@ -1 +1 @@
418983
419032
Original file line number Diff line number Diff line change
@@ -1 +1 @@
323583
323644
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
420105
420166
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_withSettlePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
419163
419224
Original file line number Diff line number Diff line change
@@ -1 +1 @@
464277
464348
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_permit.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
79076
79064
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_unsubscribe.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59238
59260
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn2Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
179724
185439
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn3Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
228843
240297
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
219720
225435
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut2Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
179842
183787
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
229821
237735
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
225905
229850
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
221027
217090
24 changes: 24 additions & 0 deletions script/DeployPositionDescriptor.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import "forge-std/console2.sol";
import "forge-std/Script.sol";

import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
import {PositionDescriptor} from "../src/PositionDescriptor.sol";

contract DeployPositionDescriptorTest is Script {
dianakocsis marked this conversation as resolved.
Show resolved Hide resolved
function setUp() public {}

function run(address poolManager, address weth, bytes32 nativeCurrencyLabel)
public
returns (PositionDescriptor positionDescriptor)
{
vm.startBroadcast();

positionDescriptor = new PositionDescriptor(IPoolManager(poolManager), weth, nativeCurrencyLabel);
console2.log("PositionDescriptor", address(positionDescriptor));

vm.stopBroadcast();
}
}
8 changes: 6 additions & 2 deletions script/DeployPosm.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
import {StateView} from "../src/lens/StateView.sol";
import {PositionManager} from "../src/PositionManager.sol";
import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol";
import {IPositionDescriptor} from "../src/interfaces/IPositionDescriptor.sol";

contract DeployPosmTest is Script {
function setUp() public {}

function run(address poolManager, address permit2, uint256 unsubscribeGasLimit)
function run(address poolManager, address permit2, uint256 unsubscribeGasLimit, address positionDescriptor)
public
returns (PositionManager posm)
{
vm.startBroadcast();

posm = new PositionManager{salt: hex"03"}(
IPoolManager(poolManager), IAllowanceTransfer(permit2), unsubscribeGasLimit
IPoolManager(poolManager),
IAllowanceTransfer(permit2),
unsubscribeGasLimit,
IPositionDescriptor(positionDescriptor)
);
console2.log("PositionManager", address(posm));

Expand Down
Loading
Loading