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