Skip to content

Commit

Permalink
merge main and change test
Browse files Browse the repository at this point in the history
  • Loading branch information
dianakocsis committed Oct 29, 2024
2 parents 1bb5367 + 825b20a commit 7477a20
Show file tree
Hide file tree
Showing 94 changed files with 900 additions and 193 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129854
129642
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131905
131705
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124110
123910
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124252
124052
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_empty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50446
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 @@
50446
50481
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125584
125659
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125031
125141
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132446
132521
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131893
132004
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
146294
146388
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154872
154966
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154872
154966
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withTakePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
154193
154331
Original file line number Diff line number Diff line change
@@ -1 +1 @@
111980
112056
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119753
119847
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119074
119212
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_burnEmpty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
135243
135318
Original file line number Diff line number Diff line change
@@ -1 +1 @@
128380
128456
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132440
132534
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 @@
120329
120467
Original file line number Diff line number Diff line change
@@ -1 +1 @@
159057
159127
Original file line number Diff line number Diff line change
@@ -1 +1 @@
157997
158079
Original file line number Diff line number Diff line change
@@ -1 +1 @@
140872
140942
Original file line number Diff line number Diff line change
@@ -1 +1 @@
136359
136403
Original file line number Diff line number Diff line change
@@ -1 +1 @@
177364
177458
Original file line number Diff line number Diff line change
@@ -1 +1 @@
148040
148084
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
364745
364815
Original file line number Diff line number Diff line change
@@ -1 +1 @@
373268
373334
Original file line number Diff line number Diff line change
@@ -1 +1 @@
372491
372569
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickLower.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
317617
317687
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickUpper.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
318287
318357
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
243856
243926
Original file line number Diff line number Diff line change
@@ -1 +1 @@
419060
419134
Original file line number Diff line number Diff line change
@@ -1 +1 @@
323648
323718
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
420170
420240
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_withSettlePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
419228
419310
Original file line number Diff line number Diff line change
@@ -1 +1 @@
455975
456088
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_permit_twice.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
44852
44876
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_subscribe.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
84348
88168
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_unsubscribe.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59238
63080
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_Bytecode.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7148
7063
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115722
115753
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
116043
116070
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_oneForZero.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124861
124888
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn1Hop_zeroForOne.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
130584
130611
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn2Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
185439
185452
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn2Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
170577
170594
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn3Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
240297
240296
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactIn3Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
225435
225438
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactInputSingle.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129854
129642
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactInputSingle_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
114992
114784
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactInputSingle_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115282
115069
Original file line number Diff line number Diff line change
@@ -1 +1 @@
121985
122016
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut1Hop_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
117107
117134
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut1Hop_oneForZero.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
125925
125952
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut1Hop_zeroForOne.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129870
129897
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut2Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
183787
183800
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut2Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
175902
175919
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
237735
237734
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops_nativeIn.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
229850
229853
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOut3Hops_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
217090
217089
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOutputSingle.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129140
128925
Original file line number Diff line number Diff line change
@@ -1 +1 @@
121255
121044
2 changes: 1 addition & 1 deletion .forge-snapshots/V4Router_ExactOutputSingle_nativeOut.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
116452
116236
2 changes: 1 addition & 1 deletion .forge-snapshots/positionDescriptor bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
31144
31514
4 changes: 3 additions & 1 deletion script/DeployPosm.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {PositionManager} from "../src/PositionManager.sol";
import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol";
import {IPositionDescriptor} from "../src/interfaces/IPositionDescriptor.sol";
import {PositionDescriptor} from "../src/PositionDescriptor.sol";
import {IWETH9} from "../src/interfaces/external/IWETH9.sol";

contract DeployPosmTest is Script {
function setUp() public {}
Expand All @@ -30,7 +31,8 @@ contract DeployPosmTest is Script {
IPoolManager(poolManager),
IAllowanceTransfer(permit2),
unsubscribeGasLimit,
IPositionDescriptor(address(positionDescriptor))
IPositionDescriptor(address(positionDescriptor)),
IWETH9(wrappedNative)
);
console2.log("PositionManager", address(posm));

Expand Down
10 changes: 5 additions & 5 deletions src/PositionDescriptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {IPositionDescriptor} from "./interfaces/IPositionDescriptor.sol";
import {PositionInfo, PositionInfoLibrary} from "./libraries/PositionInfoLibrary.sol";
import {Descriptor} from "./libraries/Descriptor.sol";
import {AddressRatioSortOrder} from "./libraries/AddressRatioSortOrder.sol";
import {SafeERC20Metadata} from "./libraries/SafeERC20Metadata.sol";
import {SafeAddressMetadata} from "./libraries/SafeAddressMetadata.sol";

/// @title Describes NFT token positions
/// @notice Produces a string containing the data URI for a JSON metadata string
Expand Down Expand Up @@ -71,10 +71,10 @@ contract PositionDescriptor is IPositionDescriptor {
tokenId: tokenId,
quoteAddress: quoteAddress,
baseAddress: baseAddress,
quoteAddressSymbol: SafeERC20Metadata.addressSymbol(quoteAddress, nativeAddressLabel),
baseAddressSymbol: SafeERC20Metadata.addressSymbol(baseAddress, nativeAddressLabel),
quoteAddressDecimals: SafeERC20Metadata.addressDecimals(quoteAddress),
baseAddressDecimals: SafeERC20Metadata.addressDecimals(baseAddress),
quoteAddressSymbol: SafeAddressMetadata.addressSymbol(quoteAddress, nativeAddressLabel),
baseAddressSymbol: SafeAddressMetadata.addressSymbol(baseAddress, nativeAddressLabel),
quoteAddressDecimals: SafeAddressMetadata.addressDecimals(quoteAddress),
baseAddressDecimals: SafeAddressMetadata.addressDecimals(baseAddress),
flipRatio: _flipRatio,
tickLower: positionInfo.tickLower(),
tickUpper: positionInfo.tickUpper(),
Expand Down
Loading

0 comments on commit 7477a20

Please sign in to comment.