timelock-sdk 0.0.33 → 0.0.35

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.
@@ -1,54 +1,133 @@
1
- //#region src/abis/singleOwnerVault.ts
2
- const singleOwnerVaultAbi = [
1
+ //#region src/abis/uniswapV3Pool.ts
2
+ const uniswapV3PoolAbi = [
3
3
  {
4
- type: "constructor",
5
- inputs: [{
6
- name: "_pool",
7
- type: "address",
8
- internalType: "contract IUniswapV3Pool"
4
+ type: "function",
5
+ name: "burn",
6
+ inputs: [
7
+ {
8
+ name: "tickLower",
9
+ type: "int24",
10
+ internalType: "int24"
11
+ },
12
+ {
13
+ name: "tickUpper",
14
+ type: "int24",
15
+ internalType: "int24"
16
+ },
17
+ {
18
+ name: "amount",
19
+ type: "uint128",
20
+ internalType: "uint128"
21
+ }
22
+ ],
23
+ outputs: [{
24
+ name: "amount0",
25
+ type: "uint256",
26
+ internalType: "uint256"
9
27
  }, {
10
- name: "_owner",
11
- type: "address",
12
- internalType: "address"
28
+ name: "amount1",
29
+ type: "uint256",
30
+ internalType: "uint256"
13
31
  }],
14
32
  stateMutability: "nonpayable"
15
33
  },
16
34
  {
17
35
  type: "function",
18
- name: "BORROW",
19
- inputs: [],
36
+ name: "collect",
37
+ inputs: [
38
+ {
39
+ name: "recipient",
40
+ type: "address",
41
+ internalType: "address"
42
+ },
43
+ {
44
+ name: "tickLower",
45
+ type: "int24",
46
+ internalType: "int24"
47
+ },
48
+ {
49
+ name: "tickUpper",
50
+ type: "int24",
51
+ internalType: "int24"
52
+ },
53
+ {
54
+ name: "amount0Requested",
55
+ type: "uint128",
56
+ internalType: "uint128"
57
+ },
58
+ {
59
+ name: "amount1Requested",
60
+ type: "uint128",
61
+ internalType: "uint128"
62
+ }
63
+ ],
20
64
  outputs: [{
21
- name: "",
22
- type: "uint8",
23
- internalType: "uint8"
65
+ name: "amount0",
66
+ type: "uint128",
67
+ internalType: "uint128"
68
+ }, {
69
+ name: "amount1",
70
+ type: "uint128",
71
+ internalType: "uint128"
24
72
  }],
25
- stateMutability: "view"
73
+ stateMutability: "nonpayable"
26
74
  },
27
75
  {
28
76
  type: "function",
29
- name: "BURN",
77
+ name: "collectProtocol",
78
+ inputs: [
79
+ {
80
+ name: "recipient",
81
+ type: "address",
82
+ internalType: "address"
83
+ },
84
+ {
85
+ name: "amount0Requested",
86
+ type: "uint128",
87
+ internalType: "uint128"
88
+ },
89
+ {
90
+ name: "amount1Requested",
91
+ type: "uint128",
92
+ internalType: "uint128"
93
+ }
94
+ ],
95
+ outputs: [{
96
+ name: "amount0",
97
+ type: "uint128",
98
+ internalType: "uint128"
99
+ }, {
100
+ name: "amount1",
101
+ type: "uint128",
102
+ internalType: "uint128"
103
+ }],
104
+ stateMutability: "nonpayable"
105
+ },
106
+ {
107
+ type: "function",
108
+ name: "factory",
30
109
  inputs: [],
31
110
  outputs: [{
32
111
  name: "",
33
- type: "uint8",
34
- internalType: "uint8"
112
+ type: "address",
113
+ internalType: "address"
35
114
  }],
36
115
  stateMutability: "view"
37
116
  },
38
117
  {
39
118
  type: "function",
40
- name: "MINT",
119
+ name: "fee",
41
120
  inputs: [],
42
121
  outputs: [{
43
122
  name: "",
44
- type: "uint8",
45
- internalType: "uint8"
123
+ type: "uint24",
124
+ internalType: "uint24"
46
125
  }],
47
126
  stateMutability: "view"
48
127
  },
49
128
  {
50
129
  type: "function",
51
- name: "MIN_DUST_THRESHOLD",
130
+ name: "feeGrowthGlobal0X128",
52
131
  inputs: [],
53
132
  outputs: [{
54
133
  name: "",
@@ -59,67 +138,96 @@ const singleOwnerVaultAbi = [
59
138
  },
60
139
  {
61
140
  type: "function",
62
- name: "REPAY",
141
+ name: "feeGrowthGlobal1X128",
63
142
  inputs: [],
64
143
  outputs: [{
65
144
  name: "",
66
- type: "uint8",
67
- internalType: "uint8"
145
+ type: "uint256",
146
+ internalType: "uint256"
68
147
  }],
69
148
  stateMutability: "view"
70
149
  },
71
150
  {
72
151
  type: "function",
73
- name: "blocks",
74
- inputs: [{
75
- name: "",
76
- type: "int24",
77
- internalType: "int24"
78
- }],
79
- outputs: [
80
- {
81
- name: "tickLower",
82
- type: "int24",
83
- internalType: "int24"
84
- },
152
+ name: "flash",
153
+ inputs: [
85
154
  {
86
- name: "tickUpper",
87
- type: "int24",
88
- internalType: "int24"
155
+ name: "recipient",
156
+ type: "address",
157
+ internalType: "address"
89
158
  },
90
159
  {
91
- name: "prevTickLower",
92
- type: "int24",
93
- internalType: "int24"
160
+ name: "amount0",
161
+ type: "uint256",
162
+ internalType: "uint256"
94
163
  },
95
164
  {
96
- name: "totalLiquidity",
97
- type: "uint128",
98
- internalType: "uint128"
165
+ name: "amount1",
166
+ type: "uint256",
167
+ internalType: "uint256"
99
168
  },
100
169
  {
101
- name: "borrowedLiquidity",
102
- type: "uint128",
103
- internalType: "uint128"
170
+ name: "data",
171
+ type: "bytes",
172
+ internalType: "bytes"
104
173
  }
105
174
  ],
175
+ outputs: [],
176
+ stateMutability: "nonpayable"
177
+ },
178
+ {
179
+ type: "function",
180
+ name: "increaseObservationCardinalityNext",
181
+ inputs: [{
182
+ name: "observationCardinalityNext",
183
+ type: "uint16",
184
+ internalType: "uint16"
185
+ }],
186
+ outputs: [],
187
+ stateMutability: "nonpayable"
188
+ },
189
+ {
190
+ type: "function",
191
+ name: "initialize",
192
+ inputs: [{
193
+ name: "sqrtPriceX96",
194
+ type: "uint160",
195
+ internalType: "uint160"
196
+ }],
197
+ outputs: [],
198
+ stateMutability: "nonpayable"
199
+ },
200
+ {
201
+ type: "function",
202
+ name: "liquidity",
203
+ inputs: [],
204
+ outputs: [{
205
+ name: "",
206
+ type: "uint128",
207
+ internalType: "uint128"
208
+ }],
106
209
  stateMutability: "view"
107
210
  },
108
211
  {
109
212
  type: "function",
110
- name: "blocksCount",
213
+ name: "maxLiquidityPerTick",
111
214
  inputs: [],
112
215
  outputs: [{
113
216
  name: "",
114
- type: "uint256",
115
- internalType: "uint256"
217
+ type: "uint128",
218
+ internalType: "uint128"
116
219
  }],
117
220
  stateMutability: "view"
118
221
  },
119
222
  {
120
223
  type: "function",
121
- name: "borrow",
224
+ name: "mint",
122
225
  inputs: [
226
+ {
227
+ name: "recipient",
228
+ type: "address",
229
+ internalType: "address"
230
+ },
123
231
  {
124
232
  name: "tickLower",
125
233
  type: "int24",
@@ -131,14 +239,14 @@ const singleOwnerVaultAbi = [
131
239
  internalType: "int24"
132
240
  },
133
241
  {
134
- name: "liquidity",
242
+ name: "amount",
135
243
  type: "uint128",
136
244
  internalType: "uint128"
137
245
  },
138
246
  {
139
- name: "refTick",
140
- type: "int24",
141
- internalType: "int24"
247
+ name: "data",
248
+ type: "bytes",
249
+ internalType: "bytes"
142
250
  }
143
251
  ],
144
252
  outputs: [{
@@ -154,405 +262,199 @@ const singleOwnerVaultAbi = [
154
262
  },
155
263
  {
156
264
  type: "function",
157
- name: "borrowerWhitelist",
265
+ name: "observations",
158
266
  inputs: [{
159
- name: "",
160
- type: "address",
161
- internalType: "address"
162
- }],
163
- outputs: [{
164
- name: "",
165
- type: "bool",
166
- internalType: "bool"
267
+ name: "index",
268
+ type: "uint256",
269
+ internalType: "uint256"
167
270
  }],
168
- stateMutability: "view"
169
- },
170
- {
171
- type: "function",
172
- name: "burn",
173
- inputs: [
271
+ outputs: [
174
272
  {
175
- name: "tickLower",
176
- type: "int24",
177
- internalType: "int24"
273
+ name: "blockTimestamp",
274
+ type: "uint32",
275
+ internalType: "uint32"
178
276
  },
179
277
  {
180
- name: "tickUpper",
181
- type: "int24",
182
- internalType: "int24"
278
+ name: "tickCumulative",
279
+ type: "int56",
280
+ internalType: "int56"
183
281
  },
184
282
  {
185
- name: "liquidity",
186
- type: "uint128",
187
- internalType: "uint128"
283
+ name: "secondsPerLiquidityCumulativeX128",
284
+ type: "uint160",
285
+ internalType: "uint160"
188
286
  },
189
287
  {
190
- name: "refTick",
191
- type: "int24",
192
- internalType: "int24"
288
+ name: "initialized",
289
+ type: "bool",
290
+ internalType: "bool"
193
291
  }
194
292
  ],
195
- outputs: [{
196
- name: "amount0",
197
- type: "uint256",
198
- internalType: "uint256"
199
- }, {
200
- name: "amount1",
201
- type: "uint256",
202
- internalType: "uint256"
203
- }],
204
- stateMutability: "nonpayable"
293
+ stateMutability: "view"
205
294
  },
206
295
  {
207
296
  type: "function",
208
- name: "collectFees",
297
+ name: "observe",
209
298
  inputs: [{
210
- name: "tickLower",
211
- type: "int24",
212
- internalType: "int24"
213
- }, {
214
- name: "tickUpper",
215
- type: "int24",
216
- internalType: "int24"
299
+ name: "secondsAgos",
300
+ type: "uint32[]",
301
+ internalType: "uint32[]"
217
302
  }],
218
303
  outputs: [{
219
- name: "totalAmount0",
220
- type: "uint256",
221
- internalType: "uint256"
222
- }, {
223
- name: "totalAmount1",
224
- type: "uint256",
225
- internalType: "uint256"
226
- }],
227
- stateMutability: "nonpayable"
228
- },
229
- {
230
- type: "function",
231
- name: "getBlock",
232
- inputs: [{
233
- name: "tickLower",
234
- type: "int24",
235
- internalType: "int24"
304
+ name: "tickCumulatives",
305
+ type: "int56[]",
306
+ internalType: "int56[]"
236
307
  }, {
237
- name: "refTick",
238
- type: "int24",
239
- internalType: "int24"
240
- }],
241
- outputs: [{
242
- name: "",
243
- type: "tuple",
244
- internalType: "struct TimelockVaultCore.LiquidityBlock",
245
- components: [
246
- {
247
- name: "tickLower",
248
- type: "int24",
249
- internalType: "int24"
250
- },
251
- {
252
- name: "tickUpper",
253
- type: "int24",
254
- internalType: "int24"
255
- },
256
- {
257
- name: "prevTickLower",
258
- type: "int24",
259
- internalType: "int24"
260
- },
261
- {
262
- name: "totalLiquidity",
263
- type: "uint128",
264
- internalType: "uint128"
265
- },
266
- {
267
- name: "borrowedLiquidity",
268
- type: "uint128",
269
- internalType: "uint128"
270
- }
271
- ]
272
- }],
273
- stateMutability: "view"
274
- },
275
- {
276
- type: "function",
277
- name: "highestTick",
278
- inputs: [],
279
- outputs: [{
280
- name: "",
281
- type: "int24",
282
- internalType: "int24"
308
+ name: "secondsPerLiquidityCumulativeX128s",
309
+ type: "uint160[]",
310
+ internalType: "uint160[]"
283
311
  }],
284
312
  stateMutability: "view"
285
313
  },
286
314
  {
287
315
  type: "function",
288
- name: "lowestTick",
289
- inputs: [],
290
- outputs: [{
291
- name: "",
292
- type: "int24",
293
- internalType: "int24"
316
+ name: "positions",
317
+ inputs: [{
318
+ name: "key",
319
+ type: "bytes32",
320
+ internalType: "bytes32"
294
321
  }],
295
- stateMutability: "view"
296
- },
297
- {
298
- type: "function",
299
- name: "mint",
300
- inputs: [
322
+ outputs: [
301
323
  {
302
- name: "tickLower",
303
- type: "int24",
304
- internalType: "int24"
324
+ name: "liquidity",
325
+ type: "uint128",
326
+ internalType: "uint128"
305
327
  },
306
328
  {
307
- name: "tickUpper",
308
- type: "int24",
309
- internalType: "int24"
329
+ name: "feeGrowthInside0LastX128",
330
+ type: "uint256",
331
+ internalType: "uint256"
310
332
  },
311
333
  {
312
- name: "liquidity",
334
+ name: "feeGrowthInside1LastX128",
335
+ type: "uint256",
336
+ internalType: "uint256"
337
+ },
338
+ {
339
+ name: "tokensOwed0",
313
340
  type: "uint128",
314
341
  internalType: "uint128"
315
342
  },
316
343
  {
317
- name: "refTick",
318
- type: "int24",
319
- internalType: "int24"
344
+ name: "tokensOwed1",
345
+ type: "uint128",
346
+ internalType: "uint128"
320
347
  }
321
348
  ],
322
- outputs: [{
323
- name: "amount0",
324
- type: "uint256",
325
- internalType: "uint256"
326
- }, {
327
- name: "amount1",
328
- type: "uint256",
329
- internalType: "uint256"
330
- }],
331
- stateMutability: "nonpayable"
332
- },
333
- {
334
- type: "function",
335
- name: "multicall",
336
- inputs: [{
337
- name: "data",
338
- type: "bytes[]",
339
- internalType: "bytes[]"
340
- }],
341
- outputs: [{
342
- name: "results",
343
- type: "bytes[]",
344
- internalType: "bytes[]"
345
- }],
346
- stateMutability: "nonpayable"
347
- },
348
- {
349
- type: "function",
350
- name: "owner",
351
- inputs: [],
352
- outputs: [{
353
- name: "",
354
- type: "address",
355
- internalType: "address"
356
- }],
357
349
  stateMutability: "view"
358
350
  },
359
351
  {
360
352
  type: "function",
361
- name: "pool",
353
+ name: "protocolFees",
362
354
  inputs: [],
363
355
  outputs: [{
364
- name: "",
365
- type: "address",
366
- internalType: "contract IUniswapV3Pool"
356
+ name: "token0",
357
+ type: "uint128",
358
+ internalType: "uint128"
359
+ }, {
360
+ name: "token1",
361
+ type: "uint128",
362
+ internalType: "uint128"
367
363
  }],
368
364
  stateMutability: "view"
369
365
  },
370
366
  {
371
367
  type: "function",
372
- name: "pool_",
373
- inputs: [],
374
- outputs: [{
375
- name: "",
376
- type: "address",
377
- internalType: "contract IUniswapV3Pool"
368
+ name: "setFeeProtocol",
369
+ inputs: [{
370
+ name: "feeProtocol0",
371
+ type: "uint8",
372
+ internalType: "uint8"
373
+ }, {
374
+ name: "feeProtocol1",
375
+ type: "uint8",
376
+ internalType: "uint8"
378
377
  }],
379
- stateMutability: "view"
380
- },
381
- {
382
- type: "function",
383
- name: "renounceOwnership",
384
- inputs: [],
385
378
  outputs: [],
386
379
  stateMutability: "nonpayable"
387
380
  },
388
381
  {
389
382
  type: "function",
390
- name: "repay",
391
- inputs: [
383
+ name: "slot0",
384
+ inputs: [],
385
+ outputs: [
392
386
  {
393
- name: "tickLower",
394
- type: "int24",
395
- internalType: "int24"
387
+ name: "sqrtPriceX96",
388
+ type: "uint160",
389
+ internalType: "uint160"
396
390
  },
397
391
  {
398
- name: "tickUpper",
392
+ name: "tick",
399
393
  type: "int24",
400
394
  internalType: "int24"
401
395
  },
402
396
  {
403
- name: "liquidity",
404
- type: "uint128",
405
- internalType: "uint128"
397
+ name: "observationIndex",
398
+ type: "uint16",
399
+ internalType: "uint16"
406
400
  },
407
401
  {
408
- name: "refTick",
409
- type: "int24",
410
- internalType: "int24"
411
- }
412
- ],
413
- outputs: [{
414
- name: "amount0",
415
- type: "uint256",
416
- internalType: "uint256"
417
- }, {
418
- name: "amount1",
419
- type: "uint256",
420
- internalType: "uint256"
421
- }],
422
- stateMutability: "nonpayable"
423
- },
424
- {
425
- type: "function",
426
- name: "tickSpacing",
427
- inputs: [],
428
- outputs: [{
429
- name: "",
430
- type: "int24",
431
- internalType: "int24"
432
- }],
433
- stateMutability: "view"
434
- },
435
- {
436
- type: "function",
437
- name: "token0",
438
- inputs: [],
439
- outputs: [{
440
- name: "",
441
- type: "address",
442
- internalType: "contract IERC20"
443
- }],
444
- stateMutability: "view"
445
- },
446
- {
447
- type: "function",
448
- name: "token1",
449
- inputs: [],
450
- outputs: [{
451
- name: "",
452
- type: "address",
453
- internalType: "contract IERC20"
454
- }],
455
- stateMutability: "view"
456
- },
457
- {
458
- type: "function",
459
- name: "transferOwnership",
460
- inputs: [{
461
- name: "newOwner",
462
- type: "address",
463
- internalType: "address"
464
- }],
465
- outputs: [],
466
- stateMutability: "nonpayable"
467
- },
468
- {
469
- type: "function",
470
- name: "uniswapV3MintCallback",
471
- inputs: [
402
+ name: "observationCardinality",
403
+ type: "uint16",
404
+ internalType: "uint16"
405
+ },
472
406
  {
473
- name: "amount0",
474
- type: "uint256",
475
- internalType: "uint256"
407
+ name: "observationCardinalityNext",
408
+ type: "uint16",
409
+ internalType: "uint16"
476
410
  },
477
411
  {
478
- name: "amount1",
479
- type: "uint256",
480
- internalType: "uint256"
412
+ name: "feeProtocol",
413
+ type: "uint8",
414
+ internalType: "uint8"
481
415
  },
482
416
  {
483
- name: "data",
484
- type: "bytes",
485
- internalType: "bytes"
417
+ name: "unlocked",
418
+ type: "bool",
419
+ internalType: "bool"
486
420
  }
487
421
  ],
488
- outputs: [],
489
- stateMutability: "nonpayable"
422
+ stateMutability: "view"
490
423
  },
491
424
  {
492
425
  type: "function",
493
- name: "whitelistBorrower",
426
+ name: "snapshotCumulativesInside",
494
427
  inputs: [{
495
- name: "borrower",
496
- type: "address",
497
- internalType: "address"
428
+ name: "tickLower",
429
+ type: "int24",
430
+ internalType: "int24"
498
431
  }, {
499
- name: "status",
500
- type: "bool",
501
- internalType: "bool"
502
- }],
503
- outputs: [],
504
- stateMutability: "nonpayable"
505
- },
506
- {
507
- type: "function",
508
- name: "withdrawTokens",
509
- inputs: [{
510
- name: "tokens",
511
- type: "address[]",
512
- internalType: "contract IERC20[]"
432
+ name: "tickUpper",
433
+ type: "int24",
434
+ internalType: "int24"
513
435
  }],
514
- outputs: [],
515
- stateMutability: "nonpayable"
516
- }
517
- ];
518
-
519
- //#endregion
520
- //#region src/abis/uniswapV3Pool.ts
521
- const uniswapV3PoolAbi = [
522
- {
523
- type: "function",
524
- name: "burn",
525
- inputs: [
436
+ outputs: [
526
437
  {
527
- name: "tickLower",
528
- type: "int24",
529
- internalType: "int24"
438
+ name: "tickCumulativeInside",
439
+ type: "int56",
440
+ internalType: "int56"
530
441
  },
531
442
  {
532
- name: "tickUpper",
533
- type: "int24",
534
- internalType: "int24"
443
+ name: "secondsPerLiquidityInsideX128",
444
+ type: "uint160",
445
+ internalType: "uint160"
535
446
  },
536
447
  {
537
- name: "amount",
538
- type: "uint128",
539
- internalType: "uint128"
448
+ name: "secondsInside",
449
+ type: "uint32",
450
+ internalType: "uint32"
540
451
  }
541
452
  ],
542
- outputs: [{
543
- name: "amount0",
544
- type: "uint256",
545
- internalType: "uint256"
546
- }, {
547
- name: "amount1",
548
- type: "uint256",
549
- internalType: "uint256"
550
- }],
551
- stateMutability: "nonpayable"
453
+ stateMutability: "view"
552
454
  },
553
455
  {
554
456
  type: "function",
555
- name: "collect",
457
+ name: "swap",
556
458
  inputs: [
557
459
  {
558
460
  name: "recipient",
@@ -560,71 +462,118 @@ const uniswapV3PoolAbi = [
560
462
  internalType: "address"
561
463
  },
562
464
  {
563
- name: "tickLower",
564
- type: "int24",
565
- internalType: "int24"
465
+ name: "zeroForOne",
466
+ type: "bool",
467
+ internalType: "bool"
566
468
  },
567
469
  {
568
- name: "tickUpper",
569
- type: "int24",
570
- internalType: "int24"
470
+ name: "amountSpecified",
471
+ type: "int256",
472
+ internalType: "int256"
571
473
  },
572
474
  {
573
- name: "amount0Requested",
574
- type: "uint128",
575
- internalType: "uint128"
475
+ name: "sqrtPriceLimitX96",
476
+ type: "uint160",
477
+ internalType: "uint160"
576
478
  },
577
479
  {
578
- name: "amount1Requested",
579
- type: "uint128",
580
- internalType: "uint128"
480
+ name: "data",
481
+ type: "bytes",
482
+ internalType: "bytes"
581
483
  }
582
484
  ],
583
485
  outputs: [{
584
486
  name: "amount0",
585
- type: "uint128",
586
- internalType: "uint128"
487
+ type: "int256",
488
+ internalType: "int256"
587
489
  }, {
588
490
  name: "amount1",
589
- type: "uint128",
590
- internalType: "uint128"
491
+ type: "int256",
492
+ internalType: "int256"
591
493
  }],
592
494
  stateMutability: "nonpayable"
593
495
  },
594
496
  {
595
497
  type: "function",
596
- name: "collectProtocol",
597
- inputs: [
598
- {
599
- name: "recipient",
600
- type: "address",
601
- internalType: "address"
602
- },
498
+ name: "tickBitmap",
499
+ inputs: [{
500
+ name: "wordPosition",
501
+ type: "int16",
502
+ internalType: "int16"
503
+ }],
504
+ outputs: [{
505
+ name: "",
506
+ type: "uint256",
507
+ internalType: "uint256"
508
+ }],
509
+ stateMutability: "view"
510
+ },
511
+ {
512
+ type: "function",
513
+ name: "tickSpacing",
514
+ inputs: [],
515
+ outputs: [{
516
+ name: "",
517
+ type: "int24",
518
+ internalType: "int24"
519
+ }],
520
+ stateMutability: "view"
521
+ },
522
+ {
523
+ type: "function",
524
+ name: "ticks",
525
+ inputs: [{
526
+ name: "tick",
527
+ type: "int24",
528
+ internalType: "int24"
529
+ }],
530
+ outputs: [
603
531
  {
604
- name: "amount0Requested",
532
+ name: "liquidityGross",
605
533
  type: "uint128",
606
534
  internalType: "uint128"
607
535
  },
608
536
  {
609
- name: "amount1Requested",
610
- type: "uint128",
611
- internalType: "uint128"
537
+ name: "liquidityNet",
538
+ type: "int128",
539
+ internalType: "int128"
540
+ },
541
+ {
542
+ name: "feeGrowthOutside0X128",
543
+ type: "uint256",
544
+ internalType: "uint256"
545
+ },
546
+ {
547
+ name: "feeGrowthOutside1X128",
548
+ type: "uint256",
549
+ internalType: "uint256"
550
+ },
551
+ {
552
+ name: "tickCumulativeOutside",
553
+ type: "int56",
554
+ internalType: "int56"
555
+ },
556
+ {
557
+ name: "secondsPerLiquidityOutsideX128",
558
+ type: "uint160",
559
+ internalType: "uint160"
560
+ },
561
+ {
562
+ name: "secondsOutside",
563
+ type: "uint32",
564
+ internalType: "uint32"
565
+ },
566
+ {
567
+ name: "initialized",
568
+ type: "bool",
569
+ internalType: "bool"
612
570
  }
613
571
  ],
614
- outputs: [{
615
- name: "amount0",
616
- type: "uint128",
617
- internalType: "uint128"
618
- }, {
619
- name: "amount1",
620
- type: "uint128",
621
- internalType: "uint128"
622
- }],
623
- stateMutability: "nonpayable"
572
+ stateMutability: "view"
624
573
  },
625
574
  {
626
575
  type: "function",
627
- name: "factory",
576
+ name: "token0",
628
577
  inputs: [],
629
578
  outputs: [{
630
579
  name: "",
@@ -635,118 +584,140 @@ const uniswapV3PoolAbi = [
635
584
  },
636
585
  {
637
586
  type: "function",
638
- name: "fee",
587
+ name: "token1",
639
588
  inputs: [],
640
589
  outputs: [{
641
590
  name: "",
642
- type: "uint24",
643
- internalType: "uint24"
591
+ type: "address",
592
+ internalType: "address"
644
593
  }],
645
594
  stateMutability: "view"
595
+ }
596
+ ];
597
+
598
+ //#endregion
599
+ //#region src/abis/singleOwnerVault.ts
600
+ const singleOwnerVaultAbi = [
601
+ {
602
+ type: "constructor",
603
+ inputs: [{
604
+ name: "_pool",
605
+ type: "address",
606
+ internalType: "contract IUniswapV3Pool"
607
+ }, {
608
+ name: "_owner",
609
+ type: "address",
610
+ internalType: "address"
611
+ }],
612
+ stateMutability: "nonpayable"
646
613
  },
647
614
  {
648
615
  type: "function",
649
- name: "feeGrowthGlobal0X128",
616
+ name: "BORROW",
650
617
  inputs: [],
651
618
  outputs: [{
652
619
  name: "",
653
- type: "uint256",
654
- internalType: "uint256"
620
+ type: "uint8",
621
+ internalType: "uint8"
655
622
  }],
656
623
  stateMutability: "view"
657
624
  },
658
625
  {
659
626
  type: "function",
660
- name: "feeGrowthGlobal1X128",
627
+ name: "BURN",
661
628
  inputs: [],
662
629
  outputs: [{
663
630
  name: "",
664
- type: "uint256",
665
- internalType: "uint256"
631
+ type: "uint8",
632
+ internalType: "uint8"
666
633
  }],
667
634
  stateMutability: "view"
668
635
  },
669
636
  {
670
637
  type: "function",
671
- name: "flash",
672
- inputs: [
673
- {
674
- name: "recipient",
675
- type: "address",
676
- internalType: "address"
677
- },
678
- {
679
- name: "amount0",
680
- type: "uint256",
681
- internalType: "uint256"
682
- },
683
- {
684
- name: "amount1",
685
- type: "uint256",
686
- internalType: "uint256"
687
- },
688
- {
689
- name: "data",
690
- type: "bytes",
691
- internalType: "bytes"
692
- }
693
- ],
694
- outputs: [],
695
- stateMutability: "nonpayable"
638
+ name: "MINT",
639
+ inputs: [],
640
+ outputs: [{
641
+ name: "",
642
+ type: "uint8",
643
+ internalType: "uint8"
644
+ }],
645
+ stateMutability: "view"
696
646
  },
697
647
  {
698
648
  type: "function",
699
- name: "increaseObservationCardinalityNext",
700
- inputs: [{
701
- name: "observationCardinalityNext",
702
- type: "uint16",
703
- internalType: "uint16"
649
+ name: "MIN_DUST_THRESHOLD",
650
+ inputs: [],
651
+ outputs: [{
652
+ name: "",
653
+ type: "uint256",
654
+ internalType: "uint256"
704
655
  }],
705
- outputs: [],
706
- stateMutability: "nonpayable"
656
+ stateMutability: "view"
707
657
  },
708
658
  {
709
659
  type: "function",
710
- name: "initialize",
711
- inputs: [{
712
- name: "sqrtPriceX96",
713
- type: "uint160",
714
- internalType: "uint160"
660
+ name: "REPAY",
661
+ inputs: [],
662
+ outputs: [{
663
+ name: "",
664
+ type: "uint8",
665
+ internalType: "uint8"
715
666
  }],
716
- outputs: [],
717
- stateMutability: "nonpayable"
667
+ stateMutability: "view"
718
668
  },
719
669
  {
720
670
  type: "function",
721
- name: "liquidity",
722
- inputs: [],
723
- outputs: [{
671
+ name: "blocks",
672
+ inputs: [{
724
673
  name: "",
725
- type: "uint128",
726
- internalType: "uint128"
674
+ type: "int24",
675
+ internalType: "int24"
727
676
  }],
677
+ outputs: [
678
+ {
679
+ name: "tickLower",
680
+ type: "int24",
681
+ internalType: "int24"
682
+ },
683
+ {
684
+ name: "tickUpper",
685
+ type: "int24",
686
+ internalType: "int24"
687
+ },
688
+ {
689
+ name: "prevTickLower",
690
+ type: "int24",
691
+ internalType: "int24"
692
+ },
693
+ {
694
+ name: "totalLiquidity",
695
+ type: "uint128",
696
+ internalType: "uint128"
697
+ },
698
+ {
699
+ name: "borrowedLiquidity",
700
+ type: "uint128",
701
+ internalType: "uint128"
702
+ }
703
+ ],
728
704
  stateMutability: "view"
729
705
  },
730
706
  {
731
707
  type: "function",
732
- name: "maxLiquidityPerTick",
708
+ name: "blocksCount",
733
709
  inputs: [],
734
710
  outputs: [{
735
711
  name: "",
736
- type: "uint128",
737
- internalType: "uint128"
712
+ type: "uint256",
713
+ internalType: "uint256"
738
714
  }],
739
715
  stateMutability: "view"
740
716
  },
741
717
  {
742
718
  type: "function",
743
- name: "mint",
719
+ name: "borrow",
744
720
  inputs: [
745
- {
746
- name: "recipient",
747
- type: "address",
748
- internalType: "address"
749
- },
750
721
  {
751
722
  name: "tickLower",
752
723
  type: "int24",
@@ -758,14 +729,14 @@ const uniswapV3PoolAbi = [
758
729
  internalType: "int24"
759
730
  },
760
731
  {
761
- name: "amount",
732
+ name: "liquidity",
762
733
  type: "uint128",
763
734
  internalType: "uint128"
764
735
  },
765
736
  {
766
- name: "data",
767
- type: "bytes",
768
- internalType: "bytes"
737
+ name: "refTick",
738
+ type: "int24",
739
+ internalType: "int24"
769
740
  }
770
741
  ],
771
742
  outputs: [{
@@ -781,313 +752,282 @@ const uniswapV3PoolAbi = [
781
752
  },
782
753
  {
783
754
  type: "function",
784
- name: "observations",
785
- inputs: [{
786
- name: "index",
787
- type: "uint256",
788
- internalType: "uint256"
789
- }],
790
- outputs: [
791
- {
792
- name: "blockTimestamp",
793
- type: "uint32",
794
- internalType: "uint32"
795
- },
796
- {
797
- name: "tickCumulative",
798
- type: "int56",
799
- internalType: "int56"
800
- },
801
- {
802
- name: "secondsPerLiquidityCumulativeX128",
803
- type: "uint160",
804
- internalType: "uint160"
805
- },
806
- {
807
- name: "initialized",
808
- type: "bool",
809
- internalType: "bool"
810
- }
811
- ],
812
- stateMutability: "view"
813
- },
814
- {
815
- type: "function",
816
- name: "observe",
755
+ name: "borrowerWhitelist",
817
756
  inputs: [{
818
- name: "secondsAgos",
819
- type: "uint32[]",
820
- internalType: "uint32[]"
757
+ name: "",
758
+ type: "address",
759
+ internalType: "address"
821
760
  }],
822
761
  outputs: [{
823
- name: "tickCumulatives",
824
- type: "int56[]",
825
- internalType: "int56[]"
826
- }, {
827
- name: "secondsPerLiquidityCumulativeX128s",
828
- type: "uint160[]",
829
- internalType: "uint160[]"
762
+ name: "",
763
+ type: "bool",
764
+ internalType: "bool"
830
765
  }],
831
766
  stateMutability: "view"
832
767
  },
833
768
  {
834
769
  type: "function",
835
- name: "positions",
836
- inputs: [{
837
- name: "key",
838
- type: "bytes32",
839
- internalType: "bytes32"
840
- }],
841
- outputs: [
842
- {
843
- name: "liquidity",
844
- type: "uint128",
845
- internalType: "uint128"
846
- },
770
+ name: "burn",
771
+ inputs: [
847
772
  {
848
- name: "feeGrowthInside0LastX128",
849
- type: "uint256",
850
- internalType: "uint256"
773
+ name: "tickLower",
774
+ type: "int24",
775
+ internalType: "int24"
851
776
  },
852
777
  {
853
- name: "feeGrowthInside1LastX128",
854
- type: "uint256",
855
- internalType: "uint256"
778
+ name: "tickUpper",
779
+ type: "int24",
780
+ internalType: "int24"
856
781
  },
857
782
  {
858
- name: "tokensOwed0",
783
+ name: "liquidity",
859
784
  type: "uint128",
860
785
  internalType: "uint128"
861
786
  },
862
787
  {
863
- name: "tokensOwed1",
864
- type: "uint128",
865
- internalType: "uint128"
788
+ name: "refTick",
789
+ type: "int24",
790
+ internalType: "int24"
866
791
  }
867
792
  ],
868
- stateMutability: "view"
869
- },
870
- {
871
- type: "function",
872
- name: "protocolFees",
873
- inputs: [],
874
793
  outputs: [{
875
- name: "token0",
876
- type: "uint128",
877
- internalType: "uint128"
794
+ name: "amount0",
795
+ type: "uint256",
796
+ internalType: "uint256"
878
797
  }, {
879
- name: "token1",
880
- type: "uint128",
881
- internalType: "uint128"
798
+ name: "amount1",
799
+ type: "uint256",
800
+ internalType: "uint256"
882
801
  }],
883
- stateMutability: "view"
802
+ stateMutability: "nonpayable"
884
803
  },
885
804
  {
886
805
  type: "function",
887
- name: "setFeeProtocol",
806
+ name: "collectFees",
888
807
  inputs: [{
889
- name: "feeProtocol0",
890
- type: "uint8",
891
- internalType: "uint8"
808
+ name: "tickLower",
809
+ type: "int24",
810
+ internalType: "int24"
892
811
  }, {
893
- name: "feeProtocol1",
894
- type: "uint8",
895
- internalType: "uint8"
812
+ name: "tickUpper",
813
+ type: "int24",
814
+ internalType: "int24"
815
+ }],
816
+ outputs: [{
817
+ name: "totalAmount0",
818
+ type: "uint256",
819
+ internalType: "uint256"
820
+ }, {
821
+ name: "totalAmount1",
822
+ type: "uint256",
823
+ internalType: "uint256"
896
824
  }],
897
- outputs: [],
898
825
  stateMutability: "nonpayable"
899
826
  },
900
827
  {
901
828
  type: "function",
902
- name: "slot0",
903
- inputs: [],
904
- outputs: [
905
- {
906
- name: "sqrtPriceX96",
907
- type: "uint160",
908
- internalType: "uint160"
909
- },
910
- {
911
- name: "tick",
912
- type: "int24",
913
- internalType: "int24"
914
- },
915
- {
916
- name: "observationIndex",
917
- type: "uint16",
918
- internalType: "uint16"
919
- },
920
- {
921
- name: "observationCardinality",
922
- type: "uint16",
923
- internalType: "uint16"
924
- },
925
- {
926
- name: "observationCardinalityNext",
927
- type: "uint16",
928
- internalType: "uint16"
929
- },
930
- {
931
- name: "feeProtocol",
932
- type: "uint8",
933
- internalType: "uint8"
934
- },
935
- {
936
- name: "unlocked",
937
- type: "bool",
938
- internalType: "bool"
939
- }
940
- ],
829
+ name: "getBlock",
830
+ inputs: [{
831
+ name: "tickLower",
832
+ type: "int24",
833
+ internalType: "int24"
834
+ }, {
835
+ name: "refTick",
836
+ type: "int24",
837
+ internalType: "int24"
838
+ }],
839
+ outputs: [{
840
+ name: "",
841
+ type: "tuple",
842
+ internalType: "struct TimelockVaultCore.LiquidityBlock",
843
+ components: [
844
+ {
845
+ name: "tickLower",
846
+ type: "int24",
847
+ internalType: "int24"
848
+ },
849
+ {
850
+ name: "tickUpper",
851
+ type: "int24",
852
+ internalType: "int24"
853
+ },
854
+ {
855
+ name: "prevTickLower",
856
+ type: "int24",
857
+ internalType: "int24"
858
+ },
859
+ {
860
+ name: "totalLiquidity",
861
+ type: "uint128",
862
+ internalType: "uint128"
863
+ },
864
+ {
865
+ name: "borrowedLiquidity",
866
+ type: "uint128",
867
+ internalType: "uint128"
868
+ }
869
+ ]
870
+ }],
941
871
  stateMutability: "view"
942
872
  },
943
873
  {
944
874
  type: "function",
945
- name: "snapshotCumulativesInside",
946
- inputs: [{
947
- name: "tickLower",
875
+ name: "highestTick",
876
+ inputs: [],
877
+ outputs: [{
878
+ name: "",
948
879
  type: "int24",
949
880
  internalType: "int24"
950
- }, {
951
- name: "tickUpper",
881
+ }],
882
+ stateMutability: "view"
883
+ },
884
+ {
885
+ type: "function",
886
+ name: "lowestTick",
887
+ inputs: [],
888
+ outputs: [{
889
+ name: "",
952
890
  type: "int24",
953
891
  internalType: "int24"
954
892
  }],
955
- outputs: [
956
- {
957
- name: "tickCumulativeInside",
958
- type: "int56",
959
- internalType: "int56"
960
- },
961
- {
962
- name: "secondsPerLiquidityInsideX128",
963
- type: "uint160",
964
- internalType: "uint160"
965
- },
966
- {
967
- name: "secondsInside",
968
- type: "uint32",
969
- internalType: "uint32"
970
- }
971
- ],
972
893
  stateMutability: "view"
973
894
  },
974
895
  {
975
896
  type: "function",
976
- name: "swap",
897
+ name: "mint",
977
898
  inputs: [
978
899
  {
979
- name: "recipient",
980
- type: "address",
981
- internalType: "address"
982
- },
983
- {
984
- name: "zeroForOne",
985
- type: "bool",
986
- internalType: "bool"
900
+ name: "tickLower",
901
+ type: "int24",
902
+ internalType: "int24"
987
903
  },
988
904
  {
989
- name: "amountSpecified",
990
- type: "int256",
991
- internalType: "int256"
905
+ name: "tickUpper",
906
+ type: "int24",
907
+ internalType: "int24"
992
908
  },
993
909
  {
994
- name: "sqrtPriceLimitX96",
995
- type: "uint160",
996
- internalType: "uint160"
910
+ name: "liquidity",
911
+ type: "uint128",
912
+ internalType: "uint128"
997
913
  },
998
914
  {
999
- name: "data",
1000
- type: "bytes",
1001
- internalType: "bytes"
915
+ name: "refTick",
916
+ type: "int24",
917
+ internalType: "int24"
1002
918
  }
1003
919
  ],
1004
920
  outputs: [{
1005
921
  name: "amount0",
1006
- type: "int256",
1007
- internalType: "int256"
922
+ type: "uint256",
923
+ internalType: "uint256"
1008
924
  }, {
1009
925
  name: "amount1",
1010
- type: "int256",
1011
- internalType: "int256"
926
+ type: "uint256",
927
+ internalType: "uint256"
1012
928
  }],
1013
929
  stateMutability: "nonpayable"
1014
930
  },
1015
931
  {
1016
932
  type: "function",
1017
- name: "tickBitmap",
933
+ name: "multicall",
1018
934
  inputs: [{
1019
- name: "wordPosition",
1020
- type: "int16",
1021
- internalType: "int16"
935
+ name: "data",
936
+ type: "bytes[]",
937
+ internalType: "bytes[]"
938
+ }],
939
+ outputs: [{
940
+ name: "results",
941
+ type: "bytes[]",
942
+ internalType: "bytes[]"
1022
943
  }],
944
+ stateMutability: "nonpayable"
945
+ },
946
+ {
947
+ type: "function",
948
+ name: "owner",
949
+ inputs: [],
1023
950
  outputs: [{
1024
951
  name: "",
1025
- type: "uint256",
1026
- internalType: "uint256"
952
+ type: "address",
953
+ internalType: "address"
1027
954
  }],
1028
955
  stateMutability: "view"
1029
956
  },
1030
957
  {
1031
958
  type: "function",
1032
- name: "tickSpacing",
959
+ name: "pool",
1033
960
  inputs: [],
1034
961
  outputs: [{
1035
962
  name: "",
1036
- type: "int24",
1037
- internalType: "int24"
963
+ type: "address",
964
+ internalType: "contract IUniswapV3Pool"
1038
965
  }],
1039
966
  stateMutability: "view"
1040
967
  },
1041
968
  {
1042
969
  type: "function",
1043
- name: "ticks",
1044
- inputs: [{
1045
- name: "tick",
1046
- type: "int24",
1047
- internalType: "int24"
970
+ name: "pool_",
971
+ inputs: [],
972
+ outputs: [{
973
+ name: "",
974
+ type: "address",
975
+ internalType: "contract IUniswapV3Pool"
1048
976
  }],
1049
- outputs: [
1050
- {
1051
- name: "liquidityGross",
1052
- type: "uint128",
1053
- internalType: "uint128"
1054
- },
1055
- {
1056
- name: "liquidityNet",
1057
- type: "int128",
1058
- internalType: "int128"
1059
- },
1060
- {
1061
- name: "feeGrowthOutside0X128",
1062
- type: "uint256",
1063
- internalType: "uint256"
1064
- },
1065
- {
1066
- name: "feeGrowthOutside1X128",
1067
- type: "uint256",
1068
- internalType: "uint256"
1069
- },
977
+ stateMutability: "view"
978
+ },
979
+ {
980
+ type: "function",
981
+ name: "renounceOwnership",
982
+ inputs: [],
983
+ outputs: [],
984
+ stateMutability: "nonpayable"
985
+ },
986
+ {
987
+ type: "function",
988
+ name: "repay",
989
+ inputs: [
1070
990
  {
1071
- name: "tickCumulativeOutside",
1072
- type: "int56",
1073
- internalType: "int56"
991
+ name: "tickLower",
992
+ type: "int24",
993
+ internalType: "int24"
1074
994
  },
1075
995
  {
1076
- name: "secondsPerLiquidityOutsideX128",
1077
- type: "uint160",
1078
- internalType: "uint160"
996
+ name: "tickUpper",
997
+ type: "int24",
998
+ internalType: "int24"
1079
999
  },
1080
1000
  {
1081
- name: "secondsOutside",
1082
- type: "uint32",
1083
- internalType: "uint32"
1001
+ name: "liquidity",
1002
+ type: "uint128",
1003
+ internalType: "uint128"
1084
1004
  },
1085
1005
  {
1086
- name: "initialized",
1087
- type: "bool",
1088
- internalType: "bool"
1006
+ name: "refTick",
1007
+ type: "int24",
1008
+ internalType: "int24"
1089
1009
  }
1090
1010
  ],
1011
+ outputs: [{
1012
+ name: "amount0",
1013
+ type: "uint256",
1014
+ internalType: "uint256"
1015
+ }, {
1016
+ name: "amount1",
1017
+ type: "uint256",
1018
+ internalType: "uint256"
1019
+ }],
1020
+ stateMutability: "nonpayable"
1021
+ },
1022
+ {
1023
+ type: "function",
1024
+ name: "tickSpacing",
1025
+ inputs: [],
1026
+ outputs: [{
1027
+ name: "",
1028
+ type: "int24",
1029
+ internalType: "int24"
1030
+ }],
1091
1031
  stateMutability: "view"
1092
1032
  },
1093
1033
  {
@@ -1097,7 +1037,7 @@ const uniswapV3PoolAbi = [
1097
1037
  outputs: [{
1098
1038
  name: "",
1099
1039
  type: "address",
1100
- internalType: "address"
1040
+ internalType: "contract IERC20"
1101
1041
  }],
1102
1042
  stateMutability: "view"
1103
1043
  },
@@ -1108,12 +1048,72 @@ const uniswapV3PoolAbi = [
1108
1048
  outputs: [{
1109
1049
  name: "",
1110
1050
  type: "address",
1111
- internalType: "address"
1051
+ internalType: "contract IERC20"
1112
1052
  }],
1113
1053
  stateMutability: "view"
1054
+ },
1055
+ {
1056
+ type: "function",
1057
+ name: "transferOwnership",
1058
+ inputs: [{
1059
+ name: "newOwner",
1060
+ type: "address",
1061
+ internalType: "address"
1062
+ }],
1063
+ outputs: [],
1064
+ stateMutability: "nonpayable"
1065
+ },
1066
+ {
1067
+ type: "function",
1068
+ name: "uniswapV3MintCallback",
1069
+ inputs: [
1070
+ {
1071
+ name: "amount0",
1072
+ type: "uint256",
1073
+ internalType: "uint256"
1074
+ },
1075
+ {
1076
+ name: "amount1",
1077
+ type: "uint256",
1078
+ internalType: "uint256"
1079
+ },
1080
+ {
1081
+ name: "data",
1082
+ type: "bytes",
1083
+ internalType: "bytes"
1084
+ }
1085
+ ],
1086
+ outputs: [],
1087
+ stateMutability: "nonpayable"
1088
+ },
1089
+ {
1090
+ type: "function",
1091
+ name: "whitelistBorrower",
1092
+ inputs: [{
1093
+ name: "borrower",
1094
+ type: "address",
1095
+ internalType: "address"
1096
+ }, {
1097
+ name: "status",
1098
+ type: "bool",
1099
+ internalType: "bool"
1100
+ }],
1101
+ outputs: [],
1102
+ stateMutability: "nonpayable"
1103
+ },
1104
+ {
1105
+ type: "function",
1106
+ name: "withdrawTokens",
1107
+ inputs: [{
1108
+ name: "tokens",
1109
+ type: "address[]",
1110
+ internalType: "contract IERC20[]"
1111
+ }],
1112
+ outputs: [],
1113
+ stateMutability: "nonpayable"
1114
1114
  }
1115
1115
  ];
1116
1116
 
1117
1117
  //#endregion
1118
1118
  export { singleOwnerVaultAbi, uniswapV3PoolAbi };
1119
- //# sourceMappingURL=uniswapV3Pool-Copswrde.js.map
1119
+ //# sourceMappingURL=singleOwnerVault-DMu9pqN1.js.map