damm-sdk 1.3.83 → 1.4.0
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 +23795 -31485
- package/dist/index.cjs.map +58 -121
- package/dist/index.js +40053 -44702
- package/dist/index.js.map +69 -110
- package/dist/integrations/index.d.ts +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/pendle/index.d.ts +4 -0
- package/dist/integrations/pendle/index.d.ts.map +1 -0
- package/dist/integrations/pendle/pendle.d.ts +25 -0
- package/dist/integrations/pendle/pendle.d.ts.map +1 -0
- package/dist/integrations/pendle/pendle.merkle-distributor.abi.d.ts +53 -0
- package/dist/integrations/pendle/pendle.merkle-distributor.abi.d.ts.map +1 -0
- package/dist/integrations/pendle/pendle.router.abi.d.ts +31 -0
- package/dist/integrations/pendle/pendle.router.abi.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/integrations/index.ts +1 -1
- package/src/integrations/pendle/index.ts +3 -0
- package/src/integrations/pendle/pendle.merkle-distributor.abi.ts +30 -0
- package/src/integrations/pendle/pendle.router.abi.ts +20 -0
- package/src/integrations/pendle/pendle.ts +78 -0
- package/src/lib/contractsRegistry.json +3 -14
- package/dist/integrations/fluidLite/fluid-lite.abi.d.ts +0 -69
- package/dist/integrations/fluidLite/fluid-lite.abi.d.ts.map +0 -1
- package/dist/integrations/fluidLite/fluid-lite.d.ts +0 -42
- package/dist/integrations/fluidLite/fluid-lite.d.ts.map +0 -1
- package/dist/integrations/fluidLite/index.d.ts +0 -3
- package/dist/integrations/fluidLite/index.d.ts.map +0 -1
- package/src/integrations/fluidLite/fluid-lite.abi.ts +0 -38
- package/src/integrations/fluidLite/fluid-lite.ts +0 -104
- package/src/integrations/fluidLite/index.ts +0 -2
|
@@ -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,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pendle.router.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/pendle/pendle.router.abi.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAaW"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
};
|
|
@@ -502,8 +502,7 @@
|
|
|
502
502
|
"cvx": "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B",
|
|
503
503
|
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
504
504
|
"ausd": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
|
|
505
|
-
"pendle": "0x808507121B80c02388FAd14726482e061B8da827"
|
|
506
|
-
"usdg": "0xe343167631d89B6Ffc58B88d6b7fB0228795491D"
|
|
505
|
+
"pendle": "0x808507121B80c02388FAd14726482e061B8da827"
|
|
507
506
|
},
|
|
508
507
|
"morpho": {
|
|
509
508
|
"morphoBlue": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
|
|
@@ -586,11 +585,6 @@
|
|
|
586
585
|
},
|
|
587
586
|
"iporFusion": {
|
|
588
587
|
"vault": "0x604117f0c94561231060f56cd2ddd16245d434c5"
|
|
589
|
-
},
|
|
590
|
-
"pendle": {
|
|
591
|
-
"routerV4": "0x888888888889758f76e7103c6cbf23abbf58f946",
|
|
592
|
-
"routerV4ActionMisc": "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
|
|
593
|
-
"merkleDistributor": "0x33305665f69b4642d1275f4ce81c23651674d21c"
|
|
594
588
|
}
|
|
595
589
|
},
|
|
596
590
|
"unichain": {
|
|
@@ -682,15 +676,10 @@
|
|
|
682
676
|
"tokens": {
|
|
683
677
|
"ausd": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
|
|
684
678
|
"usdc": "0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9",
|
|
685
|
-
"
|
|
679
|
+
"usdt": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
|
|
686
680
|
"usde": "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
|
|
687
681
|
"cmeth": "0xe6829d9a7ee3040e1276fa75293bde931859e8fa"
|
|
688
682
|
},
|
|
689
|
-
"OFTAdapters": {
|
|
690
|
-
"0x779ded0c9e1022225f8e0630b35a9b54be713736": "0xcb768e263fb1c62214e7cab4aa8d036d76dc59cc",
|
|
691
|
-
"0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34": "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34"
|
|
692
|
-
},
|
|
693
|
-
"multicall3": "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
694
683
|
"lagoonV0_4": {
|
|
695
684
|
"factory": "0x57D969B556C6AebB3Ac8f54c98CF3a3f921d5659",
|
|
696
685
|
"registry": "0x47A144e67834408716cB40Fa87fc886D63362ddC",
|
|
@@ -944,7 +933,7 @@
|
|
|
944
933
|
},
|
|
945
934
|
"wrappedNativeToken": "0x6100E367285b01F48D07953803A2d8dCA5D19873",
|
|
946
935
|
"iporFusion": {
|
|
947
|
-
"vault": "
|
|
936
|
+
"vault": "0x0a71624ab3e8101f78d95dfc81e0f1f31128ed7a"
|
|
948
937
|
}
|
|
949
938
|
}
|
|
950
939
|
}
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fluid-lite.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/fluidLite/fluid-lite.abi.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAiCW"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,38 +0,0 @@
|
|
|
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;
|
|
@@ -1,104 +0,0 @@
|
|
|
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
|
-
};
|