timelock-sdk 0.0.135 → 0.0.136

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 (42) hide show
  1. package/dist/abis.cjs +602 -3
  2. package/dist/abis.cjs.map +1 -0
  3. package/dist/abis.d.cts +354 -90
  4. package/dist/abis.d.ts +354 -90
  5. package/dist/abis.js +602 -3
  6. package/dist/abis.js.map +1 -0
  7. package/dist/{client-DXq_0YH-.d.cts → client-B7kKAk49.d.cts} +38760 -28899
  8. package/dist/{client-BQGLnbLD.d.ts → client-D4EJlSs_.d.ts} +38760 -28899
  9. package/dist/client.cjs +86 -60
  10. package/dist/client.cjs.map +1 -1
  11. package/dist/client.d.cts +3 -3
  12. package/dist/client.d.ts +3 -3
  13. package/dist/client.js +85 -61
  14. package/dist/client.js.map +1 -1
  15. package/dist/optionUtils-B0rlRtfb.js +1401 -0
  16. package/dist/optionUtils-B0rlRtfb.js.map +1 -0
  17. package/dist/{optionUtils-OfLzCR6R.cjs → optionUtils-pH0o9gTm.cjs} +1069 -37
  18. package/dist/optionUtils-pH0o9gTm.cjs.map +1 -0
  19. package/dist/{optionsMarket-B2IsvbeA.js → optionsMarket-CjlRzn2K.js} +213 -21
  20. package/dist/optionsMarket-CjlRzn2K.js.map +1 -0
  21. package/dist/{optionsMarket-C6K82im8.cjs → optionsMarket-iZiYJCuW.cjs} +213 -21
  22. package/dist/optionsMarket-iZiYJCuW.cjs.map +1 -0
  23. package/dist/package.cjs +5 -6
  24. package/dist/package.d.cts +3 -3
  25. package/dist/package.d.ts +3 -3
  26. package/dist/package.js +3 -3
  27. package/dist/singleOwnerVault-BJyEs_D_.js +847 -0
  28. package/dist/singleOwnerVault-BJyEs_D_.js.map +1 -0
  29. package/dist/singleOwnerVault-GCpQV7pN.cjs +853 -0
  30. package/dist/singleOwnerVault-GCpQV7pN.cjs.map +1 -0
  31. package/dist/{uniswapMathLens-DHfzEjej.d.ts → uniswapMathLens-B0xWynAN.d.cts} +182 -21
  32. package/dist/{uniswapMathLens-Be6lFJcD.d.cts → uniswapMathLens-DAI2a8aU.d.ts} +182 -21
  33. package/package.json +38 -38
  34. package/dist/optionUtils-CQzUsKpO.js +0 -369
  35. package/dist/optionUtils-CQzUsKpO.js.map +0 -1
  36. package/dist/optionUtils-OfLzCR6R.cjs.map +0 -1
  37. package/dist/optionsMarket-B2IsvbeA.js.map +0 -1
  38. package/dist/optionsMarket-C6K82im8.cjs.map +0 -1
  39. package/dist/singleOwnerVault-gf2zNZVk.cjs +0 -1131
  40. package/dist/singleOwnerVault-gf2zNZVk.cjs.map +0 -1
  41. package/dist/singleOwnerVault-p81IjmWe.js +0 -1119
  42. package/dist/singleOwnerVault-p81IjmWe.js.map +0 -1
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  }) : target, mod));
22
22
 
23
23
  //#endregion
24
- const require_optionsMarket = require('./optionsMarket-C6K82im8.cjs');
24
+ const require_optionsMarket = require('./optionsMarket-iZiYJCuW.cjs');
25
25
  let viem = require("viem");
26
26
  let viem_chains = require("viem/chains");
27
27
  let __uniswap_v3_sdk = require("@uniswap/v3-sdk");
@@ -30,6 +30,1042 @@ big_js = __toESM(big_js);
30
30
  let jsbi = require("jsbi");
31
31
  jsbi = __toESM(jsbi);
32
32
 
33
+ //#region src/abis/statelessStateView.ts
34
+ const statelessStateViewAbi = [
35
+ {
36
+ type: "function",
37
+ name: "getFeeGrowthGlobals",
38
+ inputs: [{
39
+ name: "poolManager",
40
+ type: "address",
41
+ internalType: "contract IPoolManager"
42
+ }, {
43
+ name: "key",
44
+ type: "tuple",
45
+ internalType: "struct PoolKey",
46
+ components: [
47
+ {
48
+ name: "currency0",
49
+ type: "address",
50
+ internalType: "Currency"
51
+ },
52
+ {
53
+ name: "currency1",
54
+ type: "address",
55
+ internalType: "Currency"
56
+ },
57
+ {
58
+ name: "fee",
59
+ type: "uint24",
60
+ internalType: "uint24"
61
+ },
62
+ {
63
+ name: "tickSpacing",
64
+ type: "int24",
65
+ internalType: "int24"
66
+ },
67
+ {
68
+ name: "hooks",
69
+ type: "address",
70
+ internalType: "contract IHooks"
71
+ }
72
+ ]
73
+ }],
74
+ outputs: [{
75
+ name: "feeGrowthGlobal0",
76
+ type: "uint256",
77
+ internalType: "uint256"
78
+ }, {
79
+ name: "feeGrowthGlobal1",
80
+ type: "uint256",
81
+ internalType: "uint256"
82
+ }],
83
+ stateMutability: "view"
84
+ },
85
+ {
86
+ type: "function",
87
+ name: "getFeeGrowthGlobals",
88
+ inputs: [{
89
+ name: "poolManager",
90
+ type: "address",
91
+ internalType: "contract IPoolManager"
92
+ }, {
93
+ name: "poolId",
94
+ type: "bytes32",
95
+ internalType: "PoolId"
96
+ }],
97
+ outputs: [{
98
+ name: "feeGrowthGlobal0",
99
+ type: "uint256",
100
+ internalType: "uint256"
101
+ }, {
102
+ name: "feeGrowthGlobal1",
103
+ type: "uint256",
104
+ internalType: "uint256"
105
+ }],
106
+ stateMutability: "view"
107
+ },
108
+ {
109
+ type: "function",
110
+ name: "getFeeGrowthInside",
111
+ inputs: [
112
+ {
113
+ name: "poolManager",
114
+ type: "address",
115
+ internalType: "contract IPoolManager"
116
+ },
117
+ {
118
+ name: "poolId",
119
+ type: "bytes32",
120
+ internalType: "PoolId"
121
+ },
122
+ {
123
+ name: "tickLower",
124
+ type: "int24",
125
+ internalType: "int24"
126
+ },
127
+ {
128
+ name: "tickUpper",
129
+ type: "int24",
130
+ internalType: "int24"
131
+ }
132
+ ],
133
+ outputs: [{
134
+ name: "feeGrowthInside0X128",
135
+ type: "uint256",
136
+ internalType: "uint256"
137
+ }, {
138
+ name: "feeGrowthInside1X128",
139
+ type: "uint256",
140
+ internalType: "uint256"
141
+ }],
142
+ stateMutability: "view"
143
+ },
144
+ {
145
+ type: "function",
146
+ name: "getFeeGrowthInside",
147
+ inputs: [
148
+ {
149
+ name: "poolManager",
150
+ type: "address",
151
+ internalType: "contract IPoolManager"
152
+ },
153
+ {
154
+ name: "key",
155
+ type: "tuple",
156
+ internalType: "struct PoolKey",
157
+ components: [
158
+ {
159
+ name: "currency0",
160
+ type: "address",
161
+ internalType: "Currency"
162
+ },
163
+ {
164
+ name: "currency1",
165
+ type: "address",
166
+ internalType: "Currency"
167
+ },
168
+ {
169
+ name: "fee",
170
+ type: "uint24",
171
+ internalType: "uint24"
172
+ },
173
+ {
174
+ name: "tickSpacing",
175
+ type: "int24",
176
+ internalType: "int24"
177
+ },
178
+ {
179
+ name: "hooks",
180
+ type: "address",
181
+ internalType: "contract IHooks"
182
+ }
183
+ ]
184
+ },
185
+ {
186
+ name: "tickLower",
187
+ type: "int24",
188
+ internalType: "int24"
189
+ },
190
+ {
191
+ name: "tickUpper",
192
+ type: "int24",
193
+ internalType: "int24"
194
+ }
195
+ ],
196
+ outputs: [{
197
+ name: "feeGrowthInside0X128",
198
+ type: "uint256",
199
+ internalType: "uint256"
200
+ }, {
201
+ name: "feeGrowthInside1X128",
202
+ type: "uint256",
203
+ internalType: "uint256"
204
+ }],
205
+ stateMutability: "view"
206
+ },
207
+ {
208
+ type: "function",
209
+ name: "getLiquidity",
210
+ inputs: [{
211
+ name: "poolManager",
212
+ type: "address",
213
+ internalType: "contract IPoolManager"
214
+ }, {
215
+ name: "poolId",
216
+ type: "bytes32",
217
+ internalType: "PoolId"
218
+ }],
219
+ outputs: [{
220
+ name: "liquidity",
221
+ type: "uint128",
222
+ internalType: "uint128"
223
+ }],
224
+ stateMutability: "view"
225
+ },
226
+ {
227
+ type: "function",
228
+ name: "getLiquidity",
229
+ inputs: [{
230
+ name: "poolManager",
231
+ type: "address",
232
+ internalType: "contract IPoolManager"
233
+ }, {
234
+ name: "key",
235
+ type: "tuple",
236
+ internalType: "struct PoolKey",
237
+ components: [
238
+ {
239
+ name: "currency0",
240
+ type: "address",
241
+ internalType: "Currency"
242
+ },
243
+ {
244
+ name: "currency1",
245
+ type: "address",
246
+ internalType: "Currency"
247
+ },
248
+ {
249
+ name: "fee",
250
+ type: "uint24",
251
+ internalType: "uint24"
252
+ },
253
+ {
254
+ name: "tickSpacing",
255
+ type: "int24",
256
+ internalType: "int24"
257
+ },
258
+ {
259
+ name: "hooks",
260
+ type: "address",
261
+ internalType: "contract IHooks"
262
+ }
263
+ ]
264
+ }],
265
+ outputs: [{
266
+ name: "liquidity",
267
+ type: "uint128",
268
+ internalType: "uint128"
269
+ }],
270
+ stateMutability: "view"
271
+ },
272
+ {
273
+ type: "function",
274
+ name: "getPositionInfo",
275
+ inputs: [
276
+ {
277
+ name: "poolManager",
278
+ type: "address",
279
+ internalType: "contract IPoolManager"
280
+ },
281
+ {
282
+ name: "key",
283
+ type: "tuple",
284
+ internalType: "struct PoolKey",
285
+ components: [
286
+ {
287
+ name: "currency0",
288
+ type: "address",
289
+ internalType: "Currency"
290
+ },
291
+ {
292
+ name: "currency1",
293
+ type: "address",
294
+ internalType: "Currency"
295
+ },
296
+ {
297
+ name: "fee",
298
+ type: "uint24",
299
+ internalType: "uint24"
300
+ },
301
+ {
302
+ name: "tickSpacing",
303
+ type: "int24",
304
+ internalType: "int24"
305
+ },
306
+ {
307
+ name: "hooks",
308
+ type: "address",
309
+ internalType: "contract IHooks"
310
+ }
311
+ ]
312
+ },
313
+ {
314
+ name: "positionId",
315
+ type: "bytes32",
316
+ internalType: "bytes32"
317
+ }
318
+ ],
319
+ outputs: [
320
+ {
321
+ name: "liquidity",
322
+ type: "uint128",
323
+ internalType: "uint128"
324
+ },
325
+ {
326
+ name: "feeGrowthInside0LastX128",
327
+ type: "uint256",
328
+ internalType: "uint256"
329
+ },
330
+ {
331
+ name: "feeGrowthInside1LastX128",
332
+ type: "uint256",
333
+ internalType: "uint256"
334
+ }
335
+ ],
336
+ stateMutability: "view"
337
+ },
338
+ {
339
+ type: "function",
340
+ name: "getPositionInfo",
341
+ inputs: [
342
+ {
343
+ name: "poolManager",
344
+ type: "address",
345
+ internalType: "contract IPoolManager"
346
+ },
347
+ {
348
+ name: "poolId",
349
+ type: "bytes32",
350
+ internalType: "PoolId"
351
+ },
352
+ {
353
+ name: "positionId",
354
+ type: "bytes32",
355
+ internalType: "bytes32"
356
+ }
357
+ ],
358
+ outputs: [
359
+ {
360
+ name: "liquidity",
361
+ type: "uint128",
362
+ internalType: "uint128"
363
+ },
364
+ {
365
+ name: "feeGrowthInside0LastX128",
366
+ type: "uint256",
367
+ internalType: "uint256"
368
+ },
369
+ {
370
+ name: "feeGrowthInside1LastX128",
371
+ type: "uint256",
372
+ internalType: "uint256"
373
+ }
374
+ ],
375
+ stateMutability: "view"
376
+ },
377
+ {
378
+ type: "function",
379
+ name: "getPositionInfo",
380
+ inputs: [
381
+ {
382
+ name: "poolManager",
383
+ type: "address",
384
+ internalType: "contract IPoolManager"
385
+ },
386
+ {
387
+ name: "poolId",
388
+ type: "bytes32",
389
+ internalType: "PoolId"
390
+ },
391
+ {
392
+ name: "owner",
393
+ type: "address",
394
+ internalType: "address"
395
+ },
396
+ {
397
+ name: "tickLower",
398
+ type: "int24",
399
+ internalType: "int24"
400
+ },
401
+ {
402
+ name: "tickUpper",
403
+ type: "int24",
404
+ internalType: "int24"
405
+ },
406
+ {
407
+ name: "salt",
408
+ type: "bytes32",
409
+ internalType: "bytes32"
410
+ }
411
+ ],
412
+ outputs: [
413
+ {
414
+ name: "liquidity",
415
+ type: "uint128",
416
+ internalType: "uint128"
417
+ },
418
+ {
419
+ name: "feeGrowthInside0LastX128",
420
+ type: "uint256",
421
+ internalType: "uint256"
422
+ },
423
+ {
424
+ name: "feeGrowthInside1LastX128",
425
+ type: "uint256",
426
+ internalType: "uint256"
427
+ }
428
+ ],
429
+ stateMutability: "view"
430
+ },
431
+ {
432
+ type: "function",
433
+ name: "getPositionInfo",
434
+ inputs: [
435
+ {
436
+ name: "poolManager",
437
+ type: "address",
438
+ internalType: "contract IPoolManager"
439
+ },
440
+ {
441
+ name: "key",
442
+ type: "tuple",
443
+ internalType: "struct PoolKey",
444
+ components: [
445
+ {
446
+ name: "currency0",
447
+ type: "address",
448
+ internalType: "Currency"
449
+ },
450
+ {
451
+ name: "currency1",
452
+ type: "address",
453
+ internalType: "Currency"
454
+ },
455
+ {
456
+ name: "fee",
457
+ type: "uint24",
458
+ internalType: "uint24"
459
+ },
460
+ {
461
+ name: "tickSpacing",
462
+ type: "int24",
463
+ internalType: "int24"
464
+ },
465
+ {
466
+ name: "hooks",
467
+ type: "address",
468
+ internalType: "contract IHooks"
469
+ }
470
+ ]
471
+ },
472
+ {
473
+ name: "owner",
474
+ type: "address",
475
+ internalType: "address"
476
+ },
477
+ {
478
+ name: "tickLower",
479
+ type: "int24",
480
+ internalType: "int24"
481
+ },
482
+ {
483
+ name: "tickUpper",
484
+ type: "int24",
485
+ internalType: "int24"
486
+ },
487
+ {
488
+ name: "salt",
489
+ type: "bytes32",
490
+ internalType: "bytes32"
491
+ }
492
+ ],
493
+ outputs: [
494
+ {
495
+ name: "liquidity",
496
+ type: "uint128",
497
+ internalType: "uint128"
498
+ },
499
+ {
500
+ name: "feeGrowthInside0LastX128",
501
+ type: "uint256",
502
+ internalType: "uint256"
503
+ },
504
+ {
505
+ name: "feeGrowthInside1LastX128",
506
+ type: "uint256",
507
+ internalType: "uint256"
508
+ }
509
+ ],
510
+ stateMutability: "view"
511
+ },
512
+ {
513
+ type: "function",
514
+ name: "getPositionLiquidity",
515
+ inputs: [
516
+ {
517
+ name: "poolManager",
518
+ type: "address",
519
+ internalType: "contract IPoolManager"
520
+ },
521
+ {
522
+ name: "poolId",
523
+ type: "bytes32",
524
+ internalType: "PoolId"
525
+ },
526
+ {
527
+ name: "positionId",
528
+ type: "bytes32",
529
+ internalType: "bytes32"
530
+ }
531
+ ],
532
+ outputs: [{
533
+ name: "liquidity",
534
+ type: "uint128",
535
+ internalType: "uint128"
536
+ }],
537
+ stateMutability: "view"
538
+ },
539
+ {
540
+ type: "function",
541
+ name: "getPositionLiquidity",
542
+ inputs: [
543
+ {
544
+ name: "poolManager",
545
+ type: "address",
546
+ internalType: "contract IPoolManager"
547
+ },
548
+ {
549
+ name: "key",
550
+ type: "tuple",
551
+ internalType: "struct PoolKey",
552
+ components: [
553
+ {
554
+ name: "currency0",
555
+ type: "address",
556
+ internalType: "Currency"
557
+ },
558
+ {
559
+ name: "currency1",
560
+ type: "address",
561
+ internalType: "Currency"
562
+ },
563
+ {
564
+ name: "fee",
565
+ type: "uint24",
566
+ internalType: "uint24"
567
+ },
568
+ {
569
+ name: "tickSpacing",
570
+ type: "int24",
571
+ internalType: "int24"
572
+ },
573
+ {
574
+ name: "hooks",
575
+ type: "address",
576
+ internalType: "contract IHooks"
577
+ }
578
+ ]
579
+ },
580
+ {
581
+ name: "positionId",
582
+ type: "bytes32",
583
+ internalType: "bytes32"
584
+ }
585
+ ],
586
+ outputs: [{
587
+ name: "liquidity",
588
+ type: "uint128",
589
+ internalType: "uint128"
590
+ }],
591
+ stateMutability: "view"
592
+ },
593
+ {
594
+ type: "function",
595
+ name: "getSlot0",
596
+ inputs: [{
597
+ name: "poolManager",
598
+ type: "address",
599
+ internalType: "contract IPoolManager"
600
+ }, {
601
+ name: "key",
602
+ type: "tuple",
603
+ internalType: "struct PoolKey",
604
+ components: [
605
+ {
606
+ name: "currency0",
607
+ type: "address",
608
+ internalType: "Currency"
609
+ },
610
+ {
611
+ name: "currency1",
612
+ type: "address",
613
+ internalType: "Currency"
614
+ },
615
+ {
616
+ name: "fee",
617
+ type: "uint24",
618
+ internalType: "uint24"
619
+ },
620
+ {
621
+ name: "tickSpacing",
622
+ type: "int24",
623
+ internalType: "int24"
624
+ },
625
+ {
626
+ name: "hooks",
627
+ type: "address",
628
+ internalType: "contract IHooks"
629
+ }
630
+ ]
631
+ }],
632
+ outputs: [
633
+ {
634
+ name: "sqrtPriceX96",
635
+ type: "uint160",
636
+ internalType: "uint160"
637
+ },
638
+ {
639
+ name: "tick",
640
+ type: "int24",
641
+ internalType: "int24"
642
+ },
643
+ {
644
+ name: "protocolFee",
645
+ type: "uint24",
646
+ internalType: "uint24"
647
+ },
648
+ {
649
+ name: "lpFee",
650
+ type: "uint24",
651
+ internalType: "uint24"
652
+ }
653
+ ],
654
+ stateMutability: "view"
655
+ },
656
+ {
657
+ type: "function",
658
+ name: "getSlot0",
659
+ inputs: [{
660
+ name: "poolManager",
661
+ type: "address",
662
+ internalType: "contract IPoolManager"
663
+ }, {
664
+ name: "poolId",
665
+ type: "bytes32",
666
+ internalType: "PoolId"
667
+ }],
668
+ outputs: [
669
+ {
670
+ name: "sqrtPriceX96",
671
+ type: "uint160",
672
+ internalType: "uint160"
673
+ },
674
+ {
675
+ name: "tick",
676
+ type: "int24",
677
+ internalType: "int24"
678
+ },
679
+ {
680
+ name: "protocolFee",
681
+ type: "uint24",
682
+ internalType: "uint24"
683
+ },
684
+ {
685
+ name: "lpFee",
686
+ type: "uint24",
687
+ internalType: "uint24"
688
+ }
689
+ ],
690
+ stateMutability: "view"
691
+ },
692
+ {
693
+ type: "function",
694
+ name: "getTickBitmap",
695
+ inputs: [
696
+ {
697
+ name: "poolManager",
698
+ type: "address",
699
+ internalType: "contract IPoolManager"
700
+ },
701
+ {
702
+ name: "key",
703
+ type: "tuple",
704
+ internalType: "struct PoolKey",
705
+ components: [
706
+ {
707
+ name: "currency0",
708
+ type: "address",
709
+ internalType: "Currency"
710
+ },
711
+ {
712
+ name: "currency1",
713
+ type: "address",
714
+ internalType: "Currency"
715
+ },
716
+ {
717
+ name: "fee",
718
+ type: "uint24",
719
+ internalType: "uint24"
720
+ },
721
+ {
722
+ name: "tickSpacing",
723
+ type: "int24",
724
+ internalType: "int24"
725
+ },
726
+ {
727
+ name: "hooks",
728
+ type: "address",
729
+ internalType: "contract IHooks"
730
+ }
731
+ ]
732
+ },
733
+ {
734
+ name: "tick",
735
+ type: "int16",
736
+ internalType: "int16"
737
+ }
738
+ ],
739
+ outputs: [{
740
+ name: "tickBitmap",
741
+ type: "uint256",
742
+ internalType: "uint256"
743
+ }],
744
+ stateMutability: "view"
745
+ },
746
+ {
747
+ type: "function",
748
+ name: "getTickBitmap",
749
+ inputs: [
750
+ {
751
+ name: "poolManager",
752
+ type: "address",
753
+ internalType: "contract IPoolManager"
754
+ },
755
+ {
756
+ name: "poolId",
757
+ type: "bytes32",
758
+ internalType: "PoolId"
759
+ },
760
+ {
761
+ name: "tick",
762
+ type: "int16",
763
+ internalType: "int16"
764
+ }
765
+ ],
766
+ outputs: [{
767
+ name: "tickBitmap",
768
+ type: "uint256",
769
+ internalType: "uint256"
770
+ }],
771
+ stateMutability: "view"
772
+ },
773
+ {
774
+ type: "function",
775
+ name: "getTickFeeGrowthOutside",
776
+ inputs: [
777
+ {
778
+ name: "poolManager",
779
+ type: "address",
780
+ internalType: "contract IPoolManager"
781
+ },
782
+ {
783
+ name: "key",
784
+ type: "tuple",
785
+ internalType: "struct PoolKey",
786
+ components: [
787
+ {
788
+ name: "currency0",
789
+ type: "address",
790
+ internalType: "Currency"
791
+ },
792
+ {
793
+ name: "currency1",
794
+ type: "address",
795
+ internalType: "Currency"
796
+ },
797
+ {
798
+ name: "fee",
799
+ type: "uint24",
800
+ internalType: "uint24"
801
+ },
802
+ {
803
+ name: "tickSpacing",
804
+ type: "int24",
805
+ internalType: "int24"
806
+ },
807
+ {
808
+ name: "hooks",
809
+ type: "address",
810
+ internalType: "contract IHooks"
811
+ }
812
+ ]
813
+ },
814
+ {
815
+ name: "tick",
816
+ type: "int24",
817
+ internalType: "int24"
818
+ }
819
+ ],
820
+ outputs: [{
821
+ name: "feeGrowthOutside0X128",
822
+ type: "uint256",
823
+ internalType: "uint256"
824
+ }, {
825
+ name: "feeGrowthOutside1X128",
826
+ type: "uint256",
827
+ internalType: "uint256"
828
+ }],
829
+ stateMutability: "view"
830
+ },
831
+ {
832
+ type: "function",
833
+ name: "getTickFeeGrowthOutside",
834
+ inputs: [
835
+ {
836
+ name: "poolManager",
837
+ type: "address",
838
+ internalType: "contract IPoolManager"
839
+ },
840
+ {
841
+ name: "poolId",
842
+ type: "bytes32",
843
+ internalType: "PoolId"
844
+ },
845
+ {
846
+ name: "tick",
847
+ type: "int24",
848
+ internalType: "int24"
849
+ }
850
+ ],
851
+ outputs: [{
852
+ name: "feeGrowthOutside0X128",
853
+ type: "uint256",
854
+ internalType: "uint256"
855
+ }, {
856
+ name: "feeGrowthOutside1X128",
857
+ type: "uint256",
858
+ internalType: "uint256"
859
+ }],
860
+ stateMutability: "view"
861
+ },
862
+ {
863
+ type: "function",
864
+ name: "getTickInfo",
865
+ inputs: [
866
+ {
867
+ name: "poolManager",
868
+ type: "address",
869
+ internalType: "contract IPoolManager"
870
+ },
871
+ {
872
+ name: "poolId",
873
+ type: "bytes32",
874
+ internalType: "PoolId"
875
+ },
876
+ {
877
+ name: "tick",
878
+ type: "int24",
879
+ internalType: "int24"
880
+ }
881
+ ],
882
+ outputs: [
883
+ {
884
+ name: "liquidityGross",
885
+ type: "uint128",
886
+ internalType: "uint128"
887
+ },
888
+ {
889
+ name: "liquidityNet",
890
+ type: "int128",
891
+ internalType: "int128"
892
+ },
893
+ {
894
+ name: "feeGrowthOutside0X128",
895
+ type: "uint256",
896
+ internalType: "uint256"
897
+ },
898
+ {
899
+ name: "feeGrowthOutside1X128",
900
+ type: "uint256",
901
+ internalType: "uint256"
902
+ }
903
+ ],
904
+ stateMutability: "view"
905
+ },
906
+ {
907
+ type: "function",
908
+ name: "getTickInfo",
909
+ inputs: [
910
+ {
911
+ name: "poolManager",
912
+ type: "address",
913
+ internalType: "contract IPoolManager"
914
+ },
915
+ {
916
+ name: "key",
917
+ type: "tuple",
918
+ internalType: "struct PoolKey",
919
+ components: [
920
+ {
921
+ name: "currency0",
922
+ type: "address",
923
+ internalType: "Currency"
924
+ },
925
+ {
926
+ name: "currency1",
927
+ type: "address",
928
+ internalType: "Currency"
929
+ },
930
+ {
931
+ name: "fee",
932
+ type: "uint24",
933
+ internalType: "uint24"
934
+ },
935
+ {
936
+ name: "tickSpacing",
937
+ type: "int24",
938
+ internalType: "int24"
939
+ },
940
+ {
941
+ name: "hooks",
942
+ type: "address",
943
+ internalType: "contract IHooks"
944
+ }
945
+ ]
946
+ },
947
+ {
948
+ name: "tick",
949
+ type: "int24",
950
+ internalType: "int24"
951
+ }
952
+ ],
953
+ outputs: [
954
+ {
955
+ name: "liquidityGross",
956
+ type: "uint128",
957
+ internalType: "uint128"
958
+ },
959
+ {
960
+ name: "liquidityNet",
961
+ type: "int128",
962
+ internalType: "int128"
963
+ },
964
+ {
965
+ name: "feeGrowthOutside0X128",
966
+ type: "uint256",
967
+ internalType: "uint256"
968
+ },
969
+ {
970
+ name: "feeGrowthOutside1X128",
971
+ type: "uint256",
972
+ internalType: "uint256"
973
+ }
974
+ ],
975
+ stateMutability: "view"
976
+ },
977
+ {
978
+ type: "function",
979
+ name: "getTickLiquidity",
980
+ inputs: [
981
+ {
982
+ name: "poolManager",
983
+ type: "address",
984
+ internalType: "contract IPoolManager"
985
+ },
986
+ {
987
+ name: "key",
988
+ type: "tuple",
989
+ internalType: "struct PoolKey",
990
+ components: [
991
+ {
992
+ name: "currency0",
993
+ type: "address",
994
+ internalType: "Currency"
995
+ },
996
+ {
997
+ name: "currency1",
998
+ type: "address",
999
+ internalType: "Currency"
1000
+ },
1001
+ {
1002
+ name: "fee",
1003
+ type: "uint24",
1004
+ internalType: "uint24"
1005
+ },
1006
+ {
1007
+ name: "tickSpacing",
1008
+ type: "int24",
1009
+ internalType: "int24"
1010
+ },
1011
+ {
1012
+ name: "hooks",
1013
+ type: "address",
1014
+ internalType: "contract IHooks"
1015
+ }
1016
+ ]
1017
+ },
1018
+ {
1019
+ name: "tick",
1020
+ type: "int24",
1021
+ internalType: "int24"
1022
+ }
1023
+ ],
1024
+ outputs: [{
1025
+ name: "liquidityGross",
1026
+ type: "uint128",
1027
+ internalType: "uint128"
1028
+ }, {
1029
+ name: "liquidityNet",
1030
+ type: "int128",
1031
+ internalType: "int128"
1032
+ }],
1033
+ stateMutability: "view"
1034
+ },
1035
+ {
1036
+ type: "function",
1037
+ name: "getTickLiquidity",
1038
+ inputs: [
1039
+ {
1040
+ name: "poolManager",
1041
+ type: "address",
1042
+ internalType: "contract IPoolManager"
1043
+ },
1044
+ {
1045
+ name: "poolId",
1046
+ type: "bytes32",
1047
+ internalType: "PoolId"
1048
+ },
1049
+ {
1050
+ name: "tick",
1051
+ type: "int24",
1052
+ internalType: "int24"
1053
+ }
1054
+ ],
1055
+ outputs: [{
1056
+ name: "liquidityGross",
1057
+ type: "uint128",
1058
+ internalType: "uint128"
1059
+ }, {
1060
+ name: "liquidityNet",
1061
+ type: "int128",
1062
+ internalType: "int128"
1063
+ }],
1064
+ stateMutability: "view"
1065
+ }
1066
+ ];
1067
+
1068
+ //#endregion
33
1069
  //#region src/lib/contracts.ts
34
1070
  const getErc20 = (address, client) => (0, viem.getContract)({
35
1071
  abi: require_optionsMarket.erc20Abi,
@@ -43,19 +1079,21 @@ const getTimelockMarket = (address, client) => {
43
1079
  client
44
1080
  });
45
1081
  };
46
- const getUniswapMathLens = (client) => (0, viem.getContract)({
47
- abi: require_optionsMarket.uniswapMathLensAbi,
48
- address: uniswapMathLenses[client.chain.id],
49
- client
50
- });
1082
+ const getStateView = (client) => {
1083
+ return (0, viem.getContract)({
1084
+ abi: statelessStateViewAbi,
1085
+ address: stateViews[client.chain.id],
1086
+ client
1087
+ });
1088
+ };
51
1089
  const getTimelockLens = (client) => (0, viem.getContract)({
52
1090
  abi: require_optionsMarket.lensAbi,
53
1091
  address: timelockLenses[client.chain.id],
54
1092
  client
55
1093
  });
56
1094
  const swappers = { [viem_chains.monadTestnet.id]: "0x877309663591ad974bE2c0C7fB453844c8D613D8" };
57
- const timelockLenses = { [viem_chains.monadTestnet.id]: "0xB637ED73B07e7fB656CD286d53b7957a64788C03" };
58
- const uniswapMathLenses = { [viem_chains.monadTestnet.id]: "0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95" };
1095
+ const timelockLenses = { [viem_chains.monadTestnet.id]: "0xce715ffBce65824705a84327B898eE77EC08Fd7f" };
1096
+ const stateViews = { [viem_chains.monadTestnet.id]: "0xB85e32Ff9b08Be61cD888e5D997E51951BCA1A69" };
59
1097
 
60
1098
  //#endregion
61
1099
  //#region src/lib/price.ts
@@ -181,21 +1219,15 @@ const getTickAtPrice = (price) => {
181
1219
  return __uniswap_v3_sdk.TickMath.getTickAtSqrtRatio(sqrtPriceX96);
182
1220
  };
183
1221
  const getNearestValidStrikeTick = (optionType, optionAssetIsToken0, tickSpacing, currentTick, strikeTick) => {
184
- strikeTick = roundTickDown(strikeTick ?? currentTick, tickSpacing);
1222
+ strikeTick = roundTick(strikeTick ?? currentTick, tickSpacing);
185
1223
  if (optionType === "CALL" && optionAssetIsToken0 || optionType === "PUT" && !optionAssetIsToken0) strikeTick += tickSpacing;
186
1224
  return strikeTick;
187
1225
  };
188
- const roundTickDown = (tick, spacing) => {
1226
+ const roundTick = (tick, spacing) => {
189
1227
  const rem = tick % spacing;
190
1228
  if (rem >= 0) return tick - rem;
191
1229
  return tick - rem - spacing;
192
1230
  };
193
- const roundTickUp = (tick, spacing) => {
194
- const rem = tick % spacing;
195
- if (rem === 0) return tick;
196
- if (rem > 0) return tick - rem + spacing;
197
- return tick - rem;
198
- };
199
1231
  const token0ToToken1 = (amount0, price) => {
200
1232
  return amount0 * price / PRICE_PRECISION;
201
1233
  };
@@ -492,6 +1524,12 @@ Object.defineProperty(exports, 'getSqrtPriceX96AtPrice', {
492
1524
  return getSqrtPriceX96AtPrice;
493
1525
  }
494
1526
  });
1527
+ Object.defineProperty(exports, 'getStateView', {
1528
+ enumerable: true,
1529
+ get: function () {
1530
+ return getStateView;
1531
+ }
1532
+ });
495
1533
  Object.defineProperty(exports, 'getTickAtPrice', {
496
1534
  enumerable: true,
497
1535
  get: function () {
@@ -510,12 +1548,6 @@ Object.defineProperty(exports, 'getTimelockMarket', {
510
1548
  return getTimelockMarket;
511
1549
  }
512
1550
  });
513
- Object.defineProperty(exports, 'getUniswapMathLens', {
514
- enumerable: true,
515
- get: function () {
516
- return getUniswapMathLens;
517
- }
518
- });
519
1551
  Object.defineProperty(exports, 'liquiditiesToAmount0', {
520
1552
  enumerable: true,
521
1553
  get: function () {
@@ -534,16 +1566,10 @@ Object.defineProperty(exports, 'liquiditiesToAmounts', {
534
1566
  return liquiditiesToAmounts;
535
1567
  }
536
1568
  });
537
- Object.defineProperty(exports, 'roundTickDown', {
538
- enumerable: true,
539
- get: function () {
540
- return roundTickDown;
541
- }
542
- });
543
- Object.defineProperty(exports, 'roundTickUp', {
1569
+ Object.defineProperty(exports, 'roundTick', {
544
1570
  enumerable: true,
545
1571
  get: function () {
546
- return roundTickUp;
1572
+ return roundTick;
547
1573
  }
548
1574
  });
549
1575
  Object.defineProperty(exports, 'scaleAmount', {
@@ -558,6 +1584,18 @@ Object.defineProperty(exports, 'scalePrice', {
558
1584
  return scalePrice;
559
1585
  }
560
1586
  });
1587
+ Object.defineProperty(exports, 'stateViews', {
1588
+ enumerable: true,
1589
+ get: function () {
1590
+ return stateViews;
1591
+ }
1592
+ });
1593
+ Object.defineProperty(exports, 'statelessStateViewAbi', {
1594
+ enumerable: true,
1595
+ get: function () {
1596
+ return statelessStateViewAbi;
1597
+ }
1598
+ });
561
1599
  Object.defineProperty(exports, 'swappers', {
562
1600
  enumerable: true,
563
1601
  get: function () {
@@ -594,12 +1632,6 @@ Object.defineProperty(exports, 'token1ToToken0AtTick', {
594
1632
  return token1ToToken0AtTick;
595
1633
  }
596
1634
  });
597
- Object.defineProperty(exports, 'uniswapMathLenses', {
598
- enumerable: true,
599
- get: function () {
600
- return uniswapMathLenses;
601
- }
602
- });
603
1635
  Object.defineProperty(exports, 'unscaleAmount', {
604
1636
  enumerable: true,
605
1637
  get: function () {
@@ -642,4 +1674,4 @@ Object.defineProperty(exports, 'zero', {
642
1674
  return zero;
643
1675
  }
644
1676
  });
645
- //# sourceMappingURL=optionUtils-OfLzCR6R.cjs.map
1677
+ //# sourceMappingURL=optionUtils-pH0o9gTm.cjs.map