timelock-sdk 0.0.19 → 0.0.21

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.
Files changed (35) hide show
  1. package/dist/abis.cjs +9 -1
  2. package/dist/abis.d.cts +3 -2
  3. package/dist/abis.d.ts +3 -2
  4. package/dist/abis.js +4 -1
  5. package/dist/client.cjs +695 -4
  6. package/dist/client.cjs.map +1 -0
  7. package/dist/client.d.cts +431 -53
  8. package/dist/client.d.ts +391 -13
  9. package/dist/client.js +667 -4
  10. package/dist/client.js.map +1 -0
  11. package/dist/{index-DyZhOGnP.d.ts → index-B7b3c8cu.d.cts} +151 -94
  12. package/dist/{index-CnaCnYLR.d.cts → index-CRhFaRiq.d.ts} +60 -3
  13. package/dist/numberUtils-CAMznXR5.js +220 -0
  14. package/dist/numberUtils-CAMznXR5.js.map +1 -0
  15. package/dist/numberUtils-DOUvJfQD.cjs +427 -0
  16. package/dist/numberUtils-DOUvJfQD.cjs.map +1 -0
  17. package/dist/optionsMarket-Br-bjuSA.cjs +2407 -0
  18. package/dist/optionsMarket-Br-bjuSA.cjs.map +1 -0
  19. package/dist/optionsMarket-DyBxHplR.js +2383 -0
  20. package/dist/optionsMarket-DyBxHplR.js.map +1 -0
  21. package/dist/package.cjs +32 -1
  22. package/dist/package.d.cts +2 -2
  23. package/dist/package.d.ts +2 -2
  24. package/dist/package.js +4 -1
  25. package/dist/{uniswapMathLens-SWLgAikn.d.ts → uniswapMathLens-B1MIL2yT.d.cts} +6 -1
  26. package/dist/{uniswapMathLens-CsZDhwII.d.cts → uniswapMathLens-MrB_VfJB.d.ts} +6 -1
  27. package/dist/uniswapV3Pool-Copswrde.js +1119 -1
  28. package/dist/uniswapV3Pool-Copswrde.js.map +1 -0
  29. package/dist/uniswapV3Pool-D9Vqrkmz.cjs +1131 -1
  30. package/dist/uniswapV3Pool-D9Vqrkmz.cjs.map +1 -0
  31. package/package.json +1 -1
  32. package/dist/numberUtils-B7BwWYfb.cjs +0 -1
  33. package/dist/numberUtils-DP-pDRRs.js +0 -1
  34. package/dist/optionsMarket-BsJTpwtl.js +0 -1
  35. package/dist/optionsMarket-BsK9z8z4.cjs +0 -1
@@ -0,0 +1,2383 @@
1
+ //#region src/abis/erc20.ts
2
+ const erc20Abi = [
3
+ {
4
+ type: "constructor",
5
+ inputs: [{
6
+ name: "name_",
7
+ type: "string",
8
+ internalType: "string"
9
+ }, {
10
+ name: "symbol_",
11
+ type: "string",
12
+ internalType: "string"
13
+ }],
14
+ stateMutability: "nonpayable"
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "allowance",
19
+ inputs: [{
20
+ name: "owner",
21
+ type: "address",
22
+ internalType: "address"
23
+ }, {
24
+ name: "spender",
25
+ type: "address",
26
+ internalType: "address"
27
+ }],
28
+ outputs: [{
29
+ name: "",
30
+ type: "uint256",
31
+ internalType: "uint256"
32
+ }],
33
+ stateMutability: "view"
34
+ },
35
+ {
36
+ type: "function",
37
+ name: "approve",
38
+ inputs: [{
39
+ name: "spender",
40
+ type: "address",
41
+ internalType: "address"
42
+ }, {
43
+ name: "amount",
44
+ type: "uint256",
45
+ internalType: "uint256"
46
+ }],
47
+ outputs: [{
48
+ name: "",
49
+ type: "bool",
50
+ internalType: "bool"
51
+ }],
52
+ stateMutability: "nonpayable"
53
+ },
54
+ {
55
+ type: "function",
56
+ name: "balanceOf",
57
+ inputs: [{
58
+ name: "account",
59
+ type: "address",
60
+ internalType: "address"
61
+ }],
62
+ outputs: [{
63
+ name: "",
64
+ type: "uint256",
65
+ internalType: "uint256"
66
+ }],
67
+ stateMutability: "view"
68
+ },
69
+ {
70
+ type: "function",
71
+ name: "decimals",
72
+ inputs: [],
73
+ outputs: [{
74
+ name: "",
75
+ type: "uint8",
76
+ internalType: "uint8"
77
+ }],
78
+ stateMutability: "view"
79
+ },
80
+ {
81
+ type: "function",
82
+ name: "decreaseAllowance",
83
+ inputs: [{
84
+ name: "spender",
85
+ type: "address",
86
+ internalType: "address"
87
+ }, {
88
+ name: "subtractedValue",
89
+ type: "uint256",
90
+ internalType: "uint256"
91
+ }],
92
+ outputs: [{
93
+ name: "",
94
+ type: "bool",
95
+ internalType: "bool"
96
+ }],
97
+ stateMutability: "nonpayable"
98
+ },
99
+ {
100
+ type: "function",
101
+ name: "increaseAllowance",
102
+ inputs: [{
103
+ name: "spender",
104
+ type: "address",
105
+ internalType: "address"
106
+ }, {
107
+ name: "addedValue",
108
+ type: "uint256",
109
+ internalType: "uint256"
110
+ }],
111
+ outputs: [{
112
+ name: "",
113
+ type: "bool",
114
+ internalType: "bool"
115
+ }],
116
+ stateMutability: "nonpayable"
117
+ },
118
+ {
119
+ type: "function",
120
+ name: "name",
121
+ inputs: [],
122
+ outputs: [{
123
+ name: "",
124
+ type: "string",
125
+ internalType: "string"
126
+ }],
127
+ stateMutability: "view"
128
+ },
129
+ {
130
+ type: "function",
131
+ name: "symbol",
132
+ inputs: [],
133
+ outputs: [{
134
+ name: "",
135
+ type: "string",
136
+ internalType: "string"
137
+ }],
138
+ stateMutability: "view"
139
+ },
140
+ {
141
+ type: "function",
142
+ name: "totalSupply",
143
+ inputs: [],
144
+ outputs: [{
145
+ name: "",
146
+ type: "uint256",
147
+ internalType: "uint256"
148
+ }],
149
+ stateMutability: "view"
150
+ },
151
+ {
152
+ type: "function",
153
+ name: "transfer",
154
+ inputs: [{
155
+ name: "to",
156
+ type: "address",
157
+ internalType: "address"
158
+ }, {
159
+ name: "amount",
160
+ type: "uint256",
161
+ internalType: "uint256"
162
+ }],
163
+ outputs: [{
164
+ name: "",
165
+ type: "bool",
166
+ internalType: "bool"
167
+ }],
168
+ stateMutability: "nonpayable"
169
+ },
170
+ {
171
+ type: "function",
172
+ name: "transferFrom",
173
+ inputs: [
174
+ {
175
+ name: "from",
176
+ type: "address",
177
+ internalType: "address"
178
+ },
179
+ {
180
+ name: "to",
181
+ type: "address",
182
+ internalType: "address"
183
+ },
184
+ {
185
+ name: "amount",
186
+ type: "uint256",
187
+ internalType: "uint256"
188
+ }
189
+ ],
190
+ outputs: [{
191
+ name: "",
192
+ type: "bool",
193
+ internalType: "bool"
194
+ }],
195
+ stateMutability: "nonpayable"
196
+ }
197
+ ];
198
+
199
+ //#endregion
200
+ //#region src/abis/lens.ts
201
+ const lensAbi = [
202
+ {
203
+ type: "function",
204
+ name: "batchGetRefTick",
205
+ inputs: [{
206
+ name: "vault",
207
+ type: "address",
208
+ internalType: "contract TimelockSingleOwnerVault"
209
+ }, {
210
+ name: "tickLower",
211
+ type: "int24[]",
212
+ internalType: "int24[]"
213
+ }],
214
+ outputs: [{
215
+ name: "refTicks",
216
+ type: "int24[]",
217
+ internalType: "int24[]"
218
+ }],
219
+ stateMutability: "view"
220
+ },
221
+ {
222
+ type: "function",
223
+ name: "getAllBlocks",
224
+ inputs: [{
225
+ name: "vault",
226
+ type: "address",
227
+ internalType: "contract TimelockVaultCore"
228
+ }],
229
+ outputs: [{
230
+ name: "blocks",
231
+ type: "tuple[]",
232
+ internalType: "struct TimelockLens.LiquidityBlockData[]",
233
+ components: [
234
+ {
235
+ name: "tickLower",
236
+ type: "int24",
237
+ internalType: "int24"
238
+ },
239
+ {
240
+ name: "tickUpper",
241
+ type: "int24",
242
+ internalType: "int24"
243
+ },
244
+ {
245
+ name: "prevTickLower",
246
+ type: "int24",
247
+ internalType: "int24"
248
+ },
249
+ {
250
+ name: "totalLiquidity",
251
+ type: "uint128",
252
+ internalType: "uint128"
253
+ },
254
+ {
255
+ name: "borrowedLiquidity",
256
+ type: "uint128",
257
+ internalType: "uint128"
258
+ },
259
+ {
260
+ name: "totalAmount0",
261
+ type: "uint256",
262
+ internalType: "uint256"
263
+ },
264
+ {
265
+ name: "totalAmount1",
266
+ type: "uint256",
267
+ internalType: "uint256"
268
+ },
269
+ {
270
+ name: "borrowedAmount0",
271
+ type: "uint256",
272
+ internalType: "uint256"
273
+ },
274
+ {
275
+ name: "borrowedAmount1",
276
+ type: "uint256",
277
+ internalType: "uint256"
278
+ }
279
+ ]
280
+ }],
281
+ stateMutability: "view"
282
+ },
283
+ {
284
+ type: "function",
285
+ name: "getExpiredOptions",
286
+ inputs: [
287
+ {
288
+ name: "market",
289
+ type: "address",
290
+ internalType: "contract TimelockOptionsMarket"
291
+ },
292
+ {
293
+ name: "startId",
294
+ type: "uint256",
295
+ internalType: "uint256"
296
+ },
297
+ {
298
+ name: "limit",
299
+ type: "uint256",
300
+ internalType: "uint256"
301
+ }
302
+ ],
303
+ outputs: [
304
+ {
305
+ name: "expiredOptions",
306
+ type: "tuple[]",
307
+ internalType: "struct TimelockLens.OptionData[]",
308
+ components: [
309
+ {
310
+ name: "optionId",
311
+ type: "uint256",
312
+ internalType: "uint256"
313
+ },
314
+ {
315
+ name: "owner",
316
+ type: "address",
317
+ internalType: "address"
318
+ },
319
+ {
320
+ name: "optionType",
321
+ type: "uint8",
322
+ internalType: "uint8"
323
+ },
324
+ {
325
+ name: "leftTick",
326
+ type: "int24",
327
+ internalType: "int24"
328
+ },
329
+ {
330
+ name: "strikeTick",
331
+ type: "int24",
332
+ internalType: "int24"
333
+ },
334
+ {
335
+ name: "entryTick",
336
+ type: "int24",
337
+ internalType: "int24"
338
+ },
339
+ {
340
+ name: "strikePrice",
341
+ type: "uint256",
342
+ internalType: "uint256"
343
+ },
344
+ {
345
+ name: "entryPrice",
346
+ type: "uint256",
347
+ internalType: "uint256"
348
+ },
349
+ {
350
+ name: "optionAssetBorrowed",
351
+ type: "uint256",
352
+ internalType: "uint256"
353
+ },
354
+ {
355
+ name: "payoutAssetBorrowed",
356
+ type: "uint256",
357
+ internalType: "uint256"
358
+ },
359
+ {
360
+ name: "optionAssetToRepay",
361
+ type: "uint256",
362
+ internalType: "uint256"
363
+ },
364
+ {
365
+ name: "payoutAssetToRepay",
366
+ type: "uint256",
367
+ internalType: "uint256"
368
+ },
369
+ {
370
+ name: "positionSize",
371
+ type: "uint256",
372
+ internalType: "uint256"
373
+ },
374
+ {
375
+ name: "netOptionAssetToRepay",
376
+ type: "uint256",
377
+ internalType: "uint256"
378
+ },
379
+ {
380
+ name: "premiumPaid",
381
+ type: "uint128",
382
+ internalType: "uint128"
383
+ },
384
+ {
385
+ name: "expiresAt",
386
+ type: "uint64",
387
+ internalType: "uint64"
388
+ },
389
+ {
390
+ name: "createdAt",
391
+ type: "uint64",
392
+ internalType: "uint64"
393
+ },
394
+ {
395
+ name: "liquidities",
396
+ type: "uint128[]",
397
+ internalType: "uint128[]"
398
+ }
399
+ ]
400
+ },
401
+ {
402
+ name: "nextStartId",
403
+ type: "uint256",
404
+ internalType: "uint256"
405
+ },
406
+ {
407
+ name: "hasMore",
408
+ type: "bool",
409
+ internalType: "bool"
410
+ }
411
+ ],
412
+ stateMutability: "view"
413
+ },
414
+ {
415
+ type: "function",
416
+ name: "getLiquidityAtTick",
417
+ inputs: [{
418
+ name: "vault",
419
+ type: "address",
420
+ internalType: "contract TimelockSingleOwnerVault"
421
+ }, {
422
+ name: "tickLower",
423
+ type: "int24",
424
+ internalType: "int24"
425
+ }],
426
+ outputs: [{
427
+ name: "totalLiquidity",
428
+ type: "uint128",
429
+ internalType: "uint128"
430
+ }, {
431
+ name: "borrowedLiquidity",
432
+ type: "uint128",
433
+ internalType: "uint128"
434
+ }],
435
+ stateMutability: "view"
436
+ },
437
+ {
438
+ type: "function",
439
+ name: "getMarketData",
440
+ inputs: [{
441
+ name: "market",
442
+ type: "address",
443
+ internalType: "contract TimelockOptionsMarket"
444
+ }],
445
+ outputs: [{
446
+ name: "marketData",
447
+ type: "tuple",
448
+ internalType: "struct TimelockLens.TimelockMarketData",
449
+ components: [
450
+ {
451
+ name: "optionAssetIsToken0",
452
+ type: "bool",
453
+ internalType: "bool"
454
+ },
455
+ {
456
+ name: "vault",
457
+ type: "address",
458
+ internalType: "contract ITimelockVault"
459
+ },
460
+ {
461
+ name: "pool",
462
+ type: "address",
463
+ internalType: "contract IUniswapV3Pool"
464
+ },
465
+ {
466
+ name: "optionAsset",
467
+ type: "address",
468
+ internalType: "address"
469
+ },
470
+ {
471
+ name: "payoutAsset",
472
+ type: "address",
473
+ internalType: "address"
474
+ },
475
+ {
476
+ name: "optionAssetDecimals",
477
+ type: "uint8",
478
+ internalType: "uint8"
479
+ },
480
+ {
481
+ name: "payoutAssetDecimals",
482
+ type: "uint8",
483
+ internalType: "uint8"
484
+ },
485
+ {
486
+ name: "optionAssetSymbol",
487
+ type: "string",
488
+ internalType: "string"
489
+ },
490
+ {
491
+ name: "payoutAssetSymbol",
492
+ type: "string",
493
+ internalType: "string"
494
+ },
495
+ {
496
+ name: "optionAssetName",
497
+ type: "string",
498
+ internalType: "string"
499
+ },
500
+ {
501
+ name: "payoutAssetName",
502
+ type: "string",
503
+ internalType: "string"
504
+ },
505
+ {
506
+ name: "optionsCount",
507
+ type: "uint256",
508
+ internalType: "uint256"
509
+ }
510
+ ]
511
+ }],
512
+ stateMutability: "view"
513
+ },
514
+ {
515
+ type: "function",
516
+ name: "getMaxPositionSize",
517
+ inputs: [
518
+ {
519
+ name: "market",
520
+ type: "address",
521
+ internalType: "contract TimelockOptionsMarket"
522
+ },
523
+ {
524
+ name: "strikeTick",
525
+ type: "int24",
526
+ internalType: "int24"
527
+ },
528
+ {
529
+ name: "maxBorrowableRange",
530
+ type: "int24",
531
+ internalType: "int24"
532
+ }
533
+ ],
534
+ outputs: [{
535
+ name: "maxCallSize",
536
+ type: "uint256",
537
+ internalType: "uint256"
538
+ }, {
539
+ name: "maxPutSize",
540
+ type: "uint256",
541
+ internalType: "uint256"
542
+ }],
543
+ stateMutability: "view"
544
+ },
545
+ {
546
+ type: "function",
547
+ name: "getMaxPositionSizeAtCurrentTick",
548
+ inputs: [{
549
+ name: "market",
550
+ type: "address",
551
+ internalType: "contract TimelockOptionsMarket"
552
+ }, {
553
+ name: "maxBorrowableRange",
554
+ type: "int24",
555
+ internalType: "int24"
556
+ }],
557
+ outputs: [{
558
+ name: "maxCallSize",
559
+ type: "uint256",
560
+ internalType: "uint256"
561
+ }, {
562
+ name: "maxPutSize",
563
+ type: "uint256",
564
+ internalType: "uint256"
565
+ }],
566
+ stateMutability: "view"
567
+ },
568
+ {
569
+ type: "function",
570
+ name: "getOptionData",
571
+ inputs: [{
572
+ name: "market",
573
+ type: "address",
574
+ internalType: "contract TimelockOptionsMarket"
575
+ }, {
576
+ name: "optionId",
577
+ type: "uint256",
578
+ internalType: "uint256"
579
+ }],
580
+ outputs: [{
581
+ name: "",
582
+ type: "tuple",
583
+ internalType: "struct TimelockLens.OptionData",
584
+ components: [
585
+ {
586
+ name: "optionId",
587
+ type: "uint256",
588
+ internalType: "uint256"
589
+ },
590
+ {
591
+ name: "owner",
592
+ type: "address",
593
+ internalType: "address"
594
+ },
595
+ {
596
+ name: "optionType",
597
+ type: "uint8",
598
+ internalType: "uint8"
599
+ },
600
+ {
601
+ name: "leftTick",
602
+ type: "int24",
603
+ internalType: "int24"
604
+ },
605
+ {
606
+ name: "strikeTick",
607
+ type: "int24",
608
+ internalType: "int24"
609
+ },
610
+ {
611
+ name: "entryTick",
612
+ type: "int24",
613
+ internalType: "int24"
614
+ },
615
+ {
616
+ name: "strikePrice",
617
+ type: "uint256",
618
+ internalType: "uint256"
619
+ },
620
+ {
621
+ name: "entryPrice",
622
+ type: "uint256",
623
+ internalType: "uint256"
624
+ },
625
+ {
626
+ name: "optionAssetBorrowed",
627
+ type: "uint256",
628
+ internalType: "uint256"
629
+ },
630
+ {
631
+ name: "payoutAssetBorrowed",
632
+ type: "uint256",
633
+ internalType: "uint256"
634
+ },
635
+ {
636
+ name: "optionAssetToRepay",
637
+ type: "uint256",
638
+ internalType: "uint256"
639
+ },
640
+ {
641
+ name: "payoutAssetToRepay",
642
+ type: "uint256",
643
+ internalType: "uint256"
644
+ },
645
+ {
646
+ name: "positionSize",
647
+ type: "uint256",
648
+ internalType: "uint256"
649
+ },
650
+ {
651
+ name: "netOptionAssetToRepay",
652
+ type: "uint256",
653
+ internalType: "uint256"
654
+ },
655
+ {
656
+ name: "premiumPaid",
657
+ type: "uint128",
658
+ internalType: "uint128"
659
+ },
660
+ {
661
+ name: "expiresAt",
662
+ type: "uint64",
663
+ internalType: "uint64"
664
+ },
665
+ {
666
+ name: "createdAt",
667
+ type: "uint64",
668
+ internalType: "uint64"
669
+ },
670
+ {
671
+ name: "liquidities",
672
+ type: "uint128[]",
673
+ internalType: "uint128[]"
674
+ }
675
+ ]
676
+ }],
677
+ stateMutability: "view"
678
+ },
679
+ {
680
+ type: "function",
681
+ name: "getOptionsData",
682
+ inputs: [{
683
+ name: "market",
684
+ type: "address",
685
+ internalType: "contract TimelockOptionsMarket"
686
+ }, {
687
+ name: "optionIds",
688
+ type: "uint256[]",
689
+ internalType: "uint256[]"
690
+ }],
691
+ outputs: [{
692
+ name: "optionsData",
693
+ type: "tuple[]",
694
+ internalType: "struct TimelockLens.OptionData[]",
695
+ components: [
696
+ {
697
+ name: "optionId",
698
+ type: "uint256",
699
+ internalType: "uint256"
700
+ },
701
+ {
702
+ name: "owner",
703
+ type: "address",
704
+ internalType: "address"
705
+ },
706
+ {
707
+ name: "optionType",
708
+ type: "uint8",
709
+ internalType: "uint8"
710
+ },
711
+ {
712
+ name: "leftTick",
713
+ type: "int24",
714
+ internalType: "int24"
715
+ },
716
+ {
717
+ name: "strikeTick",
718
+ type: "int24",
719
+ internalType: "int24"
720
+ },
721
+ {
722
+ name: "entryTick",
723
+ type: "int24",
724
+ internalType: "int24"
725
+ },
726
+ {
727
+ name: "strikePrice",
728
+ type: "uint256",
729
+ internalType: "uint256"
730
+ },
731
+ {
732
+ name: "entryPrice",
733
+ type: "uint256",
734
+ internalType: "uint256"
735
+ },
736
+ {
737
+ name: "optionAssetBorrowed",
738
+ type: "uint256",
739
+ internalType: "uint256"
740
+ },
741
+ {
742
+ name: "payoutAssetBorrowed",
743
+ type: "uint256",
744
+ internalType: "uint256"
745
+ },
746
+ {
747
+ name: "optionAssetToRepay",
748
+ type: "uint256",
749
+ internalType: "uint256"
750
+ },
751
+ {
752
+ name: "payoutAssetToRepay",
753
+ type: "uint256",
754
+ internalType: "uint256"
755
+ },
756
+ {
757
+ name: "positionSize",
758
+ type: "uint256",
759
+ internalType: "uint256"
760
+ },
761
+ {
762
+ name: "netOptionAssetToRepay",
763
+ type: "uint256",
764
+ internalType: "uint256"
765
+ },
766
+ {
767
+ name: "premiumPaid",
768
+ type: "uint128",
769
+ internalType: "uint128"
770
+ },
771
+ {
772
+ name: "expiresAt",
773
+ type: "uint64",
774
+ internalType: "uint64"
775
+ },
776
+ {
777
+ name: "createdAt",
778
+ type: "uint64",
779
+ internalType: "uint64"
780
+ },
781
+ {
782
+ name: "liquidities",
783
+ type: "uint128[]",
784
+ internalType: "uint128[]"
785
+ }
786
+ ]
787
+ }],
788
+ stateMutability: "view"
789
+ },
790
+ {
791
+ type: "function",
792
+ name: "getPoolData",
793
+ inputs: [{
794
+ name: "pool",
795
+ type: "address",
796
+ internalType: "contract IUniswapV3Pool"
797
+ }],
798
+ outputs: [{
799
+ name: "poolData",
800
+ type: "tuple",
801
+ internalType: "struct TimelockLens.UniswapPoolData",
802
+ components: [
803
+ {
804
+ name: "token0",
805
+ type: "address",
806
+ internalType: "address"
807
+ },
808
+ {
809
+ name: "token1",
810
+ type: "address",
811
+ internalType: "address"
812
+ },
813
+ {
814
+ name: "token0Decimals",
815
+ type: "uint8",
816
+ internalType: "uint8"
817
+ },
818
+ {
819
+ name: "token1Decimals",
820
+ type: "uint8",
821
+ internalType: "uint8"
822
+ },
823
+ {
824
+ name: "token0Symbol",
825
+ type: "string",
826
+ internalType: "string"
827
+ },
828
+ {
829
+ name: "token1Symbol",
830
+ type: "string",
831
+ internalType: "string"
832
+ },
833
+ {
834
+ name: "token0Name",
835
+ type: "string",
836
+ internalType: "string"
837
+ },
838
+ {
839
+ name: "token1Name",
840
+ type: "string",
841
+ internalType: "string"
842
+ },
843
+ {
844
+ name: "tickSpacing",
845
+ type: "int24",
846
+ internalType: "int24"
847
+ },
848
+ {
849
+ name: "fee",
850
+ type: "uint24",
851
+ internalType: "uint24"
852
+ }
853
+ ]
854
+ }],
855
+ stateMutability: "view"
856
+ },
857
+ {
858
+ type: "function",
859
+ name: "getRefTick",
860
+ inputs: [{
861
+ name: "vault",
862
+ type: "address",
863
+ internalType: "contract TimelockSingleOwnerVault"
864
+ }, {
865
+ name: "tickLower",
866
+ type: "int24",
867
+ internalType: "int24"
868
+ }],
869
+ outputs: [{
870
+ name: "refTick",
871
+ type: "int24",
872
+ internalType: "int24"
873
+ }],
874
+ stateMutability: "view"
875
+ },
876
+ {
877
+ type: "function",
878
+ name: "getUserOptions",
879
+ inputs: [
880
+ {
881
+ name: "market",
882
+ type: "address",
883
+ internalType: "contract TimelockOptionsMarket"
884
+ },
885
+ {
886
+ name: "user",
887
+ type: "address",
888
+ internalType: "address"
889
+ },
890
+ {
891
+ name: "startId",
892
+ type: "uint256",
893
+ internalType: "uint256"
894
+ },
895
+ {
896
+ name: "limit",
897
+ type: "uint256",
898
+ internalType: "uint256"
899
+ }
900
+ ],
901
+ outputs: [
902
+ {
903
+ name: "userOptions",
904
+ type: "tuple[]",
905
+ internalType: "struct TimelockLens.OptionData[]",
906
+ components: [
907
+ {
908
+ name: "optionId",
909
+ type: "uint256",
910
+ internalType: "uint256"
911
+ },
912
+ {
913
+ name: "owner",
914
+ type: "address",
915
+ internalType: "address"
916
+ },
917
+ {
918
+ name: "optionType",
919
+ type: "uint8",
920
+ internalType: "uint8"
921
+ },
922
+ {
923
+ name: "leftTick",
924
+ type: "int24",
925
+ internalType: "int24"
926
+ },
927
+ {
928
+ name: "strikeTick",
929
+ type: "int24",
930
+ internalType: "int24"
931
+ },
932
+ {
933
+ name: "entryTick",
934
+ type: "int24",
935
+ internalType: "int24"
936
+ },
937
+ {
938
+ name: "strikePrice",
939
+ type: "uint256",
940
+ internalType: "uint256"
941
+ },
942
+ {
943
+ name: "entryPrice",
944
+ type: "uint256",
945
+ internalType: "uint256"
946
+ },
947
+ {
948
+ name: "optionAssetBorrowed",
949
+ type: "uint256",
950
+ internalType: "uint256"
951
+ },
952
+ {
953
+ name: "payoutAssetBorrowed",
954
+ type: "uint256",
955
+ internalType: "uint256"
956
+ },
957
+ {
958
+ name: "optionAssetToRepay",
959
+ type: "uint256",
960
+ internalType: "uint256"
961
+ },
962
+ {
963
+ name: "payoutAssetToRepay",
964
+ type: "uint256",
965
+ internalType: "uint256"
966
+ },
967
+ {
968
+ name: "positionSize",
969
+ type: "uint256",
970
+ internalType: "uint256"
971
+ },
972
+ {
973
+ name: "netOptionAssetToRepay",
974
+ type: "uint256",
975
+ internalType: "uint256"
976
+ },
977
+ {
978
+ name: "premiumPaid",
979
+ type: "uint128",
980
+ internalType: "uint128"
981
+ },
982
+ {
983
+ name: "expiresAt",
984
+ type: "uint64",
985
+ internalType: "uint64"
986
+ },
987
+ {
988
+ name: "createdAt",
989
+ type: "uint64",
990
+ internalType: "uint64"
991
+ },
992
+ {
993
+ name: "liquidities",
994
+ type: "uint128[]",
995
+ internalType: "uint128[]"
996
+ }
997
+ ]
998
+ },
999
+ {
1000
+ name: "nextStartId",
1001
+ type: "uint256",
1002
+ internalType: "uint256"
1003
+ },
1004
+ {
1005
+ name: "hasMore",
1006
+ type: "bool",
1007
+ internalType: "bool"
1008
+ }
1009
+ ],
1010
+ stateMutability: "view"
1011
+ },
1012
+ {
1013
+ type: "function",
1014
+ name: "getVaultTVL",
1015
+ inputs: [{
1016
+ name: "vault",
1017
+ type: "address",
1018
+ internalType: "contract TimelockVaultCore"
1019
+ }],
1020
+ outputs: [
1021
+ {
1022
+ name: "totalAmount0",
1023
+ type: "uint256",
1024
+ internalType: "uint256"
1025
+ },
1026
+ {
1027
+ name: "totalAmount1",
1028
+ type: "uint256",
1029
+ internalType: "uint256"
1030
+ },
1031
+ {
1032
+ name: "borrowedAmount0",
1033
+ type: "uint256",
1034
+ internalType: "uint256"
1035
+ },
1036
+ {
1037
+ name: "borrowedAmount1",
1038
+ type: "uint256",
1039
+ internalType: "uint256"
1040
+ },
1041
+ {
1042
+ name: "tvl0",
1043
+ type: "uint256",
1044
+ internalType: "uint256"
1045
+ },
1046
+ {
1047
+ name: "tvl1",
1048
+ type: "uint256",
1049
+ internalType: "uint256"
1050
+ },
1051
+ {
1052
+ name: "blocksCount",
1053
+ type: "uint256",
1054
+ internalType: "uint256"
1055
+ }
1056
+ ],
1057
+ stateMutability: "view"
1058
+ }
1059
+ ];
1060
+
1061
+ //#endregion
1062
+ //#region src/abis/uniswapMathLens.ts
1063
+ const uniswapMathLensAbi = [
1064
+ {
1065
+ type: "function",
1066
+ name: "batchGetAmount0ForLiquidity",
1067
+ inputs: [
1068
+ {
1069
+ name: "sqrtRatioAX96",
1070
+ type: "uint160[]",
1071
+ internalType: "uint160[]"
1072
+ },
1073
+ {
1074
+ name: "sqrtRatioBX96",
1075
+ type: "uint160[]",
1076
+ internalType: "uint160[]"
1077
+ },
1078
+ {
1079
+ name: "liquidity",
1080
+ type: "uint128[]",
1081
+ internalType: "uint128[]"
1082
+ }
1083
+ ],
1084
+ outputs: [{
1085
+ name: "amounts0",
1086
+ type: "uint256[]",
1087
+ internalType: "uint256[]"
1088
+ }],
1089
+ stateMutability: "pure"
1090
+ },
1091
+ {
1092
+ type: "function",
1093
+ name: "batchGetAmount0ForLiquidityTicks",
1094
+ inputs: [
1095
+ {
1096
+ name: "tickA",
1097
+ type: "int24[]",
1098
+ internalType: "int24[]"
1099
+ },
1100
+ {
1101
+ name: "tickB",
1102
+ type: "int24[]",
1103
+ internalType: "int24[]"
1104
+ },
1105
+ {
1106
+ name: "liquidity",
1107
+ type: "uint128[]",
1108
+ internalType: "uint128[]"
1109
+ }
1110
+ ],
1111
+ outputs: [{
1112
+ name: "amounts0",
1113
+ type: "uint256[]",
1114
+ internalType: "uint256[]"
1115
+ }],
1116
+ stateMutability: "pure"
1117
+ },
1118
+ {
1119
+ type: "function",
1120
+ name: "batchGetAmount1ForLiquidity",
1121
+ inputs: [
1122
+ {
1123
+ name: "sqrtRatioAX96",
1124
+ type: "uint160[]",
1125
+ internalType: "uint160[]"
1126
+ },
1127
+ {
1128
+ name: "sqrtRatioBX96",
1129
+ type: "uint160[]",
1130
+ internalType: "uint160[]"
1131
+ },
1132
+ {
1133
+ name: "liquidity",
1134
+ type: "uint128[]",
1135
+ internalType: "uint128[]"
1136
+ }
1137
+ ],
1138
+ outputs: [{
1139
+ name: "amounts1",
1140
+ type: "uint256[]",
1141
+ internalType: "uint256[]"
1142
+ }],
1143
+ stateMutability: "pure"
1144
+ },
1145
+ {
1146
+ type: "function",
1147
+ name: "batchGetAmount1ForLiquidityTicks",
1148
+ inputs: [
1149
+ {
1150
+ name: "tickA",
1151
+ type: "int24[]",
1152
+ internalType: "int24[]"
1153
+ },
1154
+ {
1155
+ name: "tickB",
1156
+ type: "int24[]",
1157
+ internalType: "int24[]"
1158
+ },
1159
+ {
1160
+ name: "liquidity",
1161
+ type: "uint128[]",
1162
+ internalType: "uint128[]"
1163
+ }
1164
+ ],
1165
+ outputs: [{
1166
+ name: "amounts1",
1167
+ type: "uint256[]",
1168
+ internalType: "uint256[]"
1169
+ }],
1170
+ stateMutability: "pure"
1171
+ },
1172
+ {
1173
+ type: "function",
1174
+ name: "batchGetAmountsForLiquidity",
1175
+ inputs: [
1176
+ {
1177
+ name: "sqrtRatioX96",
1178
+ type: "uint160[]",
1179
+ internalType: "uint160[]"
1180
+ },
1181
+ {
1182
+ name: "sqrtRatioAX96",
1183
+ type: "uint160[]",
1184
+ internalType: "uint160[]"
1185
+ },
1186
+ {
1187
+ name: "sqrtRatioBX96",
1188
+ type: "uint160[]",
1189
+ internalType: "uint160[]"
1190
+ },
1191
+ {
1192
+ name: "liquidity",
1193
+ type: "uint128[]",
1194
+ internalType: "uint128[]"
1195
+ }
1196
+ ],
1197
+ outputs: [{
1198
+ name: "amounts0",
1199
+ type: "uint256[]",
1200
+ internalType: "uint256[]"
1201
+ }, {
1202
+ name: "amounts1",
1203
+ type: "uint256[]",
1204
+ internalType: "uint256[]"
1205
+ }],
1206
+ stateMutability: "pure"
1207
+ },
1208
+ {
1209
+ type: "function",
1210
+ name: "batchGetAmountsForLiquidityTicks",
1211
+ inputs: [
1212
+ {
1213
+ name: "tick",
1214
+ type: "int24[]",
1215
+ internalType: "int24[]"
1216
+ },
1217
+ {
1218
+ name: "tickA",
1219
+ type: "int24[]",
1220
+ internalType: "int24[]"
1221
+ },
1222
+ {
1223
+ name: "tickB",
1224
+ type: "int24[]",
1225
+ internalType: "int24[]"
1226
+ },
1227
+ {
1228
+ name: "liquidity",
1229
+ type: "uint128[]",
1230
+ internalType: "uint128[]"
1231
+ }
1232
+ ],
1233
+ outputs: [{
1234
+ name: "amounts0",
1235
+ type: "uint256[]",
1236
+ internalType: "uint256[]"
1237
+ }, {
1238
+ name: "amounts1",
1239
+ type: "uint256[]",
1240
+ internalType: "uint256[]"
1241
+ }],
1242
+ stateMutability: "pure"
1243
+ },
1244
+ {
1245
+ type: "function",
1246
+ name: "batchGetLiquidityForAmount0",
1247
+ inputs: [
1248
+ {
1249
+ name: "sqrtRatioAX96",
1250
+ type: "uint160[]",
1251
+ internalType: "uint160[]"
1252
+ },
1253
+ {
1254
+ name: "sqrtRatioBX96",
1255
+ type: "uint160[]",
1256
+ internalType: "uint160[]"
1257
+ },
1258
+ {
1259
+ name: "amount0",
1260
+ type: "uint256[]",
1261
+ internalType: "uint256[]"
1262
+ }
1263
+ ],
1264
+ outputs: [{
1265
+ name: "liquidities",
1266
+ type: "uint128[]",
1267
+ internalType: "uint128[]"
1268
+ }],
1269
+ stateMutability: "pure"
1270
+ },
1271
+ {
1272
+ type: "function",
1273
+ name: "batchGetLiquidityForAmount0Ticks",
1274
+ inputs: [
1275
+ {
1276
+ name: "tickA",
1277
+ type: "int24[]",
1278
+ internalType: "int24[]"
1279
+ },
1280
+ {
1281
+ name: "tickB",
1282
+ type: "int24[]",
1283
+ internalType: "int24[]"
1284
+ },
1285
+ {
1286
+ name: "amount0",
1287
+ type: "uint256[]",
1288
+ internalType: "uint256[]"
1289
+ }
1290
+ ],
1291
+ outputs: [{
1292
+ name: "liquidities",
1293
+ type: "uint128[]",
1294
+ internalType: "uint128[]"
1295
+ }],
1296
+ stateMutability: "pure"
1297
+ },
1298
+ {
1299
+ type: "function",
1300
+ name: "batchGetLiquidityForAmount1",
1301
+ inputs: [
1302
+ {
1303
+ name: "sqrtRatioAX96",
1304
+ type: "uint160[]",
1305
+ internalType: "uint160[]"
1306
+ },
1307
+ {
1308
+ name: "sqrtRatioBX96",
1309
+ type: "uint160[]",
1310
+ internalType: "uint160[]"
1311
+ },
1312
+ {
1313
+ name: "amount1",
1314
+ type: "uint256[]",
1315
+ internalType: "uint256[]"
1316
+ }
1317
+ ],
1318
+ outputs: [{
1319
+ name: "liquidities",
1320
+ type: "uint128[]",
1321
+ internalType: "uint128[]"
1322
+ }],
1323
+ stateMutability: "pure"
1324
+ },
1325
+ {
1326
+ type: "function",
1327
+ name: "batchGetLiquidityForAmount1Ticks",
1328
+ inputs: [
1329
+ {
1330
+ name: "tickA",
1331
+ type: "int24[]",
1332
+ internalType: "int24[]"
1333
+ },
1334
+ {
1335
+ name: "tickB",
1336
+ type: "int24[]",
1337
+ internalType: "int24[]"
1338
+ },
1339
+ {
1340
+ name: "amount1",
1341
+ type: "uint256[]",
1342
+ internalType: "uint256[]"
1343
+ }
1344
+ ],
1345
+ outputs: [{
1346
+ name: "liquidities",
1347
+ type: "uint128[]",
1348
+ internalType: "uint128[]"
1349
+ }],
1350
+ stateMutability: "pure"
1351
+ },
1352
+ {
1353
+ type: "function",
1354
+ name: "batchGetLiquidityForAmounts",
1355
+ inputs: [
1356
+ {
1357
+ name: "sqrtRatioX96",
1358
+ type: "uint160[]",
1359
+ internalType: "uint160[]"
1360
+ },
1361
+ {
1362
+ name: "sqrtRatioAX96",
1363
+ type: "uint160[]",
1364
+ internalType: "uint160[]"
1365
+ },
1366
+ {
1367
+ name: "sqrtRatioBX96",
1368
+ type: "uint160[]",
1369
+ internalType: "uint160[]"
1370
+ },
1371
+ {
1372
+ name: "amount0",
1373
+ type: "uint256[]",
1374
+ internalType: "uint256[]"
1375
+ },
1376
+ {
1377
+ name: "amount1",
1378
+ type: "uint256[]",
1379
+ internalType: "uint256[]"
1380
+ }
1381
+ ],
1382
+ outputs: [{
1383
+ name: "liquidities",
1384
+ type: "uint128[]",
1385
+ internalType: "uint128[]"
1386
+ }],
1387
+ stateMutability: "pure"
1388
+ },
1389
+ {
1390
+ type: "function",
1391
+ name: "batchGetLiquidityForAmountsTicks",
1392
+ inputs: [
1393
+ {
1394
+ name: "tick",
1395
+ type: "int24[]",
1396
+ internalType: "int24[]"
1397
+ },
1398
+ {
1399
+ name: "tickA",
1400
+ type: "int24[]",
1401
+ internalType: "int24[]"
1402
+ },
1403
+ {
1404
+ name: "tickB",
1405
+ type: "int24[]",
1406
+ internalType: "int24[]"
1407
+ },
1408
+ {
1409
+ name: "amount0",
1410
+ type: "uint256[]",
1411
+ internalType: "uint256[]"
1412
+ },
1413
+ {
1414
+ name: "amount1",
1415
+ type: "uint256[]",
1416
+ internalType: "uint256[]"
1417
+ }
1418
+ ],
1419
+ outputs: [{
1420
+ name: "liquidities",
1421
+ type: "uint128[]",
1422
+ internalType: "uint128[]"
1423
+ }],
1424
+ stateMutability: "pure"
1425
+ },
1426
+ {
1427
+ type: "function",
1428
+ name: "batchGetPriceAtTick",
1429
+ inputs: [{
1430
+ name: "ticks",
1431
+ type: "int24[]",
1432
+ internalType: "int24[]"
1433
+ }],
1434
+ outputs: [{
1435
+ name: "prices",
1436
+ type: "uint256[]",
1437
+ internalType: "uint256[]"
1438
+ }],
1439
+ stateMutability: "pure"
1440
+ },
1441
+ {
1442
+ type: "function",
1443
+ name: "getAmount0ForLiquidity",
1444
+ inputs: [
1445
+ {
1446
+ name: "sqrtRatioAX96",
1447
+ type: "uint160",
1448
+ internalType: "uint160"
1449
+ },
1450
+ {
1451
+ name: "sqrtRatioBX96",
1452
+ type: "uint160",
1453
+ internalType: "uint160"
1454
+ },
1455
+ {
1456
+ name: "liquidity",
1457
+ type: "uint128",
1458
+ internalType: "uint128"
1459
+ }
1460
+ ],
1461
+ outputs: [{
1462
+ name: "amount0",
1463
+ type: "uint256",
1464
+ internalType: "uint256"
1465
+ }],
1466
+ stateMutability: "pure"
1467
+ },
1468
+ {
1469
+ type: "function",
1470
+ name: "getAmount0ForLiquidityTicks",
1471
+ inputs: [
1472
+ {
1473
+ name: "tickA",
1474
+ type: "int24",
1475
+ internalType: "int24"
1476
+ },
1477
+ {
1478
+ name: "tickB",
1479
+ type: "int24",
1480
+ internalType: "int24"
1481
+ },
1482
+ {
1483
+ name: "liquidity",
1484
+ type: "uint128",
1485
+ internalType: "uint128"
1486
+ }
1487
+ ],
1488
+ outputs: [{
1489
+ name: "amount0",
1490
+ type: "uint256",
1491
+ internalType: "uint256"
1492
+ }],
1493
+ stateMutability: "pure"
1494
+ },
1495
+ {
1496
+ type: "function",
1497
+ name: "getAmount1ForLiquidity",
1498
+ inputs: [
1499
+ {
1500
+ name: "sqrtRatioAX96",
1501
+ type: "uint160",
1502
+ internalType: "uint160"
1503
+ },
1504
+ {
1505
+ name: "sqrtRatioBX96",
1506
+ type: "uint160",
1507
+ internalType: "uint160"
1508
+ },
1509
+ {
1510
+ name: "liquidity",
1511
+ type: "uint128",
1512
+ internalType: "uint128"
1513
+ }
1514
+ ],
1515
+ outputs: [{
1516
+ name: "amount1",
1517
+ type: "uint256",
1518
+ internalType: "uint256"
1519
+ }],
1520
+ stateMutability: "pure"
1521
+ },
1522
+ {
1523
+ type: "function",
1524
+ name: "getAmount1ForLiquidityTicks",
1525
+ inputs: [
1526
+ {
1527
+ name: "tickA",
1528
+ type: "int24",
1529
+ internalType: "int24"
1530
+ },
1531
+ {
1532
+ name: "tickB",
1533
+ type: "int24",
1534
+ internalType: "int24"
1535
+ },
1536
+ {
1537
+ name: "liquidity",
1538
+ type: "uint128",
1539
+ internalType: "uint128"
1540
+ }
1541
+ ],
1542
+ outputs: [{
1543
+ name: "amount1",
1544
+ type: "uint256",
1545
+ internalType: "uint256"
1546
+ }],
1547
+ stateMutability: "pure"
1548
+ },
1549
+ {
1550
+ type: "function",
1551
+ name: "getAmountsForLiquidity",
1552
+ inputs: [
1553
+ {
1554
+ name: "sqrtRatioX96",
1555
+ type: "uint160",
1556
+ internalType: "uint160"
1557
+ },
1558
+ {
1559
+ name: "sqrtRatioAX96",
1560
+ type: "uint160",
1561
+ internalType: "uint160"
1562
+ },
1563
+ {
1564
+ name: "sqrtRatioBX96",
1565
+ type: "uint160",
1566
+ internalType: "uint160"
1567
+ },
1568
+ {
1569
+ name: "liquidity",
1570
+ type: "uint128",
1571
+ internalType: "uint128"
1572
+ }
1573
+ ],
1574
+ outputs: [{
1575
+ name: "amount0",
1576
+ type: "uint256",
1577
+ internalType: "uint256"
1578
+ }, {
1579
+ name: "amount1",
1580
+ type: "uint256",
1581
+ internalType: "uint256"
1582
+ }],
1583
+ stateMutability: "pure"
1584
+ },
1585
+ {
1586
+ type: "function",
1587
+ name: "getAmountsForLiquidityTicks",
1588
+ inputs: [
1589
+ {
1590
+ name: "tick",
1591
+ type: "int24",
1592
+ internalType: "int24"
1593
+ },
1594
+ {
1595
+ name: "tickA",
1596
+ type: "int24",
1597
+ internalType: "int24"
1598
+ },
1599
+ {
1600
+ name: "tickB",
1601
+ type: "int24",
1602
+ internalType: "int24"
1603
+ },
1604
+ {
1605
+ name: "liquidity",
1606
+ type: "uint128",
1607
+ internalType: "uint128"
1608
+ }
1609
+ ],
1610
+ outputs: [{
1611
+ name: "amount0",
1612
+ type: "uint256",
1613
+ internalType: "uint256"
1614
+ }, {
1615
+ name: "amount1",
1616
+ type: "uint256",
1617
+ internalType: "uint256"
1618
+ }],
1619
+ stateMutability: "pure"
1620
+ },
1621
+ {
1622
+ type: "function",
1623
+ name: "getLiquidityForAmount0",
1624
+ inputs: [
1625
+ {
1626
+ name: "sqrtRatioAX96",
1627
+ type: "uint160",
1628
+ internalType: "uint160"
1629
+ },
1630
+ {
1631
+ name: "sqrtRatioBX96",
1632
+ type: "uint160",
1633
+ internalType: "uint160"
1634
+ },
1635
+ {
1636
+ name: "amount0",
1637
+ type: "uint256",
1638
+ internalType: "uint256"
1639
+ }
1640
+ ],
1641
+ outputs: [{
1642
+ name: "liquidity",
1643
+ type: "uint128",
1644
+ internalType: "uint128"
1645
+ }],
1646
+ stateMutability: "pure"
1647
+ },
1648
+ {
1649
+ type: "function",
1650
+ name: "getLiquidityForAmount0Ticks",
1651
+ inputs: [
1652
+ {
1653
+ name: "tickA",
1654
+ type: "int24",
1655
+ internalType: "int24"
1656
+ },
1657
+ {
1658
+ name: "tickB",
1659
+ type: "int24",
1660
+ internalType: "int24"
1661
+ },
1662
+ {
1663
+ name: "amount0",
1664
+ type: "uint256",
1665
+ internalType: "uint256"
1666
+ }
1667
+ ],
1668
+ outputs: [{
1669
+ name: "liquidity",
1670
+ type: "uint128",
1671
+ internalType: "uint128"
1672
+ }],
1673
+ stateMutability: "pure"
1674
+ },
1675
+ {
1676
+ type: "function",
1677
+ name: "getLiquidityForAmount1",
1678
+ inputs: [
1679
+ {
1680
+ name: "sqrtRatioAX96",
1681
+ type: "uint160",
1682
+ internalType: "uint160"
1683
+ },
1684
+ {
1685
+ name: "sqrtRatioBX96",
1686
+ type: "uint160",
1687
+ internalType: "uint160"
1688
+ },
1689
+ {
1690
+ name: "amount1",
1691
+ type: "uint256",
1692
+ internalType: "uint256"
1693
+ }
1694
+ ],
1695
+ outputs: [{
1696
+ name: "liquidity",
1697
+ type: "uint128",
1698
+ internalType: "uint128"
1699
+ }],
1700
+ stateMutability: "pure"
1701
+ },
1702
+ {
1703
+ type: "function",
1704
+ name: "getLiquidityForAmount1Ticks",
1705
+ inputs: [
1706
+ {
1707
+ name: "tickA",
1708
+ type: "int24",
1709
+ internalType: "int24"
1710
+ },
1711
+ {
1712
+ name: "tickB",
1713
+ type: "int24",
1714
+ internalType: "int24"
1715
+ },
1716
+ {
1717
+ name: "amount1",
1718
+ type: "uint256",
1719
+ internalType: "uint256"
1720
+ }
1721
+ ],
1722
+ outputs: [{
1723
+ name: "liquidity",
1724
+ type: "uint128",
1725
+ internalType: "uint128"
1726
+ }],
1727
+ stateMutability: "pure"
1728
+ },
1729
+ {
1730
+ type: "function",
1731
+ name: "getLiquidityForAmounts",
1732
+ inputs: [
1733
+ {
1734
+ name: "sqrtRatioX96",
1735
+ type: "uint160",
1736
+ internalType: "uint160"
1737
+ },
1738
+ {
1739
+ name: "sqrtRatioAX96",
1740
+ type: "uint160",
1741
+ internalType: "uint160"
1742
+ },
1743
+ {
1744
+ name: "sqrtRatioBX96",
1745
+ type: "uint160",
1746
+ internalType: "uint160"
1747
+ },
1748
+ {
1749
+ name: "amount0",
1750
+ type: "uint256",
1751
+ internalType: "uint256"
1752
+ },
1753
+ {
1754
+ name: "amount1",
1755
+ type: "uint256",
1756
+ internalType: "uint256"
1757
+ }
1758
+ ],
1759
+ outputs: [{
1760
+ name: "liquidity",
1761
+ type: "uint128",
1762
+ internalType: "uint128"
1763
+ }],
1764
+ stateMutability: "pure"
1765
+ },
1766
+ {
1767
+ type: "function",
1768
+ name: "getLiquidityForAmountsTicks",
1769
+ inputs: [
1770
+ {
1771
+ name: "tick",
1772
+ type: "int24",
1773
+ internalType: "int24"
1774
+ },
1775
+ {
1776
+ name: "tickA",
1777
+ type: "int24",
1778
+ internalType: "int24"
1779
+ },
1780
+ {
1781
+ name: "tickB",
1782
+ type: "int24",
1783
+ internalType: "int24"
1784
+ },
1785
+ {
1786
+ name: "amount0",
1787
+ type: "uint256",
1788
+ internalType: "uint256"
1789
+ },
1790
+ {
1791
+ name: "amount1",
1792
+ type: "uint256",
1793
+ internalType: "uint256"
1794
+ }
1795
+ ],
1796
+ outputs: [{
1797
+ name: "liquidity",
1798
+ type: "uint128",
1799
+ internalType: "uint128"
1800
+ }],
1801
+ stateMutability: "pure"
1802
+ },
1803
+ {
1804
+ type: "function",
1805
+ name: "getPriceAtTick",
1806
+ inputs: [{
1807
+ name: "tick",
1808
+ type: "int24",
1809
+ internalType: "int24"
1810
+ }],
1811
+ outputs: [{
1812
+ name: "",
1813
+ type: "uint256",
1814
+ internalType: "uint256"
1815
+ }],
1816
+ stateMutability: "pure"
1817
+ }
1818
+ ];
1819
+
1820
+ //#endregion
1821
+ //#region src/abis/optionsMarket.ts
1822
+ const optionsMarketAbi = [
1823
+ {
1824
+ type: "constructor",
1825
+ inputs: [
1826
+ {
1827
+ name: "_vault",
1828
+ type: "address",
1829
+ internalType: "contract ITimelockVault"
1830
+ },
1831
+ {
1832
+ name: "_optionPricing",
1833
+ type: "address",
1834
+ internalType: "contract IOptionPricing"
1835
+ },
1836
+ {
1837
+ name: "_optionAssetIsToken0",
1838
+ type: "bool",
1839
+ internalType: "bool"
1840
+ },
1841
+ {
1842
+ name: "_swapRouter",
1843
+ type: "address",
1844
+ internalType: "contract ISwapRouter"
1845
+ },
1846
+ {
1847
+ name: "_quoter",
1848
+ type: "address",
1849
+ internalType: "contract IQuoter"
1850
+ },
1851
+ {
1852
+ name: "_owner",
1853
+ type: "address",
1854
+ internalType: "address"
1855
+ }
1856
+ ],
1857
+ stateMutability: "nonpayable"
1858
+ },
1859
+ {
1860
+ type: "function",
1861
+ name: "BASIS_POINTS",
1862
+ inputs: [],
1863
+ outputs: [{
1864
+ name: "",
1865
+ type: "uint256",
1866
+ internalType: "uint256"
1867
+ }],
1868
+ stateMutability: "view"
1869
+ },
1870
+ {
1871
+ type: "function",
1872
+ name: "DUST_THRESHOLD",
1873
+ inputs: [],
1874
+ outputs: [{
1875
+ name: "",
1876
+ type: "uint256",
1877
+ internalType: "uint256"
1878
+ }],
1879
+ stateMutability: "view"
1880
+ },
1881
+ {
1882
+ type: "function",
1883
+ name: "MAX_STEPS",
1884
+ inputs: [],
1885
+ outputs: [{
1886
+ name: "",
1887
+ type: "uint256",
1888
+ internalType: "uint256"
1889
+ }],
1890
+ stateMutability: "view"
1891
+ },
1892
+ {
1893
+ type: "function",
1894
+ name: "OPTION_FEE_PERCENT",
1895
+ inputs: [],
1896
+ outputs: [{
1897
+ name: "",
1898
+ type: "uint256",
1899
+ internalType: "uint256"
1900
+ }],
1901
+ stateMutability: "view"
1902
+ },
1903
+ {
1904
+ type: "function",
1905
+ name: "calculatePremium",
1906
+ inputs: [
1907
+ {
1908
+ name: "optionType",
1909
+ type: "uint8",
1910
+ internalType: "uint8"
1911
+ },
1912
+ {
1913
+ name: "optionAmount",
1914
+ type: "uint256",
1915
+ internalType: "uint256"
1916
+ },
1917
+ {
1918
+ name: "strikeTick",
1919
+ type: "int24",
1920
+ internalType: "int24"
1921
+ },
1922
+ {
1923
+ name: "duration",
1924
+ type: "uint64",
1925
+ internalType: "uint64"
1926
+ }
1927
+ ],
1928
+ outputs: [{
1929
+ name: "",
1930
+ type: "uint256",
1931
+ internalType: "uint256"
1932
+ }],
1933
+ stateMutability: "view"
1934
+ },
1935
+ {
1936
+ type: "function",
1937
+ name: "exerciseOption",
1938
+ inputs: [
1939
+ {
1940
+ name: "optionId",
1941
+ type: "uint256",
1942
+ internalType: "uint256"
1943
+ },
1944
+ {
1945
+ name: "liquidities",
1946
+ type: "uint128[]",
1947
+ internalType: "uint128[]"
1948
+ },
1949
+ {
1950
+ name: "minPayout",
1951
+ type: "uint256",
1952
+ internalType: "uint256"
1953
+ },
1954
+ {
1955
+ name: "refTick",
1956
+ type: "int24",
1957
+ internalType: "int24"
1958
+ }
1959
+ ],
1960
+ outputs: [{
1961
+ name: "payout",
1962
+ type: "uint256",
1963
+ internalType: "uint256"
1964
+ }],
1965
+ stateMutability: "nonpayable"
1966
+ },
1967
+ {
1968
+ type: "function",
1969
+ name: "getOption",
1970
+ inputs: [{
1971
+ name: "optionId",
1972
+ type: "uint256",
1973
+ internalType: "uint256"
1974
+ }],
1975
+ outputs: [{
1976
+ name: "",
1977
+ type: "tuple",
1978
+ internalType: "struct TimelockOptionsMarket.OptionData",
1979
+ components: [
1980
+ {
1981
+ name: "owner",
1982
+ type: "address",
1983
+ internalType: "address"
1984
+ },
1985
+ {
1986
+ name: "optionType",
1987
+ type: "uint8",
1988
+ internalType: "uint8"
1989
+ },
1990
+ {
1991
+ name: "strikeTick",
1992
+ type: "int24",
1993
+ internalType: "int24"
1994
+ },
1995
+ {
1996
+ name: "entryTick",
1997
+ type: "int24",
1998
+ internalType: "int24"
1999
+ },
2000
+ {
2001
+ name: "expiresAt",
2002
+ type: "uint64",
2003
+ internalType: "uint64"
2004
+ },
2005
+ {
2006
+ name: "createdAt",
2007
+ type: "uint64",
2008
+ internalType: "uint64"
2009
+ },
2010
+ {
2011
+ name: "premiumPaid",
2012
+ type: "uint128",
2013
+ internalType: "uint128"
2014
+ },
2015
+ {
2016
+ name: "liquidities",
2017
+ type: "uint128[]",
2018
+ internalType: "uint128[]"
2019
+ }
2020
+ ]
2021
+ }],
2022
+ stateMutability: "view"
2023
+ },
2024
+ {
2025
+ type: "function",
2026
+ name: "liquiditiesToAmounts",
2027
+ inputs: [
2028
+ {
2029
+ name: "leftTick",
2030
+ type: "int24",
2031
+ internalType: "int24"
2032
+ },
2033
+ {
2034
+ name: "liquidities",
2035
+ type: "uint128[]",
2036
+ internalType: "uint128[]"
2037
+ },
2038
+ {
2039
+ name: "optionType",
2040
+ type: "uint8",
2041
+ internalType: "uint8"
2042
+ }
2043
+ ],
2044
+ outputs: [
2045
+ {
2046
+ name: "optionAssetToRepay",
2047
+ type: "uint256",
2048
+ internalType: "uint256"
2049
+ },
2050
+ {
2051
+ name: "payoutAssetToRepay",
2052
+ type: "uint256",
2053
+ internalType: "uint256"
2054
+ },
2055
+ {
2056
+ name: "optionAssetBorrowed",
2057
+ type: "uint256",
2058
+ internalType: "uint256"
2059
+ },
2060
+ {
2061
+ name: "payoutAssetBorrowed",
2062
+ type: "uint256",
2063
+ internalType: "uint256"
2064
+ }
2065
+ ],
2066
+ stateMutability: "view"
2067
+ },
2068
+ {
2069
+ type: "function",
2070
+ name: "maxDuration",
2071
+ inputs: [],
2072
+ outputs: [{
2073
+ name: "",
2074
+ type: "uint64",
2075
+ internalType: "uint64"
2076
+ }],
2077
+ stateMutability: "view"
2078
+ },
2079
+ {
2080
+ type: "function",
2081
+ name: "maxOptionAmount",
2082
+ inputs: [],
2083
+ outputs: [{
2084
+ name: "",
2085
+ type: "uint256",
2086
+ internalType: "uint256"
2087
+ }],
2088
+ stateMutability: "view"
2089
+ },
2090
+ {
2091
+ type: "function",
2092
+ name: "minDuration",
2093
+ inputs: [],
2094
+ outputs: [{
2095
+ name: "",
2096
+ type: "uint64",
2097
+ internalType: "uint64"
2098
+ }],
2099
+ stateMutability: "view"
2100
+ },
2101
+ {
2102
+ type: "function",
2103
+ name: "minOptionAmount",
2104
+ inputs: [],
2105
+ outputs: [{
2106
+ name: "",
2107
+ type: "uint256",
2108
+ internalType: "uint256"
2109
+ }],
2110
+ stateMutability: "view"
2111
+ },
2112
+ {
2113
+ type: "function",
2114
+ name: "mintOption",
2115
+ inputs: [
2116
+ {
2117
+ name: "optionType",
2118
+ type: "uint8",
2119
+ internalType: "uint8"
2120
+ },
2121
+ {
2122
+ name: "amount",
2123
+ type: "uint256",
2124
+ internalType: "uint256"
2125
+ },
2126
+ {
2127
+ name: "strikeTick",
2128
+ type: "int24",
2129
+ internalType: "int24"
2130
+ },
2131
+ {
2132
+ name: "duration",
2133
+ type: "uint64",
2134
+ internalType: "uint64"
2135
+ },
2136
+ {
2137
+ name: "maxPremium",
2138
+ type: "uint256",
2139
+ internalType: "uint256"
2140
+ },
2141
+ {
2142
+ name: "refTick",
2143
+ type: "int24",
2144
+ internalType: "int24"
2145
+ }
2146
+ ],
2147
+ outputs: [
2148
+ {
2149
+ name: "optionId",
2150
+ type: "uint256",
2151
+ internalType: "uint256"
2152
+ },
2153
+ {
2154
+ name: "finalAmount",
2155
+ type: "uint256",
2156
+ internalType: "uint256"
2157
+ },
2158
+ {
2159
+ name: "totalPremium",
2160
+ type: "uint256",
2161
+ internalType: "uint256"
2162
+ }
2163
+ ],
2164
+ stateMutability: "nonpayable"
2165
+ },
2166
+ {
2167
+ type: "function",
2168
+ name: "nextOptionId",
2169
+ inputs: [],
2170
+ outputs: [{
2171
+ name: "",
2172
+ type: "uint256",
2173
+ internalType: "uint256"
2174
+ }],
2175
+ stateMutability: "view"
2176
+ },
2177
+ {
2178
+ type: "function",
2179
+ name: "optionAsset",
2180
+ inputs: [],
2181
+ outputs: [{
2182
+ name: "",
2183
+ type: "address",
2184
+ internalType: "contract IERC20"
2185
+ }],
2186
+ stateMutability: "view"
2187
+ },
2188
+ {
2189
+ type: "function",
2190
+ name: "optionAssetIsToken0",
2191
+ inputs: [],
2192
+ outputs: [{
2193
+ name: "",
2194
+ type: "bool",
2195
+ internalType: "bool"
2196
+ }],
2197
+ stateMutability: "view"
2198
+ },
2199
+ {
2200
+ type: "function",
2201
+ name: "optionPricing",
2202
+ inputs: [],
2203
+ outputs: [{
2204
+ name: "",
2205
+ type: "address",
2206
+ internalType: "contract IOptionPricing"
2207
+ }],
2208
+ stateMutability: "view"
2209
+ },
2210
+ {
2211
+ type: "function",
2212
+ name: "owner",
2213
+ inputs: [],
2214
+ outputs: [{
2215
+ name: "",
2216
+ type: "address",
2217
+ internalType: "address"
2218
+ }],
2219
+ stateMutability: "view"
2220
+ },
2221
+ {
2222
+ type: "function",
2223
+ name: "payoutAsset",
2224
+ inputs: [],
2225
+ outputs: [{
2226
+ name: "",
2227
+ type: "address",
2228
+ internalType: "contract IERC20"
2229
+ }],
2230
+ stateMutability: "view"
2231
+ },
2232
+ {
2233
+ type: "function",
2234
+ name: "pool",
2235
+ inputs: [],
2236
+ outputs: [{
2237
+ name: "",
2238
+ type: "address",
2239
+ internalType: "contract IUniswapV3Pool"
2240
+ }],
2241
+ stateMutability: "view"
2242
+ },
2243
+ {
2244
+ type: "function",
2245
+ name: "protocolFees",
2246
+ inputs: [],
2247
+ outputs: [{
2248
+ name: "",
2249
+ type: "uint256",
2250
+ internalType: "uint256"
2251
+ }],
2252
+ stateMutability: "view"
2253
+ },
2254
+ {
2255
+ type: "function",
2256
+ name: "quoter",
2257
+ inputs: [],
2258
+ outputs: [{
2259
+ name: "",
2260
+ type: "address",
2261
+ internalType: "contract IQuoter"
2262
+ }],
2263
+ stateMutability: "view"
2264
+ },
2265
+ {
2266
+ type: "function",
2267
+ name: "renounceOwnership",
2268
+ inputs: [],
2269
+ outputs: [],
2270
+ stateMutability: "nonpayable"
2271
+ },
2272
+ {
2273
+ type: "function",
2274
+ name: "swapRouter",
2275
+ inputs: [],
2276
+ outputs: [{
2277
+ name: "",
2278
+ type: "address",
2279
+ internalType: "contract ISwapRouter"
2280
+ }],
2281
+ stateMutability: "view"
2282
+ },
2283
+ {
2284
+ type: "function",
2285
+ name: "tickSpacing",
2286
+ inputs: [],
2287
+ outputs: [{
2288
+ name: "",
2289
+ type: "int24",
2290
+ internalType: "int24"
2291
+ }],
2292
+ stateMutability: "view"
2293
+ },
2294
+ {
2295
+ type: "function",
2296
+ name: "token0",
2297
+ inputs: [],
2298
+ outputs: [{
2299
+ name: "",
2300
+ type: "address",
2301
+ internalType: "contract IERC20"
2302
+ }],
2303
+ stateMutability: "view"
2304
+ },
2305
+ {
2306
+ type: "function",
2307
+ name: "token1",
2308
+ inputs: [],
2309
+ outputs: [{
2310
+ name: "",
2311
+ type: "address",
2312
+ internalType: "contract IERC20"
2313
+ }],
2314
+ stateMutability: "view"
2315
+ },
2316
+ {
2317
+ type: "function",
2318
+ name: "transferOwnership",
2319
+ inputs: [{
2320
+ name: "newOwner",
2321
+ type: "address",
2322
+ internalType: "address"
2323
+ }],
2324
+ outputs: [],
2325
+ stateMutability: "nonpayable"
2326
+ },
2327
+ {
2328
+ type: "function",
2329
+ name: "updateDurationBounds",
2330
+ inputs: [{
2331
+ name: "_minDuration",
2332
+ type: "uint64",
2333
+ internalType: "uint64"
2334
+ }, {
2335
+ name: "_maxDuration",
2336
+ type: "uint64",
2337
+ internalType: "uint64"
2338
+ }],
2339
+ outputs: [],
2340
+ stateMutability: "nonpayable"
2341
+ },
2342
+ {
2343
+ type: "function",
2344
+ name: "updateOptionAmountBounds",
2345
+ inputs: [{
2346
+ name: "_minOptionAmount",
2347
+ type: "uint256",
2348
+ internalType: "uint256"
2349
+ }, {
2350
+ name: "_maxOptionAmount",
2351
+ type: "uint256",
2352
+ internalType: "uint256"
2353
+ }],
2354
+ outputs: [],
2355
+ stateMutability: "nonpayable"
2356
+ },
2357
+ {
2358
+ type: "function",
2359
+ name: "vault",
2360
+ inputs: [],
2361
+ outputs: [{
2362
+ name: "",
2363
+ type: "address",
2364
+ internalType: "contract ITimelockVault"
2365
+ }],
2366
+ stateMutability: "view"
2367
+ },
2368
+ {
2369
+ type: "function",
2370
+ name: "withdrawTokens",
2371
+ inputs: [{
2372
+ name: "tokens",
2373
+ type: "address[]",
2374
+ internalType: "contract IERC20[]"
2375
+ }],
2376
+ outputs: [],
2377
+ stateMutability: "nonpayable"
2378
+ }
2379
+ ];
2380
+
2381
+ //#endregion
2382
+ export { erc20Abi, lensAbi, optionsMarketAbi, uniswapMathLensAbi };
2383
+ //# sourceMappingURL=optionsMarket-DyBxHplR.js.map