@dzapio/sdk 2.0.2 → 2.0.4
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.d.ts +10 -8
- package/dist/index.js +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/zap/build.d.ts +6 -0
- package/dist/utils/decoder/swap/abis.d.ts +643 -0
- package/dist/utils/decoder/swap/inputDataDecoder.d.ts +14 -0
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/tokens.d.ts +3 -2
- package/package.json +1 -1
|
@@ -9,6 +9,11 @@ export type ZapRouteRequestPoolDetails = {
|
|
|
9
9
|
upperTick: number;
|
|
10
10
|
metadata?: unknown;
|
|
11
11
|
};
|
|
12
|
+
export type ZapIntegratorConfig = {
|
|
13
|
+
id: string;
|
|
14
|
+
feeBps: number;
|
|
15
|
+
wallet: string;
|
|
16
|
+
};
|
|
12
17
|
export type ZapBuildTxnResponse = {
|
|
13
18
|
amountOut: string;
|
|
14
19
|
approvalData: {
|
|
@@ -28,6 +33,7 @@ export type ZapBuildTxnRequest = {
|
|
|
28
33
|
refundee: string;
|
|
29
34
|
slippage: number;
|
|
30
35
|
account: string;
|
|
36
|
+
integrator?: ZapIntegratorConfig;
|
|
31
37
|
permitData?: string;
|
|
32
38
|
amount?: string;
|
|
33
39
|
estimateGas?: boolean;
|
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
export declare const SwapAbisByFunctionName: {
|
|
2
|
+
SingleSwap: readonly [{
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly internalType: "bytes32";
|
|
5
|
+
readonly name: "_transactionId";
|
|
6
|
+
readonly type: "bytes32";
|
|
7
|
+
}, {
|
|
8
|
+
readonly internalType: "bytes";
|
|
9
|
+
readonly name: "_feeData";
|
|
10
|
+
readonly type: "bytes";
|
|
11
|
+
}, {
|
|
12
|
+
readonly internalType: "bytes";
|
|
13
|
+
readonly name: "_feeVerificationSignature";
|
|
14
|
+
readonly type: "bytes";
|
|
15
|
+
}, {
|
|
16
|
+
readonly internalType: "uint256";
|
|
17
|
+
readonly name: "_deadline";
|
|
18
|
+
readonly type: "uint256";
|
|
19
|
+
}, {
|
|
20
|
+
readonly components: readonly [{
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly name: "token";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly internalType: "uint256";
|
|
26
|
+
readonly name: "amount";
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}, {
|
|
29
|
+
readonly internalType: "bytes";
|
|
30
|
+
readonly name: "permit";
|
|
31
|
+
readonly type: "bytes";
|
|
32
|
+
}];
|
|
33
|
+
readonly internalType: "struct InputToken";
|
|
34
|
+
readonly name: "_inputTokens";
|
|
35
|
+
readonly type: "tuple";
|
|
36
|
+
}, {
|
|
37
|
+
readonly components: readonly [{
|
|
38
|
+
readonly internalType: "address";
|
|
39
|
+
readonly name: "recipient";
|
|
40
|
+
readonly type: "address";
|
|
41
|
+
}, {
|
|
42
|
+
readonly internalType: "address";
|
|
43
|
+
readonly name: "from";
|
|
44
|
+
readonly type: "address";
|
|
45
|
+
}, {
|
|
46
|
+
readonly internalType: "address";
|
|
47
|
+
readonly name: "to";
|
|
48
|
+
readonly type: "address";
|
|
49
|
+
}, {
|
|
50
|
+
readonly internalType: "uint256";
|
|
51
|
+
readonly name: "fromAmount";
|
|
52
|
+
readonly type: "uint256";
|
|
53
|
+
}, {
|
|
54
|
+
readonly internalType: "uint256";
|
|
55
|
+
readonly name: "minToAmount";
|
|
56
|
+
readonly type: "uint256";
|
|
57
|
+
}];
|
|
58
|
+
readonly internalType: "struct SwapData";
|
|
59
|
+
readonly name: "_swapData";
|
|
60
|
+
readonly type: "tuple";
|
|
61
|
+
}, {
|
|
62
|
+
readonly components: readonly [{
|
|
63
|
+
readonly internalType: "string";
|
|
64
|
+
readonly name: "dex";
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
}, {
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
readonly name: "callTo";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly internalType: "address";
|
|
72
|
+
readonly name: "approveTo";
|
|
73
|
+
readonly type: "address";
|
|
74
|
+
}, {
|
|
75
|
+
readonly internalType: "bytes";
|
|
76
|
+
readonly name: "swapCallData";
|
|
77
|
+
readonly type: "bytes";
|
|
78
|
+
}, {
|
|
79
|
+
readonly internalType: "bool";
|
|
80
|
+
readonly name: "isDirectTransfer";
|
|
81
|
+
readonly type: "bool";
|
|
82
|
+
}];
|
|
83
|
+
readonly internalType: "struct SwapExecutionData";
|
|
84
|
+
readonly name: "_swapExecutionData";
|
|
85
|
+
readonly type: "tuple";
|
|
86
|
+
}];
|
|
87
|
+
readonly name: "swap";
|
|
88
|
+
readonly outputs: readonly [];
|
|
89
|
+
readonly stateMutability: "payable";
|
|
90
|
+
readonly type: "function";
|
|
91
|
+
}];
|
|
92
|
+
BatchPermitSwapAbi: readonly [{
|
|
93
|
+
readonly inputs: readonly [{
|
|
94
|
+
readonly internalType: "bytes32";
|
|
95
|
+
readonly name: "_transactionId";
|
|
96
|
+
readonly type: "bytes32";
|
|
97
|
+
}, {
|
|
98
|
+
readonly internalType: "bytes";
|
|
99
|
+
readonly name: "_feeData";
|
|
100
|
+
readonly type: "bytes";
|
|
101
|
+
}, {
|
|
102
|
+
readonly internalType: "bytes";
|
|
103
|
+
readonly name: "_feeVerificationSignature";
|
|
104
|
+
readonly type: "bytes";
|
|
105
|
+
}, {
|
|
106
|
+
readonly internalType: "uint256";
|
|
107
|
+
readonly name: "_deadline";
|
|
108
|
+
readonly type: "uint256";
|
|
109
|
+
}, {
|
|
110
|
+
readonly internalType: "bytes";
|
|
111
|
+
readonly name: "_batchDepositSignature";
|
|
112
|
+
readonly type: "bytes";
|
|
113
|
+
}, {
|
|
114
|
+
readonly components: readonly [{
|
|
115
|
+
readonly components: readonly [{
|
|
116
|
+
readonly internalType: "address";
|
|
117
|
+
readonly name: "token";
|
|
118
|
+
readonly type: "address";
|
|
119
|
+
}, {
|
|
120
|
+
readonly internalType: "uint256";
|
|
121
|
+
readonly name: "amount";
|
|
122
|
+
readonly type: "uint256";
|
|
123
|
+
}];
|
|
124
|
+
readonly internalType: "struct TokenPermissions[]";
|
|
125
|
+
readonly name: "permitted";
|
|
126
|
+
readonly type: "tuple[]";
|
|
127
|
+
}, {
|
|
128
|
+
readonly internalType: "uint256";
|
|
129
|
+
readonly name: "nonce";
|
|
130
|
+
readonly type: "uint256";
|
|
131
|
+
}, {
|
|
132
|
+
readonly internalType: "uint256";
|
|
133
|
+
readonly name: "deadline";
|
|
134
|
+
readonly type: "uint256";
|
|
135
|
+
}];
|
|
136
|
+
readonly internalType: "struct PermitBatchTransferFrom";
|
|
137
|
+
readonly name: "_tokenDepositDetails";
|
|
138
|
+
readonly type: "tuple";
|
|
139
|
+
}, {
|
|
140
|
+
readonly components: readonly [{
|
|
141
|
+
readonly internalType: "address";
|
|
142
|
+
readonly name: "recipient";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}, {
|
|
145
|
+
readonly internalType: "address";
|
|
146
|
+
readonly name: "from";
|
|
147
|
+
readonly type: "address";
|
|
148
|
+
}, {
|
|
149
|
+
readonly internalType: "address";
|
|
150
|
+
readonly name: "to";
|
|
151
|
+
readonly type: "address";
|
|
152
|
+
}, {
|
|
153
|
+
readonly internalType: "uint256";
|
|
154
|
+
readonly name: "fromAmount";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
}, {
|
|
157
|
+
readonly internalType: "uint256";
|
|
158
|
+
readonly name: "minToAmount";
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
}];
|
|
161
|
+
readonly internalType: "struct SwapData[]";
|
|
162
|
+
readonly name: "_swapData";
|
|
163
|
+
readonly type: "tuple[]";
|
|
164
|
+
}, {
|
|
165
|
+
readonly components: readonly [{
|
|
166
|
+
readonly internalType: "string";
|
|
167
|
+
readonly name: "dex";
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
}, {
|
|
170
|
+
readonly internalType: "address";
|
|
171
|
+
readonly name: "callTo";
|
|
172
|
+
readonly type: "address";
|
|
173
|
+
}, {
|
|
174
|
+
readonly internalType: "address";
|
|
175
|
+
readonly name: "approveTo";
|
|
176
|
+
readonly type: "address";
|
|
177
|
+
}, {
|
|
178
|
+
readonly internalType: "bytes";
|
|
179
|
+
readonly name: "swapCallData";
|
|
180
|
+
readonly type: "bytes";
|
|
181
|
+
}, {
|
|
182
|
+
readonly internalType: "bool";
|
|
183
|
+
readonly name: "isDirectTransfer";
|
|
184
|
+
readonly type: "bool";
|
|
185
|
+
}];
|
|
186
|
+
readonly internalType: "struct SwapExecutionData[]";
|
|
187
|
+
readonly name: "_swapExecutionData";
|
|
188
|
+
readonly type: "tuple[]";
|
|
189
|
+
}, {
|
|
190
|
+
readonly internalType: "bool";
|
|
191
|
+
readonly name: "withoutRevert";
|
|
192
|
+
readonly type: "bool";
|
|
193
|
+
}];
|
|
194
|
+
readonly name: "swap";
|
|
195
|
+
readonly outputs: readonly [];
|
|
196
|
+
readonly stateMutability: "payable";
|
|
197
|
+
readonly type: "function";
|
|
198
|
+
}];
|
|
199
|
+
MultiSwapAbi: readonly [{
|
|
200
|
+
readonly inputs: readonly [{
|
|
201
|
+
readonly internalType: "bytes32";
|
|
202
|
+
readonly name: "_transactionId";
|
|
203
|
+
readonly type: "bytes32";
|
|
204
|
+
}, {
|
|
205
|
+
readonly internalType: "bytes";
|
|
206
|
+
readonly name: "_feeData";
|
|
207
|
+
readonly type: "bytes";
|
|
208
|
+
}, {
|
|
209
|
+
readonly internalType: "bytes";
|
|
210
|
+
readonly name: "_feeVerificationSignature";
|
|
211
|
+
readonly type: "bytes";
|
|
212
|
+
}, {
|
|
213
|
+
readonly internalType: "uint256";
|
|
214
|
+
readonly name: "_deadline";
|
|
215
|
+
readonly type: "uint256";
|
|
216
|
+
}, {
|
|
217
|
+
readonly components: readonly [{
|
|
218
|
+
readonly internalType: "address";
|
|
219
|
+
readonly name: "token";
|
|
220
|
+
readonly type: "address";
|
|
221
|
+
}, {
|
|
222
|
+
readonly internalType: "uint256";
|
|
223
|
+
readonly name: "amount";
|
|
224
|
+
readonly type: "uint256";
|
|
225
|
+
}, {
|
|
226
|
+
readonly internalType: "bytes";
|
|
227
|
+
readonly name: "permit";
|
|
228
|
+
readonly type: "bytes";
|
|
229
|
+
}];
|
|
230
|
+
readonly internalType: "struct InputToken[]";
|
|
231
|
+
readonly name: "_inputTokens";
|
|
232
|
+
readonly type: "tuple[]";
|
|
233
|
+
}, {
|
|
234
|
+
readonly components: readonly [{
|
|
235
|
+
readonly internalType: "address";
|
|
236
|
+
readonly name: "recipient";
|
|
237
|
+
readonly type: "address";
|
|
238
|
+
}, {
|
|
239
|
+
readonly internalType: "address";
|
|
240
|
+
readonly name: "from";
|
|
241
|
+
readonly type: "address";
|
|
242
|
+
}, {
|
|
243
|
+
readonly internalType: "address";
|
|
244
|
+
readonly name: "to";
|
|
245
|
+
readonly type: "address";
|
|
246
|
+
}, {
|
|
247
|
+
readonly internalType: "uint256";
|
|
248
|
+
readonly name: "fromAmount";
|
|
249
|
+
readonly type: "uint256";
|
|
250
|
+
}, {
|
|
251
|
+
readonly internalType: "uint256";
|
|
252
|
+
readonly name: "minToAmount";
|
|
253
|
+
readonly type: "uint256";
|
|
254
|
+
}];
|
|
255
|
+
readonly internalType: "struct SwapData[]";
|
|
256
|
+
readonly name: "_swapData";
|
|
257
|
+
readonly type: "tuple[]";
|
|
258
|
+
}, {
|
|
259
|
+
readonly components: readonly [{
|
|
260
|
+
readonly internalType: "string";
|
|
261
|
+
readonly name: "dex";
|
|
262
|
+
readonly type: "string";
|
|
263
|
+
}, {
|
|
264
|
+
readonly internalType: "address";
|
|
265
|
+
readonly name: "callTo";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
}, {
|
|
268
|
+
readonly internalType: "address";
|
|
269
|
+
readonly name: "approveTo";
|
|
270
|
+
readonly type: "address";
|
|
271
|
+
}, {
|
|
272
|
+
readonly internalType: "bytes";
|
|
273
|
+
readonly name: "swapCallData";
|
|
274
|
+
readonly type: "bytes";
|
|
275
|
+
}, {
|
|
276
|
+
readonly internalType: "bool";
|
|
277
|
+
readonly name: "isDirectTransfer";
|
|
278
|
+
readonly type: "bool";
|
|
279
|
+
}];
|
|
280
|
+
readonly internalType: "struct SwapExecutionData[]";
|
|
281
|
+
readonly name: "_swapExecutionData";
|
|
282
|
+
readonly type: "tuple[]";
|
|
283
|
+
}, {
|
|
284
|
+
readonly internalType: "bool";
|
|
285
|
+
readonly name: "withoutRevert";
|
|
286
|
+
readonly type: "bool";
|
|
287
|
+
}];
|
|
288
|
+
readonly name: "swap";
|
|
289
|
+
readonly outputs: readonly [];
|
|
290
|
+
readonly stateMutability: "payable";
|
|
291
|
+
readonly type: "function";
|
|
292
|
+
}];
|
|
293
|
+
GaslessExecuteMultiSwapAbi: readonly [{
|
|
294
|
+
readonly inputs: readonly [{
|
|
295
|
+
readonly internalType: "bytes32";
|
|
296
|
+
readonly name: "_transactionId";
|
|
297
|
+
readonly type: "bytes32";
|
|
298
|
+
}, {
|
|
299
|
+
readonly internalType: "bytes";
|
|
300
|
+
readonly name: "_feeData";
|
|
301
|
+
readonly type: "bytes";
|
|
302
|
+
}, {
|
|
303
|
+
readonly internalType: "bytes";
|
|
304
|
+
readonly name: "_feeVerificationSignature";
|
|
305
|
+
readonly type: "bytes";
|
|
306
|
+
}, {
|
|
307
|
+
readonly internalType: "bytes";
|
|
308
|
+
readonly name: "_userIntentSignature";
|
|
309
|
+
readonly type: "bytes";
|
|
310
|
+
}, {
|
|
311
|
+
readonly internalType: "uint256";
|
|
312
|
+
readonly name: "_userIntentDeadline";
|
|
313
|
+
readonly type: "uint256";
|
|
314
|
+
}, {
|
|
315
|
+
readonly internalType: "uint256";
|
|
316
|
+
readonly name: "_feeDeadline";
|
|
317
|
+
readonly type: "uint256";
|
|
318
|
+
}, {
|
|
319
|
+
readonly internalType: "address";
|
|
320
|
+
readonly name: "_user";
|
|
321
|
+
readonly type: "address";
|
|
322
|
+
}, {
|
|
323
|
+
readonly components: readonly [{
|
|
324
|
+
readonly internalType: "address";
|
|
325
|
+
readonly name: "token";
|
|
326
|
+
readonly type: "address";
|
|
327
|
+
}, {
|
|
328
|
+
readonly internalType: "uint256";
|
|
329
|
+
readonly name: "amount";
|
|
330
|
+
readonly type: "uint256";
|
|
331
|
+
}, {
|
|
332
|
+
readonly internalType: "bytes";
|
|
333
|
+
readonly name: "permit";
|
|
334
|
+
readonly type: "bytes";
|
|
335
|
+
}];
|
|
336
|
+
readonly internalType: "struct InputToken[]";
|
|
337
|
+
readonly name: "_inputTokens";
|
|
338
|
+
readonly type: "tuple[]";
|
|
339
|
+
}, {
|
|
340
|
+
readonly components: readonly [{
|
|
341
|
+
readonly internalType: "address";
|
|
342
|
+
readonly name: "token";
|
|
343
|
+
readonly type: "address";
|
|
344
|
+
}, {
|
|
345
|
+
readonly internalType: "uint256";
|
|
346
|
+
readonly name: "amount";
|
|
347
|
+
readonly type: "uint256";
|
|
348
|
+
}];
|
|
349
|
+
readonly internalType: "struct TokenInfo[]";
|
|
350
|
+
readonly name: "_executorFeeInfo";
|
|
351
|
+
readonly type: "tuple[]";
|
|
352
|
+
}, {
|
|
353
|
+
readonly components: readonly [{
|
|
354
|
+
readonly internalType: "address";
|
|
355
|
+
readonly name: "recipient";
|
|
356
|
+
readonly type: "address";
|
|
357
|
+
}, {
|
|
358
|
+
readonly internalType: "address";
|
|
359
|
+
readonly name: "from";
|
|
360
|
+
readonly type: "address";
|
|
361
|
+
}, {
|
|
362
|
+
readonly internalType: "address";
|
|
363
|
+
readonly name: "to";
|
|
364
|
+
readonly type: "address";
|
|
365
|
+
}, {
|
|
366
|
+
readonly internalType: "uint256";
|
|
367
|
+
readonly name: "fromAmount";
|
|
368
|
+
readonly type: "uint256";
|
|
369
|
+
}, {
|
|
370
|
+
readonly internalType: "uint256";
|
|
371
|
+
readonly name: "minToAmount";
|
|
372
|
+
readonly type: "uint256";
|
|
373
|
+
}];
|
|
374
|
+
readonly internalType: "struct SwapData[]";
|
|
375
|
+
readonly name: "_swapData";
|
|
376
|
+
readonly type: "tuple[]";
|
|
377
|
+
}, {
|
|
378
|
+
readonly components: readonly [{
|
|
379
|
+
readonly internalType: "string";
|
|
380
|
+
readonly name: "dex";
|
|
381
|
+
readonly type: "string";
|
|
382
|
+
}, {
|
|
383
|
+
readonly internalType: "address";
|
|
384
|
+
readonly name: "callTo";
|
|
385
|
+
readonly type: "address";
|
|
386
|
+
}, {
|
|
387
|
+
readonly internalType: "address";
|
|
388
|
+
readonly name: "approveTo";
|
|
389
|
+
readonly type: "address";
|
|
390
|
+
}, {
|
|
391
|
+
readonly internalType: "bytes";
|
|
392
|
+
readonly name: "swapCallData";
|
|
393
|
+
readonly type: "bytes";
|
|
394
|
+
}, {
|
|
395
|
+
readonly internalType: "bool";
|
|
396
|
+
readonly name: "isDirectTransfer";
|
|
397
|
+
readonly type: "bool";
|
|
398
|
+
}];
|
|
399
|
+
readonly internalType: "struct SwapExecutionData[]";
|
|
400
|
+
readonly name: "_swapExecutionData";
|
|
401
|
+
readonly type: "tuple[]";
|
|
402
|
+
}];
|
|
403
|
+
readonly name: "executeMultiSwap";
|
|
404
|
+
readonly outputs: readonly [];
|
|
405
|
+
readonly stateMutability: "payable";
|
|
406
|
+
readonly type: "function";
|
|
407
|
+
}];
|
|
408
|
+
GaslessExecuteMultiSwapWithWitnessAbi: readonly [{
|
|
409
|
+
readonly inputs: readonly [{
|
|
410
|
+
readonly internalType: "bytes32";
|
|
411
|
+
readonly name: "_transactionId";
|
|
412
|
+
readonly type: "bytes32";
|
|
413
|
+
}, {
|
|
414
|
+
readonly internalType: "bytes";
|
|
415
|
+
readonly name: "_feeData";
|
|
416
|
+
readonly type: "bytes";
|
|
417
|
+
}, {
|
|
418
|
+
readonly internalType: "bytes";
|
|
419
|
+
readonly name: "_feeVerificationSignature";
|
|
420
|
+
readonly type: "bytes";
|
|
421
|
+
}, {
|
|
422
|
+
readonly internalType: "bytes";
|
|
423
|
+
readonly name: "_userIntentSignature";
|
|
424
|
+
readonly type: "bytes";
|
|
425
|
+
}, {
|
|
426
|
+
readonly internalType: "uint256";
|
|
427
|
+
readonly name: "_feeDeadline";
|
|
428
|
+
readonly type: "uint256";
|
|
429
|
+
}, {
|
|
430
|
+
readonly internalType: "address";
|
|
431
|
+
readonly name: "_user";
|
|
432
|
+
readonly type: "address";
|
|
433
|
+
}, {
|
|
434
|
+
readonly components: readonly [{
|
|
435
|
+
readonly components: readonly [{
|
|
436
|
+
readonly internalType: "address";
|
|
437
|
+
readonly name: "token";
|
|
438
|
+
readonly type: "address";
|
|
439
|
+
}, {
|
|
440
|
+
readonly internalType: "uint256";
|
|
441
|
+
readonly name: "amount";
|
|
442
|
+
readonly type: "uint256";
|
|
443
|
+
}];
|
|
444
|
+
readonly internalType: "struct TokenPermissions[]";
|
|
445
|
+
readonly name: "permitted";
|
|
446
|
+
readonly type: "tuple[]";
|
|
447
|
+
}, {
|
|
448
|
+
readonly internalType: "uint256";
|
|
449
|
+
readonly name: "nonce";
|
|
450
|
+
readonly type: "uint256";
|
|
451
|
+
}, {
|
|
452
|
+
readonly internalType: "uint256";
|
|
453
|
+
readonly name: "deadline";
|
|
454
|
+
readonly type: "uint256";
|
|
455
|
+
}];
|
|
456
|
+
readonly internalType: "struct PermitBatchTransferFrom";
|
|
457
|
+
readonly name: "_tokenDepositDetails";
|
|
458
|
+
readonly type: "tuple";
|
|
459
|
+
}, {
|
|
460
|
+
readonly components: readonly [{
|
|
461
|
+
readonly internalType: "address";
|
|
462
|
+
readonly name: "token";
|
|
463
|
+
readonly type: "address";
|
|
464
|
+
}, {
|
|
465
|
+
readonly internalType: "uint256";
|
|
466
|
+
readonly name: "amount";
|
|
467
|
+
readonly type: "uint256";
|
|
468
|
+
}];
|
|
469
|
+
readonly internalType: "struct TokenInfo[]";
|
|
470
|
+
readonly name: "_executorFeeInfo";
|
|
471
|
+
readonly type: "tuple[]";
|
|
472
|
+
}, {
|
|
473
|
+
readonly components: readonly [{
|
|
474
|
+
readonly internalType: "address";
|
|
475
|
+
readonly name: "recipient";
|
|
476
|
+
readonly type: "address";
|
|
477
|
+
}, {
|
|
478
|
+
readonly internalType: "address";
|
|
479
|
+
readonly name: "from";
|
|
480
|
+
readonly type: "address";
|
|
481
|
+
}, {
|
|
482
|
+
readonly internalType: "address";
|
|
483
|
+
readonly name: "to";
|
|
484
|
+
readonly type: "address";
|
|
485
|
+
}, {
|
|
486
|
+
readonly internalType: "uint256";
|
|
487
|
+
readonly name: "fromAmount";
|
|
488
|
+
readonly type: "uint256";
|
|
489
|
+
}, {
|
|
490
|
+
readonly internalType: "uint256";
|
|
491
|
+
readonly name: "minToAmount";
|
|
492
|
+
readonly type: "uint256";
|
|
493
|
+
}];
|
|
494
|
+
readonly internalType: "struct SwapData[]";
|
|
495
|
+
readonly name: "_swapData";
|
|
496
|
+
readonly type: "tuple[]";
|
|
497
|
+
}, {
|
|
498
|
+
readonly components: readonly [{
|
|
499
|
+
readonly internalType: "string";
|
|
500
|
+
readonly name: "dex";
|
|
501
|
+
readonly type: "string";
|
|
502
|
+
}, {
|
|
503
|
+
readonly internalType: "address";
|
|
504
|
+
readonly name: "callTo";
|
|
505
|
+
readonly type: "address";
|
|
506
|
+
}, {
|
|
507
|
+
readonly internalType: "address";
|
|
508
|
+
readonly name: "approveTo";
|
|
509
|
+
readonly type: "address";
|
|
510
|
+
}, {
|
|
511
|
+
readonly internalType: "bytes";
|
|
512
|
+
readonly name: "swapCallData";
|
|
513
|
+
readonly type: "bytes";
|
|
514
|
+
}, {
|
|
515
|
+
readonly internalType: "bool";
|
|
516
|
+
readonly name: "isDirectTransfer";
|
|
517
|
+
readonly type: "bool";
|
|
518
|
+
}];
|
|
519
|
+
readonly internalType: "struct SwapExecutionData[]";
|
|
520
|
+
readonly name: "_swapExecutionData";
|
|
521
|
+
readonly type: "tuple[]";
|
|
522
|
+
}];
|
|
523
|
+
readonly name: "executeMultiSwapWithWitness";
|
|
524
|
+
readonly outputs: readonly [];
|
|
525
|
+
readonly stateMutability: "payable";
|
|
526
|
+
readonly type: "function";
|
|
527
|
+
}];
|
|
528
|
+
GaslessExecuteSwapAbi: readonly [{
|
|
529
|
+
readonly inputs: readonly [{
|
|
530
|
+
readonly internalType: "bytes32";
|
|
531
|
+
readonly name: "_transactionId";
|
|
532
|
+
readonly type: "bytes32";
|
|
533
|
+
}, {
|
|
534
|
+
readonly internalType: "bytes";
|
|
535
|
+
readonly name: "_feeData";
|
|
536
|
+
readonly type: "bytes";
|
|
537
|
+
}, {
|
|
538
|
+
readonly internalType: "bytes";
|
|
539
|
+
readonly name: "_feeVerificationSignature";
|
|
540
|
+
readonly type: "bytes";
|
|
541
|
+
}, {
|
|
542
|
+
readonly internalType: "bytes";
|
|
543
|
+
readonly name: "_userIntentSignature";
|
|
544
|
+
readonly type: "bytes";
|
|
545
|
+
}, {
|
|
546
|
+
readonly internalType: "uint256";
|
|
547
|
+
readonly name: "_userIntentDeadline";
|
|
548
|
+
readonly type: "uint256";
|
|
549
|
+
}, {
|
|
550
|
+
readonly internalType: "uint256";
|
|
551
|
+
readonly name: "_feeDeadline";
|
|
552
|
+
readonly type: "uint256";
|
|
553
|
+
}, {
|
|
554
|
+
readonly internalType: "address";
|
|
555
|
+
readonly name: "_user";
|
|
556
|
+
readonly type: "address";
|
|
557
|
+
}, {
|
|
558
|
+
readonly components: readonly [{
|
|
559
|
+
readonly internalType: "address";
|
|
560
|
+
readonly name: "token";
|
|
561
|
+
readonly type: "address";
|
|
562
|
+
}, {
|
|
563
|
+
readonly internalType: "uint256";
|
|
564
|
+
readonly name: "amount";
|
|
565
|
+
readonly type: "uint256";
|
|
566
|
+
}, {
|
|
567
|
+
readonly internalType: "bytes";
|
|
568
|
+
readonly name: "permit";
|
|
569
|
+
readonly type: "bytes";
|
|
570
|
+
}];
|
|
571
|
+
readonly internalType: "struct InputToken";
|
|
572
|
+
readonly name: "_inputToken";
|
|
573
|
+
readonly type: "tuple";
|
|
574
|
+
}, {
|
|
575
|
+
readonly components: readonly [{
|
|
576
|
+
readonly internalType: "address";
|
|
577
|
+
readonly name: "token";
|
|
578
|
+
readonly type: "address";
|
|
579
|
+
}, {
|
|
580
|
+
readonly internalType: "uint256";
|
|
581
|
+
readonly name: "amount";
|
|
582
|
+
readonly type: "uint256";
|
|
583
|
+
}];
|
|
584
|
+
readonly internalType: "struct TokenInfo";
|
|
585
|
+
readonly name: "_executorFeeInfo";
|
|
586
|
+
readonly type: "tuple";
|
|
587
|
+
}, {
|
|
588
|
+
readonly components: readonly [{
|
|
589
|
+
readonly internalType: "address";
|
|
590
|
+
readonly name: "recipient";
|
|
591
|
+
readonly type: "address";
|
|
592
|
+
}, {
|
|
593
|
+
readonly internalType: "address";
|
|
594
|
+
readonly name: "from";
|
|
595
|
+
readonly type: "address";
|
|
596
|
+
}, {
|
|
597
|
+
readonly internalType: "address";
|
|
598
|
+
readonly name: "to";
|
|
599
|
+
readonly type: "address";
|
|
600
|
+
}, {
|
|
601
|
+
readonly internalType: "uint256";
|
|
602
|
+
readonly name: "fromAmount";
|
|
603
|
+
readonly type: "uint256";
|
|
604
|
+
}, {
|
|
605
|
+
readonly internalType: "uint256";
|
|
606
|
+
readonly name: "minToAmount";
|
|
607
|
+
readonly type: "uint256";
|
|
608
|
+
}];
|
|
609
|
+
readonly internalType: "struct SwapData";
|
|
610
|
+
readonly name: "_swapData";
|
|
611
|
+
readonly type: "tuple";
|
|
612
|
+
}, {
|
|
613
|
+
readonly components: readonly [{
|
|
614
|
+
readonly internalType: "string";
|
|
615
|
+
readonly name: "dex";
|
|
616
|
+
readonly type: "string";
|
|
617
|
+
}, {
|
|
618
|
+
readonly internalType: "address";
|
|
619
|
+
readonly name: "callTo";
|
|
620
|
+
readonly type: "address";
|
|
621
|
+
}, {
|
|
622
|
+
readonly internalType: "address";
|
|
623
|
+
readonly name: "approveTo";
|
|
624
|
+
readonly type: "address";
|
|
625
|
+
}, {
|
|
626
|
+
readonly internalType: "bytes";
|
|
627
|
+
readonly name: "swapCallData";
|
|
628
|
+
readonly type: "bytes";
|
|
629
|
+
}, {
|
|
630
|
+
readonly internalType: "bool";
|
|
631
|
+
readonly name: "isDirectTransfer";
|
|
632
|
+
readonly type: "bool";
|
|
633
|
+
}];
|
|
634
|
+
readonly internalType: "struct SwapExecutionData";
|
|
635
|
+
readonly name: "_swapExecutionData";
|
|
636
|
+
readonly type: "tuple";
|
|
637
|
+
}];
|
|
638
|
+
readonly name: "executeSwap";
|
|
639
|
+
readonly outputs: readonly [];
|
|
640
|
+
readonly stateMutability: "payable";
|
|
641
|
+
readonly type: "function";
|
|
642
|
+
}];
|
|
643
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HexString, SwapInfo } from '../../../types';
|
|
2
|
+
export declare class SwapInputDataDecoder {
|
|
3
|
+
private decodeSingleSwapData;
|
|
4
|
+
private decodeMultiSwapData;
|
|
5
|
+
private decodeBatchPermitSwapData;
|
|
6
|
+
private decodeGaslessExecuteMultiSwapData;
|
|
7
|
+
private decodeGaslessExecuteMultiSwapWithWitnessData;
|
|
8
|
+
private decodeGaslessExecuteSwapData;
|
|
9
|
+
private readonly swapFunctionSignatureWithInputTokenIndex;
|
|
10
|
+
updateSwapInfo: ({ data, eventSwapInfo, }: {
|
|
11
|
+
eventSwapInfo?: SwapInfo[] | SwapInfo;
|
|
12
|
+
data?: HexString;
|
|
13
|
+
}) => SwapInfo[] | SwapInfo | undefined;
|
|
14
|
+
}
|