damm-sdk 1.1.15 → 1.1.16-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -20
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +17 -20
- package/dist/index.js.map +4 -4
- package/dist/integrations/uniswapV4/uniswap.v4.d.ts +7 -7
- package/dist/integrations/uniswapV4/uniswap.v4.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/integrations/uniswapV4/uniswap.v4.ts +19 -17
- package/src/lib/addresses.ts +1 -1
- package/src/lib/contractsRegistry.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -62595,14 +62595,14 @@ var contractsRegistry_default = {
|
|
|
62595
62595
|
poolManager: "0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32",
|
|
62596
62596
|
stateView: "0x76Fd297e2D437cd7f76d50F01AfE6160f86e9990",
|
|
62597
62597
|
zodiacVerifiers: {
|
|
62598
|
-
positionMintVerifier: "
|
|
62599
|
-
takeAllVerifier: "
|
|
62600
|
-
settleAllVerifier: "
|
|
62601
|
-
|
|
62602
|
-
|
|
62603
|
-
takePairVerifier: "
|
|
62604
|
-
decreaseLiquidityVerifier: "
|
|
62605
|
-
settlePairVerifier: "
|
|
62598
|
+
positionMintVerifier: "0x9c3d528cC48492e97771E0C174930E74c78E61a1",
|
|
62599
|
+
takeAllVerifier: "0x6F91CdCD931e91eddDfF41407229caa23AB520ab",
|
|
62600
|
+
settleAllVerifier: "0x67CCF88e4Ca67086a89Ce2cAAf714e9005192671",
|
|
62601
|
+
swapExactInSingleVerifier: "0x871fD89d843bD14b0Ef8C20Ca5684B933098277B",
|
|
62602
|
+
sweepVerifier: "0x17B3fE1B3Ae776f3D17dc6Dbf974A99a87426a9F",
|
|
62603
|
+
takePairVerifier: "0x5a4952354C8B25dDf7d062ee25196823d18e2D56",
|
|
62604
|
+
decreaseLiquidityVerifier: "0x286f4d5D3D081cABD672D667c5121D06f6Ed8e7c",
|
|
62605
|
+
settlePairVerifier: "0xfC1EF0665962826d463780490FC8B8631d492072"
|
|
62606
62606
|
}
|
|
62607
62607
|
},
|
|
62608
62608
|
gnosisSafe: {
|
|
@@ -62798,7 +62798,7 @@ var chainIdToName = {
|
|
|
62798
62798
|
function getAddressOrThrow(chainId, key2) {
|
|
62799
62799
|
const chainName = chainIdToName[chainId];
|
|
62800
62800
|
if (!chainName) {
|
|
62801
|
-
throw new Error(`DAMM-sdk:Unsupported chainId: ${chainId}`);
|
|
62801
|
+
throw new Error(`DAMM-sdk: Unsupported chainId: ${chainId}`);
|
|
62802
62802
|
}
|
|
62803
62803
|
let current = contractsRegistry_default[chainName];
|
|
62804
62804
|
if (!current) {
|
|
@@ -77365,7 +77365,7 @@ var SwapExactInputSingleCalldataV4 = ({
|
|
|
77365
77365
|
return swapRouterInterface2.encodeFunctionData("execute", [commands, inputs, deadline]);
|
|
77366
77366
|
};
|
|
77367
77367
|
function addMintPositionV4(planner, { pool, tickLower, tickUpper, liquidity, recipient, amount0Max, amount1Max, hookData = "0x" }) {
|
|
77368
|
-
planner.addAction(Actions2.MINT_POSITION, [
|
|
77368
|
+
return planner.addAction(Actions2.MINT_POSITION, [
|
|
77369
77369
|
pool.poolKey,
|
|
77370
77370
|
tickLower.toString(),
|
|
77371
77371
|
tickUpper.toString(),
|
|
@@ -77377,9 +77377,7 @@ function addMintPositionV4(planner, { pool, tickLower, tickUpper, liquidity, rec
|
|
|
77377
77377
|
]);
|
|
77378
77378
|
}
|
|
77379
77379
|
function addSettlePairV4(planner, pool, safeAddress) {
|
|
77380
|
-
planner.addAction(Actions2.SETTLE_PAIR, [toAddress(pool.currency0), toAddress(pool.currency1)]);
|
|
77381
|
-
planner.addAction(Actions2.SWEEP, [toAddress(pool.currency0), safeAddress]);
|
|
77382
|
-
planner.addAction(Actions2.SWEEP, [toAddress(pool.currency1), safeAddress]);
|
|
77380
|
+
return planner.addAction(Actions2.SETTLE_PAIR, [toAddress(pool.currency0), toAddress(pool.currency1)]).addAction(Actions2.SWEEP, [toAddress(pool.currency0), safeAddress]).addAction(Actions2.SWEEP, [toAddress(pool.currency1), safeAddress]);
|
|
77383
77381
|
}
|
|
77384
77382
|
function finalizeActionsV4(planner, deadline, positionManagerAddress, value) {
|
|
77385
77383
|
return {
|
|
@@ -77390,7 +77388,7 @@ function finalizeActionsV4(planner, deadline, positionManagerAddress, value) {
|
|
|
77390
77388
|
};
|
|
77391
77389
|
}
|
|
77392
77390
|
function addIncreaseLiquidityV4(planner, { tokenId, liquidity, amount0Max, amount1Max, hookData = "0x" }) {
|
|
77393
|
-
planner.addAction(Actions2.INCREASE_LIQUIDITY, [
|
|
77391
|
+
return planner.addAction(Actions2.INCREASE_LIQUIDITY, [
|
|
77394
77392
|
tokenId.toString(),
|
|
77395
77393
|
liquidity.toString(),
|
|
77396
77394
|
toHex3(amount0Max),
|
|
@@ -77399,7 +77397,7 @@ function addIncreaseLiquidityV4(planner, { tokenId, liquidity, amount0Max, amoun
|
|
|
77399
77397
|
]);
|
|
77400
77398
|
}
|
|
77401
77399
|
function addDecreaseLiquidityV4(planner, { tokenId, liquidity, amount0Min, amount1Min, hookData = "0x" }) {
|
|
77402
|
-
planner.addAction(Actions2.DECREASE_LIQUIDITY, [
|
|
77400
|
+
return planner.addAction(Actions2.DECREASE_LIQUIDITY, [
|
|
77403
77401
|
tokenId.toString(),
|
|
77404
77402
|
liquidity.toString(),
|
|
77405
77403
|
toHex3(amount0Min),
|
|
@@ -77408,14 +77406,13 @@ function addDecreaseLiquidityV4(planner, { tokenId, liquidity, amount0Min, amoun
|
|
|
77408
77406
|
]);
|
|
77409
77407
|
}
|
|
77410
77408
|
function addTakePairV4(planner, pool, recipient) {
|
|
77411
|
-
planner.addAction(Actions2.TAKE_PAIR, [toAddress(pool.currency0), toAddress(pool.currency1), recipient]);
|
|
77409
|
+
return planner.addAction(Actions2.TAKE_PAIR, [toAddress(pool.currency0), toAddress(pool.currency1), recipient]);
|
|
77412
77410
|
}
|
|
77413
77411
|
function addCloseCurrencyV4(planner, pool) {
|
|
77414
|
-
planner.addAction(Actions2.CLOSE_CURRENCY, [toAddress(pool.currency1)]);
|
|
77415
|
-
planner.addAction(Actions2.CLOSE_CURRENCY, [toAddress(pool.currency0)]);
|
|
77412
|
+
return planner.addAction(Actions2.CLOSE_CURRENCY, [toAddress(pool.currency1)]).addAction(Actions2.CLOSE_CURRENCY, [toAddress(pool.currency0)]);
|
|
77416
77413
|
}
|
|
77417
77414
|
function addCollectFeesV4(planner, { tokenId, hookData = "0x" }) {
|
|
77418
|
-
addDecreaseLiquidityV4(planner, {
|
|
77415
|
+
return addDecreaseLiquidityV4(planner, {
|
|
77419
77416
|
tokenId,
|
|
77420
77417
|
liquidity: import_jsbi6.default.BigInt(0),
|
|
77421
77418
|
amount0Min: import_jsbi6.default.BigInt(0),
|
|
@@ -81645,4 +81642,4 @@ var simulateOrThrow = async (env) => {
|
|
|
81645
81642
|
};
|
|
81646
81643
|
};
|
|
81647
81644
|
|
|
81648
|
-
//# debugId=
|
|
81645
|
+
//# debugId=57AD413C82EF39F164756E2164756E21
|