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