@gitmyabi/uni-v2 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 +108 -0
- package/contracts/UniswapV2Pair_json.d.ts +1160 -0
- package/contracts/UniswapV2Pair_json.js +1235 -0
- package/contracts/UniswapV2Pair_json.ts +1510 -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 +43 -0
|
@@ -0,0 +1,1160 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* UniswapV2Pair_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const UniswapV2Pair_jsonAbi: readonly [{
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly payable: false;
|
|
10
|
+
readonly stateMutability: "nonpayable";
|
|
11
|
+
readonly type: "constructor";
|
|
12
|
+
}, {
|
|
13
|
+
readonly anonymous: false;
|
|
14
|
+
readonly inputs: readonly [{
|
|
15
|
+
readonly indexed: true;
|
|
16
|
+
readonly internalType: "address";
|
|
17
|
+
readonly name: "owner";
|
|
18
|
+
readonly type: "address";
|
|
19
|
+
}, {
|
|
20
|
+
readonly indexed: true;
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly name: "spender";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly indexed: false;
|
|
26
|
+
readonly internalType: "uint256";
|
|
27
|
+
readonly name: "value";
|
|
28
|
+
readonly type: "uint256";
|
|
29
|
+
}];
|
|
30
|
+
readonly name: "Approval";
|
|
31
|
+
readonly type: "event";
|
|
32
|
+
}, {
|
|
33
|
+
readonly anonymous: false;
|
|
34
|
+
readonly inputs: readonly [{
|
|
35
|
+
readonly indexed: true;
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
readonly name: "sender";
|
|
38
|
+
readonly type: "address";
|
|
39
|
+
}, {
|
|
40
|
+
readonly indexed: false;
|
|
41
|
+
readonly internalType: "uint256";
|
|
42
|
+
readonly name: "amount0";
|
|
43
|
+
readonly type: "uint256";
|
|
44
|
+
}, {
|
|
45
|
+
readonly indexed: false;
|
|
46
|
+
readonly internalType: "uint256";
|
|
47
|
+
readonly name: "amount1";
|
|
48
|
+
readonly type: "uint256";
|
|
49
|
+
}, {
|
|
50
|
+
readonly indexed: true;
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
readonly name: "to";
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
}];
|
|
55
|
+
readonly name: "Burn";
|
|
56
|
+
readonly type: "event";
|
|
57
|
+
}, {
|
|
58
|
+
readonly anonymous: false;
|
|
59
|
+
readonly inputs: readonly [{
|
|
60
|
+
readonly indexed: true;
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
readonly name: "sender";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}, {
|
|
65
|
+
readonly indexed: false;
|
|
66
|
+
readonly internalType: "uint256";
|
|
67
|
+
readonly name: "amount0";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}, {
|
|
70
|
+
readonly indexed: false;
|
|
71
|
+
readonly internalType: "uint256";
|
|
72
|
+
readonly name: "amount1";
|
|
73
|
+
readonly type: "uint256";
|
|
74
|
+
}];
|
|
75
|
+
readonly name: "Mint";
|
|
76
|
+
readonly type: "event";
|
|
77
|
+
}, {
|
|
78
|
+
readonly anonymous: false;
|
|
79
|
+
readonly inputs: readonly [{
|
|
80
|
+
readonly indexed: true;
|
|
81
|
+
readonly internalType: "address";
|
|
82
|
+
readonly name: "sender";
|
|
83
|
+
readonly type: "address";
|
|
84
|
+
}, {
|
|
85
|
+
readonly indexed: false;
|
|
86
|
+
readonly internalType: "uint256";
|
|
87
|
+
readonly name: "amount0In";
|
|
88
|
+
readonly type: "uint256";
|
|
89
|
+
}, {
|
|
90
|
+
readonly indexed: false;
|
|
91
|
+
readonly internalType: "uint256";
|
|
92
|
+
readonly name: "amount1In";
|
|
93
|
+
readonly type: "uint256";
|
|
94
|
+
}, {
|
|
95
|
+
readonly indexed: false;
|
|
96
|
+
readonly internalType: "uint256";
|
|
97
|
+
readonly name: "amount0Out";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
}, {
|
|
100
|
+
readonly indexed: false;
|
|
101
|
+
readonly internalType: "uint256";
|
|
102
|
+
readonly name: "amount1Out";
|
|
103
|
+
readonly type: "uint256";
|
|
104
|
+
}, {
|
|
105
|
+
readonly indexed: true;
|
|
106
|
+
readonly internalType: "address";
|
|
107
|
+
readonly name: "to";
|
|
108
|
+
readonly type: "address";
|
|
109
|
+
}];
|
|
110
|
+
readonly name: "Swap";
|
|
111
|
+
readonly type: "event";
|
|
112
|
+
}, {
|
|
113
|
+
readonly anonymous: false;
|
|
114
|
+
readonly inputs: readonly [{
|
|
115
|
+
readonly indexed: false;
|
|
116
|
+
readonly internalType: "uint112";
|
|
117
|
+
readonly name: "reserve0";
|
|
118
|
+
readonly type: "uint112";
|
|
119
|
+
}, {
|
|
120
|
+
readonly indexed: false;
|
|
121
|
+
readonly internalType: "uint112";
|
|
122
|
+
readonly name: "reserve1";
|
|
123
|
+
readonly type: "uint112";
|
|
124
|
+
}];
|
|
125
|
+
readonly name: "Sync";
|
|
126
|
+
readonly type: "event";
|
|
127
|
+
}, {
|
|
128
|
+
readonly anonymous: false;
|
|
129
|
+
readonly inputs: readonly [{
|
|
130
|
+
readonly indexed: true;
|
|
131
|
+
readonly internalType: "address";
|
|
132
|
+
readonly name: "from";
|
|
133
|
+
readonly type: "address";
|
|
134
|
+
}, {
|
|
135
|
+
readonly indexed: true;
|
|
136
|
+
readonly internalType: "address";
|
|
137
|
+
readonly name: "to";
|
|
138
|
+
readonly type: "address";
|
|
139
|
+
}, {
|
|
140
|
+
readonly indexed: false;
|
|
141
|
+
readonly internalType: "uint256";
|
|
142
|
+
readonly name: "value";
|
|
143
|
+
readonly type: "uint256";
|
|
144
|
+
}];
|
|
145
|
+
readonly name: "Transfer";
|
|
146
|
+
readonly type: "event";
|
|
147
|
+
}, {
|
|
148
|
+
readonly constant: true;
|
|
149
|
+
readonly inputs: readonly [];
|
|
150
|
+
readonly name: "DOMAIN_SEPARATOR";
|
|
151
|
+
readonly outputs: readonly [{
|
|
152
|
+
readonly internalType: "bytes32";
|
|
153
|
+
readonly name: "";
|
|
154
|
+
readonly type: "bytes32";
|
|
155
|
+
}];
|
|
156
|
+
readonly payable: false;
|
|
157
|
+
readonly stateMutability: "view";
|
|
158
|
+
readonly type: "function";
|
|
159
|
+
}, {
|
|
160
|
+
readonly constant: true;
|
|
161
|
+
readonly inputs: readonly [];
|
|
162
|
+
readonly name: "MINIMUM_LIQUIDITY";
|
|
163
|
+
readonly outputs: readonly [{
|
|
164
|
+
readonly internalType: "uint256";
|
|
165
|
+
readonly name: "";
|
|
166
|
+
readonly type: "uint256";
|
|
167
|
+
}];
|
|
168
|
+
readonly payable: false;
|
|
169
|
+
readonly stateMutability: "view";
|
|
170
|
+
readonly type: "function";
|
|
171
|
+
}, {
|
|
172
|
+
readonly constant: true;
|
|
173
|
+
readonly inputs: readonly [];
|
|
174
|
+
readonly name: "PERMIT_TYPEHASH";
|
|
175
|
+
readonly outputs: readonly [{
|
|
176
|
+
readonly internalType: "bytes32";
|
|
177
|
+
readonly name: "";
|
|
178
|
+
readonly type: "bytes32";
|
|
179
|
+
}];
|
|
180
|
+
readonly payable: false;
|
|
181
|
+
readonly stateMutability: "view";
|
|
182
|
+
readonly type: "function";
|
|
183
|
+
}, {
|
|
184
|
+
readonly constant: true;
|
|
185
|
+
readonly inputs: readonly [{
|
|
186
|
+
readonly internalType: "address";
|
|
187
|
+
readonly name: "";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
}, {
|
|
190
|
+
readonly internalType: "address";
|
|
191
|
+
readonly name: "";
|
|
192
|
+
readonly type: "address";
|
|
193
|
+
}];
|
|
194
|
+
readonly name: "allowance";
|
|
195
|
+
readonly outputs: readonly [{
|
|
196
|
+
readonly internalType: "uint256";
|
|
197
|
+
readonly name: "";
|
|
198
|
+
readonly type: "uint256";
|
|
199
|
+
}];
|
|
200
|
+
readonly payable: false;
|
|
201
|
+
readonly stateMutability: "view";
|
|
202
|
+
readonly type: "function";
|
|
203
|
+
}, {
|
|
204
|
+
readonly constant: false;
|
|
205
|
+
readonly inputs: readonly [{
|
|
206
|
+
readonly internalType: "address";
|
|
207
|
+
readonly name: "spender";
|
|
208
|
+
readonly type: "address";
|
|
209
|
+
}, {
|
|
210
|
+
readonly internalType: "uint256";
|
|
211
|
+
readonly name: "value";
|
|
212
|
+
readonly type: "uint256";
|
|
213
|
+
}];
|
|
214
|
+
readonly name: "approve";
|
|
215
|
+
readonly outputs: readonly [{
|
|
216
|
+
readonly internalType: "bool";
|
|
217
|
+
readonly name: "";
|
|
218
|
+
readonly type: "bool";
|
|
219
|
+
}];
|
|
220
|
+
readonly payable: false;
|
|
221
|
+
readonly stateMutability: "nonpayable";
|
|
222
|
+
readonly type: "function";
|
|
223
|
+
}, {
|
|
224
|
+
readonly constant: true;
|
|
225
|
+
readonly inputs: readonly [{
|
|
226
|
+
readonly internalType: "address";
|
|
227
|
+
readonly name: "";
|
|
228
|
+
readonly type: "address";
|
|
229
|
+
}];
|
|
230
|
+
readonly name: "balanceOf";
|
|
231
|
+
readonly outputs: readonly [{
|
|
232
|
+
readonly internalType: "uint256";
|
|
233
|
+
readonly name: "";
|
|
234
|
+
readonly type: "uint256";
|
|
235
|
+
}];
|
|
236
|
+
readonly payable: false;
|
|
237
|
+
readonly stateMutability: "view";
|
|
238
|
+
readonly type: "function";
|
|
239
|
+
}, {
|
|
240
|
+
readonly constant: false;
|
|
241
|
+
readonly inputs: readonly [{
|
|
242
|
+
readonly internalType: "address";
|
|
243
|
+
readonly name: "to";
|
|
244
|
+
readonly type: "address";
|
|
245
|
+
}];
|
|
246
|
+
readonly name: "burn";
|
|
247
|
+
readonly outputs: readonly [{
|
|
248
|
+
readonly internalType: "uint256";
|
|
249
|
+
readonly name: "amount0";
|
|
250
|
+
readonly type: "uint256";
|
|
251
|
+
}, {
|
|
252
|
+
readonly internalType: "uint256";
|
|
253
|
+
readonly name: "amount1";
|
|
254
|
+
readonly type: "uint256";
|
|
255
|
+
}];
|
|
256
|
+
readonly payable: false;
|
|
257
|
+
readonly stateMutability: "nonpayable";
|
|
258
|
+
readonly type: "function";
|
|
259
|
+
}, {
|
|
260
|
+
readonly constant: true;
|
|
261
|
+
readonly inputs: readonly [];
|
|
262
|
+
readonly name: "decimals";
|
|
263
|
+
readonly outputs: readonly [{
|
|
264
|
+
readonly internalType: "uint8";
|
|
265
|
+
readonly name: "";
|
|
266
|
+
readonly type: "uint8";
|
|
267
|
+
}];
|
|
268
|
+
readonly payable: false;
|
|
269
|
+
readonly stateMutability: "view";
|
|
270
|
+
readonly type: "function";
|
|
271
|
+
}, {
|
|
272
|
+
readonly constant: true;
|
|
273
|
+
readonly inputs: readonly [];
|
|
274
|
+
readonly name: "factory";
|
|
275
|
+
readonly outputs: readonly [{
|
|
276
|
+
readonly internalType: "address";
|
|
277
|
+
readonly name: "";
|
|
278
|
+
readonly type: "address";
|
|
279
|
+
}];
|
|
280
|
+
readonly payable: false;
|
|
281
|
+
readonly stateMutability: "view";
|
|
282
|
+
readonly type: "function";
|
|
283
|
+
}, {
|
|
284
|
+
readonly constant: true;
|
|
285
|
+
readonly inputs: readonly [];
|
|
286
|
+
readonly name: "getReserves";
|
|
287
|
+
readonly outputs: readonly [{
|
|
288
|
+
readonly internalType: "uint112";
|
|
289
|
+
readonly name: "_reserve0";
|
|
290
|
+
readonly type: "uint112";
|
|
291
|
+
}, {
|
|
292
|
+
readonly internalType: "uint112";
|
|
293
|
+
readonly name: "_reserve1";
|
|
294
|
+
readonly type: "uint112";
|
|
295
|
+
}, {
|
|
296
|
+
readonly internalType: "uint32";
|
|
297
|
+
readonly name: "_blockTimestampLast";
|
|
298
|
+
readonly type: "uint32";
|
|
299
|
+
}];
|
|
300
|
+
readonly payable: false;
|
|
301
|
+
readonly stateMutability: "view";
|
|
302
|
+
readonly type: "function";
|
|
303
|
+
}, {
|
|
304
|
+
readonly constant: false;
|
|
305
|
+
readonly inputs: readonly [{
|
|
306
|
+
readonly internalType: "address";
|
|
307
|
+
readonly name: "_token0";
|
|
308
|
+
readonly type: "address";
|
|
309
|
+
}, {
|
|
310
|
+
readonly internalType: "address";
|
|
311
|
+
readonly name: "_token1";
|
|
312
|
+
readonly type: "address";
|
|
313
|
+
}];
|
|
314
|
+
readonly name: "initialize";
|
|
315
|
+
readonly outputs: readonly [];
|
|
316
|
+
readonly payable: false;
|
|
317
|
+
readonly stateMutability: "nonpayable";
|
|
318
|
+
readonly type: "function";
|
|
319
|
+
}, {
|
|
320
|
+
readonly constant: true;
|
|
321
|
+
readonly inputs: readonly [];
|
|
322
|
+
readonly name: "kLast";
|
|
323
|
+
readonly outputs: readonly [{
|
|
324
|
+
readonly internalType: "uint256";
|
|
325
|
+
readonly name: "";
|
|
326
|
+
readonly type: "uint256";
|
|
327
|
+
}];
|
|
328
|
+
readonly payable: false;
|
|
329
|
+
readonly stateMutability: "view";
|
|
330
|
+
readonly type: "function";
|
|
331
|
+
}, {
|
|
332
|
+
readonly constant: false;
|
|
333
|
+
readonly inputs: readonly [{
|
|
334
|
+
readonly internalType: "address";
|
|
335
|
+
readonly name: "to";
|
|
336
|
+
readonly type: "address";
|
|
337
|
+
}];
|
|
338
|
+
readonly name: "mint";
|
|
339
|
+
readonly outputs: readonly [{
|
|
340
|
+
readonly internalType: "uint256";
|
|
341
|
+
readonly name: "liquidity";
|
|
342
|
+
readonly type: "uint256";
|
|
343
|
+
}];
|
|
344
|
+
readonly payable: false;
|
|
345
|
+
readonly stateMutability: "nonpayable";
|
|
346
|
+
readonly type: "function";
|
|
347
|
+
}, {
|
|
348
|
+
readonly constant: true;
|
|
349
|
+
readonly inputs: readonly [];
|
|
350
|
+
readonly name: "name";
|
|
351
|
+
readonly outputs: readonly [{
|
|
352
|
+
readonly internalType: "string";
|
|
353
|
+
readonly name: "";
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
}];
|
|
356
|
+
readonly payable: false;
|
|
357
|
+
readonly stateMutability: "view";
|
|
358
|
+
readonly type: "function";
|
|
359
|
+
}, {
|
|
360
|
+
readonly constant: true;
|
|
361
|
+
readonly inputs: readonly [{
|
|
362
|
+
readonly internalType: "address";
|
|
363
|
+
readonly name: "";
|
|
364
|
+
readonly type: "address";
|
|
365
|
+
}];
|
|
366
|
+
readonly name: "nonces";
|
|
367
|
+
readonly outputs: readonly [{
|
|
368
|
+
readonly internalType: "uint256";
|
|
369
|
+
readonly name: "";
|
|
370
|
+
readonly type: "uint256";
|
|
371
|
+
}];
|
|
372
|
+
readonly payable: false;
|
|
373
|
+
readonly stateMutability: "view";
|
|
374
|
+
readonly type: "function";
|
|
375
|
+
}, {
|
|
376
|
+
readonly constant: false;
|
|
377
|
+
readonly inputs: readonly [{
|
|
378
|
+
readonly internalType: "address";
|
|
379
|
+
readonly name: "owner";
|
|
380
|
+
readonly type: "address";
|
|
381
|
+
}, {
|
|
382
|
+
readonly internalType: "address";
|
|
383
|
+
readonly name: "spender";
|
|
384
|
+
readonly type: "address";
|
|
385
|
+
}, {
|
|
386
|
+
readonly internalType: "uint256";
|
|
387
|
+
readonly name: "value";
|
|
388
|
+
readonly type: "uint256";
|
|
389
|
+
}, {
|
|
390
|
+
readonly internalType: "uint256";
|
|
391
|
+
readonly name: "deadline";
|
|
392
|
+
readonly type: "uint256";
|
|
393
|
+
}, {
|
|
394
|
+
readonly internalType: "uint8";
|
|
395
|
+
readonly name: "v";
|
|
396
|
+
readonly type: "uint8";
|
|
397
|
+
}, {
|
|
398
|
+
readonly internalType: "bytes32";
|
|
399
|
+
readonly name: "r";
|
|
400
|
+
readonly type: "bytes32";
|
|
401
|
+
}, {
|
|
402
|
+
readonly internalType: "bytes32";
|
|
403
|
+
readonly name: "s";
|
|
404
|
+
readonly type: "bytes32";
|
|
405
|
+
}];
|
|
406
|
+
readonly name: "permit";
|
|
407
|
+
readonly outputs: readonly [];
|
|
408
|
+
readonly payable: false;
|
|
409
|
+
readonly stateMutability: "nonpayable";
|
|
410
|
+
readonly type: "function";
|
|
411
|
+
}, {
|
|
412
|
+
readonly constant: true;
|
|
413
|
+
readonly inputs: readonly [];
|
|
414
|
+
readonly name: "price0CumulativeLast";
|
|
415
|
+
readonly outputs: readonly [{
|
|
416
|
+
readonly internalType: "uint256";
|
|
417
|
+
readonly name: "";
|
|
418
|
+
readonly type: "uint256";
|
|
419
|
+
}];
|
|
420
|
+
readonly payable: false;
|
|
421
|
+
readonly stateMutability: "view";
|
|
422
|
+
readonly type: "function";
|
|
423
|
+
}, {
|
|
424
|
+
readonly constant: true;
|
|
425
|
+
readonly inputs: readonly [];
|
|
426
|
+
readonly name: "price1CumulativeLast";
|
|
427
|
+
readonly outputs: readonly [{
|
|
428
|
+
readonly internalType: "uint256";
|
|
429
|
+
readonly name: "";
|
|
430
|
+
readonly type: "uint256";
|
|
431
|
+
}];
|
|
432
|
+
readonly payable: false;
|
|
433
|
+
readonly stateMutability: "view";
|
|
434
|
+
readonly type: "function";
|
|
435
|
+
}, {
|
|
436
|
+
readonly constant: false;
|
|
437
|
+
readonly inputs: readonly [{
|
|
438
|
+
readonly internalType: "address";
|
|
439
|
+
readonly name: "to";
|
|
440
|
+
readonly type: "address";
|
|
441
|
+
}];
|
|
442
|
+
readonly name: "skim";
|
|
443
|
+
readonly outputs: readonly [];
|
|
444
|
+
readonly payable: false;
|
|
445
|
+
readonly stateMutability: "nonpayable";
|
|
446
|
+
readonly type: "function";
|
|
447
|
+
}, {
|
|
448
|
+
readonly constant: false;
|
|
449
|
+
readonly inputs: readonly [{
|
|
450
|
+
readonly internalType: "uint256";
|
|
451
|
+
readonly name: "amount0Out";
|
|
452
|
+
readonly type: "uint256";
|
|
453
|
+
}, {
|
|
454
|
+
readonly internalType: "uint256";
|
|
455
|
+
readonly name: "amount1Out";
|
|
456
|
+
readonly type: "uint256";
|
|
457
|
+
}, {
|
|
458
|
+
readonly internalType: "address";
|
|
459
|
+
readonly name: "to";
|
|
460
|
+
readonly type: "address";
|
|
461
|
+
}, {
|
|
462
|
+
readonly internalType: "bytes";
|
|
463
|
+
readonly name: "data";
|
|
464
|
+
readonly type: "bytes";
|
|
465
|
+
}];
|
|
466
|
+
readonly name: "swap";
|
|
467
|
+
readonly outputs: readonly [];
|
|
468
|
+
readonly payable: false;
|
|
469
|
+
readonly stateMutability: "nonpayable";
|
|
470
|
+
readonly type: "function";
|
|
471
|
+
}, {
|
|
472
|
+
readonly constant: true;
|
|
473
|
+
readonly inputs: readonly [];
|
|
474
|
+
readonly name: "symbol";
|
|
475
|
+
readonly outputs: readonly [{
|
|
476
|
+
readonly internalType: "string";
|
|
477
|
+
readonly name: "";
|
|
478
|
+
readonly type: "string";
|
|
479
|
+
}];
|
|
480
|
+
readonly payable: false;
|
|
481
|
+
readonly stateMutability: "view";
|
|
482
|
+
readonly type: "function";
|
|
483
|
+
}, {
|
|
484
|
+
readonly constant: false;
|
|
485
|
+
readonly inputs: readonly [];
|
|
486
|
+
readonly name: "sync";
|
|
487
|
+
readonly outputs: readonly [];
|
|
488
|
+
readonly payable: false;
|
|
489
|
+
readonly stateMutability: "nonpayable";
|
|
490
|
+
readonly type: "function";
|
|
491
|
+
}, {
|
|
492
|
+
readonly constant: true;
|
|
493
|
+
readonly inputs: readonly [];
|
|
494
|
+
readonly name: "token0";
|
|
495
|
+
readonly outputs: readonly [{
|
|
496
|
+
readonly internalType: "address";
|
|
497
|
+
readonly name: "";
|
|
498
|
+
readonly type: "address";
|
|
499
|
+
}];
|
|
500
|
+
readonly payable: false;
|
|
501
|
+
readonly stateMutability: "view";
|
|
502
|
+
readonly type: "function";
|
|
503
|
+
}, {
|
|
504
|
+
readonly constant: true;
|
|
505
|
+
readonly inputs: readonly [];
|
|
506
|
+
readonly name: "token1";
|
|
507
|
+
readonly outputs: readonly [{
|
|
508
|
+
readonly internalType: "address";
|
|
509
|
+
readonly name: "";
|
|
510
|
+
readonly type: "address";
|
|
511
|
+
}];
|
|
512
|
+
readonly payable: false;
|
|
513
|
+
readonly stateMutability: "view";
|
|
514
|
+
readonly type: "function";
|
|
515
|
+
}, {
|
|
516
|
+
readonly constant: true;
|
|
517
|
+
readonly inputs: readonly [];
|
|
518
|
+
readonly name: "totalSupply";
|
|
519
|
+
readonly outputs: readonly [{
|
|
520
|
+
readonly internalType: "uint256";
|
|
521
|
+
readonly name: "";
|
|
522
|
+
readonly type: "uint256";
|
|
523
|
+
}];
|
|
524
|
+
readonly payable: false;
|
|
525
|
+
readonly stateMutability: "view";
|
|
526
|
+
readonly type: "function";
|
|
527
|
+
}, {
|
|
528
|
+
readonly constant: false;
|
|
529
|
+
readonly inputs: readonly [{
|
|
530
|
+
readonly internalType: "address";
|
|
531
|
+
readonly name: "to";
|
|
532
|
+
readonly type: "address";
|
|
533
|
+
}, {
|
|
534
|
+
readonly internalType: "uint256";
|
|
535
|
+
readonly name: "value";
|
|
536
|
+
readonly type: "uint256";
|
|
537
|
+
}];
|
|
538
|
+
readonly name: "transfer";
|
|
539
|
+
readonly outputs: readonly [{
|
|
540
|
+
readonly internalType: "bool";
|
|
541
|
+
readonly name: "";
|
|
542
|
+
readonly type: "bool";
|
|
543
|
+
}];
|
|
544
|
+
readonly payable: false;
|
|
545
|
+
readonly stateMutability: "nonpayable";
|
|
546
|
+
readonly type: "function";
|
|
547
|
+
}, {
|
|
548
|
+
readonly constant: false;
|
|
549
|
+
readonly inputs: readonly [{
|
|
550
|
+
readonly internalType: "address";
|
|
551
|
+
readonly name: "from";
|
|
552
|
+
readonly type: "address";
|
|
553
|
+
}, {
|
|
554
|
+
readonly internalType: "address";
|
|
555
|
+
readonly name: "to";
|
|
556
|
+
readonly type: "address";
|
|
557
|
+
}, {
|
|
558
|
+
readonly internalType: "uint256";
|
|
559
|
+
readonly name: "value";
|
|
560
|
+
readonly type: "uint256";
|
|
561
|
+
}];
|
|
562
|
+
readonly name: "transferFrom";
|
|
563
|
+
readonly outputs: readonly [{
|
|
564
|
+
readonly internalType: "bool";
|
|
565
|
+
readonly name: "";
|
|
566
|
+
readonly type: "bool";
|
|
567
|
+
}];
|
|
568
|
+
readonly payable: false;
|
|
569
|
+
readonly stateMutability: "nonpayable";
|
|
570
|
+
readonly type: "function";
|
|
571
|
+
}];
|
|
572
|
+
/**
|
|
573
|
+
* Type-safe ABI for UniswapV2Pair_json
|
|
574
|
+
*/
|
|
575
|
+
export type UniswapV2Pair_jsonAbi = typeof UniswapV2Pair_jsonAbi;
|
|
576
|
+
/**
|
|
577
|
+
* Contract instance type for UniswapV2Pair_json
|
|
578
|
+
*/
|
|
579
|
+
export type UniswapV2Pair_jsonContract = any;
|
|
580
|
+
/**
|
|
581
|
+
* UniswapV2Pair_json Contract Class
|
|
582
|
+
*
|
|
583
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
584
|
+
*
|
|
585
|
+
* @example
|
|
586
|
+
* ```typescript
|
|
587
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
588
|
+
* import { mainnet } from 'viem/chains';
|
|
589
|
+
* import { UniswapV2Pair_json } from 'UniswapV2Pair_json';
|
|
590
|
+
*
|
|
591
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
592
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
593
|
+
*
|
|
594
|
+
* const contract = new UniswapV2Pair_json('0x...', { publicClient, walletClient });
|
|
595
|
+
*
|
|
596
|
+
* // Read functions
|
|
597
|
+
* const result = await contract.balanceOf('0x...');
|
|
598
|
+
*
|
|
599
|
+
* // Write functions
|
|
600
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
601
|
+
*
|
|
602
|
+
* // Simulate transactions (dry-run)
|
|
603
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
604
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
605
|
+
*
|
|
606
|
+
* // Watch events
|
|
607
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
608
|
+
* console.log('Transfer event:', event);
|
|
609
|
+
* });
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
export declare class UniswapV2Pair_json {
|
|
613
|
+
private contract;
|
|
614
|
+
private contractAddress;
|
|
615
|
+
private publicClient;
|
|
616
|
+
constructor(address: Address, clients: {
|
|
617
|
+
publicClient: PublicClient;
|
|
618
|
+
walletClient?: WalletClient;
|
|
619
|
+
});
|
|
620
|
+
/**
|
|
621
|
+
* Get the contract address
|
|
622
|
+
*/
|
|
623
|
+
get address(): Address;
|
|
624
|
+
/**
|
|
625
|
+
* Get the underlying viem contract instance
|
|
626
|
+
*/
|
|
627
|
+
getContract(): UniswapV2Pair_jsonContract;
|
|
628
|
+
/**
|
|
629
|
+
* DOMAIN_SEPARATOR
|
|
630
|
+
* view
|
|
631
|
+
*/
|
|
632
|
+
DOMAIN_SEPARATOR(): Promise<`0x${string}`>;
|
|
633
|
+
/**
|
|
634
|
+
* MINIMUM_LIQUIDITY
|
|
635
|
+
* view
|
|
636
|
+
*/
|
|
637
|
+
MINIMUM_LIQUIDITY(): Promise<bigint>;
|
|
638
|
+
/**
|
|
639
|
+
* PERMIT_TYPEHASH
|
|
640
|
+
* view
|
|
641
|
+
*/
|
|
642
|
+
PERMIT_TYPEHASH(): Promise<`0x${string}`>;
|
|
643
|
+
/**
|
|
644
|
+
* allowance
|
|
645
|
+
* view
|
|
646
|
+
*/
|
|
647
|
+
allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint>;
|
|
648
|
+
/**
|
|
649
|
+
* balanceOf
|
|
650
|
+
* view
|
|
651
|
+
*/
|
|
652
|
+
balanceOf(arg0: `0x${string}`): Promise<bigint>;
|
|
653
|
+
/**
|
|
654
|
+
* decimals
|
|
655
|
+
* view
|
|
656
|
+
*/
|
|
657
|
+
decimals(): Promise<bigint>;
|
|
658
|
+
/**
|
|
659
|
+
* factory
|
|
660
|
+
* view
|
|
661
|
+
*/
|
|
662
|
+
factory(): Promise<`0x${string}`>;
|
|
663
|
+
/**
|
|
664
|
+
* getReserves
|
|
665
|
+
* view
|
|
666
|
+
*/
|
|
667
|
+
getReserves(): Promise<[bigint, bigint, bigint]>;
|
|
668
|
+
/**
|
|
669
|
+
* kLast
|
|
670
|
+
* view
|
|
671
|
+
*/
|
|
672
|
+
kLast(): Promise<bigint>;
|
|
673
|
+
/**
|
|
674
|
+
* name
|
|
675
|
+
* view
|
|
676
|
+
*/
|
|
677
|
+
name(): Promise<string>;
|
|
678
|
+
/**
|
|
679
|
+
* nonces
|
|
680
|
+
* view
|
|
681
|
+
*/
|
|
682
|
+
nonces(arg0: `0x${string}`): Promise<bigint>;
|
|
683
|
+
/**
|
|
684
|
+
* price0CumulativeLast
|
|
685
|
+
* view
|
|
686
|
+
*/
|
|
687
|
+
price0CumulativeLast(): Promise<bigint>;
|
|
688
|
+
/**
|
|
689
|
+
* price1CumulativeLast
|
|
690
|
+
* view
|
|
691
|
+
*/
|
|
692
|
+
price1CumulativeLast(): Promise<bigint>;
|
|
693
|
+
/**
|
|
694
|
+
* symbol
|
|
695
|
+
* view
|
|
696
|
+
*/
|
|
697
|
+
symbol(): Promise<string>;
|
|
698
|
+
/**
|
|
699
|
+
* token0
|
|
700
|
+
* view
|
|
701
|
+
*/
|
|
702
|
+
token0(): Promise<`0x${string}`>;
|
|
703
|
+
/**
|
|
704
|
+
* token1
|
|
705
|
+
* view
|
|
706
|
+
*/
|
|
707
|
+
token1(): Promise<`0x${string}`>;
|
|
708
|
+
/**
|
|
709
|
+
* totalSupply
|
|
710
|
+
* view
|
|
711
|
+
*/
|
|
712
|
+
totalSupply(): Promise<bigint>;
|
|
713
|
+
/**
|
|
714
|
+
* approve
|
|
715
|
+
* nonpayable
|
|
716
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
717
|
+
*/
|
|
718
|
+
approve(spender: `0x${string}`, value: bigint, options?: {
|
|
719
|
+
accessList?: import('viem').AccessList;
|
|
720
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
721
|
+
chain?: import('viem').Chain | null;
|
|
722
|
+
dataSuffix?: `0x${string}`;
|
|
723
|
+
gas?: bigint;
|
|
724
|
+
gasPrice?: bigint;
|
|
725
|
+
maxFeePerGas?: bigint;
|
|
726
|
+
maxPriorityFeePerGas?: bigint;
|
|
727
|
+
nonce?: number;
|
|
728
|
+
value?: bigint;
|
|
729
|
+
}): Promise<`0x${string}`>;
|
|
730
|
+
/**
|
|
731
|
+
* burn
|
|
732
|
+
* nonpayable
|
|
733
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
734
|
+
*/
|
|
735
|
+
burn(to: `0x${string}`, options?: {
|
|
736
|
+
accessList?: import('viem').AccessList;
|
|
737
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
738
|
+
chain?: import('viem').Chain | null;
|
|
739
|
+
dataSuffix?: `0x${string}`;
|
|
740
|
+
gas?: bigint;
|
|
741
|
+
gasPrice?: bigint;
|
|
742
|
+
maxFeePerGas?: bigint;
|
|
743
|
+
maxPriorityFeePerGas?: bigint;
|
|
744
|
+
nonce?: number;
|
|
745
|
+
value?: bigint;
|
|
746
|
+
}): Promise<`0x${string}`>;
|
|
747
|
+
/**
|
|
748
|
+
* initialize
|
|
749
|
+
* nonpayable
|
|
750
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
751
|
+
*/
|
|
752
|
+
initialize(_token0: `0x${string}`, _token1: `0x${string}`, options?: {
|
|
753
|
+
accessList?: import('viem').AccessList;
|
|
754
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
755
|
+
chain?: import('viem').Chain | null;
|
|
756
|
+
dataSuffix?: `0x${string}`;
|
|
757
|
+
gas?: bigint;
|
|
758
|
+
gasPrice?: bigint;
|
|
759
|
+
maxFeePerGas?: bigint;
|
|
760
|
+
maxPriorityFeePerGas?: bigint;
|
|
761
|
+
nonce?: number;
|
|
762
|
+
value?: bigint;
|
|
763
|
+
}): Promise<`0x${string}`>;
|
|
764
|
+
/**
|
|
765
|
+
* mint
|
|
766
|
+
* nonpayable
|
|
767
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
768
|
+
*/
|
|
769
|
+
mint(to: `0x${string}`, options?: {
|
|
770
|
+
accessList?: import('viem').AccessList;
|
|
771
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
772
|
+
chain?: import('viem').Chain | null;
|
|
773
|
+
dataSuffix?: `0x${string}`;
|
|
774
|
+
gas?: bigint;
|
|
775
|
+
gasPrice?: bigint;
|
|
776
|
+
maxFeePerGas?: bigint;
|
|
777
|
+
maxPriorityFeePerGas?: bigint;
|
|
778
|
+
nonce?: number;
|
|
779
|
+
value?: bigint;
|
|
780
|
+
}): Promise<`0x${string}`>;
|
|
781
|
+
/**
|
|
782
|
+
* permit
|
|
783
|
+
* nonpayable
|
|
784
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
785
|
+
*/
|
|
786
|
+
permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
787
|
+
accessList?: import('viem').AccessList;
|
|
788
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
789
|
+
chain?: import('viem').Chain | null;
|
|
790
|
+
dataSuffix?: `0x${string}`;
|
|
791
|
+
gas?: bigint;
|
|
792
|
+
gasPrice?: bigint;
|
|
793
|
+
maxFeePerGas?: bigint;
|
|
794
|
+
maxPriorityFeePerGas?: bigint;
|
|
795
|
+
nonce?: number;
|
|
796
|
+
value?: bigint;
|
|
797
|
+
}): Promise<`0x${string}`>;
|
|
798
|
+
/**
|
|
799
|
+
* skim
|
|
800
|
+
* nonpayable
|
|
801
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
802
|
+
*/
|
|
803
|
+
skim(to: `0x${string}`, options?: {
|
|
804
|
+
accessList?: import('viem').AccessList;
|
|
805
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
806
|
+
chain?: import('viem').Chain | null;
|
|
807
|
+
dataSuffix?: `0x${string}`;
|
|
808
|
+
gas?: bigint;
|
|
809
|
+
gasPrice?: bigint;
|
|
810
|
+
maxFeePerGas?: bigint;
|
|
811
|
+
maxPriorityFeePerGas?: bigint;
|
|
812
|
+
nonce?: number;
|
|
813
|
+
value?: bigint;
|
|
814
|
+
}): Promise<`0x${string}`>;
|
|
815
|
+
/**
|
|
816
|
+
* swap
|
|
817
|
+
* nonpayable
|
|
818
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
819
|
+
*/
|
|
820
|
+
swap(amount0Out: bigint, amount1Out: bigint, to: `0x${string}`, data: `0x${string}`, options?: {
|
|
821
|
+
accessList?: import('viem').AccessList;
|
|
822
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
823
|
+
chain?: import('viem').Chain | null;
|
|
824
|
+
dataSuffix?: `0x${string}`;
|
|
825
|
+
gas?: bigint;
|
|
826
|
+
gasPrice?: bigint;
|
|
827
|
+
maxFeePerGas?: bigint;
|
|
828
|
+
maxPriorityFeePerGas?: bigint;
|
|
829
|
+
nonce?: number;
|
|
830
|
+
value?: bigint;
|
|
831
|
+
}): Promise<`0x${string}`>;
|
|
832
|
+
/**
|
|
833
|
+
* sync
|
|
834
|
+
* nonpayable
|
|
835
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
836
|
+
*/
|
|
837
|
+
sync(options?: {
|
|
838
|
+
accessList?: import('viem').AccessList;
|
|
839
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
840
|
+
chain?: import('viem').Chain | null;
|
|
841
|
+
dataSuffix?: `0x${string}`;
|
|
842
|
+
gas?: bigint;
|
|
843
|
+
gasPrice?: bigint;
|
|
844
|
+
maxFeePerGas?: bigint;
|
|
845
|
+
maxPriorityFeePerGas?: bigint;
|
|
846
|
+
nonce?: number;
|
|
847
|
+
value?: bigint;
|
|
848
|
+
}): Promise<`0x${string}`>;
|
|
849
|
+
/**
|
|
850
|
+
* transfer
|
|
851
|
+
* nonpayable
|
|
852
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
853
|
+
*/
|
|
854
|
+
transfer(to: `0x${string}`, value: bigint, options?: {
|
|
855
|
+
accessList?: import('viem').AccessList;
|
|
856
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
857
|
+
chain?: import('viem').Chain | null;
|
|
858
|
+
dataSuffix?: `0x${string}`;
|
|
859
|
+
gas?: bigint;
|
|
860
|
+
gasPrice?: bigint;
|
|
861
|
+
maxFeePerGas?: bigint;
|
|
862
|
+
maxPriorityFeePerGas?: bigint;
|
|
863
|
+
nonce?: number;
|
|
864
|
+
value?: bigint;
|
|
865
|
+
}): Promise<`0x${string}`>;
|
|
866
|
+
/**
|
|
867
|
+
* transferFrom
|
|
868
|
+
* nonpayable
|
|
869
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
870
|
+
*/
|
|
871
|
+
transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
872
|
+
accessList?: import('viem').AccessList;
|
|
873
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
874
|
+
chain?: import('viem').Chain | null;
|
|
875
|
+
dataSuffix?: `0x${string}`;
|
|
876
|
+
gas?: bigint;
|
|
877
|
+
gasPrice?: bigint;
|
|
878
|
+
maxFeePerGas?: bigint;
|
|
879
|
+
maxPriorityFeePerGas?: bigint;
|
|
880
|
+
nonce?: number;
|
|
881
|
+
value?: bigint;
|
|
882
|
+
}): Promise<`0x${string}`>;
|
|
883
|
+
/**
|
|
884
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
885
|
+
*
|
|
886
|
+
* @example
|
|
887
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
888
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
889
|
+
* console.log('Would succeed:', result.result);
|
|
890
|
+
*/
|
|
891
|
+
get simulate(): {
|
|
892
|
+
/**
|
|
893
|
+
* Simulate approve
|
|
894
|
+
* Returns gas estimate and result without sending transaction
|
|
895
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
896
|
+
*/
|
|
897
|
+
approve(spender: `0x${string}`, value: bigint, options?: {
|
|
898
|
+
accessList?: import("viem").AccessList;
|
|
899
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
900
|
+
chain?: import("viem").Chain | null;
|
|
901
|
+
dataSuffix?: `0x${string}`;
|
|
902
|
+
gas?: bigint;
|
|
903
|
+
gasPrice?: bigint;
|
|
904
|
+
maxFeePerGas?: bigint;
|
|
905
|
+
maxPriorityFeePerGas?: bigint;
|
|
906
|
+
nonce?: number;
|
|
907
|
+
value?: bigint;
|
|
908
|
+
}): Promise<boolean>;
|
|
909
|
+
/**
|
|
910
|
+
* Simulate burn
|
|
911
|
+
* Returns gas estimate and result without sending transaction
|
|
912
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
913
|
+
*/
|
|
914
|
+
burn(to: `0x${string}`, options?: {
|
|
915
|
+
accessList?: import("viem").AccessList;
|
|
916
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
917
|
+
chain?: import("viem").Chain | null;
|
|
918
|
+
dataSuffix?: `0x${string}`;
|
|
919
|
+
gas?: bigint;
|
|
920
|
+
gasPrice?: bigint;
|
|
921
|
+
maxFeePerGas?: bigint;
|
|
922
|
+
maxPriorityFeePerGas?: bigint;
|
|
923
|
+
nonce?: number;
|
|
924
|
+
value?: bigint;
|
|
925
|
+
}): Promise<[bigint, bigint]>;
|
|
926
|
+
/**
|
|
927
|
+
* Simulate initialize
|
|
928
|
+
* Returns gas estimate and result without sending transaction
|
|
929
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
930
|
+
*/
|
|
931
|
+
initialize(_token0: `0x${string}`, _token1: `0x${string}`, options?: {
|
|
932
|
+
accessList?: import("viem").AccessList;
|
|
933
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
934
|
+
chain?: import("viem").Chain | null;
|
|
935
|
+
dataSuffix?: `0x${string}`;
|
|
936
|
+
gas?: bigint;
|
|
937
|
+
gasPrice?: bigint;
|
|
938
|
+
maxFeePerGas?: bigint;
|
|
939
|
+
maxPriorityFeePerGas?: bigint;
|
|
940
|
+
nonce?: number;
|
|
941
|
+
value?: bigint;
|
|
942
|
+
}): Promise<void>;
|
|
943
|
+
/**
|
|
944
|
+
* Simulate mint
|
|
945
|
+
* Returns gas estimate and result without sending transaction
|
|
946
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
947
|
+
*/
|
|
948
|
+
mint(to: `0x${string}`, options?: {
|
|
949
|
+
accessList?: import("viem").AccessList;
|
|
950
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
951
|
+
chain?: import("viem").Chain | null;
|
|
952
|
+
dataSuffix?: `0x${string}`;
|
|
953
|
+
gas?: bigint;
|
|
954
|
+
gasPrice?: bigint;
|
|
955
|
+
maxFeePerGas?: bigint;
|
|
956
|
+
maxPriorityFeePerGas?: bigint;
|
|
957
|
+
nonce?: number;
|
|
958
|
+
value?: bigint;
|
|
959
|
+
}): Promise<bigint>;
|
|
960
|
+
/**
|
|
961
|
+
* Simulate permit
|
|
962
|
+
* Returns gas estimate and result without sending transaction
|
|
963
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
964
|
+
*/
|
|
965
|
+
permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
966
|
+
accessList?: import("viem").AccessList;
|
|
967
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
968
|
+
chain?: import("viem").Chain | null;
|
|
969
|
+
dataSuffix?: `0x${string}`;
|
|
970
|
+
gas?: bigint;
|
|
971
|
+
gasPrice?: bigint;
|
|
972
|
+
maxFeePerGas?: bigint;
|
|
973
|
+
maxPriorityFeePerGas?: bigint;
|
|
974
|
+
nonce?: number;
|
|
975
|
+
value?: bigint;
|
|
976
|
+
}): Promise<void>;
|
|
977
|
+
/**
|
|
978
|
+
* Simulate skim
|
|
979
|
+
* Returns gas estimate and result without sending transaction
|
|
980
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
981
|
+
*/
|
|
982
|
+
skim(to: `0x${string}`, options?: {
|
|
983
|
+
accessList?: import("viem").AccessList;
|
|
984
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
985
|
+
chain?: import("viem").Chain | null;
|
|
986
|
+
dataSuffix?: `0x${string}`;
|
|
987
|
+
gas?: bigint;
|
|
988
|
+
gasPrice?: bigint;
|
|
989
|
+
maxFeePerGas?: bigint;
|
|
990
|
+
maxPriorityFeePerGas?: bigint;
|
|
991
|
+
nonce?: number;
|
|
992
|
+
value?: bigint;
|
|
993
|
+
}): Promise<void>;
|
|
994
|
+
/**
|
|
995
|
+
* Simulate swap
|
|
996
|
+
* Returns gas estimate and result without sending transaction
|
|
997
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
998
|
+
*/
|
|
999
|
+
swap(amount0Out: bigint, amount1Out: bigint, to: `0x${string}`, data: `0x${string}`, options?: {
|
|
1000
|
+
accessList?: import("viem").AccessList;
|
|
1001
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1002
|
+
chain?: import("viem").Chain | null;
|
|
1003
|
+
dataSuffix?: `0x${string}`;
|
|
1004
|
+
gas?: bigint;
|
|
1005
|
+
gasPrice?: bigint;
|
|
1006
|
+
maxFeePerGas?: bigint;
|
|
1007
|
+
maxPriorityFeePerGas?: bigint;
|
|
1008
|
+
nonce?: number;
|
|
1009
|
+
value?: bigint;
|
|
1010
|
+
}): Promise<void>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Simulate sync
|
|
1013
|
+
* Returns gas estimate and result without sending transaction
|
|
1014
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1015
|
+
*/
|
|
1016
|
+
sync(options?: {
|
|
1017
|
+
accessList?: import("viem").AccessList;
|
|
1018
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1019
|
+
chain?: import("viem").Chain | null;
|
|
1020
|
+
dataSuffix?: `0x${string}`;
|
|
1021
|
+
gas?: bigint;
|
|
1022
|
+
gasPrice?: bigint;
|
|
1023
|
+
maxFeePerGas?: bigint;
|
|
1024
|
+
maxPriorityFeePerGas?: bigint;
|
|
1025
|
+
nonce?: number;
|
|
1026
|
+
value?: bigint;
|
|
1027
|
+
}): Promise<void>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Simulate transfer
|
|
1030
|
+
* Returns gas estimate and result without sending transaction
|
|
1031
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1032
|
+
*/
|
|
1033
|
+
transfer(to: `0x${string}`, value: bigint, options?: {
|
|
1034
|
+
accessList?: import("viem").AccessList;
|
|
1035
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1036
|
+
chain?: import("viem").Chain | null;
|
|
1037
|
+
dataSuffix?: `0x${string}`;
|
|
1038
|
+
gas?: bigint;
|
|
1039
|
+
gasPrice?: bigint;
|
|
1040
|
+
maxFeePerGas?: bigint;
|
|
1041
|
+
maxPriorityFeePerGas?: bigint;
|
|
1042
|
+
nonce?: number;
|
|
1043
|
+
value?: bigint;
|
|
1044
|
+
}): Promise<boolean>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Simulate transferFrom
|
|
1047
|
+
* Returns gas estimate and result without sending transaction
|
|
1048
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1049
|
+
*/
|
|
1050
|
+
transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
1051
|
+
accessList?: import("viem").AccessList;
|
|
1052
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1053
|
+
chain?: import("viem").Chain | null;
|
|
1054
|
+
dataSuffix?: `0x${string}`;
|
|
1055
|
+
gas?: bigint;
|
|
1056
|
+
gasPrice?: bigint;
|
|
1057
|
+
maxFeePerGas?: bigint;
|
|
1058
|
+
maxPriorityFeePerGas?: bigint;
|
|
1059
|
+
nonce?: number;
|
|
1060
|
+
value?: bigint;
|
|
1061
|
+
}): Promise<boolean>;
|
|
1062
|
+
};
|
|
1063
|
+
/**
|
|
1064
|
+
* Watch contract events
|
|
1065
|
+
*
|
|
1066
|
+
* @example
|
|
1067
|
+
* // Watch all Transfer events
|
|
1068
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1069
|
+
* console.log('Transfer:', event);
|
|
1070
|
+
* });
|
|
1071
|
+
*
|
|
1072
|
+
* // Stop watching
|
|
1073
|
+
* unwatch();
|
|
1074
|
+
*/
|
|
1075
|
+
get watch(): {
|
|
1076
|
+
/**
|
|
1077
|
+
* Watch Approval events
|
|
1078
|
+
* @param callback Function to call when event is emitted
|
|
1079
|
+
* @param filter Optional filter for indexed parameters
|
|
1080
|
+
* @returns Unwatch function to stop listening
|
|
1081
|
+
*/
|
|
1082
|
+
Approval: (callback: (event: {
|
|
1083
|
+
owner: `0x${string}`;
|
|
1084
|
+
spender: `0x${string}`;
|
|
1085
|
+
value: bigint;
|
|
1086
|
+
}) => void, filter?: {
|
|
1087
|
+
owner: `0x${string}`;
|
|
1088
|
+
spender: `0x${string}`;
|
|
1089
|
+
}) => () => void;
|
|
1090
|
+
/**
|
|
1091
|
+
* Watch Burn events
|
|
1092
|
+
* @param callback Function to call when event is emitted
|
|
1093
|
+
* @param filter Optional filter for indexed parameters
|
|
1094
|
+
* @returns Unwatch function to stop listening
|
|
1095
|
+
*/
|
|
1096
|
+
Burn: (callback: (event: {
|
|
1097
|
+
sender: `0x${string}`;
|
|
1098
|
+
to: `0x${string}`;
|
|
1099
|
+
amount0: bigint;
|
|
1100
|
+
amount1: bigint;
|
|
1101
|
+
}) => void, filter?: {
|
|
1102
|
+
sender: `0x${string}`;
|
|
1103
|
+
to: `0x${string}`;
|
|
1104
|
+
}) => () => void;
|
|
1105
|
+
/**
|
|
1106
|
+
* Watch Mint events
|
|
1107
|
+
* @param callback Function to call when event is emitted
|
|
1108
|
+
* @param filter Optional filter for indexed parameters
|
|
1109
|
+
* @returns Unwatch function to stop listening
|
|
1110
|
+
*/
|
|
1111
|
+
Mint: (callback: (event: {
|
|
1112
|
+
sender: `0x${string}`;
|
|
1113
|
+
amount0: bigint;
|
|
1114
|
+
amount1: bigint;
|
|
1115
|
+
}) => void, filter?: {
|
|
1116
|
+
sender: `0x${string}`;
|
|
1117
|
+
}) => () => void;
|
|
1118
|
+
/**
|
|
1119
|
+
* Watch Swap events
|
|
1120
|
+
* @param callback Function to call when event is emitted
|
|
1121
|
+
* @param filter Optional filter for indexed parameters
|
|
1122
|
+
* @returns Unwatch function to stop listening
|
|
1123
|
+
*/
|
|
1124
|
+
Swap: (callback: (event: {
|
|
1125
|
+
sender: `0x${string}`;
|
|
1126
|
+
to: `0x${string}`;
|
|
1127
|
+
amount0In: bigint;
|
|
1128
|
+
amount1In: bigint;
|
|
1129
|
+
amount0Out: bigint;
|
|
1130
|
+
amount1Out: bigint;
|
|
1131
|
+
}) => void, filter?: {
|
|
1132
|
+
sender: `0x${string}`;
|
|
1133
|
+
to: `0x${string}`;
|
|
1134
|
+
}) => () => void;
|
|
1135
|
+
/**
|
|
1136
|
+
* Watch Sync events
|
|
1137
|
+
* @param callback Function to call when event is emitted
|
|
1138
|
+
* @param filter Optional filter for indexed parameters
|
|
1139
|
+
* @returns Unwatch function to stop listening
|
|
1140
|
+
*/
|
|
1141
|
+
Sync: (callback: (event: {
|
|
1142
|
+
reserve0: bigint;
|
|
1143
|
+
reserve1: bigint;
|
|
1144
|
+
}) => void) => () => void;
|
|
1145
|
+
/**
|
|
1146
|
+
* Watch Transfer events
|
|
1147
|
+
* @param callback Function to call when event is emitted
|
|
1148
|
+
* @param filter Optional filter for indexed parameters
|
|
1149
|
+
* @returns Unwatch function to stop listening
|
|
1150
|
+
*/
|
|
1151
|
+
Transfer: (callback: (event: {
|
|
1152
|
+
from: `0x${string}`;
|
|
1153
|
+
to: `0x${string}`;
|
|
1154
|
+
value: bigint;
|
|
1155
|
+
}) => void, filter?: {
|
|
1156
|
+
from: `0x${string}`;
|
|
1157
|
+
to: `0x${string}`;
|
|
1158
|
+
}) => () => void;
|
|
1159
|
+
};
|
|
1160
|
+
}
|