damm-sdk 1.4.0 → 1.4.1
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 +49025 -41335
- package/dist/index.cjs.map +121 -58
- package/dist/index.js +2955 -2428
- package/dist/index.js.map +22 -17
- package/dist/integrations/fluidLite/fluid-lite.abi.d.ts +69 -0
- package/dist/integrations/fluidLite/fluid-lite.abi.d.ts.map +1 -0
- package/dist/integrations/fluidLite/fluid-lite.d.ts +42 -0
- package/dist/integrations/fluidLite/fluid-lite.d.ts.map +1 -0
- package/dist/integrations/fluidLite/index.d.ts +3 -0
- package/dist/integrations/fluidLite/index.d.ts.map +1 -0
- package/dist/integrations/index.d.ts +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/integrations/fluidLite/fluid-lite.abi.ts +38 -0
- package/src/integrations/fluidLite/fluid-lite.ts +104 -0
- package/src/integrations/fluidLite/index.ts +2 -0
- package/src/integrations/index.ts +1 -1
- package/src/lib/contractsRegistry.json +14 -3
- package/dist/integrations/pendle/index.d.ts +0 -4
- package/dist/integrations/pendle/index.d.ts.map +0 -1
- package/dist/integrations/pendle/pendle.d.ts +0 -25
- package/dist/integrations/pendle/pendle.d.ts.map +0 -1
- package/dist/integrations/pendle/pendle.merkle-distributor.abi.d.ts +0 -53
- package/dist/integrations/pendle/pendle.merkle-distributor.abi.d.ts.map +0 -1
- package/dist/integrations/pendle/pendle.router.abi.d.ts +0 -31
- package/dist/integrations/pendle/pendle.router.abi.d.ts.map +0 -1
- package/src/integrations/pendle/index.ts +0 -3
- package/src/integrations/pendle/pendle.merkle-distributor.abi.ts +0 -30
- package/src/integrations/pendle/pendle.router.abi.ts +0 -20
- package/src/integrations/pendle/pendle.ts +0 -78
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal ERC-4626 ABI for Fluid Lite iETHv2 vault.
|
|
3
|
+
* Only includes deposit, withdraw, and redeem functions.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: readonly [{
|
|
6
|
+
readonly inputs: readonly [{
|
|
7
|
+
readonly internalType: "uint256";
|
|
8
|
+
readonly name: "assets";
|
|
9
|
+
readonly type: "uint256";
|
|
10
|
+
}, {
|
|
11
|
+
readonly internalType: "address";
|
|
12
|
+
readonly name: "receiver";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}];
|
|
15
|
+
readonly name: "deposit";
|
|
16
|
+
readonly outputs: readonly [{
|
|
17
|
+
readonly internalType: "uint256";
|
|
18
|
+
readonly name: "shares";
|
|
19
|
+
readonly type: "uint256";
|
|
20
|
+
}];
|
|
21
|
+
readonly stateMutability: "nonpayable";
|
|
22
|
+
readonly type: "function";
|
|
23
|
+
}, {
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly internalType: "uint256";
|
|
26
|
+
readonly name: "assets";
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}, {
|
|
29
|
+
readonly internalType: "address";
|
|
30
|
+
readonly name: "receiver";
|
|
31
|
+
readonly type: "address";
|
|
32
|
+
}, {
|
|
33
|
+
readonly internalType: "address";
|
|
34
|
+
readonly name: "owner";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
}];
|
|
37
|
+
readonly name: "withdraw";
|
|
38
|
+
readonly outputs: readonly [{
|
|
39
|
+
readonly internalType: "uint256";
|
|
40
|
+
readonly name: "shares";
|
|
41
|
+
readonly type: "uint256";
|
|
42
|
+
}];
|
|
43
|
+
readonly stateMutability: "nonpayable";
|
|
44
|
+
readonly type: "function";
|
|
45
|
+
}, {
|
|
46
|
+
readonly inputs: readonly [{
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
readonly name: "shares";
|
|
49
|
+
readonly type: "uint256";
|
|
50
|
+
}, {
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
readonly name: "receiver";
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
}, {
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
readonly name: "owner";
|
|
57
|
+
readonly type: "address";
|
|
58
|
+
}];
|
|
59
|
+
readonly name: "redeem";
|
|
60
|
+
readonly outputs: readonly [{
|
|
61
|
+
readonly internalType: "uint256";
|
|
62
|
+
readonly name: "assets";
|
|
63
|
+
readonly type: "uint256";
|
|
64
|
+
}];
|
|
65
|
+
readonly stateMutability: "nonpayable";
|
|
66
|
+
readonly type: "function";
|
|
67
|
+
}];
|
|
68
|
+
export default _default;
|
|
69
|
+
//# sourceMappingURL=fluid-lite.abi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluid-lite.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/fluidLite/fluid-lite.abi.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAiCW"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluid Lite iETHv2 vault encoder.
|
|
3
|
+
*
|
|
4
|
+
* ERC-4626 compliant vault for stETH on mainnet.
|
|
5
|
+
* deposit(assets, receiver) — deposit stETH, receive vault shares.
|
|
6
|
+
* redeem(shares, receiver, owner) — redeem shares for stETH.
|
|
7
|
+
* withdraw(assets, receiver, owner) — withdraw exact stETH amount.
|
|
8
|
+
*
|
|
9
|
+
* Receiver and owner must always be the Safe address (avatar).
|
|
10
|
+
*/
|
|
11
|
+
import type { Address } from "viem";
|
|
12
|
+
import type { HexString, Unwrapable, Call } from "../../types";
|
|
13
|
+
export type DepositFluidLiteArgs = Readonly<{
|
|
14
|
+
assets: bigint;
|
|
15
|
+
receiver: Address;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const DepositFluidLiteCalldata: ({ assets, receiver }: DepositFluidLiteArgs) => HexString;
|
|
18
|
+
export declare const depositFluidLiteTrx: ({ args, vault, }: {
|
|
19
|
+
args: DepositFluidLiteArgs;
|
|
20
|
+
vault: Address;
|
|
21
|
+
}) => Unwrapable<Call>;
|
|
22
|
+
export type RedeemFluidLiteArgs = Readonly<{
|
|
23
|
+
shares: bigint;
|
|
24
|
+
receiver: Address;
|
|
25
|
+
owner: Address;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const RedeemFluidLiteCalldata: ({ shares, receiver, owner }: RedeemFluidLiteArgs) => HexString;
|
|
28
|
+
export declare const redeemFluidLiteTrx: ({ args, vault, }: {
|
|
29
|
+
args: RedeemFluidLiteArgs;
|
|
30
|
+
vault: Address;
|
|
31
|
+
}) => Unwrapable<Call>;
|
|
32
|
+
export type WithdrawFluidLiteArgs = Readonly<{
|
|
33
|
+
assets: bigint;
|
|
34
|
+
receiver: Address;
|
|
35
|
+
owner: Address;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const WithdrawFluidLiteCalldata: ({ assets, receiver, owner }: WithdrawFluidLiteArgs) => HexString;
|
|
38
|
+
export declare const withdrawFluidLiteTrx: ({ args, vault, }: {
|
|
39
|
+
args: WithdrawFluidLiteArgs;
|
|
40
|
+
vault: Address;
|
|
41
|
+
}) => Unwrapable<Call>;
|
|
42
|
+
//# sourceMappingURL=fluid-lite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluid-lite.d.ts","sourceRoot":"","sources":["../../../src/integrations/fluidLite/fluid-lite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAS/D,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,wBAAwB,yBAA0B,oBAAoB,KAAG,SAErF,CAAC;AAEF,eAAO,MAAM,mBAAmB;UAItB,oBAAoB;WACnB,OAAO;MACd,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB,gCAAiC,mBAAmB,KAAG,SAE1F,CAAC;AAEF,eAAO,MAAM,kBAAkB;UAIrB,mBAAmB;WAClB,OAAO;MACd,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,yBAAyB,gCAAiC,qBAAqB,KAAG,SAE9F,CAAC;AAEF,eAAO,MAAM,oBAAoB;UAIvB,qBAAqB;WACpB,OAAO;MACd,WAAW,IAAI,CAOlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/fluidLite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal ERC-4626 ABI for Fluid Lite iETHv2 vault.
|
|
3
|
+
* Only includes deposit, withdraw, and redeem functions.
|
|
4
|
+
*/
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
inputs: [
|
|
8
|
+
{ internalType: "uint256", name: "assets", type: "uint256" },
|
|
9
|
+
{ internalType: "address", name: "receiver", type: "address" },
|
|
10
|
+
],
|
|
11
|
+
name: "deposit",
|
|
12
|
+
outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
|
|
13
|
+
stateMutability: "nonpayable",
|
|
14
|
+
type: "function",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
inputs: [
|
|
18
|
+
{ internalType: "uint256", name: "assets", type: "uint256" },
|
|
19
|
+
{ internalType: "address", name: "receiver", type: "address" },
|
|
20
|
+
{ internalType: "address", name: "owner", type: "address" },
|
|
21
|
+
],
|
|
22
|
+
name: "withdraw",
|
|
23
|
+
outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
|
|
24
|
+
stateMutability: "nonpayable",
|
|
25
|
+
type: "function",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
inputs: [
|
|
29
|
+
{ internalType: "uint256", name: "shares", type: "uint256" },
|
|
30
|
+
{ internalType: "address", name: "receiver", type: "address" },
|
|
31
|
+
{ internalType: "address", name: "owner", type: "address" },
|
|
32
|
+
],
|
|
33
|
+
name: "redeem",
|
|
34
|
+
outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
|
|
35
|
+
stateMutability: "nonpayable",
|
|
36
|
+
type: "function",
|
|
37
|
+
},
|
|
38
|
+
] as const;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluid Lite iETHv2 vault encoder.
|
|
3
|
+
*
|
|
4
|
+
* ERC-4626 compliant vault for stETH on mainnet.
|
|
5
|
+
* deposit(assets, receiver) — deposit stETH, receive vault shares.
|
|
6
|
+
* redeem(shares, receiver, owner) — redeem shares for stETH.
|
|
7
|
+
* withdraw(assets, receiver, owner) — withdraw exact stETH amount.
|
|
8
|
+
*
|
|
9
|
+
* Receiver and owner must always be the Safe address (avatar).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { ethers } from "ethers";
|
|
13
|
+
import FluidLiteAbi from "./fluid-lite.abi";
|
|
14
|
+
import type { Address } from "viem";
|
|
15
|
+
import type { HexString, Unwrapable, Call } from "../../types";
|
|
16
|
+
import { createCall } from "../../types";
|
|
17
|
+
|
|
18
|
+
const fluidLiteInterface = new ethers.utils.Interface(FluidLiteAbi);
|
|
19
|
+
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Deposit (ERC4626)
|
|
22
|
+
// ============================================================================
|
|
23
|
+
|
|
24
|
+
export type DepositFluidLiteArgs = Readonly<{
|
|
25
|
+
assets: bigint;
|
|
26
|
+
receiver: Address;
|
|
27
|
+
}>;
|
|
28
|
+
|
|
29
|
+
export const DepositFluidLiteCalldata = ({ assets, receiver }: DepositFluidLiteArgs): HexString => {
|
|
30
|
+
return fluidLiteInterface.encodeFunctionData("deposit", [assets, receiver]) as HexString;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const depositFluidLiteTrx = ({
|
|
34
|
+
args,
|
|
35
|
+
vault,
|
|
36
|
+
}: {
|
|
37
|
+
args: DepositFluidLiteArgs;
|
|
38
|
+
vault: Address;
|
|
39
|
+
}): Unwrapable<Call> => {
|
|
40
|
+
return createCall({
|
|
41
|
+
operation: 0,
|
|
42
|
+
to: vault,
|
|
43
|
+
value: 0n,
|
|
44
|
+
data: DepositFluidLiteCalldata(args),
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Redeem (ERC4626) - Shares-based withdrawal
|
|
50
|
+
// ============================================================================
|
|
51
|
+
|
|
52
|
+
export type RedeemFluidLiteArgs = Readonly<{
|
|
53
|
+
shares: bigint;
|
|
54
|
+
receiver: Address;
|
|
55
|
+
owner: Address;
|
|
56
|
+
}>;
|
|
57
|
+
|
|
58
|
+
export const RedeemFluidLiteCalldata = ({ shares, receiver, owner }: RedeemFluidLiteArgs): HexString => {
|
|
59
|
+
return fluidLiteInterface.encodeFunctionData("redeem", [shares, receiver, owner]) as HexString;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const redeemFluidLiteTrx = ({
|
|
63
|
+
args,
|
|
64
|
+
vault,
|
|
65
|
+
}: {
|
|
66
|
+
args: RedeemFluidLiteArgs;
|
|
67
|
+
vault: Address;
|
|
68
|
+
}): Unwrapable<Call> => {
|
|
69
|
+
return createCall({
|
|
70
|
+
operation: 0,
|
|
71
|
+
to: vault,
|
|
72
|
+
value: 0n,
|
|
73
|
+
data: RedeemFluidLiteCalldata(args),
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// ============================================================================
|
|
78
|
+
// Withdraw (ERC4626) - Assets-based withdrawal
|
|
79
|
+
// ============================================================================
|
|
80
|
+
|
|
81
|
+
export type WithdrawFluidLiteArgs = Readonly<{
|
|
82
|
+
assets: bigint;
|
|
83
|
+
receiver: Address;
|
|
84
|
+
owner: Address;
|
|
85
|
+
}>;
|
|
86
|
+
|
|
87
|
+
export const WithdrawFluidLiteCalldata = ({ assets, receiver, owner }: WithdrawFluidLiteArgs): HexString => {
|
|
88
|
+
return fluidLiteInterface.encodeFunctionData("withdraw", [assets, receiver, owner]) as HexString;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const withdrawFluidLiteTrx = ({
|
|
92
|
+
args,
|
|
93
|
+
vault,
|
|
94
|
+
}: {
|
|
95
|
+
args: WithdrawFluidLiteArgs;
|
|
96
|
+
vault: Address;
|
|
97
|
+
}): Unwrapable<Call> => {
|
|
98
|
+
return createCall({
|
|
99
|
+
operation: 0,
|
|
100
|
+
to: vault,
|
|
101
|
+
value: 0n,
|
|
102
|
+
data: WithdrawFluidLiteCalldata(args),
|
|
103
|
+
});
|
|
104
|
+
};
|
|
@@ -502,7 +502,8 @@
|
|
|
502
502
|
"cvx": "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B",
|
|
503
503
|
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
504
504
|
"ausd": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
|
|
505
|
-
"pendle": "0x808507121B80c02388FAd14726482e061B8da827"
|
|
505
|
+
"pendle": "0x808507121B80c02388FAd14726482e061B8da827",
|
|
506
|
+
"usdg": "0xe343167631d89B6Ffc58B88d6b7fB0228795491D"
|
|
506
507
|
},
|
|
507
508
|
"morpho": {
|
|
508
509
|
"morphoBlue": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
|
|
@@ -585,6 +586,11 @@
|
|
|
585
586
|
},
|
|
586
587
|
"iporFusion": {
|
|
587
588
|
"vault": "0x604117f0c94561231060f56cd2ddd16245d434c5"
|
|
589
|
+
},
|
|
590
|
+
"pendle": {
|
|
591
|
+
"routerV4": "0x888888888889758f76e7103c6cbf23abbf58f946",
|
|
592
|
+
"routerV4ActionMisc": "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
|
|
593
|
+
"merkleDistributor": "0x33305665f69b4642d1275f4ce81c23651674d21c"
|
|
588
594
|
}
|
|
589
595
|
},
|
|
590
596
|
"unichain": {
|
|
@@ -676,10 +682,15 @@
|
|
|
676
682
|
"tokens": {
|
|
677
683
|
"ausd": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
|
|
678
684
|
"usdc": "0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9",
|
|
679
|
-
"
|
|
685
|
+
"usdt0": "0x779ded0c9e1022225f8e0630b35a9b54be713736",
|
|
680
686
|
"usde": "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
|
|
681
687
|
"cmeth": "0xe6829d9a7ee3040e1276fa75293bde931859e8fa"
|
|
682
688
|
},
|
|
689
|
+
"OFTAdapters": {
|
|
690
|
+
"0x779ded0c9e1022225f8e0630b35a9b54be713736": "0xcb768e263fb1c62214e7cab4aa8d036d76dc59cc",
|
|
691
|
+
"0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34": "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34"
|
|
692
|
+
},
|
|
693
|
+
"multicall3": "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
683
694
|
"lagoonV0_4": {
|
|
684
695
|
"factory": "0x57D969B556C6AebB3Ac8f54c98CF3a3f921d5659",
|
|
685
696
|
"registry": "0x47A144e67834408716cB40Fa87fc886D63362ddC",
|
|
@@ -933,7 +944,7 @@
|
|
|
933
944
|
},
|
|
934
945
|
"wrappedNativeToken": "0x6100E367285b01F48D07953803A2d8dCA5D19873",
|
|
935
946
|
"iporFusion": {
|
|
936
|
-
"vault": "
|
|
947
|
+
"vault": "0x0A71624ab3E8101f78D95DFc81E0F1f31128Ed7A"
|
|
937
948
|
}
|
|
938
949
|
}
|
|
939
950
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/pendle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACxF,cAAc,UAAU,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type Call, type Unwrapable, type HexString } from "../../types";
|
|
3
|
-
export type PendleRedeemRewardsArgs = Readonly<{
|
|
4
|
-
user: Address;
|
|
5
|
-
sys: Address[];
|
|
6
|
-
yts: Address[];
|
|
7
|
-
markets: Address[];
|
|
8
|
-
}>;
|
|
9
|
-
export declare const pendleRedeemRewardsCalldata: ({ user, sys, yts, markets }: PendleRedeemRewardsArgs) => HexString;
|
|
10
|
-
export declare const pendleRedeemRewardsTrx: ({ args, routerAddress, }: {
|
|
11
|
-
args: PendleRedeemRewardsArgs;
|
|
12
|
-
routerAddress: Address;
|
|
13
|
-
}) => Unwrapable<Call>;
|
|
14
|
-
export type PendleMerkleClaimArgs = Readonly<{
|
|
15
|
-
receiver: Address;
|
|
16
|
-
tokens: Address[];
|
|
17
|
-
totalAccrueds: bigint[];
|
|
18
|
-
proofs: HexString[][];
|
|
19
|
-
}>;
|
|
20
|
-
export declare const pendleMerkleClaimCalldata: ({ receiver, tokens, totalAccrueds, proofs, }: PendleMerkleClaimArgs) => HexString;
|
|
21
|
-
export declare const pendleMerkleClaimTrx: ({ args, distributorAddress, }: {
|
|
22
|
-
args: PendleMerkleClaimArgs;
|
|
23
|
-
distributorAddress: Address;
|
|
24
|
-
}) => Unwrapable<Call>;
|
|
25
|
-
//# sourceMappingURL=pendle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pendle.d.ts","sourceRoot":"","sources":["../../../src/integrations/pendle/pendle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,UAAU,EAAc,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAYrF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,OAAO,EAAE,OAAO,EAAE,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,2BAA2B,gCAAiC,uBAAuB,KAAG,SAElG,CAAC;AAEF,eAAO,MAAM,sBAAsB;UAIzB,uBAAuB;mBACd,OAAO;MACtB,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IACzC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,eAAO,MAAM,yBAAyB,iDAKnC,qBAAqB,KAAG,SAO1B,CAAC;AAEF,eAAO,MAAM,oBAAoB;UAIvB,qBAAqB;wBACP,OAAO;MAC3B,WAAW,IAAI,CAOlB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pendle MultiToken Merkle Distributor ABI.
|
|
3
|
-
*
|
|
4
|
-
* Used for claiming off-chain merkle rewards (PENDLE incentives, partner tokens).
|
|
5
|
-
* Only includes claim() and claimed() — the two functions needed for reward claiming.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: readonly [{
|
|
8
|
-
readonly inputs: readonly [{
|
|
9
|
-
readonly internalType: "address";
|
|
10
|
-
readonly name: "receiver";
|
|
11
|
-
readonly type: "address";
|
|
12
|
-
}, {
|
|
13
|
-
readonly internalType: "address[]";
|
|
14
|
-
readonly name: "tokens";
|
|
15
|
-
readonly type: "address[]";
|
|
16
|
-
}, {
|
|
17
|
-
readonly internalType: "uint256[]";
|
|
18
|
-
readonly name: "totalAccrueds";
|
|
19
|
-
readonly type: "uint256[]";
|
|
20
|
-
}, {
|
|
21
|
-
readonly internalType: "bytes32[][]";
|
|
22
|
-
readonly name: "proofs";
|
|
23
|
-
readonly type: "bytes32[][]";
|
|
24
|
-
}];
|
|
25
|
-
readonly name: "claim";
|
|
26
|
-
readonly outputs: readonly [{
|
|
27
|
-
readonly internalType: "uint256[]";
|
|
28
|
-
readonly name: "amountOuts";
|
|
29
|
-
readonly type: "uint256[]";
|
|
30
|
-
}];
|
|
31
|
-
readonly stateMutability: "nonpayable";
|
|
32
|
-
readonly type: "function";
|
|
33
|
-
}, {
|
|
34
|
-
readonly inputs: readonly [{
|
|
35
|
-
readonly internalType: "address";
|
|
36
|
-
readonly name: "token";
|
|
37
|
-
readonly type: "address";
|
|
38
|
-
}, {
|
|
39
|
-
readonly internalType: "address";
|
|
40
|
-
readonly name: "user";
|
|
41
|
-
readonly type: "address";
|
|
42
|
-
}];
|
|
43
|
-
readonly name: "claimed";
|
|
44
|
-
readonly outputs: readonly [{
|
|
45
|
-
readonly internalType: "uint256";
|
|
46
|
-
readonly name: "";
|
|
47
|
-
readonly type: "uint256";
|
|
48
|
-
}];
|
|
49
|
-
readonly stateMutability: "view";
|
|
50
|
-
readonly type: "function";
|
|
51
|
-
}];
|
|
52
|
-
export default _default;
|
|
53
|
-
//# sourceMappingURL=pendle.merkle-distributor.abi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pendle.merkle-distributor.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/pendle/pendle.merkle-distributor.abi.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAuBW"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pendle Router V4 ABI (ActionMiscV3 facet — V1 reward claiming only).
|
|
3
|
-
*
|
|
4
|
-
* We only include redeemDueInterestAndRewards (V1) — not V2 which adds
|
|
5
|
-
* swap parameters we don't want to permit.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: readonly [{
|
|
8
|
-
readonly inputs: readonly [{
|
|
9
|
-
readonly internalType: "address";
|
|
10
|
-
readonly name: "user";
|
|
11
|
-
readonly type: "address";
|
|
12
|
-
}, {
|
|
13
|
-
readonly internalType: "address[]";
|
|
14
|
-
readonly name: "sys";
|
|
15
|
-
readonly type: "address[]";
|
|
16
|
-
}, {
|
|
17
|
-
readonly internalType: "address[]";
|
|
18
|
-
readonly name: "yts";
|
|
19
|
-
readonly type: "address[]";
|
|
20
|
-
}, {
|
|
21
|
-
readonly internalType: "address[]";
|
|
22
|
-
readonly name: "markets";
|
|
23
|
-
readonly type: "address[]";
|
|
24
|
-
}];
|
|
25
|
-
readonly name: "redeemDueInterestAndRewards";
|
|
26
|
-
readonly outputs: readonly [];
|
|
27
|
-
readonly stateMutability: "nonpayable";
|
|
28
|
-
readonly type: "function";
|
|
29
|
-
}];
|
|
30
|
-
export default _default;
|
|
31
|
-
//# sourceMappingURL=pendle.router.abi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pendle.router.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/pendle/pendle.router.abi.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAaW"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pendle MultiToken Merkle Distributor ABI.
|
|
3
|
-
*
|
|
4
|
-
* Used for claiming off-chain merkle rewards (PENDLE incentives, partner tokens).
|
|
5
|
-
* Only includes claim() and claimed() — the two functions needed for reward claiming.
|
|
6
|
-
*/
|
|
7
|
-
export default [
|
|
8
|
-
{
|
|
9
|
-
inputs: [
|
|
10
|
-
{ internalType: "address", name: "receiver", type: "address" },
|
|
11
|
-
{ internalType: "address[]", name: "tokens", type: "address[]" },
|
|
12
|
-
{ internalType: "uint256[]", name: "totalAccrueds", type: "uint256[]" },
|
|
13
|
-
{ internalType: "bytes32[][]", name: "proofs", type: "bytes32[][]" },
|
|
14
|
-
],
|
|
15
|
-
name: "claim",
|
|
16
|
-
outputs: [{ internalType: "uint256[]", name: "amountOuts", type: "uint256[]" }],
|
|
17
|
-
stateMutability: "nonpayable",
|
|
18
|
-
type: "function",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
inputs: [
|
|
22
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
23
|
-
{ internalType: "address", name: "user", type: "address" },
|
|
24
|
-
],
|
|
25
|
-
name: "claimed",
|
|
26
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
27
|
-
stateMutability: "view",
|
|
28
|
-
type: "function",
|
|
29
|
-
},
|
|
30
|
-
] as const;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pendle Router V4 ABI (ActionMiscV3 facet — V1 reward claiming only).
|
|
3
|
-
*
|
|
4
|
-
* We only include redeemDueInterestAndRewards (V1) — not V2 which adds
|
|
5
|
-
* swap parameters we don't want to permit.
|
|
6
|
-
*/
|
|
7
|
-
export default [
|
|
8
|
-
{
|
|
9
|
-
inputs: [
|
|
10
|
-
{ internalType: "address", name: "user", type: "address" },
|
|
11
|
-
{ internalType: "address[]", name: "sys", type: "address[]" },
|
|
12
|
-
{ internalType: "address[]", name: "yts", type: "address[]" },
|
|
13
|
-
{ internalType: "address[]", name: "markets", type: "address[]" },
|
|
14
|
-
],
|
|
15
|
-
name: "redeemDueInterestAndRewards",
|
|
16
|
-
outputs: [],
|
|
17
|
-
stateMutability: "nonpayable",
|
|
18
|
-
type: "function",
|
|
19
|
-
},
|
|
20
|
-
] as const;
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
};
|