damm-sdk 1.4.37 → 1.4.39
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 +1191 -45
- package/dist/index.cjs.map +8 -8
- package/dist/index.js +1191 -45
- package/dist/index.js.map +8 -8
- package/dist/integrations/lagoonV2/lagoon.v2.permissions.d.ts +30 -10
- package/dist/integrations/lagoonV2/lagoon.v2.permissions.d.ts.map +1 -1
- package/dist/integrations/lagoonV2/vault.abi.d.ts +2 -2
- package/dist/integrations/morphoBlue/morpho.blue.d.ts +21 -1
- package/dist/integrations/morphoBlue/morpho.blue.d.ts.map +1 -1
- package/dist/integrations/pendle/pendle.d.ts +13 -24
- package/dist/integrations/pendle/pendle.d.ts.map +1 -1
- package/dist/integrations/pendle/pendle.router.abi.d.ts +3653 -3
- package/dist/integrations/pendle/pendle.router.abi.d.ts.map +1 -1
- package/dist/integrations/pendle/pendle.router.encoders.d.ts +384 -0
- package/dist/integrations/pendle/pendle.router.encoders.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/integrations/lagoonV2/lagoon.v2.permissions.ts +62 -10
- package/src/integrations/lagoonV2/vault.abi.ts +2 -2
- package/src/integrations/morphoBlue/morpho.blue.ts +44 -1
- package/src/integrations/pendle/pendle.router.abi.ts +796 -3
- package/src/integrations/pendle/pendle.router.encoders.ts +977 -0
- package/src/integrations/pendle/pendle.ts +13 -78
- package/src/lib/contractsRegistry.json +32 -2
|
@@ -1,78 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export type PendleRedeemRewardsArgs = Readonly<{
|
|
15
|
-
user: Address;
|
|
16
|
-
sys: Address[];
|
|
17
|
-
yts: Address[];
|
|
18
|
-
markets: Address[];
|
|
19
|
-
}>;
|
|
20
|
-
|
|
21
|
-
export const pendleRedeemRewardsCalldata = ({ user, sys, yts, markets }: PendleRedeemRewardsArgs): HexString => {
|
|
22
|
-
return routerInterface.encodeFunctionData("redeemDueInterestAndRewards", [user, sys, yts, markets]) as HexString;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const pendleRedeemRewardsTrx = ({
|
|
26
|
-
args,
|
|
27
|
-
routerAddress,
|
|
28
|
-
}: {
|
|
29
|
-
args: PendleRedeemRewardsArgs;
|
|
30
|
-
routerAddress: Address;
|
|
31
|
-
}): Unwrapable<Call> => {
|
|
32
|
-
return createCall({
|
|
33
|
-
to: routerAddress,
|
|
34
|
-
data: pendleRedeemRewardsCalldata(args),
|
|
35
|
-
operation: 0,
|
|
36
|
-
value: 0n,
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// =============================================================================
|
|
41
|
-
// Off-chain: MerkleDistributor claim
|
|
42
|
-
// =============================================================================
|
|
43
|
-
|
|
44
|
-
export type PendleMerkleClaimArgs = Readonly<{
|
|
45
|
-
receiver: Address;
|
|
46
|
-
tokens: Address[];
|
|
47
|
-
totalAccrueds: bigint[];
|
|
48
|
-
proofs: HexString[][];
|
|
49
|
-
}>;
|
|
50
|
-
|
|
51
|
-
export const pendleMerkleClaimCalldata = ({
|
|
52
|
-
receiver,
|
|
53
|
-
tokens,
|
|
54
|
-
totalAccrueds,
|
|
55
|
-
proofs,
|
|
56
|
-
}: PendleMerkleClaimArgs): HexString => {
|
|
57
|
-
return merkleDistributorInterface.encodeFunctionData("claim", [
|
|
58
|
-
receiver,
|
|
59
|
-
tokens,
|
|
60
|
-
totalAccrueds,
|
|
61
|
-
proofs,
|
|
62
|
-
]) as HexString;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const pendleMerkleClaimTrx = ({
|
|
66
|
-
args,
|
|
67
|
-
distributorAddress,
|
|
68
|
-
}: {
|
|
69
|
-
args: PendleMerkleClaimArgs;
|
|
70
|
-
distributorAddress: Address;
|
|
71
|
-
}): Unwrapable<Call> => {
|
|
72
|
-
return createCall({
|
|
73
|
-
to: distributorAddress,
|
|
74
|
-
data: pendleMerkleClaimCalldata(args),
|
|
75
|
-
operation: 0,
|
|
76
|
-
value: 0n,
|
|
77
|
-
});
|
|
78
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Pendle encoders — re-export shim.
|
|
3
|
+
*
|
|
4
|
+
* All logic lives in `./pendle.router.encoders`. This file exists for backward
|
|
5
|
+
* compatibility: existing callers that import from `./pendle` (or from the
|
|
6
|
+
* package index which re-exports `./pendle`) continue to work unchanged.
|
|
7
|
+
*
|
|
8
|
+
* History:
|
|
9
|
+
* - Originally contained ethers v5 encoders for redeemDueInterestAndRewards + merkle claim.
|
|
10
|
+
* - Refactored [DeFi-Kit#275]: migrated to viem, all router encoders consolidated into
|
|
11
|
+
* `pendle.router.encoders.ts`. Behaviour is unchanged; only the encoding library changed.
|
|
12
|
+
*/
|
|
13
|
+
export * from "./pendle.router.encoders";
|
|
@@ -636,9 +636,22 @@
|
|
|
636
636
|
"withdrawManager": "0x14dd163386553b23267c097dbde868559b9bcbd2"
|
|
637
637
|
},
|
|
638
638
|
"pendle": {
|
|
639
|
-
"routerV4": "
|
|
639
|
+
"routerV4": "0x888888888889758F76e7103c6CbF23ABbF58F946",
|
|
640
|
+
"routerV4ActionSwapPTV3": "0xd8D200d9A713A1c71cF1e7F694B14E5F1D948b15",
|
|
641
|
+
"routerV4ActionSwapYTV3": "0x4a03Ce0a268951d04E187B1CF48075eE69266e27",
|
|
642
|
+
"routerV4ActionAddRemoveLiqV3": "0x663C21103915B68e9dA797CfdF3cAb01a037D5Ff",
|
|
643
|
+
"routerV4ActionMiscV3": "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
|
|
640
644
|
"routerV4ActionMisc": "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
|
|
641
|
-
"
|
|
645
|
+
"limitRouter": "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
|
|
646
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
647
|
+
"merkleDistributor": "0x33305665f69B4642D1275f4Ce81c23651674D21C",
|
|
648
|
+
"markets": {
|
|
649
|
+
"usdat": "0x9aFe7a057A09cF5da748d952078C9C99938b4329",
|
|
650
|
+
"usdatPT": "0x1D69402390657308C91179aa184bF992908c1e08",
|
|
651
|
+
"usdatSY": "0x7a7dE491e1BE5287874904e2b7c8488249A4D0a9",
|
|
652
|
+
"usdatYT": "0x076A3ea71e83Ca09319B161E40F5FB3BB943d3C6",
|
|
653
|
+
"usdatUnderlying": "0x23238f20b894f29041f48D88eE91131C395Aaa71"
|
|
654
|
+
}
|
|
642
655
|
}
|
|
643
656
|
},
|
|
644
657
|
"unichain": {
|
|
@@ -974,6 +987,23 @@
|
|
|
974
987
|
},
|
|
975
988
|
"enso": {
|
|
976
989
|
"routerV2": "0xCfBAa9Cfce952Ca4F4069874fF1Df8c05e37a3c7"
|
|
990
|
+
},
|
|
991
|
+
"pendle": {
|
|
992
|
+
"routerV4": "0x888888888889758F76e7103c6CbF23ABbF58F946",
|
|
993
|
+
"routerV4ActionSwapPTV3": "0xbb0Dd79794e58795b08b599297ec55a6Afb6AB58",
|
|
994
|
+
"routerV4ActionSwapYTV3": "0x171B480B1A2ebc1acE52e46E0Bd73e7E08413ec2",
|
|
995
|
+
"routerV4ActionAddRemoveLiqV3": "0x2fb6d0753602Bf397fcE38Ec8Ee3a811cA07B3FD",
|
|
996
|
+
"routerV4ActionMiscV3": "0xac1700293346b0bEFC71bCB7E14Bf1c38a5c2a97",
|
|
997
|
+
"limitRouter": "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
|
|
998
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
999
|
+
"merkleDistributor": "0x33305665f69B4642D1275f4Ce81c23651674D21C",
|
|
1000
|
+
"markets": {
|
|
1001
|
+
"ausd": "0x6f99CF00ee7290aE78a072Bb6910eF72D1129fE7",
|
|
1002
|
+
"ausdPT": "0x9FC74f8Ed616B5BaF52a170caa97d6d3898602d1",
|
|
1003
|
+
"ausdSY": "0xBA3d60f5000f472aef947FB8020a3E6319F9a0B7",
|
|
1004
|
+
"ausdYT": "0xEdDeE9C0B56248d70A9BFdD103f8bD97C35DfD89",
|
|
1005
|
+
"ausdUnderlying": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a"
|
|
1006
|
+
}
|
|
977
1007
|
}
|
|
978
1008
|
},
|
|
979
1009
|
"plasma": {
|