@gearbox-protocol/sdk 14.12.0-next.37 → 14.12.0-next.38
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/abi/IWithdrawalCompressorV313.js +78 -0
- package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +1 -1
- package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +90 -5
- package/dist/esm/abi/IWithdrawalCompressorV313.js +78 -0
- package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +90 -5
- package/dist/types/abi/IWithdrawalCompressorV313.d.ts +103 -0
- package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +1 -1
- package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +104 -1
- package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +3 -2
- package/package.json +1 -1
|
@@ -176,6 +176,84 @@ const iWithdrawalCompressorV313Abi = [
|
|
|
176
176
|
],
|
|
177
177
|
stateMutability: "view"
|
|
178
178
|
},
|
|
179
|
+
{
|
|
180
|
+
type: "function",
|
|
181
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
182
|
+
inputs: [
|
|
183
|
+
{
|
|
184
|
+
name: "withdrawalTokens",
|
|
185
|
+
type: "address[]",
|
|
186
|
+
internalType: "address[]"
|
|
187
|
+
},
|
|
188
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
189
|
+
],
|
|
190
|
+
outputs: [
|
|
191
|
+
{
|
|
192
|
+
name: "",
|
|
193
|
+
type: "tuple[]",
|
|
194
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
195
|
+
components: [
|
|
196
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
197
|
+
{
|
|
198
|
+
name: "withdrawalPhantomToken",
|
|
199
|
+
type: "address",
|
|
200
|
+
internalType: "address"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "withdrawalTokenSpent",
|
|
204
|
+
type: "uint256",
|
|
205
|
+
internalType: "uint256"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "outputs",
|
|
209
|
+
type: "tuple[]",
|
|
210
|
+
internalType: "struct WithdrawalOutput[]",
|
|
211
|
+
components: [
|
|
212
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
213
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
214
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "claimCalls",
|
|
219
|
+
type: "tuple[]",
|
|
220
|
+
internalType: "struct MultiCall[]",
|
|
221
|
+
components: [
|
|
222
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
223
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "",
|
|
231
|
+
type: "tuple[]",
|
|
232
|
+
internalType: "struct PendingWithdrawal[]",
|
|
233
|
+
components: [
|
|
234
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
235
|
+
{
|
|
236
|
+
name: "withdrawalPhantomToken",
|
|
237
|
+
type: "address",
|
|
238
|
+
internalType: "address"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "expectedOutputs",
|
|
242
|
+
type: "tuple[]",
|
|
243
|
+
internalType: "struct WithdrawalOutput[]",
|
|
244
|
+
components: [
|
|
245
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
246
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
247
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
251
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
stateMutability: "view"
|
|
256
|
+
},
|
|
179
257
|
{
|
|
180
258
|
type: "function",
|
|
181
259
|
name: "getWithdrawalStatus",
|
|
@@ -191,7 +191,7 @@ class AbstractWithdrawalCompressorContract extends import_base.BaseContract {
|
|
|
191
191
|
/**
|
|
192
192
|
* {@inheritDoc IWithdrawalCompressorContract.getExternalAccountCurrentWithdrawals}
|
|
193
193
|
**/
|
|
194
|
-
async getExternalAccountCurrentWithdrawals(
|
|
194
|
+
async getExternalAccountCurrentWithdrawals(_account, ..._withdrawalTokens) {
|
|
195
195
|
this.#reportUnsupported("external account withdrawals");
|
|
196
196
|
return { claimable: [], pending: [] };
|
|
197
197
|
}
|
|
@@ -26,6 +26,86 @@ var import_AbstractWithdrawalCompressorContract = require("./AbstractWithdrawalC
|
|
|
26
26
|
var import_intent_codec = require("./intent-codec.js");
|
|
27
27
|
var import_types = require("./types.js");
|
|
28
28
|
const abi = import_IWithdrawalCompressorV313.iWithdrawalCompressorV313Abi;
|
|
29
|
+
const iExternalWithdrawalsBatchAbi = [
|
|
30
|
+
{
|
|
31
|
+
type: "function",
|
|
32
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
33
|
+
inputs: [
|
|
34
|
+
{
|
|
35
|
+
name: "withdrawalTokens",
|
|
36
|
+
type: "address[]",
|
|
37
|
+
internalType: "address[]"
|
|
38
|
+
},
|
|
39
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
40
|
+
],
|
|
41
|
+
outputs: [
|
|
42
|
+
{
|
|
43
|
+
name: "",
|
|
44
|
+
type: "tuple[]",
|
|
45
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
46
|
+
components: [
|
|
47
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
48
|
+
{
|
|
49
|
+
name: "withdrawalPhantomToken",
|
|
50
|
+
type: "address",
|
|
51
|
+
internalType: "address"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "withdrawalTokenSpent",
|
|
55
|
+
type: "uint256",
|
|
56
|
+
internalType: "uint256"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "outputs",
|
|
60
|
+
type: "tuple[]",
|
|
61
|
+
internalType: "struct WithdrawalOutput[]",
|
|
62
|
+
components: [
|
|
63
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
64
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
65
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "claimCalls",
|
|
70
|
+
type: "tuple[]",
|
|
71
|
+
internalType: "struct MultiCall[]",
|
|
72
|
+
components: [
|
|
73
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
74
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "",
|
|
82
|
+
type: "tuple[]",
|
|
83
|
+
internalType: "struct PendingWithdrawal[]",
|
|
84
|
+
components: [
|
|
85
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
86
|
+
{
|
|
87
|
+
name: "withdrawalPhantomToken",
|
|
88
|
+
type: "address",
|
|
89
|
+
internalType: "address"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "expectedOutputs",
|
|
93
|
+
type: "tuple[]",
|
|
94
|
+
internalType: "struct WithdrawalOutput[]",
|
|
95
|
+
components: [
|
|
96
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
97
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
98
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
102
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
stateMutability: "view"
|
|
107
|
+
}
|
|
108
|
+
];
|
|
29
109
|
const iWithdrawalStatusBatchAbi = [
|
|
30
110
|
{
|
|
31
111
|
type: "function",
|
|
@@ -51,11 +131,16 @@ class WithdrawalCompressorV313Contract extends import_AbstractWithdrawalCompress
|
|
|
51
131
|
/**
|
|
52
132
|
* {@inheritDoc IWithdrawalCompressorContract.getExternalAccountCurrentWithdrawals}
|
|
53
133
|
**/
|
|
54
|
-
async getExternalAccountCurrentWithdrawals(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]
|
|
134
|
+
async getExternalAccountCurrentWithdrawals(account, ...withdrawalTokens) {
|
|
135
|
+
if (withdrawalTokens.length === 0) {
|
|
136
|
+
return { claimable: [], pending: [] };
|
|
137
|
+
}
|
|
138
|
+
const [claimable, pending] = await this.client.readContract({
|
|
139
|
+
address: this.address,
|
|
140
|
+
abi: iExternalWithdrawalsBatchAbi,
|
|
141
|
+
functionName: "getExternalAccountCurrentWithdrawals",
|
|
142
|
+
args: [withdrawalTokens, account]
|
|
143
|
+
});
|
|
59
144
|
return {
|
|
60
145
|
claimable: claimable.map((w) => (0, import_AbstractWithdrawalCompressorContract.toClaimableWithdrawal)(w, void 0)),
|
|
61
146
|
pending: pending.map((w) => (0, import_AbstractWithdrawalCompressorContract.toPendingWithdrawal)(w, void 0)).sort((a, b) => a.claimableAt < b.claimableAt ? -1 : 1)
|
|
@@ -153,6 +153,84 @@ const iWithdrawalCompressorV313Abi = [
|
|
|
153
153
|
],
|
|
154
154
|
stateMutability: "view"
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
type: "function",
|
|
158
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
159
|
+
inputs: [
|
|
160
|
+
{
|
|
161
|
+
name: "withdrawalTokens",
|
|
162
|
+
type: "address[]",
|
|
163
|
+
internalType: "address[]"
|
|
164
|
+
},
|
|
165
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
166
|
+
],
|
|
167
|
+
outputs: [
|
|
168
|
+
{
|
|
169
|
+
name: "",
|
|
170
|
+
type: "tuple[]",
|
|
171
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
172
|
+
components: [
|
|
173
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
174
|
+
{
|
|
175
|
+
name: "withdrawalPhantomToken",
|
|
176
|
+
type: "address",
|
|
177
|
+
internalType: "address"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "withdrawalTokenSpent",
|
|
181
|
+
type: "uint256",
|
|
182
|
+
internalType: "uint256"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "outputs",
|
|
186
|
+
type: "tuple[]",
|
|
187
|
+
internalType: "struct WithdrawalOutput[]",
|
|
188
|
+
components: [
|
|
189
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
190
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
191
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "claimCalls",
|
|
196
|
+
type: "tuple[]",
|
|
197
|
+
internalType: "struct MultiCall[]",
|
|
198
|
+
components: [
|
|
199
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
200
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "",
|
|
208
|
+
type: "tuple[]",
|
|
209
|
+
internalType: "struct PendingWithdrawal[]",
|
|
210
|
+
components: [
|
|
211
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
212
|
+
{
|
|
213
|
+
name: "withdrawalPhantomToken",
|
|
214
|
+
type: "address",
|
|
215
|
+
internalType: "address"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "expectedOutputs",
|
|
219
|
+
type: "tuple[]",
|
|
220
|
+
internalType: "struct WithdrawalOutput[]",
|
|
221
|
+
components: [
|
|
222
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
223
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
224
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
228
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
stateMutability: "view"
|
|
233
|
+
},
|
|
156
234
|
{
|
|
157
235
|
type: "function",
|
|
158
236
|
name: "getWithdrawalStatus",
|
|
@@ -164,7 +164,7 @@ class AbstractWithdrawalCompressorContract extends BaseContract {
|
|
|
164
164
|
/**
|
|
165
165
|
* {@inheritDoc IWithdrawalCompressorContract.getExternalAccountCurrentWithdrawals}
|
|
166
166
|
**/
|
|
167
|
-
async getExternalAccountCurrentWithdrawals(
|
|
167
|
+
async getExternalAccountCurrentWithdrawals(_account, ..._withdrawalTokens) {
|
|
168
168
|
this.#reportUnsupported("external account withdrawals");
|
|
169
169
|
return { claimable: [], pending: [] };
|
|
170
170
|
}
|
|
@@ -9,6 +9,86 @@ import {
|
|
|
9
9
|
import { encodeDelayedIntent } from "./intent-codec.js";
|
|
10
10
|
import { toWithdrawalStatus } from "./types.js";
|
|
11
11
|
const abi = iWithdrawalCompressorV313Abi;
|
|
12
|
+
const iExternalWithdrawalsBatchAbi = [
|
|
13
|
+
{
|
|
14
|
+
type: "function",
|
|
15
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
16
|
+
inputs: [
|
|
17
|
+
{
|
|
18
|
+
name: "withdrawalTokens",
|
|
19
|
+
type: "address[]",
|
|
20
|
+
internalType: "address[]"
|
|
21
|
+
},
|
|
22
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
23
|
+
],
|
|
24
|
+
outputs: [
|
|
25
|
+
{
|
|
26
|
+
name: "",
|
|
27
|
+
type: "tuple[]",
|
|
28
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
29
|
+
components: [
|
|
30
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
31
|
+
{
|
|
32
|
+
name: "withdrawalPhantomToken",
|
|
33
|
+
type: "address",
|
|
34
|
+
internalType: "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "withdrawalTokenSpent",
|
|
38
|
+
type: "uint256",
|
|
39
|
+
internalType: "uint256"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "outputs",
|
|
43
|
+
type: "tuple[]",
|
|
44
|
+
internalType: "struct WithdrawalOutput[]",
|
|
45
|
+
components: [
|
|
46
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
47
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
48
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "claimCalls",
|
|
53
|
+
type: "tuple[]",
|
|
54
|
+
internalType: "struct MultiCall[]",
|
|
55
|
+
components: [
|
|
56
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
57
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "",
|
|
65
|
+
type: "tuple[]",
|
|
66
|
+
internalType: "struct PendingWithdrawal[]",
|
|
67
|
+
components: [
|
|
68
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
69
|
+
{
|
|
70
|
+
name: "withdrawalPhantomToken",
|
|
71
|
+
type: "address",
|
|
72
|
+
internalType: "address"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "expectedOutputs",
|
|
76
|
+
type: "tuple[]",
|
|
77
|
+
internalType: "struct WithdrawalOutput[]",
|
|
78
|
+
components: [
|
|
79
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
80
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
81
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
85
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
stateMutability: "view"
|
|
90
|
+
}
|
|
91
|
+
];
|
|
12
92
|
const iWithdrawalStatusBatchAbi = [
|
|
13
93
|
{
|
|
14
94
|
type: "function",
|
|
@@ -34,11 +114,16 @@ class WithdrawalCompressorV313Contract extends AbstractWithdrawalCompressorContr
|
|
|
34
114
|
/**
|
|
35
115
|
* {@inheritDoc IWithdrawalCompressorContract.getExternalAccountCurrentWithdrawals}
|
|
36
116
|
**/
|
|
37
|
-
async getExternalAccountCurrentWithdrawals(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
]
|
|
117
|
+
async getExternalAccountCurrentWithdrawals(account, ...withdrawalTokens) {
|
|
118
|
+
if (withdrawalTokens.length === 0) {
|
|
119
|
+
return { claimable: [], pending: [] };
|
|
120
|
+
}
|
|
121
|
+
const [claimable, pending] = await this.client.readContract({
|
|
122
|
+
address: this.address,
|
|
123
|
+
abi: iExternalWithdrawalsBatchAbi,
|
|
124
|
+
functionName: "getExternalAccountCurrentWithdrawals",
|
|
125
|
+
args: [withdrawalTokens, account]
|
|
126
|
+
});
|
|
42
127
|
return {
|
|
43
128
|
claimable: claimable.map((w) => toClaimableWithdrawal(w, void 0)),
|
|
44
129
|
pending: pending.map((w) => toPendingWithdrawal(w, void 0)).sort((a, b) => a.claimableAt < b.claimableAt ? -1 : 1)
|
|
@@ -210,6 +210,109 @@ export declare const iWithdrawalCompressorV313Abi: readonly [{
|
|
|
210
210
|
}];
|
|
211
211
|
}];
|
|
212
212
|
readonly stateMutability: "view";
|
|
213
|
+
}, {
|
|
214
|
+
readonly type: "function";
|
|
215
|
+
readonly name: "getExternalAccountCurrentWithdrawals";
|
|
216
|
+
readonly inputs: readonly [{
|
|
217
|
+
readonly name: "withdrawalTokens";
|
|
218
|
+
readonly type: "address[]";
|
|
219
|
+
readonly internalType: "address[]";
|
|
220
|
+
}, {
|
|
221
|
+
readonly name: "account";
|
|
222
|
+
readonly type: "address";
|
|
223
|
+
readonly internalType: "address";
|
|
224
|
+
}];
|
|
225
|
+
readonly outputs: readonly [{
|
|
226
|
+
readonly name: "";
|
|
227
|
+
readonly type: "tuple[]";
|
|
228
|
+
readonly internalType: "struct ClaimableWithdrawal[]";
|
|
229
|
+
readonly components: readonly [{
|
|
230
|
+
readonly name: "token";
|
|
231
|
+
readonly type: "address";
|
|
232
|
+
readonly internalType: "address";
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "withdrawalPhantomToken";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
readonly internalType: "address";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "withdrawalTokenSpent";
|
|
239
|
+
readonly type: "uint256";
|
|
240
|
+
readonly internalType: "uint256";
|
|
241
|
+
}, {
|
|
242
|
+
readonly name: "outputs";
|
|
243
|
+
readonly type: "tuple[]";
|
|
244
|
+
readonly internalType: "struct WithdrawalOutput[]";
|
|
245
|
+
readonly components: readonly [{
|
|
246
|
+
readonly name: "token";
|
|
247
|
+
readonly type: "address";
|
|
248
|
+
readonly internalType: "address";
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "isDelayed";
|
|
251
|
+
readonly type: "bool";
|
|
252
|
+
readonly internalType: "bool";
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "amount";
|
|
255
|
+
readonly type: "uint256";
|
|
256
|
+
readonly internalType: "uint256";
|
|
257
|
+
}];
|
|
258
|
+
}, {
|
|
259
|
+
readonly name: "claimCalls";
|
|
260
|
+
readonly type: "tuple[]";
|
|
261
|
+
readonly internalType: "struct MultiCall[]";
|
|
262
|
+
readonly components: readonly [{
|
|
263
|
+
readonly name: "target";
|
|
264
|
+
readonly type: "address";
|
|
265
|
+
readonly internalType: "address";
|
|
266
|
+
}, {
|
|
267
|
+
readonly name: "callData";
|
|
268
|
+
readonly type: "bytes";
|
|
269
|
+
readonly internalType: "bytes";
|
|
270
|
+
}];
|
|
271
|
+
}, {
|
|
272
|
+
readonly name: "extraData";
|
|
273
|
+
readonly type: "bytes";
|
|
274
|
+
readonly internalType: "bytes";
|
|
275
|
+
}];
|
|
276
|
+
}, {
|
|
277
|
+
readonly name: "";
|
|
278
|
+
readonly type: "tuple[]";
|
|
279
|
+
readonly internalType: "struct PendingWithdrawal[]";
|
|
280
|
+
readonly components: readonly [{
|
|
281
|
+
readonly name: "token";
|
|
282
|
+
readonly type: "address";
|
|
283
|
+
readonly internalType: "address";
|
|
284
|
+
}, {
|
|
285
|
+
readonly name: "withdrawalPhantomToken";
|
|
286
|
+
readonly type: "address";
|
|
287
|
+
readonly internalType: "address";
|
|
288
|
+
}, {
|
|
289
|
+
readonly name: "expectedOutputs";
|
|
290
|
+
readonly type: "tuple[]";
|
|
291
|
+
readonly internalType: "struct WithdrawalOutput[]";
|
|
292
|
+
readonly components: readonly [{
|
|
293
|
+
readonly name: "token";
|
|
294
|
+
readonly type: "address";
|
|
295
|
+
readonly internalType: "address";
|
|
296
|
+
}, {
|
|
297
|
+
readonly name: "isDelayed";
|
|
298
|
+
readonly type: "bool";
|
|
299
|
+
readonly internalType: "bool";
|
|
300
|
+
}, {
|
|
301
|
+
readonly name: "amount";
|
|
302
|
+
readonly type: "uint256";
|
|
303
|
+
readonly internalType: "uint256";
|
|
304
|
+
}];
|
|
305
|
+
}, {
|
|
306
|
+
readonly name: "claimableAt";
|
|
307
|
+
readonly type: "uint256";
|
|
308
|
+
readonly internalType: "uint256";
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "extraData";
|
|
311
|
+
readonly type: "bytes";
|
|
312
|
+
readonly internalType: "bytes";
|
|
313
|
+
}];
|
|
314
|
+
}];
|
|
315
|
+
readonly stateMutability: "view";
|
|
213
316
|
}, {
|
|
214
317
|
readonly type: "function";
|
|
215
318
|
readonly name: "getWithdrawalStatus";
|
package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare abstract class AbstractWithdrawalCompressorContract<abi extends A
|
|
|
78
78
|
/**
|
|
79
79
|
* {@inheritDoc IWithdrawalCompressorContract.getExternalAccountCurrentWithdrawals}
|
|
80
80
|
**/
|
|
81
|
-
getExternalAccountCurrentWithdrawals(
|
|
81
|
+
getExternalAccountCurrentWithdrawals(_account: Address, ..._withdrawalTokens: Address[]): Promise<CurrentWithdrawals>;
|
|
82
82
|
/**
|
|
83
83
|
* {@inheritDoc IWithdrawalCompressorContract.getWithdrawalStatus}
|
|
84
84
|
**/
|
|
@@ -214,6 +214,109 @@ declare const abi: readonly [{
|
|
|
214
214
|
}];
|
|
215
215
|
}];
|
|
216
216
|
readonly stateMutability: "view";
|
|
217
|
+
}, {
|
|
218
|
+
readonly type: "function";
|
|
219
|
+
readonly name: "getExternalAccountCurrentWithdrawals";
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly name: "withdrawalTokens";
|
|
222
|
+
readonly type: "address[]";
|
|
223
|
+
readonly internalType: "address[]";
|
|
224
|
+
}, {
|
|
225
|
+
readonly name: "account";
|
|
226
|
+
readonly type: "address";
|
|
227
|
+
readonly internalType: "address";
|
|
228
|
+
}];
|
|
229
|
+
readonly outputs: readonly [{
|
|
230
|
+
readonly name: "";
|
|
231
|
+
readonly type: "tuple[]";
|
|
232
|
+
readonly internalType: "struct ClaimableWithdrawal[]";
|
|
233
|
+
readonly components: readonly [{
|
|
234
|
+
readonly name: "token";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
readonly internalType: "address";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "withdrawalPhantomToken";
|
|
239
|
+
readonly type: "address";
|
|
240
|
+
readonly internalType: "address";
|
|
241
|
+
}, {
|
|
242
|
+
readonly name: "withdrawalTokenSpent";
|
|
243
|
+
readonly type: "uint256";
|
|
244
|
+
readonly internalType: "uint256";
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "outputs";
|
|
247
|
+
readonly type: "tuple[]";
|
|
248
|
+
readonly internalType: "struct WithdrawalOutput[]";
|
|
249
|
+
readonly components: readonly [{
|
|
250
|
+
readonly name: "token";
|
|
251
|
+
readonly type: "address";
|
|
252
|
+
readonly internalType: "address";
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "isDelayed";
|
|
255
|
+
readonly type: "bool";
|
|
256
|
+
readonly internalType: "bool";
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "amount";
|
|
259
|
+
readonly type: "uint256";
|
|
260
|
+
readonly internalType: "uint256";
|
|
261
|
+
}];
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "claimCalls";
|
|
264
|
+
readonly type: "tuple[]";
|
|
265
|
+
readonly internalType: "struct MultiCall[]";
|
|
266
|
+
readonly components: readonly [{
|
|
267
|
+
readonly name: "target";
|
|
268
|
+
readonly type: "address";
|
|
269
|
+
readonly internalType: "address";
|
|
270
|
+
}, {
|
|
271
|
+
readonly name: "callData";
|
|
272
|
+
readonly type: "bytes";
|
|
273
|
+
readonly internalType: "bytes";
|
|
274
|
+
}];
|
|
275
|
+
}, {
|
|
276
|
+
readonly name: "extraData";
|
|
277
|
+
readonly type: "bytes";
|
|
278
|
+
readonly internalType: "bytes";
|
|
279
|
+
}];
|
|
280
|
+
}, {
|
|
281
|
+
readonly name: "";
|
|
282
|
+
readonly type: "tuple[]";
|
|
283
|
+
readonly internalType: "struct PendingWithdrawal[]";
|
|
284
|
+
readonly components: readonly [{
|
|
285
|
+
readonly name: "token";
|
|
286
|
+
readonly type: "address";
|
|
287
|
+
readonly internalType: "address";
|
|
288
|
+
}, {
|
|
289
|
+
readonly name: "withdrawalPhantomToken";
|
|
290
|
+
readonly type: "address";
|
|
291
|
+
readonly internalType: "address";
|
|
292
|
+
}, {
|
|
293
|
+
readonly name: "expectedOutputs";
|
|
294
|
+
readonly type: "tuple[]";
|
|
295
|
+
readonly internalType: "struct WithdrawalOutput[]";
|
|
296
|
+
readonly components: readonly [{
|
|
297
|
+
readonly name: "token";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
readonly internalType: "address";
|
|
300
|
+
}, {
|
|
301
|
+
readonly name: "isDelayed";
|
|
302
|
+
readonly type: "bool";
|
|
303
|
+
readonly internalType: "bool";
|
|
304
|
+
}, {
|
|
305
|
+
readonly name: "amount";
|
|
306
|
+
readonly type: "uint256";
|
|
307
|
+
readonly internalType: "uint256";
|
|
308
|
+
}];
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "claimableAt";
|
|
311
|
+
readonly type: "uint256";
|
|
312
|
+
readonly internalType: "uint256";
|
|
313
|
+
}, {
|
|
314
|
+
readonly name: "extraData";
|
|
315
|
+
readonly type: "bytes";
|
|
316
|
+
readonly internalType: "bytes";
|
|
317
|
+
}];
|
|
318
|
+
}];
|
|
319
|
+
readonly stateMutability: "view";
|
|
217
320
|
}, {
|
|
218
321
|
readonly type: "function";
|
|
219
322
|
readonly name: "getWithdrawalStatus";
|
|
@@ -507,7 +610,7 @@ export declare class WithdrawalCompressorV313Contract extends AbstractWithdrawal
|
|
|
507
610
|
/**
|
|
508
611
|
* {@inheritDoc IWithdrawalCompressorContract.getExternalAccountCurrentWithdrawals}
|
|
509
612
|
**/
|
|
510
|
-
getExternalAccountCurrentWithdrawals(
|
|
613
|
+
getExternalAccountCurrentWithdrawals(account: Address, ...withdrawalTokens: Address[]): Promise<CurrentWithdrawals>;
|
|
511
614
|
/**
|
|
512
615
|
* {@inheritDoc IWithdrawalCompressorContract.getWithdrawalStatus}
|
|
513
616
|
**/
|
|
@@ -361,12 +361,13 @@ export interface IWithdrawalCompressorContract extends IBaseContract {
|
|
|
361
361
|
getCurrentWithdrawals(creditAccount: Address): Promise<CurrentWithdrawals>;
|
|
362
362
|
/**
|
|
363
363
|
* Returns claimable and pending delayed withdrawals of an external address
|
|
364
|
-
* (non-credit-account, e.g. liquidator EOA) in the given withdrawal phantom
|
|
364
|
+
* (non-credit-account, e.g. liquidator EOA) in the given withdrawal phantom
|
|
365
|
+
* tokens. With no tokens given, returns empty lists.
|
|
365
366
|
* Only supported on v313+ compressors; on older versions throws if
|
|
366
367
|
* `sdk.strictContractTypes` is `true`, otherwise logs a warning and
|
|
367
368
|
* returns empty lists.
|
|
368
369
|
**/
|
|
369
|
-
getExternalAccountCurrentWithdrawals(
|
|
370
|
+
getExternalAccountCurrentWithdrawals(account: Address, ...withdrawalTokens: Address[]): Promise<CurrentWithdrawals>;
|
|
370
371
|
/**
|
|
371
372
|
* Returns statuses of the given redeemer contracts.
|
|
372
373
|
* Only supported on v313+ compressors; on older versions throws if
|