@gitmyabi/cicada-maker 0.0.0-stage → 1.0.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/README.md +107 -2
- package/contracts/HashflowPool.d.ts +1565 -0
- package/contracts/HashflowPool.js +1541 -0
- package/contracts/HashflowPool.ts +2019 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,1565 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* IQuote.RFQMQuote struct type
|
|
4
|
+
*/
|
|
5
|
+
export type IQuote_RFQMQuote = {
|
|
6
|
+
pool: `0x${string}`;
|
|
7
|
+
externalAccount: `0x${string}`;
|
|
8
|
+
trader: `0x${string}`;
|
|
9
|
+
baseToken: `0x${string}`;
|
|
10
|
+
quoteToken: `0x${string}`;
|
|
11
|
+
baseTokenAmount: bigint;
|
|
12
|
+
quoteTokenAmount: bigint;
|
|
13
|
+
quoteExpiry: bigint;
|
|
14
|
+
txid: `0x${string}`;
|
|
15
|
+
takerSignature: `0x${string}`;
|
|
16
|
+
makerSignature: `0x${string}`;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* IQuote.RFQTQuote struct type
|
|
20
|
+
*/
|
|
21
|
+
export type IQuote_RFQTQuote = {
|
|
22
|
+
pool: `0x${string}`;
|
|
23
|
+
externalAccount: `0x${string}`;
|
|
24
|
+
trader: `0x${string}`;
|
|
25
|
+
effectiveTrader: `0x${string}`;
|
|
26
|
+
baseToken: `0x${string}`;
|
|
27
|
+
quoteToken: `0x${string}`;
|
|
28
|
+
effectiveBaseTokenAmount: bigint;
|
|
29
|
+
baseTokenAmount: bigint;
|
|
30
|
+
quoteTokenAmount: bigint;
|
|
31
|
+
quoteExpiry: bigint;
|
|
32
|
+
nonce: bigint;
|
|
33
|
+
txid: `0x${string}`;
|
|
34
|
+
signature: `0x${string}`;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* IQuote.XChainRFQMQuote struct type
|
|
38
|
+
*/
|
|
39
|
+
export type IQuote_XChainRFQMQuote = {
|
|
40
|
+
srcChainId: bigint;
|
|
41
|
+
dstChainId: bigint;
|
|
42
|
+
srcPool: `0x${string}`;
|
|
43
|
+
dstPool: `0x${string}`;
|
|
44
|
+
srcExternalAccount: `0x${string}`;
|
|
45
|
+
dstExternalAccount: `0x${string}`;
|
|
46
|
+
trader: `0x${string}`;
|
|
47
|
+
dstTrader: `0x${string}`;
|
|
48
|
+
baseToken: `0x${string}`;
|
|
49
|
+
quoteToken: `0x${string}`;
|
|
50
|
+
baseTokenAmount: bigint;
|
|
51
|
+
quoteTokenAmount: bigint;
|
|
52
|
+
quoteExpiry: bigint;
|
|
53
|
+
txid: `0x${string}`;
|
|
54
|
+
xChainMessenger: `0x${string}`;
|
|
55
|
+
takerSignature: `0x${string}`;
|
|
56
|
+
makerSignature: `0x${string}`;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* IQuote.XChainRFQTQuote struct type
|
|
60
|
+
*/
|
|
61
|
+
export type IQuote_XChainRFQTQuote = {
|
|
62
|
+
srcChainId: bigint;
|
|
63
|
+
dstChainId: bigint;
|
|
64
|
+
srcPool: `0x${string}`;
|
|
65
|
+
dstPool: `0x${string}`;
|
|
66
|
+
srcExternalAccount: `0x${string}`;
|
|
67
|
+
dstExternalAccount: `0x${string}`;
|
|
68
|
+
dstTrader: `0x${string}`;
|
|
69
|
+
baseToken: `0x${string}`;
|
|
70
|
+
quoteToken: `0x${string}`;
|
|
71
|
+
effectiveBaseTokenAmount: bigint;
|
|
72
|
+
baseTokenAmount: bigint;
|
|
73
|
+
quoteTokenAmount: bigint;
|
|
74
|
+
quoteExpiry: bigint;
|
|
75
|
+
nonce: bigint;
|
|
76
|
+
txid: `0x${string}`;
|
|
77
|
+
xChainMessenger: `0x${string}`;
|
|
78
|
+
signature: `0x${string}`;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* IHashflowPool.AuthorizedXChainPool struct type
|
|
82
|
+
*/
|
|
83
|
+
export type IHashflowPool_AuthorizedXChainPool = {
|
|
84
|
+
chainId: bigint;
|
|
85
|
+
pool: `0x${string}`;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* HashflowPool ABI
|
|
89
|
+
*
|
|
90
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
91
|
+
*/
|
|
92
|
+
export declare const HashflowPoolAbi: readonly [{
|
|
93
|
+
readonly inputs: readonly [{
|
|
94
|
+
readonly internalType: "address";
|
|
95
|
+
readonly name: "weth";
|
|
96
|
+
readonly type: "address";
|
|
97
|
+
}];
|
|
98
|
+
readonly stateMutability: "nonpayable";
|
|
99
|
+
readonly type: "constructor";
|
|
100
|
+
}, {
|
|
101
|
+
readonly anonymous: false;
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly indexed: false;
|
|
104
|
+
readonly internalType: "uint8";
|
|
105
|
+
readonly name: "version";
|
|
106
|
+
readonly type: "uint8";
|
|
107
|
+
}];
|
|
108
|
+
readonly name: "Initialized";
|
|
109
|
+
readonly type: "event";
|
|
110
|
+
}, {
|
|
111
|
+
readonly anonymous: false;
|
|
112
|
+
readonly inputs: readonly [{
|
|
113
|
+
readonly indexed: false;
|
|
114
|
+
readonly internalType: "address";
|
|
115
|
+
readonly name: "token";
|
|
116
|
+
readonly type: "address";
|
|
117
|
+
}, {
|
|
118
|
+
readonly indexed: false;
|
|
119
|
+
readonly internalType: "address";
|
|
120
|
+
readonly name: "recipient";
|
|
121
|
+
readonly type: "address";
|
|
122
|
+
}, {
|
|
123
|
+
readonly indexed: false;
|
|
124
|
+
readonly internalType: "uint256";
|
|
125
|
+
readonly name: "withdrawAmount";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
}];
|
|
128
|
+
readonly name: "RemoveLiquidity";
|
|
129
|
+
readonly type: "event";
|
|
130
|
+
}, {
|
|
131
|
+
readonly anonymous: false;
|
|
132
|
+
readonly inputs: readonly [{
|
|
133
|
+
readonly indexed: false;
|
|
134
|
+
readonly internalType: "address";
|
|
135
|
+
readonly name: "trader";
|
|
136
|
+
readonly type: "address";
|
|
137
|
+
}, {
|
|
138
|
+
readonly indexed: false;
|
|
139
|
+
readonly internalType: "address";
|
|
140
|
+
readonly name: "effectiveTrader";
|
|
141
|
+
readonly type: "address";
|
|
142
|
+
}, {
|
|
143
|
+
readonly indexed: false;
|
|
144
|
+
readonly internalType: "bytes32";
|
|
145
|
+
readonly name: "txid";
|
|
146
|
+
readonly type: "bytes32";
|
|
147
|
+
}, {
|
|
148
|
+
readonly indexed: false;
|
|
149
|
+
readonly internalType: "address";
|
|
150
|
+
readonly name: "baseToken";
|
|
151
|
+
readonly type: "address";
|
|
152
|
+
}, {
|
|
153
|
+
readonly indexed: false;
|
|
154
|
+
readonly internalType: "address";
|
|
155
|
+
readonly name: "quoteToken";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}, {
|
|
158
|
+
readonly indexed: false;
|
|
159
|
+
readonly internalType: "uint256";
|
|
160
|
+
readonly name: "baseTokenAmount";
|
|
161
|
+
readonly type: "uint256";
|
|
162
|
+
}, {
|
|
163
|
+
readonly indexed: false;
|
|
164
|
+
readonly internalType: "uint256";
|
|
165
|
+
readonly name: "quoteTokenAmount";
|
|
166
|
+
readonly type: "uint256";
|
|
167
|
+
}];
|
|
168
|
+
readonly name: "Trade";
|
|
169
|
+
readonly type: "event";
|
|
170
|
+
}, {
|
|
171
|
+
readonly anonymous: false;
|
|
172
|
+
readonly inputs: readonly [{
|
|
173
|
+
readonly indexed: false;
|
|
174
|
+
readonly internalType: "address";
|
|
175
|
+
readonly name: "signer";
|
|
176
|
+
readonly type: "address";
|
|
177
|
+
}, {
|
|
178
|
+
readonly indexed: false;
|
|
179
|
+
readonly internalType: "address";
|
|
180
|
+
readonly name: "prevSigner";
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
}];
|
|
183
|
+
readonly name: "UpdateSigner";
|
|
184
|
+
readonly type: "event";
|
|
185
|
+
}, {
|
|
186
|
+
readonly anonymous: false;
|
|
187
|
+
readonly inputs: readonly [{
|
|
188
|
+
readonly indexed: false;
|
|
189
|
+
readonly internalType: "address";
|
|
190
|
+
readonly name: "account";
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
}, {
|
|
193
|
+
readonly indexed: false;
|
|
194
|
+
readonly internalType: "bool";
|
|
195
|
+
readonly name: "authorized";
|
|
196
|
+
readonly type: "bool";
|
|
197
|
+
}];
|
|
198
|
+
readonly name: "UpdateWithdrawalAccount";
|
|
199
|
+
readonly type: "event";
|
|
200
|
+
}, {
|
|
201
|
+
readonly anonymous: false;
|
|
202
|
+
readonly inputs: readonly [{
|
|
203
|
+
readonly indexed: false;
|
|
204
|
+
readonly internalType: "uint16";
|
|
205
|
+
readonly name: "dstChainId";
|
|
206
|
+
readonly type: "uint16";
|
|
207
|
+
}, {
|
|
208
|
+
readonly indexed: false;
|
|
209
|
+
readonly internalType: "bytes32";
|
|
210
|
+
readonly name: "dstPool";
|
|
211
|
+
readonly type: "bytes32";
|
|
212
|
+
}, {
|
|
213
|
+
readonly indexed: false;
|
|
214
|
+
readonly internalType: "address";
|
|
215
|
+
readonly name: "trader";
|
|
216
|
+
readonly type: "address";
|
|
217
|
+
}, {
|
|
218
|
+
readonly indexed: false;
|
|
219
|
+
readonly internalType: "bytes32";
|
|
220
|
+
readonly name: "dstTrader";
|
|
221
|
+
readonly type: "bytes32";
|
|
222
|
+
}, {
|
|
223
|
+
readonly indexed: false;
|
|
224
|
+
readonly internalType: "bytes32";
|
|
225
|
+
readonly name: "txid";
|
|
226
|
+
readonly type: "bytes32";
|
|
227
|
+
}, {
|
|
228
|
+
readonly indexed: false;
|
|
229
|
+
readonly internalType: "address";
|
|
230
|
+
readonly name: "baseToken";
|
|
231
|
+
readonly type: "address";
|
|
232
|
+
}, {
|
|
233
|
+
readonly indexed: false;
|
|
234
|
+
readonly internalType: "bytes32";
|
|
235
|
+
readonly name: "quoteToken";
|
|
236
|
+
readonly type: "bytes32";
|
|
237
|
+
}, {
|
|
238
|
+
readonly indexed: false;
|
|
239
|
+
readonly internalType: "uint256";
|
|
240
|
+
readonly name: "baseTokenAmount";
|
|
241
|
+
readonly type: "uint256";
|
|
242
|
+
}, {
|
|
243
|
+
readonly indexed: false;
|
|
244
|
+
readonly internalType: "uint256";
|
|
245
|
+
readonly name: "quoteTokenAmount";
|
|
246
|
+
readonly type: "uint256";
|
|
247
|
+
}];
|
|
248
|
+
readonly name: "XChainTrade";
|
|
249
|
+
readonly type: "event";
|
|
250
|
+
}, {
|
|
251
|
+
readonly anonymous: false;
|
|
252
|
+
readonly inputs: readonly [{
|
|
253
|
+
readonly indexed: false;
|
|
254
|
+
readonly internalType: "bytes32";
|
|
255
|
+
readonly name: "txid";
|
|
256
|
+
readonly type: "bytes32";
|
|
257
|
+
}];
|
|
258
|
+
readonly name: "XChainTradeFill";
|
|
259
|
+
readonly type: "event";
|
|
260
|
+
}, {
|
|
261
|
+
readonly inputs: readonly [];
|
|
262
|
+
readonly name: "_WETH";
|
|
263
|
+
readonly outputs: readonly [{
|
|
264
|
+
readonly internalType: "address";
|
|
265
|
+
readonly name: "";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
}];
|
|
268
|
+
readonly stateMutability: "view";
|
|
269
|
+
readonly type: "function";
|
|
270
|
+
}, {
|
|
271
|
+
readonly inputs: readonly [{
|
|
272
|
+
readonly internalType: "address";
|
|
273
|
+
readonly name: "token";
|
|
274
|
+
readonly type: "address";
|
|
275
|
+
}, {
|
|
276
|
+
readonly internalType: "address";
|
|
277
|
+
readonly name: "spender";
|
|
278
|
+
readonly type: "address";
|
|
279
|
+
}, {
|
|
280
|
+
readonly internalType: "uint256";
|
|
281
|
+
readonly name: "amount";
|
|
282
|
+
readonly type: "uint256";
|
|
283
|
+
}];
|
|
284
|
+
readonly name: "approveToken";
|
|
285
|
+
readonly outputs: readonly [];
|
|
286
|
+
readonly stateMutability: "nonpayable";
|
|
287
|
+
readonly type: "function";
|
|
288
|
+
}, {
|
|
289
|
+
readonly inputs: readonly [{
|
|
290
|
+
readonly internalType: "address";
|
|
291
|
+
readonly name: "token";
|
|
292
|
+
readonly type: "address";
|
|
293
|
+
}, {
|
|
294
|
+
readonly internalType: "address";
|
|
295
|
+
readonly name: "spender";
|
|
296
|
+
readonly type: "address";
|
|
297
|
+
}, {
|
|
298
|
+
readonly internalType: "uint256";
|
|
299
|
+
readonly name: "amount";
|
|
300
|
+
readonly type: "uint256";
|
|
301
|
+
}];
|
|
302
|
+
readonly name: "decreaseTokenAllowance";
|
|
303
|
+
readonly outputs: readonly [];
|
|
304
|
+
readonly stateMutability: "nonpayable";
|
|
305
|
+
readonly type: "function";
|
|
306
|
+
}, {
|
|
307
|
+
readonly inputs: readonly [{
|
|
308
|
+
readonly internalType: "address";
|
|
309
|
+
readonly name: "externalAccount";
|
|
310
|
+
readonly type: "address";
|
|
311
|
+
}, {
|
|
312
|
+
readonly internalType: "bytes32";
|
|
313
|
+
readonly name: "txid";
|
|
314
|
+
readonly type: "bytes32";
|
|
315
|
+
}, {
|
|
316
|
+
readonly internalType: "address";
|
|
317
|
+
readonly name: "trader";
|
|
318
|
+
readonly type: "address";
|
|
319
|
+
}, {
|
|
320
|
+
readonly internalType: "address";
|
|
321
|
+
readonly name: "quoteToken";
|
|
322
|
+
readonly type: "address";
|
|
323
|
+
}, {
|
|
324
|
+
readonly internalType: "uint256";
|
|
325
|
+
readonly name: "quoteTokenAmount";
|
|
326
|
+
readonly type: "uint256";
|
|
327
|
+
}];
|
|
328
|
+
readonly name: "fillXChain";
|
|
329
|
+
readonly outputs: readonly [];
|
|
330
|
+
readonly stateMutability: "nonpayable";
|
|
331
|
+
readonly type: "function";
|
|
332
|
+
}, {
|
|
333
|
+
readonly inputs: readonly [{
|
|
334
|
+
readonly internalType: "address";
|
|
335
|
+
readonly name: "token";
|
|
336
|
+
readonly type: "address";
|
|
337
|
+
}];
|
|
338
|
+
readonly name: "getReserves";
|
|
339
|
+
readonly outputs: readonly [{
|
|
340
|
+
readonly internalType: "uint256";
|
|
341
|
+
readonly name: "";
|
|
342
|
+
readonly type: "uint256";
|
|
343
|
+
}];
|
|
344
|
+
readonly stateMutability: "view";
|
|
345
|
+
readonly type: "function";
|
|
346
|
+
}, {
|
|
347
|
+
readonly inputs: readonly [{
|
|
348
|
+
readonly internalType: "address";
|
|
349
|
+
readonly name: "token";
|
|
350
|
+
readonly type: "address";
|
|
351
|
+
}, {
|
|
352
|
+
readonly internalType: "address";
|
|
353
|
+
readonly name: "spender";
|
|
354
|
+
readonly type: "address";
|
|
355
|
+
}, {
|
|
356
|
+
readonly internalType: "uint256";
|
|
357
|
+
readonly name: "amount";
|
|
358
|
+
readonly type: "uint256";
|
|
359
|
+
}];
|
|
360
|
+
readonly name: "increaseTokenAllowance";
|
|
361
|
+
readonly outputs: readonly [];
|
|
362
|
+
readonly stateMutability: "nonpayable";
|
|
363
|
+
readonly type: "function";
|
|
364
|
+
}, {
|
|
365
|
+
readonly inputs: readonly [{
|
|
366
|
+
readonly internalType: "string";
|
|
367
|
+
readonly name: "_name";
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
}, {
|
|
370
|
+
readonly internalType: "address";
|
|
371
|
+
readonly name: "_signer";
|
|
372
|
+
readonly type: "address";
|
|
373
|
+
}, {
|
|
374
|
+
readonly internalType: "address";
|
|
375
|
+
readonly name: "_operations";
|
|
376
|
+
readonly type: "address";
|
|
377
|
+
}, {
|
|
378
|
+
readonly internalType: "address";
|
|
379
|
+
readonly name: "_router";
|
|
380
|
+
readonly type: "address";
|
|
381
|
+
}];
|
|
382
|
+
readonly name: "initialize";
|
|
383
|
+
readonly outputs: readonly [];
|
|
384
|
+
readonly stateMutability: "nonpayable";
|
|
385
|
+
readonly type: "function";
|
|
386
|
+
}, {
|
|
387
|
+
readonly inputs: readonly [{
|
|
388
|
+
readonly internalType: "bytes32";
|
|
389
|
+
readonly name: "hash";
|
|
390
|
+
readonly type: "bytes32";
|
|
391
|
+
}, {
|
|
392
|
+
readonly internalType: "bytes";
|
|
393
|
+
readonly name: "signature";
|
|
394
|
+
readonly type: "bytes";
|
|
395
|
+
}];
|
|
396
|
+
readonly name: "isValidSignature";
|
|
397
|
+
readonly outputs: readonly [{
|
|
398
|
+
readonly internalType: "bytes4";
|
|
399
|
+
readonly name: "magicValue";
|
|
400
|
+
readonly type: "bytes4";
|
|
401
|
+
}];
|
|
402
|
+
readonly stateMutability: "view";
|
|
403
|
+
readonly type: "function";
|
|
404
|
+
}, {
|
|
405
|
+
readonly inputs: readonly [{
|
|
406
|
+
readonly internalType: "bool";
|
|
407
|
+
readonly name: "enabled";
|
|
408
|
+
readonly type: "bool";
|
|
409
|
+
}];
|
|
410
|
+
readonly name: "killswitchOperations";
|
|
411
|
+
readonly outputs: readonly [];
|
|
412
|
+
readonly stateMutability: "nonpayable";
|
|
413
|
+
readonly type: "function";
|
|
414
|
+
}, {
|
|
415
|
+
readonly inputs: readonly [];
|
|
416
|
+
readonly name: "name";
|
|
417
|
+
readonly outputs: readonly [{
|
|
418
|
+
readonly internalType: "string";
|
|
419
|
+
readonly name: "";
|
|
420
|
+
readonly type: "string";
|
|
421
|
+
}];
|
|
422
|
+
readonly stateMutability: "view";
|
|
423
|
+
readonly type: "function";
|
|
424
|
+
}, {
|
|
425
|
+
readonly inputs: readonly [{
|
|
426
|
+
readonly internalType: "address";
|
|
427
|
+
readonly name: "";
|
|
428
|
+
readonly type: "address";
|
|
429
|
+
}];
|
|
430
|
+
readonly name: "nonces";
|
|
431
|
+
readonly outputs: readonly [{
|
|
432
|
+
readonly internalType: "uint256";
|
|
433
|
+
readonly name: "";
|
|
434
|
+
readonly type: "uint256";
|
|
435
|
+
}];
|
|
436
|
+
readonly stateMutability: "view";
|
|
437
|
+
readonly type: "function";
|
|
438
|
+
}, {
|
|
439
|
+
readonly inputs: readonly [];
|
|
440
|
+
readonly name: "operations";
|
|
441
|
+
readonly outputs: readonly [{
|
|
442
|
+
readonly internalType: "address";
|
|
443
|
+
readonly name: "";
|
|
444
|
+
readonly type: "address";
|
|
445
|
+
}];
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
readonly type: "function";
|
|
448
|
+
}, {
|
|
449
|
+
readonly inputs: readonly [{
|
|
450
|
+
readonly internalType: "address";
|
|
451
|
+
readonly name: "token";
|
|
452
|
+
readonly type: "address";
|
|
453
|
+
}, {
|
|
454
|
+
readonly internalType: "address";
|
|
455
|
+
readonly name: "recipient";
|
|
456
|
+
readonly type: "address";
|
|
457
|
+
}, {
|
|
458
|
+
readonly internalType: "uint256";
|
|
459
|
+
readonly name: "amount";
|
|
460
|
+
readonly type: "uint256";
|
|
461
|
+
}];
|
|
462
|
+
readonly name: "removeLiquidity";
|
|
463
|
+
readonly outputs: readonly [];
|
|
464
|
+
readonly stateMutability: "nonpayable";
|
|
465
|
+
readonly type: "function";
|
|
466
|
+
}, {
|
|
467
|
+
readonly inputs: readonly [];
|
|
468
|
+
readonly name: "router";
|
|
469
|
+
readonly outputs: readonly [{
|
|
470
|
+
readonly internalType: "address";
|
|
471
|
+
readonly name: "";
|
|
472
|
+
readonly type: "address";
|
|
473
|
+
}];
|
|
474
|
+
readonly stateMutability: "view";
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
}, {
|
|
477
|
+
readonly inputs: readonly [];
|
|
478
|
+
readonly name: "signerConfiguration";
|
|
479
|
+
readonly outputs: readonly [{
|
|
480
|
+
readonly internalType: "address";
|
|
481
|
+
readonly name: "signer";
|
|
482
|
+
readonly type: "address";
|
|
483
|
+
}, {
|
|
484
|
+
readonly internalType: "bool";
|
|
485
|
+
readonly name: "enabled";
|
|
486
|
+
readonly type: "bool";
|
|
487
|
+
}];
|
|
488
|
+
readonly stateMutability: "view";
|
|
489
|
+
readonly type: "function";
|
|
490
|
+
}, {
|
|
491
|
+
readonly inputs: readonly [{
|
|
492
|
+
readonly components: readonly [{
|
|
493
|
+
readonly internalType: "address";
|
|
494
|
+
readonly name: "pool";
|
|
495
|
+
readonly type: "address";
|
|
496
|
+
}, {
|
|
497
|
+
readonly internalType: "address";
|
|
498
|
+
readonly name: "externalAccount";
|
|
499
|
+
readonly type: "address";
|
|
500
|
+
}, {
|
|
501
|
+
readonly internalType: "address";
|
|
502
|
+
readonly name: "trader";
|
|
503
|
+
readonly type: "address";
|
|
504
|
+
}, {
|
|
505
|
+
readonly internalType: "address";
|
|
506
|
+
readonly name: "baseToken";
|
|
507
|
+
readonly type: "address";
|
|
508
|
+
}, {
|
|
509
|
+
readonly internalType: "address";
|
|
510
|
+
readonly name: "quoteToken";
|
|
511
|
+
readonly type: "address";
|
|
512
|
+
}, {
|
|
513
|
+
readonly internalType: "uint256";
|
|
514
|
+
readonly name: "baseTokenAmount";
|
|
515
|
+
readonly type: "uint256";
|
|
516
|
+
}, {
|
|
517
|
+
readonly internalType: "uint256";
|
|
518
|
+
readonly name: "quoteTokenAmount";
|
|
519
|
+
readonly type: "uint256";
|
|
520
|
+
}, {
|
|
521
|
+
readonly internalType: "uint256";
|
|
522
|
+
readonly name: "quoteExpiry";
|
|
523
|
+
readonly type: "uint256";
|
|
524
|
+
}, {
|
|
525
|
+
readonly internalType: "bytes32";
|
|
526
|
+
readonly name: "txid";
|
|
527
|
+
readonly type: "bytes32";
|
|
528
|
+
}, {
|
|
529
|
+
readonly internalType: "bytes";
|
|
530
|
+
readonly name: "takerSignature";
|
|
531
|
+
readonly type: "bytes";
|
|
532
|
+
}, {
|
|
533
|
+
readonly internalType: "bytes";
|
|
534
|
+
readonly name: "makerSignature";
|
|
535
|
+
readonly type: "bytes";
|
|
536
|
+
}];
|
|
537
|
+
readonly internalType: "struct IQuote.RFQMQuote";
|
|
538
|
+
readonly name: "quote";
|
|
539
|
+
readonly type: "tuple";
|
|
540
|
+
}];
|
|
541
|
+
readonly name: "tradeRFQM";
|
|
542
|
+
readonly outputs: readonly [];
|
|
543
|
+
readonly stateMutability: "nonpayable";
|
|
544
|
+
readonly type: "function";
|
|
545
|
+
}, {
|
|
546
|
+
readonly inputs: readonly [{
|
|
547
|
+
readonly components: readonly [{
|
|
548
|
+
readonly internalType: "address";
|
|
549
|
+
readonly name: "pool";
|
|
550
|
+
readonly type: "address";
|
|
551
|
+
}, {
|
|
552
|
+
readonly internalType: "address";
|
|
553
|
+
readonly name: "externalAccount";
|
|
554
|
+
readonly type: "address";
|
|
555
|
+
}, {
|
|
556
|
+
readonly internalType: "address";
|
|
557
|
+
readonly name: "trader";
|
|
558
|
+
readonly type: "address";
|
|
559
|
+
}, {
|
|
560
|
+
readonly internalType: "address";
|
|
561
|
+
readonly name: "effectiveTrader";
|
|
562
|
+
readonly type: "address";
|
|
563
|
+
}, {
|
|
564
|
+
readonly internalType: "address";
|
|
565
|
+
readonly name: "baseToken";
|
|
566
|
+
readonly type: "address";
|
|
567
|
+
}, {
|
|
568
|
+
readonly internalType: "address";
|
|
569
|
+
readonly name: "quoteToken";
|
|
570
|
+
readonly type: "address";
|
|
571
|
+
}, {
|
|
572
|
+
readonly internalType: "uint256";
|
|
573
|
+
readonly name: "effectiveBaseTokenAmount";
|
|
574
|
+
readonly type: "uint256";
|
|
575
|
+
}, {
|
|
576
|
+
readonly internalType: "uint256";
|
|
577
|
+
readonly name: "baseTokenAmount";
|
|
578
|
+
readonly type: "uint256";
|
|
579
|
+
}, {
|
|
580
|
+
readonly internalType: "uint256";
|
|
581
|
+
readonly name: "quoteTokenAmount";
|
|
582
|
+
readonly type: "uint256";
|
|
583
|
+
}, {
|
|
584
|
+
readonly internalType: "uint256";
|
|
585
|
+
readonly name: "quoteExpiry";
|
|
586
|
+
readonly type: "uint256";
|
|
587
|
+
}, {
|
|
588
|
+
readonly internalType: "uint256";
|
|
589
|
+
readonly name: "nonce";
|
|
590
|
+
readonly type: "uint256";
|
|
591
|
+
}, {
|
|
592
|
+
readonly internalType: "bytes32";
|
|
593
|
+
readonly name: "txid";
|
|
594
|
+
readonly type: "bytes32";
|
|
595
|
+
}, {
|
|
596
|
+
readonly internalType: "bytes";
|
|
597
|
+
readonly name: "signature";
|
|
598
|
+
readonly type: "bytes";
|
|
599
|
+
}];
|
|
600
|
+
readonly internalType: "struct IQuote.RFQTQuote";
|
|
601
|
+
readonly name: "quote";
|
|
602
|
+
readonly type: "tuple";
|
|
603
|
+
}];
|
|
604
|
+
readonly name: "tradeRFQT";
|
|
605
|
+
readonly outputs: readonly [];
|
|
606
|
+
readonly stateMutability: "payable";
|
|
607
|
+
readonly type: "function";
|
|
608
|
+
}, {
|
|
609
|
+
readonly inputs: readonly [{
|
|
610
|
+
readonly components: readonly [{
|
|
611
|
+
readonly internalType: "uint16";
|
|
612
|
+
readonly name: "srcChainId";
|
|
613
|
+
readonly type: "uint16";
|
|
614
|
+
}, {
|
|
615
|
+
readonly internalType: "uint16";
|
|
616
|
+
readonly name: "dstChainId";
|
|
617
|
+
readonly type: "uint16";
|
|
618
|
+
}, {
|
|
619
|
+
readonly internalType: "address";
|
|
620
|
+
readonly name: "srcPool";
|
|
621
|
+
readonly type: "address";
|
|
622
|
+
}, {
|
|
623
|
+
readonly internalType: "bytes32";
|
|
624
|
+
readonly name: "dstPool";
|
|
625
|
+
readonly type: "bytes32";
|
|
626
|
+
}, {
|
|
627
|
+
readonly internalType: "address";
|
|
628
|
+
readonly name: "srcExternalAccount";
|
|
629
|
+
readonly type: "address";
|
|
630
|
+
}, {
|
|
631
|
+
readonly internalType: "bytes32";
|
|
632
|
+
readonly name: "dstExternalAccount";
|
|
633
|
+
readonly type: "bytes32";
|
|
634
|
+
}, {
|
|
635
|
+
readonly internalType: "address";
|
|
636
|
+
readonly name: "trader";
|
|
637
|
+
readonly type: "address";
|
|
638
|
+
}, {
|
|
639
|
+
readonly internalType: "bytes32";
|
|
640
|
+
readonly name: "dstTrader";
|
|
641
|
+
readonly type: "bytes32";
|
|
642
|
+
}, {
|
|
643
|
+
readonly internalType: "address";
|
|
644
|
+
readonly name: "baseToken";
|
|
645
|
+
readonly type: "address";
|
|
646
|
+
}, {
|
|
647
|
+
readonly internalType: "bytes32";
|
|
648
|
+
readonly name: "quoteToken";
|
|
649
|
+
readonly type: "bytes32";
|
|
650
|
+
}, {
|
|
651
|
+
readonly internalType: "uint256";
|
|
652
|
+
readonly name: "baseTokenAmount";
|
|
653
|
+
readonly type: "uint256";
|
|
654
|
+
}, {
|
|
655
|
+
readonly internalType: "uint256";
|
|
656
|
+
readonly name: "quoteTokenAmount";
|
|
657
|
+
readonly type: "uint256";
|
|
658
|
+
}, {
|
|
659
|
+
readonly internalType: "uint256";
|
|
660
|
+
readonly name: "quoteExpiry";
|
|
661
|
+
readonly type: "uint256";
|
|
662
|
+
}, {
|
|
663
|
+
readonly internalType: "bytes32";
|
|
664
|
+
readonly name: "txid";
|
|
665
|
+
readonly type: "bytes32";
|
|
666
|
+
}, {
|
|
667
|
+
readonly internalType: "address";
|
|
668
|
+
readonly name: "xChainMessenger";
|
|
669
|
+
readonly type: "address";
|
|
670
|
+
}, {
|
|
671
|
+
readonly internalType: "bytes";
|
|
672
|
+
readonly name: "takerSignature";
|
|
673
|
+
readonly type: "bytes";
|
|
674
|
+
}, {
|
|
675
|
+
readonly internalType: "bytes";
|
|
676
|
+
readonly name: "makerSignature";
|
|
677
|
+
readonly type: "bytes";
|
|
678
|
+
}];
|
|
679
|
+
readonly internalType: "struct IQuote.XChainRFQMQuote";
|
|
680
|
+
readonly name: "quote";
|
|
681
|
+
readonly type: "tuple";
|
|
682
|
+
}];
|
|
683
|
+
readonly name: "tradeXChainRFQM";
|
|
684
|
+
readonly outputs: readonly [];
|
|
685
|
+
readonly stateMutability: "nonpayable";
|
|
686
|
+
readonly type: "function";
|
|
687
|
+
}, {
|
|
688
|
+
readonly inputs: readonly [{
|
|
689
|
+
readonly components: readonly [{
|
|
690
|
+
readonly internalType: "uint16";
|
|
691
|
+
readonly name: "srcChainId";
|
|
692
|
+
readonly type: "uint16";
|
|
693
|
+
}, {
|
|
694
|
+
readonly internalType: "uint16";
|
|
695
|
+
readonly name: "dstChainId";
|
|
696
|
+
readonly type: "uint16";
|
|
697
|
+
}, {
|
|
698
|
+
readonly internalType: "address";
|
|
699
|
+
readonly name: "srcPool";
|
|
700
|
+
readonly type: "address";
|
|
701
|
+
}, {
|
|
702
|
+
readonly internalType: "bytes32";
|
|
703
|
+
readonly name: "dstPool";
|
|
704
|
+
readonly type: "bytes32";
|
|
705
|
+
}, {
|
|
706
|
+
readonly internalType: "address";
|
|
707
|
+
readonly name: "srcExternalAccount";
|
|
708
|
+
readonly type: "address";
|
|
709
|
+
}, {
|
|
710
|
+
readonly internalType: "bytes32";
|
|
711
|
+
readonly name: "dstExternalAccount";
|
|
712
|
+
readonly type: "bytes32";
|
|
713
|
+
}, {
|
|
714
|
+
readonly internalType: "bytes32";
|
|
715
|
+
readonly name: "dstTrader";
|
|
716
|
+
readonly type: "bytes32";
|
|
717
|
+
}, {
|
|
718
|
+
readonly internalType: "address";
|
|
719
|
+
readonly name: "baseToken";
|
|
720
|
+
readonly type: "address";
|
|
721
|
+
}, {
|
|
722
|
+
readonly internalType: "bytes32";
|
|
723
|
+
readonly name: "quoteToken";
|
|
724
|
+
readonly type: "bytes32";
|
|
725
|
+
}, {
|
|
726
|
+
readonly internalType: "uint256";
|
|
727
|
+
readonly name: "effectiveBaseTokenAmount";
|
|
728
|
+
readonly type: "uint256";
|
|
729
|
+
}, {
|
|
730
|
+
readonly internalType: "uint256";
|
|
731
|
+
readonly name: "baseTokenAmount";
|
|
732
|
+
readonly type: "uint256";
|
|
733
|
+
}, {
|
|
734
|
+
readonly internalType: "uint256";
|
|
735
|
+
readonly name: "quoteTokenAmount";
|
|
736
|
+
readonly type: "uint256";
|
|
737
|
+
}, {
|
|
738
|
+
readonly internalType: "uint256";
|
|
739
|
+
readonly name: "quoteExpiry";
|
|
740
|
+
readonly type: "uint256";
|
|
741
|
+
}, {
|
|
742
|
+
readonly internalType: "uint256";
|
|
743
|
+
readonly name: "nonce";
|
|
744
|
+
readonly type: "uint256";
|
|
745
|
+
}, {
|
|
746
|
+
readonly internalType: "bytes32";
|
|
747
|
+
readonly name: "txid";
|
|
748
|
+
readonly type: "bytes32";
|
|
749
|
+
}, {
|
|
750
|
+
readonly internalType: "address";
|
|
751
|
+
readonly name: "xChainMessenger";
|
|
752
|
+
readonly type: "address";
|
|
753
|
+
}, {
|
|
754
|
+
readonly internalType: "bytes";
|
|
755
|
+
readonly name: "signature";
|
|
756
|
+
readonly type: "bytes";
|
|
757
|
+
}];
|
|
758
|
+
readonly internalType: "struct IQuote.XChainRFQTQuote";
|
|
759
|
+
readonly name: "quote";
|
|
760
|
+
readonly type: "tuple";
|
|
761
|
+
}, {
|
|
762
|
+
readonly internalType: "address";
|
|
763
|
+
readonly name: "trader";
|
|
764
|
+
readonly type: "address";
|
|
765
|
+
}];
|
|
766
|
+
readonly name: "tradeXChainRFQT";
|
|
767
|
+
readonly outputs: readonly [];
|
|
768
|
+
readonly stateMutability: "payable";
|
|
769
|
+
readonly type: "function";
|
|
770
|
+
}, {
|
|
771
|
+
readonly inputs: readonly [{
|
|
772
|
+
readonly internalType: "address";
|
|
773
|
+
readonly name: "newSigner";
|
|
774
|
+
readonly type: "address";
|
|
775
|
+
}];
|
|
776
|
+
readonly name: "updateSigner";
|
|
777
|
+
readonly outputs: readonly [];
|
|
778
|
+
readonly stateMutability: "nonpayable";
|
|
779
|
+
readonly type: "function";
|
|
780
|
+
}, {
|
|
781
|
+
readonly inputs: readonly [{
|
|
782
|
+
readonly internalType: "address[]";
|
|
783
|
+
readonly name: "withdrawalAccounts";
|
|
784
|
+
readonly type: "address[]";
|
|
785
|
+
}, {
|
|
786
|
+
readonly internalType: "bool";
|
|
787
|
+
readonly name: "authorized";
|
|
788
|
+
readonly type: "bool";
|
|
789
|
+
}];
|
|
790
|
+
readonly name: "updateWithdrawalAccount";
|
|
791
|
+
readonly outputs: readonly [];
|
|
792
|
+
readonly stateMutability: "nonpayable";
|
|
793
|
+
readonly type: "function";
|
|
794
|
+
}, {
|
|
795
|
+
readonly inputs: readonly [{
|
|
796
|
+
readonly internalType: "address";
|
|
797
|
+
readonly name: "xChainMessenger";
|
|
798
|
+
readonly type: "address";
|
|
799
|
+
}, {
|
|
800
|
+
readonly internalType: "bool";
|
|
801
|
+
readonly name: "authorized";
|
|
802
|
+
readonly type: "bool";
|
|
803
|
+
}];
|
|
804
|
+
readonly name: "updateXChainMessengerAuthorization";
|
|
805
|
+
readonly outputs: readonly [];
|
|
806
|
+
readonly stateMutability: "nonpayable";
|
|
807
|
+
readonly type: "function";
|
|
808
|
+
}, {
|
|
809
|
+
readonly inputs: readonly [{
|
|
810
|
+
readonly components: readonly [{
|
|
811
|
+
readonly internalType: "uint16";
|
|
812
|
+
readonly name: "chainId";
|
|
813
|
+
readonly type: "uint16";
|
|
814
|
+
}, {
|
|
815
|
+
readonly internalType: "bytes32";
|
|
816
|
+
readonly name: "pool";
|
|
817
|
+
readonly type: "bytes32";
|
|
818
|
+
}];
|
|
819
|
+
readonly internalType: "struct IHashflowPool.AuthorizedXChainPool[]";
|
|
820
|
+
readonly name: "pools";
|
|
821
|
+
readonly type: "tuple[]";
|
|
822
|
+
}, {
|
|
823
|
+
readonly internalType: "bool";
|
|
824
|
+
readonly name: "status";
|
|
825
|
+
readonly type: "bool";
|
|
826
|
+
}];
|
|
827
|
+
readonly name: "updateXChainPoolAuthorization";
|
|
828
|
+
readonly outputs: readonly [];
|
|
829
|
+
readonly stateMutability: "nonpayable";
|
|
830
|
+
readonly type: "function";
|
|
831
|
+
}, {
|
|
832
|
+
readonly inputs: readonly [{
|
|
833
|
+
readonly internalType: "bytes32";
|
|
834
|
+
readonly name: "";
|
|
835
|
+
readonly type: "bytes32";
|
|
836
|
+
}];
|
|
837
|
+
readonly name: "xChainNonces";
|
|
838
|
+
readonly outputs: readonly [{
|
|
839
|
+
readonly internalType: "uint256";
|
|
840
|
+
readonly name: "";
|
|
841
|
+
readonly type: "uint256";
|
|
842
|
+
}];
|
|
843
|
+
readonly stateMutability: "view";
|
|
844
|
+
readonly type: "function";
|
|
845
|
+
}, {
|
|
846
|
+
readonly stateMutability: "payable";
|
|
847
|
+
readonly type: "receive";
|
|
848
|
+
}];
|
|
849
|
+
/**
|
|
850
|
+
* Type-safe ABI for HashflowPool
|
|
851
|
+
*/
|
|
852
|
+
export type HashflowPoolAbi = typeof HashflowPoolAbi;
|
|
853
|
+
/**
|
|
854
|
+
* Contract instance type for HashflowPool
|
|
855
|
+
*/
|
|
856
|
+
export type HashflowPoolContract = any;
|
|
857
|
+
/**
|
|
858
|
+
* HashflowPool Contract Class
|
|
859
|
+
*
|
|
860
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
861
|
+
*
|
|
862
|
+
* @example
|
|
863
|
+
* ```typescript
|
|
864
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
865
|
+
* import { mainnet } from 'viem/chains';
|
|
866
|
+
* import { HashflowPool } from 'HashflowPool';
|
|
867
|
+
*
|
|
868
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
869
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
870
|
+
*
|
|
871
|
+
* const contract = new HashflowPool('0x...', { publicClient, walletClient });
|
|
872
|
+
*
|
|
873
|
+
* // Read functions
|
|
874
|
+
* const result = await contract.balanceOf('0x...');
|
|
875
|
+
*
|
|
876
|
+
* // Write functions
|
|
877
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
878
|
+
*
|
|
879
|
+
* // Simulate transactions (dry-run)
|
|
880
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
881
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
882
|
+
*
|
|
883
|
+
* // Watch events
|
|
884
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
885
|
+
* console.log('Transfer event:', event);
|
|
886
|
+
* });
|
|
887
|
+
* ```
|
|
888
|
+
*/
|
|
889
|
+
export declare class HashflowPool {
|
|
890
|
+
private contract;
|
|
891
|
+
private contractAddress;
|
|
892
|
+
private publicClient;
|
|
893
|
+
constructor(address: Address, clients: {
|
|
894
|
+
publicClient: PublicClient;
|
|
895
|
+
walletClient?: WalletClient;
|
|
896
|
+
});
|
|
897
|
+
/**
|
|
898
|
+
* Get the contract address
|
|
899
|
+
*/
|
|
900
|
+
get address(): Address;
|
|
901
|
+
/**
|
|
902
|
+
* Get the underlying viem contract instance.
|
|
903
|
+
*/
|
|
904
|
+
getContract(): HashflowPoolContract;
|
|
905
|
+
/**
|
|
906
|
+
* _WETH
|
|
907
|
+
* view
|
|
908
|
+
*/
|
|
909
|
+
_WETH(): Promise<`0x${string}`>;
|
|
910
|
+
/**
|
|
911
|
+
* getReserves
|
|
912
|
+
* view
|
|
913
|
+
*/
|
|
914
|
+
getReserves(token: `0x${string}`): Promise<bigint>;
|
|
915
|
+
/**
|
|
916
|
+
* isValidSignature
|
|
917
|
+
* view
|
|
918
|
+
*/
|
|
919
|
+
isValidSignature(hash: `0x${string}`, signature: `0x${string}`): Promise<`0x${string}`>;
|
|
920
|
+
/**
|
|
921
|
+
* name
|
|
922
|
+
* view
|
|
923
|
+
*/
|
|
924
|
+
name(): Promise<string>;
|
|
925
|
+
/**
|
|
926
|
+
* nonces
|
|
927
|
+
* view
|
|
928
|
+
*/
|
|
929
|
+
nonces(arg0: `0x${string}`): Promise<bigint>;
|
|
930
|
+
/**
|
|
931
|
+
* operations
|
|
932
|
+
* view
|
|
933
|
+
*/
|
|
934
|
+
operations(): Promise<`0x${string}`>;
|
|
935
|
+
/**
|
|
936
|
+
* router
|
|
937
|
+
* view
|
|
938
|
+
*/
|
|
939
|
+
router(): Promise<`0x${string}`>;
|
|
940
|
+
/**
|
|
941
|
+
* signerConfiguration
|
|
942
|
+
* view
|
|
943
|
+
*/
|
|
944
|
+
signerConfiguration(): Promise<[`0x${string}`, boolean]>;
|
|
945
|
+
/**
|
|
946
|
+
* xChainNonces
|
|
947
|
+
* view
|
|
948
|
+
*/
|
|
949
|
+
xChainNonces(arg0: `0x${string}`): Promise<bigint>;
|
|
950
|
+
/**
|
|
951
|
+
* approveToken
|
|
952
|
+
* nonpayable
|
|
953
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
954
|
+
*/
|
|
955
|
+
approveToken(token: `0x${string}`, spender: `0x${string}`, amount: bigint, options?: {
|
|
956
|
+
accessList?: import('viem').AccessList;
|
|
957
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
958
|
+
chain?: import('viem').Chain | null;
|
|
959
|
+
dataSuffix?: `0x${string}`;
|
|
960
|
+
gas?: bigint;
|
|
961
|
+
gasPrice?: bigint;
|
|
962
|
+
maxFeePerGas?: bigint;
|
|
963
|
+
maxPriorityFeePerGas?: bigint;
|
|
964
|
+
nonce?: number;
|
|
965
|
+
value?: bigint;
|
|
966
|
+
}): Promise<`0x${string}`>;
|
|
967
|
+
/**
|
|
968
|
+
* decreaseTokenAllowance
|
|
969
|
+
* nonpayable
|
|
970
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
971
|
+
*/
|
|
972
|
+
decreaseTokenAllowance(token: `0x${string}`, spender: `0x${string}`, amount: bigint, options?: {
|
|
973
|
+
accessList?: import('viem').AccessList;
|
|
974
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
975
|
+
chain?: import('viem').Chain | null;
|
|
976
|
+
dataSuffix?: `0x${string}`;
|
|
977
|
+
gas?: bigint;
|
|
978
|
+
gasPrice?: bigint;
|
|
979
|
+
maxFeePerGas?: bigint;
|
|
980
|
+
maxPriorityFeePerGas?: bigint;
|
|
981
|
+
nonce?: number;
|
|
982
|
+
value?: bigint;
|
|
983
|
+
}): Promise<`0x${string}`>;
|
|
984
|
+
/**
|
|
985
|
+
* fillXChain
|
|
986
|
+
* nonpayable
|
|
987
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
988
|
+
*/
|
|
989
|
+
fillXChain(externalAccount: `0x${string}`, txid: `0x${string}`, trader: `0x${string}`, quoteToken: `0x${string}`, quoteTokenAmount: bigint, options?: {
|
|
990
|
+
accessList?: import('viem').AccessList;
|
|
991
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
992
|
+
chain?: import('viem').Chain | null;
|
|
993
|
+
dataSuffix?: `0x${string}`;
|
|
994
|
+
gas?: bigint;
|
|
995
|
+
gasPrice?: bigint;
|
|
996
|
+
maxFeePerGas?: bigint;
|
|
997
|
+
maxPriorityFeePerGas?: bigint;
|
|
998
|
+
nonce?: number;
|
|
999
|
+
value?: bigint;
|
|
1000
|
+
}): Promise<`0x${string}`>;
|
|
1001
|
+
/**
|
|
1002
|
+
* increaseTokenAllowance
|
|
1003
|
+
* nonpayable
|
|
1004
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1005
|
+
*/
|
|
1006
|
+
increaseTokenAllowance(token: `0x${string}`, spender: `0x${string}`, amount: bigint, options?: {
|
|
1007
|
+
accessList?: import('viem').AccessList;
|
|
1008
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1009
|
+
chain?: import('viem').Chain | null;
|
|
1010
|
+
dataSuffix?: `0x${string}`;
|
|
1011
|
+
gas?: bigint;
|
|
1012
|
+
gasPrice?: bigint;
|
|
1013
|
+
maxFeePerGas?: bigint;
|
|
1014
|
+
maxPriorityFeePerGas?: bigint;
|
|
1015
|
+
nonce?: number;
|
|
1016
|
+
value?: bigint;
|
|
1017
|
+
}): Promise<`0x${string}`>;
|
|
1018
|
+
/**
|
|
1019
|
+
* initialize
|
|
1020
|
+
* nonpayable
|
|
1021
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1022
|
+
*/
|
|
1023
|
+
initialize(_name: string, _signer: `0x${string}`, _operations: `0x${string}`, _router: `0x${string}`, options?: {
|
|
1024
|
+
accessList?: import('viem').AccessList;
|
|
1025
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1026
|
+
chain?: import('viem').Chain | null;
|
|
1027
|
+
dataSuffix?: `0x${string}`;
|
|
1028
|
+
gas?: bigint;
|
|
1029
|
+
gasPrice?: bigint;
|
|
1030
|
+
maxFeePerGas?: bigint;
|
|
1031
|
+
maxPriorityFeePerGas?: bigint;
|
|
1032
|
+
nonce?: number;
|
|
1033
|
+
value?: bigint;
|
|
1034
|
+
}): Promise<`0x${string}`>;
|
|
1035
|
+
/**
|
|
1036
|
+
* killswitchOperations
|
|
1037
|
+
* nonpayable
|
|
1038
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1039
|
+
*/
|
|
1040
|
+
killswitchOperations(enabled: boolean, options?: {
|
|
1041
|
+
accessList?: import('viem').AccessList;
|
|
1042
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1043
|
+
chain?: import('viem').Chain | null;
|
|
1044
|
+
dataSuffix?: `0x${string}`;
|
|
1045
|
+
gas?: bigint;
|
|
1046
|
+
gasPrice?: bigint;
|
|
1047
|
+
maxFeePerGas?: bigint;
|
|
1048
|
+
maxPriorityFeePerGas?: bigint;
|
|
1049
|
+
nonce?: number;
|
|
1050
|
+
value?: bigint;
|
|
1051
|
+
}): Promise<`0x${string}`>;
|
|
1052
|
+
/**
|
|
1053
|
+
* removeLiquidity
|
|
1054
|
+
* nonpayable
|
|
1055
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1056
|
+
*/
|
|
1057
|
+
removeLiquidity(token: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
|
|
1058
|
+
accessList?: import('viem').AccessList;
|
|
1059
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1060
|
+
chain?: import('viem').Chain | null;
|
|
1061
|
+
dataSuffix?: `0x${string}`;
|
|
1062
|
+
gas?: bigint;
|
|
1063
|
+
gasPrice?: bigint;
|
|
1064
|
+
maxFeePerGas?: bigint;
|
|
1065
|
+
maxPriorityFeePerGas?: bigint;
|
|
1066
|
+
nonce?: number;
|
|
1067
|
+
value?: bigint;
|
|
1068
|
+
}): Promise<`0x${string}`>;
|
|
1069
|
+
/**
|
|
1070
|
+
* tradeRFQM
|
|
1071
|
+
* nonpayable
|
|
1072
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1073
|
+
*/
|
|
1074
|
+
tradeRFQM(quote: IQuote_RFQMQuote, options?: {
|
|
1075
|
+
accessList?: import('viem').AccessList;
|
|
1076
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1077
|
+
chain?: import('viem').Chain | null;
|
|
1078
|
+
dataSuffix?: `0x${string}`;
|
|
1079
|
+
gas?: bigint;
|
|
1080
|
+
gasPrice?: bigint;
|
|
1081
|
+
maxFeePerGas?: bigint;
|
|
1082
|
+
maxPriorityFeePerGas?: bigint;
|
|
1083
|
+
nonce?: number;
|
|
1084
|
+
value?: bigint;
|
|
1085
|
+
}): Promise<`0x${string}`>;
|
|
1086
|
+
/**
|
|
1087
|
+
* tradeRFQT
|
|
1088
|
+
* payable
|
|
1089
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1090
|
+
*/
|
|
1091
|
+
tradeRFQT(quote: IQuote_RFQTQuote, options?: {
|
|
1092
|
+
accessList?: import('viem').AccessList;
|
|
1093
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1094
|
+
chain?: import('viem').Chain | null;
|
|
1095
|
+
dataSuffix?: `0x${string}`;
|
|
1096
|
+
gas?: bigint;
|
|
1097
|
+
gasPrice?: bigint;
|
|
1098
|
+
maxFeePerGas?: bigint;
|
|
1099
|
+
maxPriorityFeePerGas?: bigint;
|
|
1100
|
+
nonce?: number;
|
|
1101
|
+
value?: bigint;
|
|
1102
|
+
}): Promise<`0x${string}`>;
|
|
1103
|
+
/**
|
|
1104
|
+
* tradeXChainRFQM
|
|
1105
|
+
* nonpayable
|
|
1106
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1107
|
+
*/
|
|
1108
|
+
tradeXChainRFQM(quote: IQuote_XChainRFQMQuote, options?: {
|
|
1109
|
+
accessList?: import('viem').AccessList;
|
|
1110
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1111
|
+
chain?: import('viem').Chain | null;
|
|
1112
|
+
dataSuffix?: `0x${string}`;
|
|
1113
|
+
gas?: bigint;
|
|
1114
|
+
gasPrice?: bigint;
|
|
1115
|
+
maxFeePerGas?: bigint;
|
|
1116
|
+
maxPriorityFeePerGas?: bigint;
|
|
1117
|
+
nonce?: number;
|
|
1118
|
+
value?: bigint;
|
|
1119
|
+
}): Promise<`0x${string}`>;
|
|
1120
|
+
/**
|
|
1121
|
+
* tradeXChainRFQT
|
|
1122
|
+
* payable
|
|
1123
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1124
|
+
*/
|
|
1125
|
+
tradeXChainRFQT(quote: IQuote_XChainRFQTQuote, trader: `0x${string}`, options?: {
|
|
1126
|
+
accessList?: import('viem').AccessList;
|
|
1127
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1128
|
+
chain?: import('viem').Chain | null;
|
|
1129
|
+
dataSuffix?: `0x${string}`;
|
|
1130
|
+
gas?: bigint;
|
|
1131
|
+
gasPrice?: bigint;
|
|
1132
|
+
maxFeePerGas?: bigint;
|
|
1133
|
+
maxPriorityFeePerGas?: bigint;
|
|
1134
|
+
nonce?: number;
|
|
1135
|
+
value?: bigint;
|
|
1136
|
+
}): Promise<`0x${string}`>;
|
|
1137
|
+
/**
|
|
1138
|
+
* updateSigner
|
|
1139
|
+
* nonpayable
|
|
1140
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1141
|
+
*/
|
|
1142
|
+
updateSigner(newSigner: `0x${string}`, options?: {
|
|
1143
|
+
accessList?: import('viem').AccessList;
|
|
1144
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1145
|
+
chain?: import('viem').Chain | null;
|
|
1146
|
+
dataSuffix?: `0x${string}`;
|
|
1147
|
+
gas?: bigint;
|
|
1148
|
+
gasPrice?: bigint;
|
|
1149
|
+
maxFeePerGas?: bigint;
|
|
1150
|
+
maxPriorityFeePerGas?: bigint;
|
|
1151
|
+
nonce?: number;
|
|
1152
|
+
value?: bigint;
|
|
1153
|
+
}): Promise<`0x${string}`>;
|
|
1154
|
+
/**
|
|
1155
|
+
* updateWithdrawalAccount
|
|
1156
|
+
* nonpayable
|
|
1157
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1158
|
+
*/
|
|
1159
|
+
updateWithdrawalAccount(withdrawalAccounts: `0x${string}`[], authorized: boolean, options?: {
|
|
1160
|
+
accessList?: import('viem').AccessList;
|
|
1161
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1162
|
+
chain?: import('viem').Chain | null;
|
|
1163
|
+
dataSuffix?: `0x${string}`;
|
|
1164
|
+
gas?: bigint;
|
|
1165
|
+
gasPrice?: bigint;
|
|
1166
|
+
maxFeePerGas?: bigint;
|
|
1167
|
+
maxPriorityFeePerGas?: bigint;
|
|
1168
|
+
nonce?: number;
|
|
1169
|
+
value?: bigint;
|
|
1170
|
+
}): Promise<`0x${string}`>;
|
|
1171
|
+
/**
|
|
1172
|
+
* updateXChainMessengerAuthorization
|
|
1173
|
+
* nonpayable
|
|
1174
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1175
|
+
*/
|
|
1176
|
+
updateXChainMessengerAuthorization(xChainMessenger: `0x${string}`, authorized: boolean, options?: {
|
|
1177
|
+
accessList?: import('viem').AccessList;
|
|
1178
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1179
|
+
chain?: import('viem').Chain | null;
|
|
1180
|
+
dataSuffix?: `0x${string}`;
|
|
1181
|
+
gas?: bigint;
|
|
1182
|
+
gasPrice?: bigint;
|
|
1183
|
+
maxFeePerGas?: bigint;
|
|
1184
|
+
maxPriorityFeePerGas?: bigint;
|
|
1185
|
+
nonce?: number;
|
|
1186
|
+
value?: bigint;
|
|
1187
|
+
}): Promise<`0x${string}`>;
|
|
1188
|
+
/**
|
|
1189
|
+
* updateXChainPoolAuthorization
|
|
1190
|
+
* nonpayable
|
|
1191
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1192
|
+
*/
|
|
1193
|
+
updateXChainPoolAuthorization(pools: IHashflowPool_AuthorizedXChainPool[], status: boolean, options?: {
|
|
1194
|
+
accessList?: import('viem').AccessList;
|
|
1195
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1196
|
+
chain?: import('viem').Chain | null;
|
|
1197
|
+
dataSuffix?: `0x${string}`;
|
|
1198
|
+
gas?: bigint;
|
|
1199
|
+
gasPrice?: bigint;
|
|
1200
|
+
maxFeePerGas?: bigint;
|
|
1201
|
+
maxPriorityFeePerGas?: bigint;
|
|
1202
|
+
nonce?: number;
|
|
1203
|
+
value?: bigint;
|
|
1204
|
+
}): Promise<`0x${string}`>;
|
|
1205
|
+
/**
|
|
1206
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1207
|
+
*
|
|
1208
|
+
* @example
|
|
1209
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1210
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1211
|
+
* console.log('Would succeed:', result.result);
|
|
1212
|
+
*/
|
|
1213
|
+
get simulate(): {
|
|
1214
|
+
/**
|
|
1215
|
+
* Simulate approveToken
|
|
1216
|
+
* Returns gas estimate and result without sending transaction
|
|
1217
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1218
|
+
*/
|
|
1219
|
+
approveToken(token: `0x${string}`, spender: `0x${string}`, amount: bigint, options?: {
|
|
1220
|
+
accessList?: import("viem").AccessList;
|
|
1221
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1222
|
+
chain?: import("viem").Chain | null;
|
|
1223
|
+
dataSuffix?: `0x${string}`;
|
|
1224
|
+
gas?: bigint;
|
|
1225
|
+
gasPrice?: bigint;
|
|
1226
|
+
maxFeePerGas?: bigint;
|
|
1227
|
+
maxPriorityFeePerGas?: bigint;
|
|
1228
|
+
nonce?: number;
|
|
1229
|
+
value?: bigint;
|
|
1230
|
+
}): Promise<void>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Simulate decreaseTokenAllowance
|
|
1233
|
+
* Returns gas estimate and result without sending transaction
|
|
1234
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1235
|
+
*/
|
|
1236
|
+
decreaseTokenAllowance(token: `0x${string}`, spender: `0x${string}`, amount: bigint, options?: {
|
|
1237
|
+
accessList?: import("viem").AccessList;
|
|
1238
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1239
|
+
chain?: import("viem").Chain | null;
|
|
1240
|
+
dataSuffix?: `0x${string}`;
|
|
1241
|
+
gas?: bigint;
|
|
1242
|
+
gasPrice?: bigint;
|
|
1243
|
+
maxFeePerGas?: bigint;
|
|
1244
|
+
maxPriorityFeePerGas?: bigint;
|
|
1245
|
+
nonce?: number;
|
|
1246
|
+
value?: bigint;
|
|
1247
|
+
}): Promise<void>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Simulate fillXChain
|
|
1250
|
+
* Returns gas estimate and result without sending transaction
|
|
1251
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1252
|
+
*/
|
|
1253
|
+
fillXChain(externalAccount: `0x${string}`, txid: `0x${string}`, trader: `0x${string}`, quoteToken: `0x${string}`, quoteTokenAmount: bigint, options?: {
|
|
1254
|
+
accessList?: import("viem").AccessList;
|
|
1255
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1256
|
+
chain?: import("viem").Chain | null;
|
|
1257
|
+
dataSuffix?: `0x${string}`;
|
|
1258
|
+
gas?: bigint;
|
|
1259
|
+
gasPrice?: bigint;
|
|
1260
|
+
maxFeePerGas?: bigint;
|
|
1261
|
+
maxPriorityFeePerGas?: bigint;
|
|
1262
|
+
nonce?: number;
|
|
1263
|
+
value?: bigint;
|
|
1264
|
+
}): Promise<void>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Simulate increaseTokenAllowance
|
|
1267
|
+
* Returns gas estimate and result without sending transaction
|
|
1268
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1269
|
+
*/
|
|
1270
|
+
increaseTokenAllowance(token: `0x${string}`, spender: `0x${string}`, amount: bigint, options?: {
|
|
1271
|
+
accessList?: import("viem").AccessList;
|
|
1272
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1273
|
+
chain?: import("viem").Chain | null;
|
|
1274
|
+
dataSuffix?: `0x${string}`;
|
|
1275
|
+
gas?: bigint;
|
|
1276
|
+
gasPrice?: bigint;
|
|
1277
|
+
maxFeePerGas?: bigint;
|
|
1278
|
+
maxPriorityFeePerGas?: bigint;
|
|
1279
|
+
nonce?: number;
|
|
1280
|
+
value?: bigint;
|
|
1281
|
+
}): Promise<void>;
|
|
1282
|
+
/**
|
|
1283
|
+
* Simulate initialize
|
|
1284
|
+
* Returns gas estimate and result without sending transaction
|
|
1285
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1286
|
+
*/
|
|
1287
|
+
initialize(_name: string, _signer: `0x${string}`, _operations: `0x${string}`, _router: `0x${string}`, options?: {
|
|
1288
|
+
accessList?: import("viem").AccessList;
|
|
1289
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1290
|
+
chain?: import("viem").Chain | null;
|
|
1291
|
+
dataSuffix?: `0x${string}`;
|
|
1292
|
+
gas?: bigint;
|
|
1293
|
+
gasPrice?: bigint;
|
|
1294
|
+
maxFeePerGas?: bigint;
|
|
1295
|
+
maxPriorityFeePerGas?: bigint;
|
|
1296
|
+
nonce?: number;
|
|
1297
|
+
value?: bigint;
|
|
1298
|
+
}): Promise<void>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Simulate killswitchOperations
|
|
1301
|
+
* Returns gas estimate and result without sending transaction
|
|
1302
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1303
|
+
*/
|
|
1304
|
+
killswitchOperations(enabled: boolean, options?: {
|
|
1305
|
+
accessList?: import("viem").AccessList;
|
|
1306
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1307
|
+
chain?: import("viem").Chain | null;
|
|
1308
|
+
dataSuffix?: `0x${string}`;
|
|
1309
|
+
gas?: bigint;
|
|
1310
|
+
gasPrice?: bigint;
|
|
1311
|
+
maxFeePerGas?: bigint;
|
|
1312
|
+
maxPriorityFeePerGas?: bigint;
|
|
1313
|
+
nonce?: number;
|
|
1314
|
+
value?: bigint;
|
|
1315
|
+
}): Promise<void>;
|
|
1316
|
+
/**
|
|
1317
|
+
* Simulate removeLiquidity
|
|
1318
|
+
* Returns gas estimate and result without sending transaction
|
|
1319
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1320
|
+
*/
|
|
1321
|
+
removeLiquidity(token: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
|
|
1322
|
+
accessList?: import("viem").AccessList;
|
|
1323
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1324
|
+
chain?: import("viem").Chain | null;
|
|
1325
|
+
dataSuffix?: `0x${string}`;
|
|
1326
|
+
gas?: bigint;
|
|
1327
|
+
gasPrice?: bigint;
|
|
1328
|
+
maxFeePerGas?: bigint;
|
|
1329
|
+
maxPriorityFeePerGas?: bigint;
|
|
1330
|
+
nonce?: number;
|
|
1331
|
+
value?: bigint;
|
|
1332
|
+
}): Promise<void>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Simulate tradeRFQM
|
|
1335
|
+
* Returns gas estimate and result without sending transaction
|
|
1336
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1337
|
+
*/
|
|
1338
|
+
tradeRFQM(quote: IQuote_RFQMQuote, options?: {
|
|
1339
|
+
accessList?: import("viem").AccessList;
|
|
1340
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1341
|
+
chain?: import("viem").Chain | null;
|
|
1342
|
+
dataSuffix?: `0x${string}`;
|
|
1343
|
+
gas?: bigint;
|
|
1344
|
+
gasPrice?: bigint;
|
|
1345
|
+
maxFeePerGas?: bigint;
|
|
1346
|
+
maxPriorityFeePerGas?: bigint;
|
|
1347
|
+
nonce?: number;
|
|
1348
|
+
value?: bigint;
|
|
1349
|
+
}): Promise<void>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Simulate tradeRFQT
|
|
1352
|
+
* Returns gas estimate and result without sending transaction
|
|
1353
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1354
|
+
*/
|
|
1355
|
+
tradeRFQT(quote: IQuote_RFQTQuote, options?: {
|
|
1356
|
+
accessList?: import("viem").AccessList;
|
|
1357
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1358
|
+
chain?: import("viem").Chain | null;
|
|
1359
|
+
dataSuffix?: `0x${string}`;
|
|
1360
|
+
gas?: bigint;
|
|
1361
|
+
gasPrice?: bigint;
|
|
1362
|
+
maxFeePerGas?: bigint;
|
|
1363
|
+
maxPriorityFeePerGas?: bigint;
|
|
1364
|
+
nonce?: number;
|
|
1365
|
+
value?: bigint;
|
|
1366
|
+
}): Promise<void>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Simulate tradeXChainRFQM
|
|
1369
|
+
* Returns gas estimate and result without sending transaction
|
|
1370
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1371
|
+
*/
|
|
1372
|
+
tradeXChainRFQM(quote: IQuote_XChainRFQMQuote, options?: {
|
|
1373
|
+
accessList?: import("viem").AccessList;
|
|
1374
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1375
|
+
chain?: import("viem").Chain | null;
|
|
1376
|
+
dataSuffix?: `0x${string}`;
|
|
1377
|
+
gas?: bigint;
|
|
1378
|
+
gasPrice?: bigint;
|
|
1379
|
+
maxFeePerGas?: bigint;
|
|
1380
|
+
maxPriorityFeePerGas?: bigint;
|
|
1381
|
+
nonce?: number;
|
|
1382
|
+
value?: bigint;
|
|
1383
|
+
}): Promise<void>;
|
|
1384
|
+
/**
|
|
1385
|
+
* Simulate tradeXChainRFQT
|
|
1386
|
+
* Returns gas estimate and result without sending transaction
|
|
1387
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1388
|
+
*/
|
|
1389
|
+
tradeXChainRFQT(quote: IQuote_XChainRFQTQuote, trader: `0x${string}`, options?: {
|
|
1390
|
+
accessList?: import("viem").AccessList;
|
|
1391
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1392
|
+
chain?: import("viem").Chain | null;
|
|
1393
|
+
dataSuffix?: `0x${string}`;
|
|
1394
|
+
gas?: bigint;
|
|
1395
|
+
gasPrice?: bigint;
|
|
1396
|
+
maxFeePerGas?: bigint;
|
|
1397
|
+
maxPriorityFeePerGas?: bigint;
|
|
1398
|
+
nonce?: number;
|
|
1399
|
+
value?: bigint;
|
|
1400
|
+
}): Promise<void>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Simulate updateSigner
|
|
1403
|
+
* Returns gas estimate and result without sending transaction
|
|
1404
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1405
|
+
*/
|
|
1406
|
+
updateSigner(newSigner: `0x${string}`, options?: {
|
|
1407
|
+
accessList?: import("viem").AccessList;
|
|
1408
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1409
|
+
chain?: import("viem").Chain | null;
|
|
1410
|
+
dataSuffix?: `0x${string}`;
|
|
1411
|
+
gas?: bigint;
|
|
1412
|
+
gasPrice?: bigint;
|
|
1413
|
+
maxFeePerGas?: bigint;
|
|
1414
|
+
maxPriorityFeePerGas?: bigint;
|
|
1415
|
+
nonce?: number;
|
|
1416
|
+
value?: bigint;
|
|
1417
|
+
}): Promise<void>;
|
|
1418
|
+
/**
|
|
1419
|
+
* Simulate updateWithdrawalAccount
|
|
1420
|
+
* Returns gas estimate and result without sending transaction
|
|
1421
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1422
|
+
*/
|
|
1423
|
+
updateWithdrawalAccount(withdrawalAccounts: `0x${string}`[], authorized: boolean, options?: {
|
|
1424
|
+
accessList?: import("viem").AccessList;
|
|
1425
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1426
|
+
chain?: import("viem").Chain | null;
|
|
1427
|
+
dataSuffix?: `0x${string}`;
|
|
1428
|
+
gas?: bigint;
|
|
1429
|
+
gasPrice?: bigint;
|
|
1430
|
+
maxFeePerGas?: bigint;
|
|
1431
|
+
maxPriorityFeePerGas?: bigint;
|
|
1432
|
+
nonce?: number;
|
|
1433
|
+
value?: bigint;
|
|
1434
|
+
}): Promise<void>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Simulate updateXChainMessengerAuthorization
|
|
1437
|
+
* Returns gas estimate and result without sending transaction
|
|
1438
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1439
|
+
*/
|
|
1440
|
+
updateXChainMessengerAuthorization(xChainMessenger: `0x${string}`, authorized: boolean, options?: {
|
|
1441
|
+
accessList?: import("viem").AccessList;
|
|
1442
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1443
|
+
chain?: import("viem").Chain | null;
|
|
1444
|
+
dataSuffix?: `0x${string}`;
|
|
1445
|
+
gas?: bigint;
|
|
1446
|
+
gasPrice?: bigint;
|
|
1447
|
+
maxFeePerGas?: bigint;
|
|
1448
|
+
maxPriorityFeePerGas?: bigint;
|
|
1449
|
+
nonce?: number;
|
|
1450
|
+
value?: bigint;
|
|
1451
|
+
}): Promise<void>;
|
|
1452
|
+
/**
|
|
1453
|
+
* Simulate updateXChainPoolAuthorization
|
|
1454
|
+
* Returns gas estimate and result without sending transaction
|
|
1455
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1456
|
+
*/
|
|
1457
|
+
updateXChainPoolAuthorization(pools: IHashflowPool_AuthorizedXChainPool[], status: boolean, options?: {
|
|
1458
|
+
accessList?: import("viem").AccessList;
|
|
1459
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1460
|
+
chain?: import("viem").Chain | null;
|
|
1461
|
+
dataSuffix?: `0x${string}`;
|
|
1462
|
+
gas?: bigint;
|
|
1463
|
+
gasPrice?: bigint;
|
|
1464
|
+
maxFeePerGas?: bigint;
|
|
1465
|
+
maxPriorityFeePerGas?: bigint;
|
|
1466
|
+
nonce?: number;
|
|
1467
|
+
value?: bigint;
|
|
1468
|
+
}): Promise<void>;
|
|
1469
|
+
};
|
|
1470
|
+
/**
|
|
1471
|
+
* Watch contract events
|
|
1472
|
+
*
|
|
1473
|
+
* @example
|
|
1474
|
+
* // Watch all Transfer events
|
|
1475
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1476
|
+
* console.log('Transfer:', event);
|
|
1477
|
+
* });
|
|
1478
|
+
*
|
|
1479
|
+
* // Stop watching
|
|
1480
|
+
* unwatch();
|
|
1481
|
+
*/
|
|
1482
|
+
get watch(): {
|
|
1483
|
+
/**
|
|
1484
|
+
* Watch Initialized events
|
|
1485
|
+
* @param callback Function to call when event is emitted
|
|
1486
|
+
* @param filter Optional filter for indexed parameters
|
|
1487
|
+
* @returns Unwatch function to stop listening
|
|
1488
|
+
*/
|
|
1489
|
+
Initialized: (callback: (event: {
|
|
1490
|
+
version: bigint;
|
|
1491
|
+
}) => void) => () => void;
|
|
1492
|
+
/**
|
|
1493
|
+
* Watch RemoveLiquidity events
|
|
1494
|
+
* @param callback Function to call when event is emitted
|
|
1495
|
+
* @param filter Optional filter for indexed parameters
|
|
1496
|
+
* @returns Unwatch function to stop listening
|
|
1497
|
+
*/
|
|
1498
|
+
RemoveLiquidity: (callback: (event: {
|
|
1499
|
+
token: `0x${string}`;
|
|
1500
|
+
recipient: `0x${string}`;
|
|
1501
|
+
withdrawAmount: bigint;
|
|
1502
|
+
}) => void) => () => void;
|
|
1503
|
+
/**
|
|
1504
|
+
* Watch Trade events
|
|
1505
|
+
* @param callback Function to call when event is emitted
|
|
1506
|
+
* @param filter Optional filter for indexed parameters
|
|
1507
|
+
* @returns Unwatch function to stop listening
|
|
1508
|
+
*/
|
|
1509
|
+
Trade: (callback: (event: {
|
|
1510
|
+
trader: `0x${string}`;
|
|
1511
|
+
effectiveTrader: `0x${string}`;
|
|
1512
|
+
txid: `0x${string}`;
|
|
1513
|
+
baseToken: `0x${string}`;
|
|
1514
|
+
quoteToken: `0x${string}`;
|
|
1515
|
+
baseTokenAmount: bigint;
|
|
1516
|
+
quoteTokenAmount: bigint;
|
|
1517
|
+
}) => void) => () => void;
|
|
1518
|
+
/**
|
|
1519
|
+
* Watch UpdateSigner events
|
|
1520
|
+
* @param callback Function to call when event is emitted
|
|
1521
|
+
* @param filter Optional filter for indexed parameters
|
|
1522
|
+
* @returns Unwatch function to stop listening
|
|
1523
|
+
*/
|
|
1524
|
+
UpdateSigner: (callback: (event: {
|
|
1525
|
+
signer: `0x${string}`;
|
|
1526
|
+
prevSigner: `0x${string}`;
|
|
1527
|
+
}) => void) => () => void;
|
|
1528
|
+
/**
|
|
1529
|
+
* Watch UpdateWithdrawalAccount events
|
|
1530
|
+
* @param callback Function to call when event is emitted
|
|
1531
|
+
* @param filter Optional filter for indexed parameters
|
|
1532
|
+
* @returns Unwatch function to stop listening
|
|
1533
|
+
*/
|
|
1534
|
+
UpdateWithdrawalAccount: (callback: (event: {
|
|
1535
|
+
account: `0x${string}`;
|
|
1536
|
+
authorized: boolean;
|
|
1537
|
+
}) => void) => () => void;
|
|
1538
|
+
/**
|
|
1539
|
+
* Watch XChainTrade events
|
|
1540
|
+
* @param callback Function to call when event is emitted
|
|
1541
|
+
* @param filter Optional filter for indexed parameters
|
|
1542
|
+
* @returns Unwatch function to stop listening
|
|
1543
|
+
*/
|
|
1544
|
+
XChainTrade: (callback: (event: {
|
|
1545
|
+
dstChainId: bigint;
|
|
1546
|
+
dstPool: `0x${string}`;
|
|
1547
|
+
trader: `0x${string}`;
|
|
1548
|
+
dstTrader: `0x${string}`;
|
|
1549
|
+
txid: `0x${string}`;
|
|
1550
|
+
baseToken: `0x${string}`;
|
|
1551
|
+
quoteToken: `0x${string}`;
|
|
1552
|
+
baseTokenAmount: bigint;
|
|
1553
|
+
quoteTokenAmount: bigint;
|
|
1554
|
+
}) => void) => () => void;
|
|
1555
|
+
/**
|
|
1556
|
+
* Watch XChainTradeFill events
|
|
1557
|
+
* @param callback Function to call when event is emitted
|
|
1558
|
+
* @param filter Optional filter for indexed parameters
|
|
1559
|
+
* @returns Unwatch function to stop listening
|
|
1560
|
+
*/
|
|
1561
|
+
XChainTradeFill: (callback: (event: {
|
|
1562
|
+
txid: `0x${string}`;
|
|
1563
|
+
}) => void) => () => void;
|
|
1564
|
+
};
|
|
1565
|
+
}
|