@gearbox-protocol/sdk 18.2.0-next.14 → 18.2.0-next.16
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/cjs/onchain/index.js +18 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.js +113 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js +258 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.js +161 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/index.js +6 -0
- package/dist/cjs/onchain/market/adapters/abi/index.js +13 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.js +39 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.js +230 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseRouter.js +29 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/index.js +7 -0
- package/dist/cjs/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.js +72 -0
- package/dist/cjs/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js +117 -0
- package/dist/cjs/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.js +61 -0
- package/dist/cjs/onchain/market/adapters/contracts/index.js +6 -0
- package/dist/cjs/onchain/market/adapters/createAdapter.js +6 -0
- package/dist/cjs/onchain/market/adapters/index.js +18 -0
- package/dist/cjs/onchain/market/index.js +18 -0
- package/dist/cjs/permissionless/api/oracles/PermissionlessOracles.js +53 -7
- package/dist/cjs/permissionless/api/oracles/onchain-feed.js +25 -0
- package/dist/cjs/permissionless/api/transactions/InstanceOwnerTransactions.js +14 -3
- package/dist/cjs/permissionless/api/transactions/lp-price-feeds.js +10 -4
- package/dist/esm/onchain/index.js +10 -1
- package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.js +112 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js +257 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.js +160 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/index.js +4 -1
- package/dist/esm/onchain/market/adapters/abi/index.js +8 -1
- package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.js +38 -0
- package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.js +229 -0
- package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseRouter.js +28 -0
- package/dist/esm/onchain/market/adapters/abi/treehouse/index.js +4 -0
- package/dist/esm/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.js +71 -0
- package/dist/esm/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js +116 -0
- package/dist/esm/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.js +60 -0
- package/dist/esm/onchain/market/adapters/contracts/index.js +4 -1
- package/dist/esm/onchain/market/adapters/createAdapter.js +6 -0
- package/dist/esm/onchain/market/adapters/index.js +10 -1
- package/dist/esm/onchain/market/index.js +10 -1
- package/dist/esm/permissionless/api/oracles/PermissionlessOracles.js +55 -9
- package/dist/esm/permissionless/api/oracles/onchain-feed.js +24 -0
- package/dist/esm/permissionless/api/transactions/InstanceOwnerTransactions.js +14 -3
- package/dist/esm/permissionless/api/transactions/lp-price-feeds.js +10 -4
- package/dist/types/onchain/index.d.ts +10 -1
- package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.d.ts +101 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.d.ts +237 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.d.ts +146 -0
- package/dist/types/onchain/market/adapters/abi/adapters/index.d.ts +4 -1
- package/dist/types/onchain/market/adapters/abi/index.d.ts +8 -1
- package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.d.ts +33 -0
- package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.d.ts +207 -0
- package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseRouter.d.ts +27 -0
- package/dist/types/onchain/market/adapters/abi/treehouse/index.d.ts +4 -0
- package/dist/types/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.d.ts +156 -0
- package/dist/types/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.d.ts +481 -0
- package/dist/types/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.d.ts +193 -0
- package/dist/types/onchain/market/adapters/contracts/index.d.ts +4 -1
- package/dist/types/onchain/market/adapters/index.d.ts +10 -1
- package/dist/types/onchain/market/index.d.ts +10 -1
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +8 -2
- package/dist/types/permissionless/api/oracles/onchain-feed.d.ts +15 -0
- package/dist/types/permissionless/api/oracles/types.d.ts +12 -3
- package/dist/types/permissionless/api/transactions/lp-price-feeds.d.ts +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/onchain/market/adapters/abi/treehouse/iTreehouseRouter.d.ts
|
|
2
|
+
export declare const iTreehouseRouterAbi: readonly [{
|
|
3
|
+
readonly type: "function";
|
|
4
|
+
readonly name: "TASSET";
|
|
5
|
+
readonly inputs: readonly [];
|
|
6
|
+
readonly outputs: readonly [{
|
|
7
|
+
readonly name: "";
|
|
8
|
+
readonly type: "address";
|
|
9
|
+
readonly internalType: "address";
|
|
10
|
+
}];
|
|
11
|
+
readonly stateMutability: "view";
|
|
12
|
+
}, {
|
|
13
|
+
readonly type: "function";
|
|
14
|
+
readonly name: "deposit";
|
|
15
|
+
readonly inputs: readonly [{
|
|
16
|
+
readonly name: "token";
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
readonly internalType: "address";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "amount";
|
|
21
|
+
readonly type: "uint256";
|
|
22
|
+
readonly internalType: "uint256";
|
|
23
|
+
}];
|
|
24
|
+
readonly outputs: readonly [];
|
|
25
|
+
readonly stateMutability: "nonpayable";
|
|
26
|
+
}];
|
|
27
|
+
//#endregion
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { iTreehouseFastlaneAbi } from "./iTreehouseFastlane.js";
|
|
2
|
+
import { iTreehouseRedemptionGatewayAbi } from "./iTreehouseRedemptionGateway.js";
|
|
3
|
+
import { iTreehouseRouterAbi } from "./iTreehouseRouter.js";
|
|
4
|
+
export { iTreehouseFastlaneAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRouterAbi };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { AssetsMap } from "../../../utils/AssetsMap.js";
|
|
2
|
+
import { AbstractAdapterContract, ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
3
|
+
import { OnchainSDK } from "../../../OnchainSDK.js";
|
|
4
|
+
import "../../../utils/index.js";
|
|
5
|
+
import { Address, DecodeFunctionDataReturnType } from "viem";
|
|
6
|
+
//#region src/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.d.ts
|
|
7
|
+
declare const abi: readonly [{
|
|
8
|
+
readonly type: "function";
|
|
9
|
+
readonly name: "contractType";
|
|
10
|
+
readonly inputs: readonly [];
|
|
11
|
+
readonly outputs: readonly [{
|
|
12
|
+
readonly name: "";
|
|
13
|
+
readonly type: "bytes32";
|
|
14
|
+
readonly internalType: "bytes32";
|
|
15
|
+
}];
|
|
16
|
+
readonly stateMutability: "view";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "function";
|
|
19
|
+
readonly name: "creditManager";
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
readonly outputs: readonly [{
|
|
22
|
+
readonly name: "";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
readonly internalType: "address";
|
|
25
|
+
}];
|
|
26
|
+
readonly stateMutability: "view";
|
|
27
|
+
}, {
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
readonly name: "redeemAndFinalize";
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly name: "shares";
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
readonly internalType: "uint256";
|
|
34
|
+
}];
|
|
35
|
+
readonly outputs: readonly [{
|
|
36
|
+
readonly name: "";
|
|
37
|
+
readonly type: "bool";
|
|
38
|
+
readonly internalType: "bool";
|
|
39
|
+
}];
|
|
40
|
+
readonly stateMutability: "nonpayable";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "function";
|
|
43
|
+
readonly name: "redeemAndFinalizeDiff";
|
|
44
|
+
readonly inputs: readonly [{
|
|
45
|
+
readonly name: "leftoverShares";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
}];
|
|
49
|
+
readonly outputs: readonly [{
|
|
50
|
+
readonly name: "";
|
|
51
|
+
readonly type: "bool";
|
|
52
|
+
readonly internalType: "bool";
|
|
53
|
+
}];
|
|
54
|
+
readonly stateMutability: "nonpayable";
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "function";
|
|
57
|
+
readonly name: "serialize";
|
|
58
|
+
readonly inputs: readonly [];
|
|
59
|
+
readonly outputs: readonly [{
|
|
60
|
+
readonly name: "serializedData";
|
|
61
|
+
readonly type: "bytes";
|
|
62
|
+
readonly internalType: "bytes";
|
|
63
|
+
}];
|
|
64
|
+
readonly stateMutability: "view";
|
|
65
|
+
}, {
|
|
66
|
+
readonly type: "function";
|
|
67
|
+
readonly name: "tAsset";
|
|
68
|
+
readonly inputs: readonly [];
|
|
69
|
+
readonly outputs: readonly [{
|
|
70
|
+
readonly name: "";
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
readonly internalType: "address";
|
|
73
|
+
}];
|
|
74
|
+
readonly stateMutability: "view";
|
|
75
|
+
}, {
|
|
76
|
+
readonly type: "function";
|
|
77
|
+
readonly name: "targetContract";
|
|
78
|
+
readonly inputs: readonly [];
|
|
79
|
+
readonly outputs: readonly [{
|
|
80
|
+
readonly name: "";
|
|
81
|
+
readonly type: "address";
|
|
82
|
+
readonly internalType: "address";
|
|
83
|
+
}];
|
|
84
|
+
readonly stateMutability: "view";
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "function";
|
|
87
|
+
readonly name: "vaultUnderlying";
|
|
88
|
+
readonly inputs: readonly [];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "address";
|
|
92
|
+
readonly internalType: "address";
|
|
93
|
+
}];
|
|
94
|
+
readonly stateMutability: "view";
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "function";
|
|
97
|
+
readonly name: "version";
|
|
98
|
+
readonly inputs: readonly [];
|
|
99
|
+
readonly outputs: readonly [{
|
|
100
|
+
readonly name: "";
|
|
101
|
+
readonly type: "uint256";
|
|
102
|
+
readonly internalType: "uint256";
|
|
103
|
+
}];
|
|
104
|
+
readonly stateMutability: "view";
|
|
105
|
+
}];
|
|
106
|
+
type abi = typeof abi;
|
|
107
|
+
declare const protocolAbi: readonly [{
|
|
108
|
+
readonly type: "function";
|
|
109
|
+
readonly name: "TASSET";
|
|
110
|
+
readonly inputs: readonly [];
|
|
111
|
+
readonly outputs: readonly [{
|
|
112
|
+
readonly name: "";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
readonly internalType: "address";
|
|
115
|
+
}];
|
|
116
|
+
readonly stateMutability: "view";
|
|
117
|
+
}, {
|
|
118
|
+
readonly type: "function";
|
|
119
|
+
readonly name: "UNDERLYING";
|
|
120
|
+
readonly inputs: readonly [];
|
|
121
|
+
readonly outputs: readonly [{
|
|
122
|
+
readonly name: "";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
readonly internalType: "address";
|
|
125
|
+
}];
|
|
126
|
+
readonly stateMutability: "view";
|
|
127
|
+
}, {
|
|
128
|
+
readonly type: "function";
|
|
129
|
+
readonly name: "redeemAndFinalize";
|
|
130
|
+
readonly inputs: readonly [{
|
|
131
|
+
readonly name: "_shares";
|
|
132
|
+
readonly type: "uint96";
|
|
133
|
+
readonly internalType: "uint96";
|
|
134
|
+
}];
|
|
135
|
+
readonly outputs: readonly [];
|
|
136
|
+
readonly stateMutability: "nonpayable";
|
|
137
|
+
}];
|
|
138
|
+
type protocolAbi = typeof protocolAbi;
|
|
139
|
+
export declare class TreehouseFastlaneAdapterContract extends AbstractAdapterContract<abi, protocolAbi> {
|
|
140
|
+
#private;
|
|
141
|
+
constructor(sdk: OnchainSDK, args: ConcreteAdapterContractOptions);
|
|
142
|
+
get tAsset(): Address;
|
|
143
|
+
get vaultUnderlying(): Address;
|
|
144
|
+
stateHuman(raw?: boolean): {
|
|
145
|
+
address: string;
|
|
146
|
+
version: number;
|
|
147
|
+
contractType?: string;
|
|
148
|
+
creditManager?: string;
|
|
149
|
+
targetContract?: string;
|
|
150
|
+
tAsset: string | undefined;
|
|
151
|
+
vaultUnderlying: string | undefined;
|
|
152
|
+
};
|
|
153
|
+
protected applyBalanceChanges(balances: AssetsMap, decoded: DecodeFunctionDataReturnType<abi>): void;
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export {};
|
package/dist/types/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.d.ts
ADDED
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import { AssetsMap } from "../../../utils/AssetsMap.js";
|
|
2
|
+
import { DelayedWithdrawalClaim, DelayedWithdrawalRequest } from "../types.js";
|
|
3
|
+
import { AbstractAdapterContract, ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
|
+
import { OnchainSDK } from "../../../OnchainSDK.js";
|
|
5
|
+
import "../../../utils/index.js";
|
|
6
|
+
import { Address, DecodeFunctionDataReturnType, Hex } from "viem";
|
|
7
|
+
//#region src/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.d.ts
|
|
8
|
+
declare const abi: readonly [{
|
|
9
|
+
readonly type: "function";
|
|
10
|
+
readonly name: "contractType";
|
|
11
|
+
readonly inputs: readonly [];
|
|
12
|
+
readonly outputs: readonly [{
|
|
13
|
+
readonly name: "";
|
|
14
|
+
readonly type: "bytes32";
|
|
15
|
+
readonly internalType: "bytes32";
|
|
16
|
+
}];
|
|
17
|
+
readonly stateMutability: "view";
|
|
18
|
+
}, {
|
|
19
|
+
readonly type: "function";
|
|
20
|
+
readonly name: "creditManager";
|
|
21
|
+
readonly inputs: readonly [];
|
|
22
|
+
readonly outputs: readonly [{
|
|
23
|
+
readonly name: "";
|
|
24
|
+
readonly type: "address";
|
|
25
|
+
readonly internalType: "address";
|
|
26
|
+
}];
|
|
27
|
+
readonly stateMutability: "view";
|
|
28
|
+
}, {
|
|
29
|
+
readonly type: "function";
|
|
30
|
+
readonly name: "depositPhantomToken";
|
|
31
|
+
readonly inputs: readonly [{
|
|
32
|
+
readonly name: "token";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
readonly internalType: "address";
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "amount";
|
|
37
|
+
readonly type: "uint256";
|
|
38
|
+
readonly internalType: "uint256";
|
|
39
|
+
}];
|
|
40
|
+
readonly outputs: readonly [{
|
|
41
|
+
readonly name: "";
|
|
42
|
+
readonly type: "bool";
|
|
43
|
+
readonly internalType: "bool";
|
|
44
|
+
}];
|
|
45
|
+
readonly stateMutability: "nonpayable";
|
|
46
|
+
}, {
|
|
47
|
+
readonly type: "function";
|
|
48
|
+
readonly name: "finalizeRedeem";
|
|
49
|
+
readonly inputs: readonly [{
|
|
50
|
+
readonly name: "redeemer";
|
|
51
|
+
readonly type: "address";
|
|
52
|
+
readonly internalType: "address";
|
|
53
|
+
}];
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly name: "";
|
|
56
|
+
readonly type: "bool";
|
|
57
|
+
readonly internalType: "bool";
|
|
58
|
+
}];
|
|
59
|
+
readonly stateMutability: "nonpayable";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "function";
|
|
62
|
+
readonly name: "phantomToken";
|
|
63
|
+
readonly inputs: readonly [];
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly name: "";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
}];
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "function";
|
|
72
|
+
readonly name: "redeem";
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "shares";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
readonly internalType: "uint256";
|
|
77
|
+
}];
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly name: "";
|
|
80
|
+
readonly type: "bool";
|
|
81
|
+
readonly internalType: "bool";
|
|
82
|
+
}];
|
|
83
|
+
readonly stateMutability: "nonpayable";
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "function";
|
|
86
|
+
readonly name: "redeem";
|
|
87
|
+
readonly inputs: readonly [{
|
|
88
|
+
readonly name: "shares";
|
|
89
|
+
readonly type: "uint256";
|
|
90
|
+
readonly internalType: "uint256";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "extraData";
|
|
93
|
+
readonly type: "bytes";
|
|
94
|
+
readonly internalType: "bytes";
|
|
95
|
+
}];
|
|
96
|
+
readonly outputs: readonly [{
|
|
97
|
+
readonly name: "";
|
|
98
|
+
readonly type: "bool";
|
|
99
|
+
readonly internalType: "bool";
|
|
100
|
+
}];
|
|
101
|
+
readonly stateMutability: "nonpayable";
|
|
102
|
+
}, {
|
|
103
|
+
readonly type: "function";
|
|
104
|
+
readonly name: "redeemDiff";
|
|
105
|
+
readonly inputs: readonly [{
|
|
106
|
+
readonly name: "leftoverShares";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
readonly internalType: "uint256";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "extraData";
|
|
111
|
+
readonly type: "bytes";
|
|
112
|
+
readonly internalType: "bytes";
|
|
113
|
+
}];
|
|
114
|
+
readonly outputs: readonly [{
|
|
115
|
+
readonly name: "";
|
|
116
|
+
readonly type: "bool";
|
|
117
|
+
readonly internalType: "bool";
|
|
118
|
+
}];
|
|
119
|
+
readonly stateMutability: "nonpayable";
|
|
120
|
+
}, {
|
|
121
|
+
readonly type: "function";
|
|
122
|
+
readonly name: "redeemDiff";
|
|
123
|
+
readonly inputs: readonly [{
|
|
124
|
+
readonly name: "leftoverShares";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
readonly internalType: "uint256";
|
|
127
|
+
}];
|
|
128
|
+
readonly outputs: readonly [{
|
|
129
|
+
readonly name: "";
|
|
130
|
+
readonly type: "bool";
|
|
131
|
+
readonly internalType: "bool";
|
|
132
|
+
}];
|
|
133
|
+
readonly stateMutability: "nonpayable";
|
|
134
|
+
}, {
|
|
135
|
+
readonly type: "function";
|
|
136
|
+
readonly name: "rescueToken";
|
|
137
|
+
readonly inputs: readonly [{
|
|
138
|
+
readonly name: "redeemer";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
readonly internalType: "address";
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "token";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
readonly internalType: "address";
|
|
145
|
+
}];
|
|
146
|
+
readonly outputs: readonly [{
|
|
147
|
+
readonly name: "";
|
|
148
|
+
readonly type: "bool";
|
|
149
|
+
readonly internalType: "bool";
|
|
150
|
+
}];
|
|
151
|
+
readonly stateMutability: "nonpayable";
|
|
152
|
+
}, {
|
|
153
|
+
readonly type: "function";
|
|
154
|
+
readonly name: "serialize";
|
|
155
|
+
readonly inputs: readonly [];
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly name: "serializedData";
|
|
158
|
+
readonly type: "bytes";
|
|
159
|
+
readonly internalType: "bytes";
|
|
160
|
+
}];
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
}, {
|
|
163
|
+
readonly type: "function";
|
|
164
|
+
readonly name: "tAsset";
|
|
165
|
+
readonly inputs: readonly [];
|
|
166
|
+
readonly outputs: readonly [{
|
|
167
|
+
readonly name: "";
|
|
168
|
+
readonly type: "address";
|
|
169
|
+
readonly internalType: "address";
|
|
170
|
+
}];
|
|
171
|
+
readonly stateMutability: "view";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
readonly name: "targetContract";
|
|
175
|
+
readonly inputs: readonly [];
|
|
176
|
+
readonly outputs: readonly [{
|
|
177
|
+
readonly name: "";
|
|
178
|
+
readonly type: "address";
|
|
179
|
+
readonly internalType: "address";
|
|
180
|
+
}];
|
|
181
|
+
readonly stateMutability: "view";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "function";
|
|
184
|
+
readonly name: "transferRedeemer";
|
|
185
|
+
readonly inputs: readonly [{
|
|
186
|
+
readonly name: "redeemer";
|
|
187
|
+
readonly type: "address";
|
|
188
|
+
readonly internalType: "address";
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "newAccount";
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
readonly internalType: "address";
|
|
193
|
+
}];
|
|
194
|
+
readonly outputs: readonly [{
|
|
195
|
+
readonly name: "";
|
|
196
|
+
readonly type: "bool";
|
|
197
|
+
readonly internalType: "bool";
|
|
198
|
+
}];
|
|
199
|
+
readonly stateMutability: "nonpayable";
|
|
200
|
+
}, {
|
|
201
|
+
readonly type: "function";
|
|
202
|
+
readonly name: "vaultUnderlying";
|
|
203
|
+
readonly inputs: readonly [];
|
|
204
|
+
readonly outputs: readonly [{
|
|
205
|
+
readonly name: "";
|
|
206
|
+
readonly type: "address";
|
|
207
|
+
readonly internalType: "address";
|
|
208
|
+
}];
|
|
209
|
+
readonly stateMutability: "view";
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "function";
|
|
212
|
+
readonly name: "version";
|
|
213
|
+
readonly inputs: readonly [];
|
|
214
|
+
readonly outputs: readonly [{
|
|
215
|
+
readonly name: "";
|
|
216
|
+
readonly type: "uint256";
|
|
217
|
+
readonly internalType: "uint256";
|
|
218
|
+
}];
|
|
219
|
+
readonly stateMutability: "view";
|
|
220
|
+
}, {
|
|
221
|
+
readonly type: "function";
|
|
222
|
+
readonly name: "withdrawPhantomToken";
|
|
223
|
+
readonly inputs: readonly [{
|
|
224
|
+
readonly name: "token";
|
|
225
|
+
readonly type: "address";
|
|
226
|
+
readonly internalType: "address";
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "amount";
|
|
229
|
+
readonly type: "uint256";
|
|
230
|
+
readonly internalType: "uint256";
|
|
231
|
+
}];
|
|
232
|
+
readonly outputs: readonly [{
|
|
233
|
+
readonly name: "useSafePrices";
|
|
234
|
+
readonly type: "bool";
|
|
235
|
+
readonly internalType: "bool";
|
|
236
|
+
}];
|
|
237
|
+
readonly stateMutability: "nonpayable";
|
|
238
|
+
}, {
|
|
239
|
+
readonly type: "error";
|
|
240
|
+
readonly name: "IncorrectStakedPhantomTokenException";
|
|
241
|
+
readonly inputs: readonly [];
|
|
242
|
+
}];
|
|
243
|
+
type abi = typeof abi;
|
|
244
|
+
declare const protocolAbi: readonly [{
|
|
245
|
+
readonly type: "function";
|
|
246
|
+
readonly name: "contractType";
|
|
247
|
+
readonly inputs: readonly [];
|
|
248
|
+
readonly outputs: readonly [{
|
|
249
|
+
readonly name: "";
|
|
250
|
+
readonly type: "bytes32";
|
|
251
|
+
readonly internalType: "bytes32";
|
|
252
|
+
}];
|
|
253
|
+
readonly stateMutability: "view";
|
|
254
|
+
}, {
|
|
255
|
+
readonly type: "function";
|
|
256
|
+
readonly name: "finalizeRedeem";
|
|
257
|
+
readonly inputs: readonly [{
|
|
258
|
+
readonly name: "redeemer";
|
|
259
|
+
readonly type: "address";
|
|
260
|
+
readonly internalType: "address";
|
|
261
|
+
}];
|
|
262
|
+
readonly outputs: readonly [];
|
|
263
|
+
readonly stateMutability: "nonpayable";
|
|
264
|
+
}, {
|
|
265
|
+
readonly type: "function";
|
|
266
|
+
readonly name: "masterRedeemer";
|
|
267
|
+
readonly inputs: readonly [];
|
|
268
|
+
readonly outputs: readonly [{
|
|
269
|
+
readonly name: "";
|
|
270
|
+
readonly type: "address";
|
|
271
|
+
readonly internalType: "address";
|
|
272
|
+
}];
|
|
273
|
+
readonly stateMutability: "view";
|
|
274
|
+
}, {
|
|
275
|
+
readonly type: "function";
|
|
276
|
+
readonly name: "pendingAndClaimableAmounts";
|
|
277
|
+
readonly inputs: readonly [{
|
|
278
|
+
readonly name: "account";
|
|
279
|
+
readonly type: "address";
|
|
280
|
+
readonly internalType: "address";
|
|
281
|
+
}];
|
|
282
|
+
readonly outputs: readonly [{
|
|
283
|
+
readonly name: "pendingAmount";
|
|
284
|
+
readonly type: "uint256";
|
|
285
|
+
readonly internalType: "uint256";
|
|
286
|
+
}, {
|
|
287
|
+
readonly name: "claimableAmount";
|
|
288
|
+
readonly type: "uint256";
|
|
289
|
+
readonly internalType: "uint256";
|
|
290
|
+
}];
|
|
291
|
+
readonly stateMutability: "view";
|
|
292
|
+
}, {
|
|
293
|
+
readonly type: "function";
|
|
294
|
+
readonly name: "pendingRedeemers";
|
|
295
|
+
readonly inputs: readonly [{
|
|
296
|
+
readonly name: "account";
|
|
297
|
+
readonly type: "address";
|
|
298
|
+
readonly internalType: "address";
|
|
299
|
+
}];
|
|
300
|
+
readonly outputs: readonly [{
|
|
301
|
+
readonly name: "redeemers";
|
|
302
|
+
readonly type: "address[]";
|
|
303
|
+
readonly internalType: "address[]";
|
|
304
|
+
}];
|
|
305
|
+
readonly stateMutability: "view";
|
|
306
|
+
}, {
|
|
307
|
+
readonly type: "function";
|
|
308
|
+
readonly name: "phantomToken";
|
|
309
|
+
readonly inputs: readonly [];
|
|
310
|
+
readonly outputs: readonly [{
|
|
311
|
+
readonly name: "";
|
|
312
|
+
readonly type: "address";
|
|
313
|
+
readonly internalType: "address";
|
|
314
|
+
}];
|
|
315
|
+
readonly stateMutability: "view";
|
|
316
|
+
}, {
|
|
317
|
+
readonly type: "function";
|
|
318
|
+
readonly name: "redeem";
|
|
319
|
+
readonly inputs: readonly [{
|
|
320
|
+
readonly name: "shares";
|
|
321
|
+
readonly type: "uint256";
|
|
322
|
+
readonly internalType: "uint256";
|
|
323
|
+
}, {
|
|
324
|
+
readonly name: "extraData";
|
|
325
|
+
readonly type: "bytes";
|
|
326
|
+
readonly internalType: "bytes";
|
|
327
|
+
}];
|
|
328
|
+
readonly outputs: readonly [];
|
|
329
|
+
readonly stateMutability: "nonpayable";
|
|
330
|
+
}, {
|
|
331
|
+
readonly type: "function";
|
|
332
|
+
readonly name: "redeemers";
|
|
333
|
+
readonly inputs: readonly [{
|
|
334
|
+
readonly name: "account";
|
|
335
|
+
readonly type: "address";
|
|
336
|
+
readonly internalType: "address";
|
|
337
|
+
}];
|
|
338
|
+
readonly outputs: readonly [{
|
|
339
|
+
readonly name: "redeemers";
|
|
340
|
+
readonly type: "address[]";
|
|
341
|
+
readonly internalType: "address[]";
|
|
342
|
+
}];
|
|
343
|
+
readonly stateMutability: "view";
|
|
344
|
+
}, {
|
|
345
|
+
readonly type: "function";
|
|
346
|
+
readonly name: "redemptionLogger";
|
|
347
|
+
readonly inputs: readonly [];
|
|
348
|
+
readonly outputs: readonly [{
|
|
349
|
+
readonly name: "";
|
|
350
|
+
readonly type: "address";
|
|
351
|
+
readonly internalType: "address";
|
|
352
|
+
}];
|
|
353
|
+
readonly stateMutability: "view";
|
|
354
|
+
}, {
|
|
355
|
+
readonly type: "function";
|
|
356
|
+
readonly name: "redemptionV3";
|
|
357
|
+
readonly inputs: readonly [];
|
|
358
|
+
readonly outputs: readonly [{
|
|
359
|
+
readonly name: "";
|
|
360
|
+
readonly type: "address";
|
|
361
|
+
readonly internalType: "address";
|
|
362
|
+
}];
|
|
363
|
+
readonly stateMutability: "view";
|
|
364
|
+
}, {
|
|
365
|
+
readonly type: "function";
|
|
366
|
+
readonly name: "rescueToken";
|
|
367
|
+
readonly inputs: readonly [{
|
|
368
|
+
readonly name: "redeemer";
|
|
369
|
+
readonly type: "address";
|
|
370
|
+
readonly internalType: "address";
|
|
371
|
+
}, {
|
|
372
|
+
readonly name: "token";
|
|
373
|
+
readonly type: "address";
|
|
374
|
+
readonly internalType: "address";
|
|
375
|
+
}];
|
|
376
|
+
readonly outputs: readonly [];
|
|
377
|
+
readonly stateMutability: "nonpayable";
|
|
378
|
+
}, {
|
|
379
|
+
readonly type: "function";
|
|
380
|
+
readonly name: "tAsset";
|
|
381
|
+
readonly inputs: readonly [];
|
|
382
|
+
readonly outputs: readonly [{
|
|
383
|
+
readonly name: "";
|
|
384
|
+
readonly type: "address";
|
|
385
|
+
readonly internalType: "address";
|
|
386
|
+
}];
|
|
387
|
+
readonly stateMutability: "view";
|
|
388
|
+
}, {
|
|
389
|
+
readonly type: "function";
|
|
390
|
+
readonly name: "transferMaster";
|
|
391
|
+
readonly inputs: readonly [];
|
|
392
|
+
readonly outputs: readonly [{
|
|
393
|
+
readonly name: "";
|
|
394
|
+
readonly type: "address";
|
|
395
|
+
readonly internalType: "address";
|
|
396
|
+
}];
|
|
397
|
+
readonly stateMutability: "view";
|
|
398
|
+
}, {
|
|
399
|
+
readonly type: "function";
|
|
400
|
+
readonly name: "transferRedeemer";
|
|
401
|
+
readonly inputs: readonly [{
|
|
402
|
+
readonly name: "redeemer";
|
|
403
|
+
readonly type: "address";
|
|
404
|
+
readonly internalType: "address";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "newAccount";
|
|
407
|
+
readonly type: "address";
|
|
408
|
+
readonly internalType: "address";
|
|
409
|
+
}];
|
|
410
|
+
readonly outputs: readonly [];
|
|
411
|
+
readonly stateMutability: "nonpayable";
|
|
412
|
+
}, {
|
|
413
|
+
readonly type: "function";
|
|
414
|
+
readonly name: "vaultUnderlying";
|
|
415
|
+
readonly inputs: readonly [];
|
|
416
|
+
readonly outputs: readonly [{
|
|
417
|
+
readonly name: "";
|
|
418
|
+
readonly type: "address";
|
|
419
|
+
readonly internalType: "address";
|
|
420
|
+
}];
|
|
421
|
+
readonly stateMutability: "view";
|
|
422
|
+
}, {
|
|
423
|
+
readonly type: "function";
|
|
424
|
+
readonly name: "version";
|
|
425
|
+
readonly inputs: readonly [];
|
|
426
|
+
readonly outputs: readonly [{
|
|
427
|
+
readonly name: "";
|
|
428
|
+
readonly type: "uint256";
|
|
429
|
+
readonly internalType: "uint256";
|
|
430
|
+
}];
|
|
431
|
+
readonly stateMutability: "view";
|
|
432
|
+
}, {
|
|
433
|
+
readonly type: "error";
|
|
434
|
+
readonly name: "MaxPendingRedeemersPerAccountException";
|
|
435
|
+
readonly inputs: readonly [];
|
|
436
|
+
}, {
|
|
437
|
+
readonly type: "error";
|
|
438
|
+
readonly name: "RedeemerNotOwnedByAccountException";
|
|
439
|
+
readonly inputs: readonly [];
|
|
440
|
+
}, {
|
|
441
|
+
readonly type: "error";
|
|
442
|
+
readonly name: "RedeemerStillPendingException";
|
|
443
|
+
readonly inputs: readonly [];
|
|
444
|
+
}, {
|
|
445
|
+
readonly type: "error";
|
|
446
|
+
readonly name: "RedeemerTransferNotAllowedException";
|
|
447
|
+
readonly inputs: readonly [];
|
|
448
|
+
}];
|
|
449
|
+
type protocolAbi = typeof protocolAbi;
|
|
450
|
+
export declare class TreehouseRedemptionGatewayAdapterContract extends AbstractAdapterContract<abi, protocolAbi> {
|
|
451
|
+
#private;
|
|
452
|
+
constructor(sdk: OnchainSDK, args: ConcreteAdapterContractOptions);
|
|
453
|
+
get tAsset(): Address;
|
|
454
|
+
get vaultUnderlying(): Address;
|
|
455
|
+
get phantomToken(): Address;
|
|
456
|
+
stateHuman(raw?: boolean): {
|
|
457
|
+
address: string;
|
|
458
|
+
version: number;
|
|
459
|
+
contractType?: string;
|
|
460
|
+
creditManager?: string;
|
|
461
|
+
targetContract?: string;
|
|
462
|
+
tAsset: string | undefined;
|
|
463
|
+
vaultUnderlying: string | undefined;
|
|
464
|
+
phantomToken: string | undefined;
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* `redeem` (the only request call the withdrawal compressor emits) spends
|
|
468
|
+
* the tAsset and mints the redemption phantom token; the vault underlying is
|
|
469
|
+
* received when the redemption is finalized. The 2-arg overload carries the
|
|
470
|
+
* intent `extraData`.
|
|
471
|
+
*/
|
|
472
|
+
parseDelayedWithdrawalRequest(calldata: Hex): DelayedWithdrawalRequest | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* `finalizeRedeem(address redeemer)` claims a matured redemption from a
|
|
475
|
+
* redeemer contract.
|
|
476
|
+
*/
|
|
477
|
+
parseDelayedWithdrawalClaim(calldata: Hex): DelayedWithdrawalClaim | undefined;
|
|
478
|
+
protected applyBalanceChanges(balances: AssetsMap, decoded: DecodeFunctionDataReturnType<abi>): void;
|
|
479
|
+
}
|
|
480
|
+
//#endregion
|
|
481
|
+
export {};
|