damm-sdk 1.4.38 → 1.4.40

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.
@@ -1,78 +1,13 @@
1
- import { type Address } from "viem";
2
- import { type Call, type Unwrapable, createCall, type HexString } from "../../types";
3
- import pendleRouterAbi from "./pendle.router.abi.ts";
4
- import pendleMerkleDistributorAbi from "./pendle.merkle-distributor.abi.ts";
5
- import { ethers } from "ethers";
6
-
7
- const routerInterface = new ethers.utils.Interface(pendleRouterAbi);
8
- const merkleDistributorInterface = new ethers.utils.Interface(pendleMerkleDistributorAbi);
9
-
10
- // =============================================================================
11
- // On-chain: redeemDueInterestAndRewards (V1)
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";
@@ -46,9 +46,9 @@
46
46
  }
47
47
  },
48
48
  "zodiac": {
49
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
49
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
50
50
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
51
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
51
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
52
52
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
53
53
  },
54
54
  "multicall3": "0xcA11bde05977b3631167028862bE2a173976CA11",
@@ -151,9 +151,9 @@
151
151
  "positionManager": "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1"
152
152
  },
153
153
  "zodiac": {
154
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
154
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
155
155
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
156
- "delayModule": "0xd54895B1121A2eE3f37b502F507631FA1331BED6",
156
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
157
157
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
158
158
  },
159
159
  "slipstream": {
@@ -254,9 +254,9 @@
254
254
  "ausd": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a"
255
255
  },
256
256
  "zodiac": {
257
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
257
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
258
258
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
259
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
259
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
260
260
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
261
261
  },
262
262
  "1inch": {
@@ -321,9 +321,9 @@
321
321
  "weeth": "0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A"
322
322
  },
323
323
  "zodiac": {
324
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
324
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
325
325
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
326
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
326
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
327
327
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
328
328
  },
329
329
  "1inch": {
@@ -390,10 +390,10 @@
390
390
  }
391
391
  },
392
392
  "zodiac": {
393
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
393
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
394
394
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
395
395
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD",
396
- "delayModule": "0xd54895B1121A2eE3f37b502F507631FA1331BED6"
396
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01"
397
397
  },
398
398
  "enso": {
399
399
  "routerV2": "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"
@@ -626,9 +626,9 @@
626
626
  "l1StandardBridgeBase": "0x3154Cf16ccdb4C6d922629664174b904d80F2C35"
627
627
  },
628
628
  "zodiac": {
629
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
629
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
630
630
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
631
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
631
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
632
632
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
633
633
  },
634
634
  "iporFusion": {
@@ -636,9 +636,22 @@
636
636
  "withdrawManager": "0x14dd163386553b23267c097dbde868559b9bcbd2"
637
637
  },
638
638
  "pendle": {
639
- "routerV4": "0x888888888889758f76e7103c6cbf23abbf58f946",
639
+ "routerV4": "0x888888888889758F76e7103c6CbF23ABbF58F946",
640
+ "routerV4ActionSwapPTV3": "0xd8D200d9A713A1c71cF1e7F694B14E5F1D948b15",
641
+ "routerV4ActionSwapYTV3": "0x4a03Ce0a268951d04E187B1CF48075eE69266e27",
642
+ "routerV4ActionAddRemoveLiqV3": "0x663C21103915B68e9dA797CfdF3cAb01a037D5Ff",
643
+ "routerV4ActionMiscV3": "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
640
644
  "routerV4ActionMisc": "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
641
- "merkleDistributor": "0x33305665f69b4642d1275f4ce81c23651674d21c"
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": {
@@ -665,9 +678,9 @@
665
678
  "weeth": "0x7DCC39B4d1C53CB31e1aBc0e358b43987FEF80f7"
666
679
  },
667
680
  "zodiac": {
668
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
681
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
669
682
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
670
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
683
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
671
684
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
672
685
  },
673
686
  "gnosisSafe": {
@@ -725,9 +738,9 @@
725
738
  "pool": "0xCFa5aE7c2CE8Fadc6426C1ff872cA45378Fb7cF3"
726
739
  },
727
740
  "zodiac": {
728
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
741
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
729
742
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
730
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
743
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
731
744
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
732
745
  },
733
746
  "tokens": {
@@ -787,9 +800,9 @@
787
800
  "router": "0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6"
788
801
  },
789
802
  "zodiac": {
790
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
803
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
791
804
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
792
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
805
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
793
806
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
794
807
  },
795
808
  "morpho": {
@@ -835,9 +848,9 @@
835
848
  "positionManager": "0x5bE4DAa6982C69aD20A57F1e68cBcA3D37de6207"
836
849
  },
837
850
  "zodiac": {
838
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
851
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
839
852
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
840
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
853
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
841
854
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
842
855
  },
843
856
  "gnosisSafe": {
@@ -874,9 +887,9 @@
874
887
  "positionManager": "0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A"
875
888
  },
876
889
  "zodiac": {
877
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
890
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
878
891
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
879
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
892
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
880
893
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
881
894
  },
882
895
  "gnosisSafe": {
@@ -939,7 +952,7 @@
939
952
  }
940
953
  },
941
954
  "zodiac": {
942
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
955
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
943
956
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
944
957
  "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
945
958
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
@@ -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": {
@@ -981,9 +1011,9 @@
981
1011
  "pool": "0x925a2A7214Ed92428B5b1B090F80b25700095e12"
982
1012
  },
983
1013
  "zodiac": {
984
- "rolesModule": "0x9646fDAD06d3e24444381f44362a3B0eB343D337",
1014
+ "rolesModule": "0xF2964CE6161ce0e75964Fe7927cE114cb0B283D5",
985
1015
  "moduleProxyFactory": "0x000000000000aDdB49795b0f9bA5BC298cDda236",
986
- "delayModule": "0x01F8cabB808D7dE0dF4202D4B60C8310d2f1339b",
1016
+ "delayModule": "0x824175b945838d127C1ca83CbcE11D8e44F6dF01",
987
1017
  "multisendUnwrapper": "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
988
1018
  },
989
1019
  "gnosisSafe": {