timelock-sdk 0.0.34 → 0.0.36

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