@gitmyabi/poly 0.0.0-stage → 1.0.0

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.
@@ -0,0 +1,3784 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * PoolKey struct type
7
+ */
8
+ export type PoolKey = {
9
+ currency0: `0x${string}`;
10
+ currency1: `0x${string}`;
11
+ fee: bigint;
12
+ tickSpacing: bigint;
13
+ hooks: `0x${string}`;
14
+ };
15
+
16
+ /**
17
+ * Position struct type
18
+ */
19
+ export type Position = {
20
+ owner: `0x${string}`;
21
+ start: bigint;
22
+ end: bigint;
23
+ armed: boolean;
24
+ program: `0x${string}`;
25
+ movedAt: bigint;
26
+ lastGwei: bigint;
27
+ amount: bigint;
28
+ initial: bigint;
29
+ params: `0x${string}`;
30
+ note: `0x${string}`;
31
+ };
32
+ /**
33
+ * Polypheme_json ABI
34
+ *
35
+ * This ABI is typed using viem's type system for full type safety.
36
+ */
37
+ export const Polypheme_jsonAbi = [
38
+ {
39
+ "inputs": [
40
+ {
41
+ "internalType": "contract IPoolManager",
42
+ "name": "_pm",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "internalType": "address",
47
+ "name": "_owner",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "internalType": "address",
52
+ "name": "hook",
53
+ "type": "address"
54
+ },
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "launchPrice",
58
+ "type": "uint256"
59
+ },
60
+ {
61
+ "internalType": "string",
62
+ "name": "name_",
63
+ "type": "string"
64
+ },
65
+ {
66
+ "internalType": "string",
67
+ "name": "symbol_",
68
+ "type": "string"
69
+ }
70
+ ],
71
+ "stateMutability": "nonpayable",
72
+ "type": "constructor"
73
+ },
74
+ {
75
+ "inputs": [],
76
+ "name": "AllowanceOverflow",
77
+ "type": "error"
78
+ },
79
+ {
80
+ "inputs": [],
81
+ "name": "AllowanceUnderflow",
82
+ "type": "error"
83
+ },
84
+ {
85
+ "inputs": [],
86
+ "name": "AlreadyInitialized",
87
+ "type": "error"
88
+ },
89
+ {
90
+ "inputs": [],
91
+ "name": "BadAct",
92
+ "type": "error"
93
+ },
94
+ {
95
+ "inputs": [],
96
+ "name": "BadDestination",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "BadPrice",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [],
106
+ "name": "BadProgram",
107
+ "type": "error"
108
+ },
109
+ {
110
+ "inputs": [],
111
+ "name": "BadTerm",
112
+ "type": "error"
113
+ },
114
+ {
115
+ "inputs": [],
116
+ "name": "CodeEnded",
117
+ "type": "error"
118
+ },
119
+ {
120
+ "inputs": [],
121
+ "name": "CodeNotEnded",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [],
126
+ "name": "EthTransferFailed",
127
+ "type": "error"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "uint256",
133
+ "name": "fee",
134
+ "type": "uint256"
135
+ }
136
+ ],
137
+ "name": "FeeNotPaid",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "InsufficientAllowance",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "inputs": [],
147
+ "name": "InsufficientBalance",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [],
152
+ "name": "InvalidPermit",
153
+ "type": "error"
154
+ },
155
+ {
156
+ "inputs": [],
157
+ "name": "NewOwnerIsZeroAddress",
158
+ "type": "error"
159
+ },
160
+ {
161
+ "inputs": [],
162
+ "name": "NoHandoverRequest",
163
+ "type": "error"
164
+ },
165
+ {
166
+ "inputs": [],
167
+ "name": "NoSuchPosition",
168
+ "type": "error"
169
+ },
170
+ {
171
+ "inputs": [],
172
+ "name": "NotArmed",
173
+ "type": "error"
174
+ },
175
+ {
176
+ "inputs": [],
177
+ "name": "NotEnoughPlain",
178
+ "type": "error"
179
+ },
180
+ {
181
+ "inputs": [],
182
+ "name": "NotHook",
183
+ "type": "error"
184
+ },
185
+ {
186
+ "inputs": [],
187
+ "name": "NotOurPool",
188
+ "type": "error"
189
+ },
190
+ {
191
+ "inputs": [],
192
+ "name": "NotOwner",
193
+ "type": "error"
194
+ },
195
+ {
196
+ "inputs": [],
197
+ "name": "NotPoolManager",
198
+ "type": "error"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "NotSeeded",
203
+ "type": "error"
204
+ },
205
+ {
206
+ "inputs": [],
207
+ "name": "NotWholeUnits",
208
+ "type": "error"
209
+ },
210
+ {
211
+ "inputs": [],
212
+ "name": "NothingBought",
213
+ "type": "error"
214
+ },
215
+ {
216
+ "inputs": [],
217
+ "name": "Permit2AllowanceIsFixedAtInfinity",
218
+ "type": "error"
219
+ },
220
+ {
221
+ "inputs": [],
222
+ "name": "PermitExpired",
223
+ "type": "error"
224
+ },
225
+ {
226
+ "inputs": [],
227
+ "name": "ProgramSaysNo",
228
+ "type": "error"
229
+ },
230
+ {
231
+ "inputs": [],
232
+ "name": "Reentrancy",
233
+ "type": "error"
234
+ },
235
+ {
236
+ "inputs": [
237
+ {
238
+ "internalType": "address",
239
+ "name": "to",
240
+ "type": "address"
241
+ }
242
+ ],
243
+ "name": "RefusesCode",
244
+ "type": "error"
245
+ },
246
+ {
247
+ "inputs": [],
248
+ "name": "RenounceDisabled",
249
+ "type": "error"
250
+ },
251
+ {
252
+ "inputs": [],
253
+ "name": "Slippage",
254
+ "type": "error"
255
+ },
256
+ {
257
+ "inputs": [
258
+ {
259
+ "internalType": "address",
260
+ "name": "owner",
261
+ "type": "address"
262
+ }
263
+ ],
264
+ "name": "TooManyPositions",
265
+ "type": "error"
266
+ },
267
+ {
268
+ "inputs": [],
269
+ "name": "TotalSupplyOverflow",
270
+ "type": "error"
271
+ },
272
+ {
273
+ "inputs": [],
274
+ "name": "Unauthorized",
275
+ "type": "error"
276
+ },
277
+ {
278
+ "inputs": [],
279
+ "name": "ZeroAddress",
280
+ "type": "error"
281
+ },
282
+ {
283
+ "anonymous": false,
284
+ "inputs": [
285
+ {
286
+ "indexed": true,
287
+ "internalType": "address",
288
+ "name": "owner",
289
+ "type": "address"
290
+ },
291
+ {
292
+ "indexed": true,
293
+ "internalType": "address",
294
+ "name": "spender",
295
+ "type": "address"
296
+ },
297
+ {
298
+ "indexed": false,
299
+ "internalType": "uint256",
300
+ "name": "amount",
301
+ "type": "uint256"
302
+ }
303
+ ],
304
+ "name": "Approval",
305
+ "type": "event"
306
+ },
307
+ {
308
+ "anonymous": false,
309
+ "inputs": [
310
+ {
311
+ "indexed": true,
312
+ "internalType": "address",
313
+ "name": "buyer",
314
+ "type": "address"
315
+ },
316
+ {
317
+ "indexed": false,
318
+ "internalType": "uint256",
319
+ "name": "ethIn",
320
+ "type": "uint256"
321
+ },
322
+ {
323
+ "indexed": false,
324
+ "internalType": "uint256",
325
+ "name": "unitsOut",
326
+ "type": "uint256"
327
+ }
328
+ ],
329
+ "name": "Bought",
330
+ "type": "event"
331
+ },
332
+ {
333
+ "anonymous": false,
334
+ "inputs": [
335
+ {
336
+ "indexed": true,
337
+ "internalType": "address",
338
+ "name": "owner",
339
+ "type": "address"
340
+ },
341
+ {
342
+ "indexed": false,
343
+ "internalType": "uint256",
344
+ "name": "eth",
345
+ "type": "uint256"
346
+ }
347
+ ],
348
+ "name": "Claimed",
349
+ "type": "event"
350
+ },
351
+ {
352
+ "anonymous": false,
353
+ "inputs": [
354
+ {
355
+ "indexed": true,
356
+ "internalType": "address",
357
+ "name": "who",
358
+ "type": "address"
359
+ },
360
+ {
361
+ "indexed": false,
362
+ "internalType": "bool",
363
+ "name": "accepts",
364
+ "type": "bool"
365
+ }
366
+ ],
367
+ "name": "CodeAcceptance",
368
+ "type": "event"
369
+ },
370
+ {
371
+ "anonymous": false,
372
+ "inputs": [
373
+ {
374
+ "indexed": true,
375
+ "internalType": "uint256",
376
+ "name": "id",
377
+ "type": "uint256"
378
+ }
379
+ ],
380
+ "name": "Disarmed",
381
+ "type": "event"
382
+ },
383
+ {
384
+ "anonymous": false,
385
+ "inputs": [
386
+ {
387
+ "indexed": true,
388
+ "internalType": "uint256",
389
+ "name": "id",
390
+ "type": "uint256"
391
+ },
392
+ {
393
+ "indexed": true,
394
+ "internalType": "address",
395
+ "name": "owner",
396
+ "type": "address"
397
+ },
398
+ {
399
+ "indexed": false,
400
+ "internalType": "uint256",
401
+ "name": "amount",
402
+ "type": "uint256"
403
+ },
404
+ {
405
+ "indexed": false,
406
+ "internalType": "bool",
407
+ "name": "byPool",
408
+ "type": "bool"
409
+ }
410
+ ],
411
+ "name": "Erased",
412
+ "type": "event"
413
+ },
414
+ {
415
+ "anonymous": false,
416
+ "inputs": [
417
+ {
418
+ "indexed": true,
419
+ "internalType": "uint256",
420
+ "name": "id",
421
+ "type": "uint256"
422
+ },
423
+ {
424
+ "indexed": false,
425
+ "internalType": "uint40",
426
+ "name": "oldEnd",
427
+ "type": "uint40"
428
+ },
429
+ {
430
+ "indexed": false,
431
+ "internalType": "uint40",
432
+ "name": "newEnd",
433
+ "type": "uint40"
434
+ },
435
+ {
436
+ "indexed": false,
437
+ "internalType": "uint256",
438
+ "name": "fee",
439
+ "type": "uint256"
440
+ }
441
+ ],
442
+ "name": "Extended",
443
+ "type": "event"
444
+ },
445
+ {
446
+ "anonymous": false,
447
+ "inputs": [
448
+ {
449
+ "indexed": true,
450
+ "internalType": "uint256",
451
+ "name": "id",
452
+ "type": "uint256"
453
+ },
454
+ {
455
+ "indexed": false,
456
+ "internalType": "uint256",
457
+ "name": "fee",
458
+ "type": "uint256"
459
+ }
460
+ ],
461
+ "name": "FeePaid",
462
+ "type": "event"
463
+ },
464
+ {
465
+ "anonymous": false,
466
+ "inputs": [
467
+ {
468
+ "indexed": true,
469
+ "internalType": "uint256",
470
+ "name": "id",
471
+ "type": "uint256"
472
+ },
473
+ {
474
+ "indexed": false,
475
+ "internalType": "bytes32",
476
+ "name": "note",
477
+ "type": "bytes32"
478
+ }
479
+ ],
480
+ "name": "Marked",
481
+ "type": "event"
482
+ },
483
+ {
484
+ "anonymous": false,
485
+ "inputs": [
486
+ {
487
+ "indexed": true,
488
+ "internalType": "address",
489
+ "name": "pendingOwner",
490
+ "type": "address"
491
+ }
492
+ ],
493
+ "name": "OwnershipHandoverCanceled",
494
+ "type": "event"
495
+ },
496
+ {
497
+ "anonymous": false,
498
+ "inputs": [
499
+ {
500
+ "indexed": true,
501
+ "internalType": "address",
502
+ "name": "pendingOwner",
503
+ "type": "address"
504
+ }
505
+ ],
506
+ "name": "OwnershipHandoverRequested",
507
+ "type": "event"
508
+ },
509
+ {
510
+ "anonymous": false,
511
+ "inputs": [
512
+ {
513
+ "indexed": true,
514
+ "internalType": "address",
515
+ "name": "oldOwner",
516
+ "type": "address"
517
+ },
518
+ {
519
+ "indexed": true,
520
+ "internalType": "address",
521
+ "name": "newOwner",
522
+ "type": "address"
523
+ }
524
+ ],
525
+ "name": "OwnershipTransferred",
526
+ "type": "event"
527
+ },
528
+ {
529
+ "anonymous": false,
530
+ "inputs": [
531
+ {
532
+ "indexed": true,
533
+ "internalType": "uint256",
534
+ "name": "id",
535
+ "type": "uint256"
536
+ },
537
+ {
538
+ "indexed": true,
539
+ "internalType": "address",
540
+ "name": "owner",
541
+ "type": "address"
542
+ },
543
+ {
544
+ "indexed": true,
545
+ "internalType": "address",
546
+ "name": "program",
547
+ "type": "address"
548
+ },
549
+ {
550
+ "indexed": false,
551
+ "internalType": "uint256",
552
+ "name": "amount",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "indexed": false,
557
+ "internalType": "uint40",
558
+ "name": "end",
559
+ "type": "uint40"
560
+ },
561
+ {
562
+ "indexed": false,
563
+ "internalType": "bytes",
564
+ "name": "params",
565
+ "type": "bytes"
566
+ }
567
+ ],
568
+ "name": "Programmed",
569
+ "type": "event"
570
+ },
571
+ {
572
+ "anonymous": false,
573
+ "inputs": [
574
+ {
575
+ "indexed": true,
576
+ "internalType": "uint256",
577
+ "name": "id",
578
+ "type": "uint256"
579
+ },
580
+ {
581
+ "indexed": true,
582
+ "internalType": "address",
583
+ "name": "owner",
584
+ "type": "address"
585
+ },
586
+ {
587
+ "indexed": false,
588
+ "internalType": "uint256",
589
+ "name": "amount",
590
+ "type": "uint256"
591
+ }
592
+ ],
593
+ "name": "Refused",
594
+ "type": "event"
595
+ },
596
+ {
597
+ "anonymous": false,
598
+ "inputs": [
599
+ {
600
+ "indexed": true,
601
+ "internalType": "uint256",
602
+ "name": "id",
603
+ "type": "uint256"
604
+ },
605
+ {
606
+ "indexed": true,
607
+ "internalType": "uint256",
608
+ "name": "newId",
609
+ "type": "uint256"
610
+ },
611
+ {
612
+ "indexed": true,
613
+ "internalType": "address",
614
+ "name": "to",
615
+ "type": "address"
616
+ },
617
+ {
618
+ "indexed": false,
619
+ "internalType": "address",
620
+ "name": "from",
621
+ "type": "address"
622
+ },
623
+ {
624
+ "indexed": false,
625
+ "internalType": "uint256",
626
+ "name": "amount",
627
+ "type": "uint256"
628
+ }
629
+ ],
630
+ "name": "Sent",
631
+ "type": "event"
632
+ },
633
+ {
634
+ "anonymous": false,
635
+ "inputs": [
636
+ {
637
+ "indexed": true,
638
+ "internalType": "uint256",
639
+ "name": "id",
640
+ "type": "uint256"
641
+ },
642
+ {
643
+ "indexed": true,
644
+ "internalType": "address",
645
+ "name": "owner",
646
+ "type": "address"
647
+ },
648
+ {
649
+ "indexed": false,
650
+ "internalType": "uint256",
651
+ "name": "amount",
652
+ "type": "uint256"
653
+ },
654
+ {
655
+ "indexed": false,
656
+ "internalType": "uint256",
657
+ "name": "ethOut",
658
+ "type": "uint256"
659
+ }
660
+ ],
661
+ "name": "Sold",
662
+ "type": "event"
663
+ },
664
+ {
665
+ "anonymous": false,
666
+ "inputs": [
667
+ {
668
+ "indexed": true,
669
+ "internalType": "uint256",
670
+ "name": "id",
671
+ "type": "uint256"
672
+ },
673
+ {
674
+ "indexed": true,
675
+ "internalType": "address",
676
+ "name": "caller",
677
+ "type": "address"
678
+ },
679
+ {
680
+ "indexed": false,
681
+ "internalType": "uint256",
682
+ "name": "units",
683
+ "type": "uint256"
684
+ },
685
+ {
686
+ "indexed": false,
687
+ "internalType": "uint256",
688
+ "name": "ethOut",
689
+ "type": "uint256"
690
+ },
691
+ {
692
+ "indexed": false,
693
+ "internalType": "uint256",
694
+ "name": "tip",
695
+ "type": "uint256"
696
+ }
697
+ ],
698
+ "name": "SoldFor",
699
+ "type": "event"
700
+ },
701
+ {
702
+ "anonymous": false,
703
+ "inputs": [
704
+ {
705
+ "indexed": true,
706
+ "internalType": "address",
707
+ "name": "seller",
708
+ "type": "address"
709
+ },
710
+ {
711
+ "indexed": false,
712
+ "internalType": "uint256",
713
+ "name": "unitsIn",
714
+ "type": "uint256"
715
+ },
716
+ {
717
+ "indexed": false,
718
+ "internalType": "uint256",
719
+ "name": "ethOut",
720
+ "type": "uint256"
721
+ }
722
+ ],
723
+ "name": "SoldPlain",
724
+ "type": "event"
725
+ },
726
+ {
727
+ "anonymous": false,
728
+ "inputs": [
729
+ {
730
+ "indexed": true,
731
+ "internalType": "uint256",
732
+ "name": "id",
733
+ "type": "uint256"
734
+ },
735
+ {
736
+ "indexed": true,
737
+ "internalType": "address",
738
+ "name": "from",
739
+ "type": "address"
740
+ },
741
+ {
742
+ "indexed": true,
743
+ "internalType": "address",
744
+ "name": "to",
745
+ "type": "address"
746
+ },
747
+ {
748
+ "indexed": false,
749
+ "internalType": "uint256",
750
+ "name": "cost",
751
+ "type": "uint256"
752
+ }
753
+ ],
754
+ "name": "Taken",
755
+ "type": "event"
756
+ },
757
+ {
758
+ "anonymous": false,
759
+ "inputs": [
760
+ {
761
+ "indexed": true,
762
+ "internalType": "address",
763
+ "name": "from",
764
+ "type": "address"
765
+ },
766
+ {
767
+ "indexed": true,
768
+ "internalType": "address",
769
+ "name": "to",
770
+ "type": "address"
771
+ },
772
+ {
773
+ "indexed": false,
774
+ "internalType": "uint256",
775
+ "name": "amount",
776
+ "type": "uint256"
777
+ }
778
+ ],
779
+ "name": "Transfer",
780
+ "type": "event"
781
+ },
782
+ {
783
+ "inputs": [],
784
+ "name": "ARM_DELAY",
785
+ "outputs": [
786
+ {
787
+ "internalType": "uint40",
788
+ "name": "",
789
+ "type": "uint40"
790
+ }
791
+ ],
792
+ "stateMutability": "view",
793
+ "type": "function"
794
+ },
795
+ {
796
+ "inputs": [],
797
+ "name": "BPS",
798
+ "outputs": [
799
+ {
800
+ "internalType": "uint16",
801
+ "name": "",
802
+ "type": "uint16"
803
+ }
804
+ ],
805
+ "stateMutability": "view",
806
+ "type": "function"
807
+ },
808
+ {
809
+ "inputs": [],
810
+ "name": "DEV_SUPPLY",
811
+ "outputs": [
812
+ {
813
+ "internalType": "uint256",
814
+ "name": "",
815
+ "type": "uint256"
816
+ }
817
+ ],
818
+ "stateMutability": "view",
819
+ "type": "function"
820
+ },
821
+ {
822
+ "inputs": [],
823
+ "name": "DOMAIN_SEPARATOR",
824
+ "outputs": [
825
+ {
826
+ "internalType": "bytes32",
827
+ "name": "result",
828
+ "type": "bytes32"
829
+ }
830
+ ],
831
+ "stateMutability": "view",
832
+ "type": "function"
833
+ },
834
+ {
835
+ "inputs": [],
836
+ "name": "GIFT_POSITIONS",
837
+ "outputs": [
838
+ {
839
+ "internalType": "uint256",
840
+ "name": "",
841
+ "type": "uint256"
842
+ }
843
+ ],
844
+ "stateMutability": "view",
845
+ "type": "function"
846
+ },
847
+ {
848
+ "inputs": [],
849
+ "name": "HOOK",
850
+ "outputs": [
851
+ {
852
+ "internalType": "contract IPolyphemeHook",
853
+ "name": "",
854
+ "type": "address"
855
+ }
856
+ ],
857
+ "stateMutability": "view",
858
+ "type": "function"
859
+ },
860
+ {
861
+ "inputs": [],
862
+ "name": "LAUNCH_PRICE",
863
+ "outputs": [
864
+ {
865
+ "internalType": "uint256",
866
+ "name": "",
867
+ "type": "uint256"
868
+ }
869
+ ],
870
+ "stateMutability": "view",
871
+ "type": "function"
872
+ },
873
+ {
874
+ "inputs": [],
875
+ "name": "MAX_POSITIONS",
876
+ "outputs": [
877
+ {
878
+ "internalType": "uint256",
879
+ "name": "",
880
+ "type": "uint256"
881
+ }
882
+ ],
883
+ "stateMutability": "view",
884
+ "type": "function"
885
+ },
886
+ {
887
+ "inputs": [],
888
+ "name": "MAX_TERM",
889
+ "outputs": [
890
+ {
891
+ "internalType": "uint40",
892
+ "name": "",
893
+ "type": "uint40"
894
+ }
895
+ ],
896
+ "stateMutability": "view",
897
+ "type": "function"
898
+ },
899
+ {
900
+ "inputs": [],
901
+ "name": "MIN_TERM",
902
+ "outputs": [
903
+ {
904
+ "internalType": "uint40",
905
+ "name": "",
906
+ "type": "uint40"
907
+ }
908
+ ],
909
+ "stateMutability": "view",
910
+ "type": "function"
911
+ },
912
+ {
913
+ "inputs": [],
914
+ "name": "PROGRAM_FEE_BPS_PER_YEAR",
915
+ "outputs": [
916
+ {
917
+ "internalType": "uint16",
918
+ "name": "",
919
+ "type": "uint16"
920
+ }
921
+ ],
922
+ "stateMutability": "view",
923
+ "type": "function"
924
+ },
925
+ {
926
+ "inputs": [],
927
+ "name": "PROGRAM_GAS",
928
+ "outputs": [
929
+ {
930
+ "internalType": "uint256",
931
+ "name": "",
932
+ "type": "uint256"
933
+ }
934
+ ],
935
+ "stateMutability": "view",
936
+ "type": "function"
937
+ },
938
+ {
939
+ "inputs": [],
940
+ "name": "SELL_BAND_BPS",
941
+ "outputs": [
942
+ {
943
+ "internalType": "uint16",
944
+ "name": "",
945
+ "type": "uint16"
946
+ }
947
+ ],
948
+ "stateMutability": "view",
949
+ "type": "function"
950
+ },
951
+ {
952
+ "inputs": [],
953
+ "name": "SUPPLY",
954
+ "outputs": [
955
+ {
956
+ "internalType": "uint256",
957
+ "name": "",
958
+ "type": "uint256"
959
+ }
960
+ ],
961
+ "stateMutability": "view",
962
+ "type": "function"
963
+ },
964
+ {
965
+ "inputs": [],
966
+ "name": "TIP_FLAT_MAX",
967
+ "outputs": [
968
+ {
969
+ "internalType": "uint256",
970
+ "name": "",
971
+ "type": "uint256"
972
+ }
973
+ ],
974
+ "stateMutability": "view",
975
+ "type": "function"
976
+ },
977
+ {
978
+ "inputs": [],
979
+ "name": "UNIT",
980
+ "outputs": [
981
+ {
982
+ "internalType": "uint256",
983
+ "name": "",
984
+ "type": "uint256"
985
+ }
986
+ ],
987
+ "stateMutability": "view",
988
+ "type": "function"
989
+ },
990
+ {
991
+ "inputs": [
992
+ {
993
+ "internalType": "address",
994
+ "name": "who",
995
+ "type": "address"
996
+ }
997
+ ],
998
+ "name": "acceptsCode",
999
+ "outputs": [
1000
+ {
1001
+ "internalType": "bool",
1002
+ "name": "",
1003
+ "type": "bool"
1004
+ }
1005
+ ],
1006
+ "stateMutability": "view",
1007
+ "type": "function"
1008
+ },
1009
+ {
1010
+ "inputs": [
1011
+ {
1012
+ "internalType": "uint256",
1013
+ "name": "id",
1014
+ "type": "uint256"
1015
+ },
1016
+ {
1017
+ "internalType": "uint256",
1018
+ "name": "units",
1019
+ "type": "uint256"
1020
+ }
1021
+ ],
1022
+ "name": "act",
1023
+ "outputs": [
1024
+ {
1025
+ "internalType": "uint256",
1026
+ "name": "out",
1027
+ "type": "uint256"
1028
+ }
1029
+ ],
1030
+ "stateMutability": "payable",
1031
+ "type": "function"
1032
+ },
1033
+ {
1034
+ "inputs": [
1035
+ {
1036
+ "internalType": "address",
1037
+ "name": "owner",
1038
+ "type": "address"
1039
+ },
1040
+ {
1041
+ "internalType": "address",
1042
+ "name": "spender",
1043
+ "type": "address"
1044
+ }
1045
+ ],
1046
+ "name": "allowance",
1047
+ "outputs": [
1048
+ {
1049
+ "internalType": "uint256",
1050
+ "name": "result",
1051
+ "type": "uint256"
1052
+ }
1053
+ ],
1054
+ "stateMutability": "view",
1055
+ "type": "function"
1056
+ },
1057
+ {
1058
+ "inputs": [
1059
+ {
1060
+ "internalType": "address",
1061
+ "name": "spender",
1062
+ "type": "address"
1063
+ },
1064
+ {
1065
+ "internalType": "uint256",
1066
+ "name": "amount",
1067
+ "type": "uint256"
1068
+ }
1069
+ ],
1070
+ "name": "approve",
1071
+ "outputs": [
1072
+ {
1073
+ "internalType": "bool",
1074
+ "name": "",
1075
+ "type": "bool"
1076
+ }
1077
+ ],
1078
+ "stateMutability": "nonpayable",
1079
+ "type": "function"
1080
+ },
1081
+ {
1082
+ "inputs": [
1083
+ {
1084
+ "internalType": "address",
1085
+ "name": "owner",
1086
+ "type": "address"
1087
+ }
1088
+ ],
1089
+ "name": "balanceOf",
1090
+ "outputs": [
1091
+ {
1092
+ "internalType": "uint256",
1093
+ "name": "result",
1094
+ "type": "uint256"
1095
+ }
1096
+ ],
1097
+ "stateMutability": "view",
1098
+ "type": "function"
1099
+ },
1100
+ {
1101
+ "inputs": [
1102
+ {
1103
+ "internalType": "uint256",
1104
+ "name": "amount",
1105
+ "type": "uint256"
1106
+ }
1107
+ ],
1108
+ "name": "burn",
1109
+ "outputs": [],
1110
+ "stateMutability": "nonpayable",
1111
+ "type": "function"
1112
+ },
1113
+ {
1114
+ "inputs": [],
1115
+ "name": "burned",
1116
+ "outputs": [
1117
+ {
1118
+ "internalType": "uint256",
1119
+ "name": "",
1120
+ "type": "uint256"
1121
+ }
1122
+ ],
1123
+ "stateMutability": "view",
1124
+ "type": "function"
1125
+ },
1126
+ {
1127
+ "inputs": [],
1128
+ "name": "cancelOwnershipHandover",
1129
+ "outputs": [],
1130
+ "stateMutability": "payable",
1131
+ "type": "function"
1132
+ },
1133
+ {
1134
+ "inputs": [],
1135
+ "name": "claim",
1136
+ "outputs": [
1137
+ {
1138
+ "internalType": "uint256",
1139
+ "name": "eth",
1140
+ "type": "uint256"
1141
+ }
1142
+ ],
1143
+ "stateMutability": "nonpayable",
1144
+ "type": "function"
1145
+ },
1146
+ {
1147
+ "inputs": [
1148
+ {
1149
+ "internalType": "address",
1150
+ "name": "pendingOwner",
1151
+ "type": "address"
1152
+ }
1153
+ ],
1154
+ "name": "completeOwnershipHandover",
1155
+ "outputs": [],
1156
+ "stateMutability": "payable",
1157
+ "type": "function"
1158
+ },
1159
+ {
1160
+ "inputs": [],
1161
+ "name": "decimals",
1162
+ "outputs": [
1163
+ {
1164
+ "internalType": "uint8",
1165
+ "name": "",
1166
+ "type": "uint8"
1167
+ }
1168
+ ],
1169
+ "stateMutability": "view",
1170
+ "type": "function"
1171
+ },
1172
+ {
1173
+ "inputs": [
1174
+ {
1175
+ "internalType": "uint256",
1176
+ "name": "id",
1177
+ "type": "uint256"
1178
+ }
1179
+ ],
1180
+ "name": "disarm",
1181
+ "outputs": [],
1182
+ "stateMutability": "nonpayable",
1183
+ "type": "function"
1184
+ },
1185
+ {
1186
+ "inputs": [
1187
+ {
1188
+ "internalType": "uint256",
1189
+ "name": "id",
1190
+ "type": "uint256"
1191
+ }
1192
+ ],
1193
+ "name": "expire",
1194
+ "outputs": [],
1195
+ "stateMutability": "nonpayable",
1196
+ "type": "function"
1197
+ },
1198
+ {
1199
+ "inputs": [
1200
+ {
1201
+ "internalType": "uint256",
1202
+ "name": "id",
1203
+ "type": "uint256"
1204
+ },
1205
+ {
1206
+ "internalType": "uint40",
1207
+ "name": "newEnd",
1208
+ "type": "uint40"
1209
+ }
1210
+ ],
1211
+ "name": "extend",
1212
+ "outputs": [
1213
+ {
1214
+ "internalType": "uint256",
1215
+ "name": "fee",
1216
+ "type": "uint256"
1217
+ }
1218
+ ],
1219
+ "stateMutability": "payable",
1220
+ "type": "function"
1221
+ },
1222
+ {
1223
+ "inputs": [],
1224
+ "name": "name",
1225
+ "outputs": [
1226
+ {
1227
+ "internalType": "string",
1228
+ "name": "",
1229
+ "type": "string"
1230
+ }
1231
+ ],
1232
+ "stateMutability": "view",
1233
+ "type": "function"
1234
+ },
1235
+ {
1236
+ "inputs": [],
1237
+ "name": "nextId",
1238
+ "outputs": [
1239
+ {
1240
+ "internalType": "uint256",
1241
+ "name": "",
1242
+ "type": "uint256"
1243
+ }
1244
+ ],
1245
+ "stateMutability": "view",
1246
+ "type": "function"
1247
+ },
1248
+ {
1249
+ "inputs": [
1250
+ {
1251
+ "internalType": "address",
1252
+ "name": "owner",
1253
+ "type": "address"
1254
+ }
1255
+ ],
1256
+ "name": "nonces",
1257
+ "outputs": [
1258
+ {
1259
+ "internalType": "uint256",
1260
+ "name": "result",
1261
+ "type": "uint256"
1262
+ }
1263
+ ],
1264
+ "stateMutability": "view",
1265
+ "type": "function"
1266
+ },
1267
+ {
1268
+ "inputs": [
1269
+ {
1270
+ "internalType": "uint256",
1271
+ "name": "amount",
1272
+ "type": "uint256"
1273
+ }
1274
+ ],
1275
+ "name": "openPool",
1276
+ "outputs": [],
1277
+ "stateMutability": "nonpayable",
1278
+ "type": "function"
1279
+ },
1280
+ {
1281
+ "inputs": [
1282
+ {
1283
+ "internalType": "address",
1284
+ "name": "",
1285
+ "type": "address"
1286
+ }
1287
+ ],
1288
+ "name": "owed",
1289
+ "outputs": [
1290
+ {
1291
+ "internalType": "uint256",
1292
+ "name": "",
1293
+ "type": "uint256"
1294
+ }
1295
+ ],
1296
+ "stateMutability": "view",
1297
+ "type": "function"
1298
+ },
1299
+ {
1300
+ "inputs": [],
1301
+ "name": "owner",
1302
+ "outputs": [
1303
+ {
1304
+ "internalType": "address",
1305
+ "name": "result",
1306
+ "type": "address"
1307
+ }
1308
+ ],
1309
+ "stateMutability": "view",
1310
+ "type": "function"
1311
+ },
1312
+ {
1313
+ "inputs": [
1314
+ {
1315
+ "internalType": "address",
1316
+ "name": "pendingOwner",
1317
+ "type": "address"
1318
+ }
1319
+ ],
1320
+ "name": "ownershipHandoverExpiresAt",
1321
+ "outputs": [
1322
+ {
1323
+ "internalType": "uint256",
1324
+ "name": "result",
1325
+ "type": "uint256"
1326
+ }
1327
+ ],
1328
+ "stateMutability": "view",
1329
+ "type": "function"
1330
+ },
1331
+ {
1332
+ "inputs": [
1333
+ {
1334
+ "internalType": "address",
1335
+ "name": "owner",
1336
+ "type": "address"
1337
+ },
1338
+ {
1339
+ "internalType": "address",
1340
+ "name": "spender",
1341
+ "type": "address"
1342
+ },
1343
+ {
1344
+ "internalType": "uint256",
1345
+ "name": "value",
1346
+ "type": "uint256"
1347
+ },
1348
+ {
1349
+ "internalType": "uint256",
1350
+ "name": "deadline",
1351
+ "type": "uint256"
1352
+ },
1353
+ {
1354
+ "internalType": "uint8",
1355
+ "name": "v",
1356
+ "type": "uint8"
1357
+ },
1358
+ {
1359
+ "internalType": "bytes32",
1360
+ "name": "r",
1361
+ "type": "bytes32"
1362
+ },
1363
+ {
1364
+ "internalType": "bytes32",
1365
+ "name": "s",
1366
+ "type": "bytes32"
1367
+ }
1368
+ ],
1369
+ "name": "permit",
1370
+ "outputs": [],
1371
+ "stateMutability": "nonpayable",
1372
+ "type": "function"
1373
+ },
1374
+ {
1375
+ "inputs": [
1376
+ {
1377
+ "internalType": "address",
1378
+ "name": "owner",
1379
+ "type": "address"
1380
+ }
1381
+ ],
1382
+ "name": "plainOf",
1383
+ "outputs": [
1384
+ {
1385
+ "internalType": "uint256",
1386
+ "name": "",
1387
+ "type": "uint256"
1388
+ }
1389
+ ],
1390
+ "stateMutability": "view",
1391
+ "type": "function"
1392
+ },
1393
+ {
1394
+ "inputs": [],
1395
+ "name": "poolKey",
1396
+ "outputs": [
1397
+ {
1398
+ "components": [
1399
+ {
1400
+ "internalType": "Currency",
1401
+ "name": "currency0",
1402
+ "type": "address"
1403
+ },
1404
+ {
1405
+ "internalType": "Currency",
1406
+ "name": "currency1",
1407
+ "type": "address"
1408
+ },
1409
+ {
1410
+ "internalType": "uint24",
1411
+ "name": "fee",
1412
+ "type": "uint24"
1413
+ },
1414
+ {
1415
+ "internalType": "int24",
1416
+ "name": "tickSpacing",
1417
+ "type": "int24"
1418
+ },
1419
+ {
1420
+ "internalType": "contract IHooks",
1421
+ "name": "hooks",
1422
+ "type": "address"
1423
+ }
1424
+ ],
1425
+ "internalType": "struct PoolKey",
1426
+ "name": "",
1427
+ "type": "tuple"
1428
+ }
1429
+ ],
1430
+ "stateMutability": "view",
1431
+ "type": "function"
1432
+ },
1433
+ {
1434
+ "inputs": [],
1435
+ "name": "poolManager",
1436
+ "outputs": [
1437
+ {
1438
+ "internalType": "contract IPoolManager",
1439
+ "name": "",
1440
+ "type": "address"
1441
+ }
1442
+ ],
1443
+ "stateMutability": "view",
1444
+ "type": "function"
1445
+ },
1446
+ {
1447
+ "inputs": [
1448
+ {
1449
+ "internalType": "uint256",
1450
+ "name": "id",
1451
+ "type": "uint256"
1452
+ }
1453
+ ],
1454
+ "name": "positionOf",
1455
+ "outputs": [
1456
+ {
1457
+ "components": [
1458
+ {
1459
+ "internalType": "address",
1460
+ "name": "owner",
1461
+ "type": "address"
1462
+ },
1463
+ {
1464
+ "internalType": "uint40",
1465
+ "name": "start",
1466
+ "type": "uint40"
1467
+ },
1468
+ {
1469
+ "internalType": "uint40",
1470
+ "name": "end",
1471
+ "type": "uint40"
1472
+ },
1473
+ {
1474
+ "internalType": "bool",
1475
+ "name": "armed",
1476
+ "type": "bool"
1477
+ },
1478
+ {
1479
+ "internalType": "address",
1480
+ "name": "program",
1481
+ "type": "address"
1482
+ },
1483
+ {
1484
+ "internalType": "uint40",
1485
+ "name": "movedAt",
1486
+ "type": "uint40"
1487
+ },
1488
+ {
1489
+ "internalType": "uint56",
1490
+ "name": "lastGwei",
1491
+ "type": "uint56"
1492
+ },
1493
+ {
1494
+ "internalType": "uint128",
1495
+ "name": "amount",
1496
+ "type": "uint128"
1497
+ },
1498
+ {
1499
+ "internalType": "uint128",
1500
+ "name": "initial",
1501
+ "type": "uint128"
1502
+ },
1503
+ {
1504
+ "internalType": "bytes",
1505
+ "name": "params",
1506
+ "type": "bytes"
1507
+ },
1508
+ {
1509
+ "internalType": "bytes32",
1510
+ "name": "note",
1511
+ "type": "bytes32"
1512
+ }
1513
+ ],
1514
+ "internalType": "struct Position",
1515
+ "name": "",
1516
+ "type": "tuple"
1517
+ }
1518
+ ],
1519
+ "stateMutability": "view",
1520
+ "type": "function"
1521
+ },
1522
+ {
1523
+ "inputs": [
1524
+ {
1525
+ "internalType": "address",
1526
+ "name": "owner",
1527
+ "type": "address"
1528
+ }
1529
+ ],
1530
+ "name": "positionsOf",
1531
+ "outputs": [
1532
+ {
1533
+ "internalType": "uint256[]",
1534
+ "name": "",
1535
+ "type": "uint256[]"
1536
+ }
1537
+ ],
1538
+ "stateMutability": "view",
1539
+ "type": "function"
1540
+ },
1541
+ {
1542
+ "inputs": [
1543
+ {
1544
+ "internalType": "uint256",
1545
+ "name": "amount",
1546
+ "type": "uint256"
1547
+ },
1548
+ {
1549
+ "internalType": "address",
1550
+ "name": "program_",
1551
+ "type": "address"
1552
+ },
1553
+ {
1554
+ "internalType": "bytes",
1555
+ "name": "params",
1556
+ "type": "bytes"
1557
+ },
1558
+ {
1559
+ "internalType": "uint40",
1560
+ "name": "end",
1561
+ "type": "uint40"
1562
+ }
1563
+ ],
1564
+ "name": "program",
1565
+ "outputs": [
1566
+ {
1567
+ "internalType": "uint256",
1568
+ "name": "id",
1569
+ "type": "uint256"
1570
+ }
1571
+ ],
1572
+ "stateMutability": "payable",
1573
+ "type": "function"
1574
+ },
1575
+ {
1576
+ "inputs": [
1577
+ {
1578
+ "internalType": "uint256",
1579
+ "name": "amount",
1580
+ "type": "uint256"
1581
+ },
1582
+ {
1583
+ "internalType": "uint40",
1584
+ "name": "end",
1585
+ "type": "uint40"
1586
+ }
1587
+ ],
1588
+ "name": "programFee",
1589
+ "outputs": [
1590
+ {
1591
+ "internalType": "uint256",
1592
+ "name": "",
1593
+ "type": "uint256"
1594
+ }
1595
+ ],
1596
+ "stateMutability": "view",
1597
+ "type": "function"
1598
+ },
1599
+ {
1600
+ "inputs": [
1601
+ {
1602
+ "internalType": "address",
1603
+ "name": "",
1604
+ "type": "address"
1605
+ }
1606
+ ],
1607
+ "name": "programmedOf",
1608
+ "outputs": [
1609
+ {
1610
+ "internalType": "uint256",
1611
+ "name": "",
1612
+ "type": "uint256"
1613
+ }
1614
+ ],
1615
+ "stateMutability": "view",
1616
+ "type": "function"
1617
+ },
1618
+ {
1619
+ "inputs": [],
1620
+ "name": "programmedSupply",
1621
+ "outputs": [
1622
+ {
1623
+ "internalType": "uint256",
1624
+ "name": "",
1625
+ "type": "uint256"
1626
+ }
1627
+ ],
1628
+ "stateMutability": "view",
1629
+ "type": "function"
1630
+ },
1631
+ {
1632
+ "inputs": [
1633
+ {
1634
+ "internalType": "uint256",
1635
+ "name": "id",
1636
+ "type": "uint256"
1637
+ }
1638
+ ],
1639
+ "name": "refuse",
1640
+ "outputs": [],
1641
+ "stateMutability": "nonpayable",
1642
+ "type": "function"
1643
+ },
1644
+ {
1645
+ "inputs": [],
1646
+ "name": "renounceOwnership",
1647
+ "outputs": [],
1648
+ "stateMutability": "payable",
1649
+ "type": "function"
1650
+ },
1651
+ {
1652
+ "inputs": [],
1653
+ "name": "requestOwnershipHandover",
1654
+ "outputs": [],
1655
+ "stateMutability": "payable",
1656
+ "type": "function"
1657
+ },
1658
+ {
1659
+ "inputs": [],
1660
+ "name": "seeded",
1661
+ "outputs": [
1662
+ {
1663
+ "internalType": "bool",
1664
+ "name": "",
1665
+ "type": "bool"
1666
+ }
1667
+ ],
1668
+ "stateMutability": "view",
1669
+ "type": "function"
1670
+ },
1671
+ {
1672
+ "inputs": [
1673
+ {
1674
+ "internalType": "uint256",
1675
+ "name": "id",
1676
+ "type": "uint256"
1677
+ },
1678
+ {
1679
+ "internalType": "uint256",
1680
+ "name": "amount",
1681
+ "type": "uint256"
1682
+ },
1683
+ {
1684
+ "internalType": "uint256",
1685
+ "name": "minOut",
1686
+ "type": "uint256"
1687
+ }
1688
+ ],
1689
+ "name": "sell",
1690
+ "outputs": [
1691
+ {
1692
+ "internalType": "uint256",
1693
+ "name": "out",
1694
+ "type": "uint256"
1695
+ }
1696
+ ],
1697
+ "stateMutability": "nonpayable",
1698
+ "type": "function"
1699
+ },
1700
+ {
1701
+ "inputs": [
1702
+ {
1703
+ "internalType": "uint256",
1704
+ "name": "amount",
1705
+ "type": "uint256"
1706
+ },
1707
+ {
1708
+ "internalType": "uint256",
1709
+ "name": "minOut",
1710
+ "type": "uint256"
1711
+ }
1712
+ ],
1713
+ "name": "sellPlain",
1714
+ "outputs": [
1715
+ {
1716
+ "internalType": "uint256",
1717
+ "name": "ethOut",
1718
+ "type": "uint256"
1719
+ }
1720
+ ],
1721
+ "stateMutability": "nonpayable",
1722
+ "type": "function"
1723
+ },
1724
+ {
1725
+ "inputs": [
1726
+ {
1727
+ "internalType": "uint256",
1728
+ "name": "id",
1729
+ "type": "uint256"
1730
+ },
1731
+ {
1732
+ "internalType": "address",
1733
+ "name": "to",
1734
+ "type": "address"
1735
+ },
1736
+ {
1737
+ "internalType": "uint256",
1738
+ "name": "amount",
1739
+ "type": "uint256"
1740
+ }
1741
+ ],
1742
+ "name": "send",
1743
+ "outputs": [
1744
+ {
1745
+ "internalType": "uint256",
1746
+ "name": "newId",
1747
+ "type": "uint256"
1748
+ }
1749
+ ],
1750
+ "stateMutability": "nonpayable",
1751
+ "type": "function"
1752
+ },
1753
+ {
1754
+ "inputs": [
1755
+ {
1756
+ "internalType": "uint256",
1757
+ "name": "id",
1758
+ "type": "uint256"
1759
+ },
1760
+ {
1761
+ "internalType": "address[]",
1762
+ "name": "to",
1763
+ "type": "address[]"
1764
+ },
1765
+ {
1766
+ "internalType": "uint256[]",
1767
+ "name": "amounts",
1768
+ "type": "uint256[]"
1769
+ }
1770
+ ],
1771
+ "name": "sendMany",
1772
+ "outputs": [
1773
+ {
1774
+ "internalType": "uint256",
1775
+ "name": "firstNewId",
1776
+ "type": "uint256"
1777
+ }
1778
+ ],
1779
+ "stateMutability": "nonpayable",
1780
+ "type": "function"
1781
+ },
1782
+ {
1783
+ "inputs": [
1784
+ {
1785
+ "internalType": "bool",
1786
+ "name": "accepts",
1787
+ "type": "bool"
1788
+ }
1789
+ ],
1790
+ "name": "setAcceptsCode",
1791
+ "outputs": [],
1792
+ "stateMutability": "nonpayable",
1793
+ "type": "function"
1794
+ },
1795
+ {
1796
+ "inputs": [],
1797
+ "name": "settledPrice",
1798
+ "outputs": [
1799
+ {
1800
+ "internalType": "uint256",
1801
+ "name": "",
1802
+ "type": "uint256"
1803
+ }
1804
+ ],
1805
+ "stateMutability": "view",
1806
+ "type": "function"
1807
+ },
1808
+ {
1809
+ "inputs": [],
1810
+ "name": "settledTick",
1811
+ "outputs": [
1812
+ {
1813
+ "internalType": "int24",
1814
+ "name": "",
1815
+ "type": "int24"
1816
+ }
1817
+ ],
1818
+ "stateMutability": "view",
1819
+ "type": "function"
1820
+ },
1821
+ {
1822
+ "inputs": [],
1823
+ "name": "symbol",
1824
+ "outputs": [
1825
+ {
1826
+ "internalType": "string",
1827
+ "name": "",
1828
+ "type": "string"
1829
+ }
1830
+ ],
1831
+ "stateMutability": "view",
1832
+ "type": "function"
1833
+ },
1834
+ {
1835
+ "inputs": [],
1836
+ "name": "tickCumulative",
1837
+ "outputs": [
1838
+ {
1839
+ "internalType": "int56",
1840
+ "name": "",
1841
+ "type": "int56"
1842
+ }
1843
+ ],
1844
+ "stateMutability": "view",
1845
+ "type": "function"
1846
+ },
1847
+ {
1848
+ "inputs": [],
1849
+ "name": "totalSupply",
1850
+ "outputs": [
1851
+ {
1852
+ "internalType": "uint256",
1853
+ "name": "result",
1854
+ "type": "uint256"
1855
+ }
1856
+ ],
1857
+ "stateMutability": "view",
1858
+ "type": "function"
1859
+ },
1860
+ {
1861
+ "inputs": [
1862
+ {
1863
+ "internalType": "address",
1864
+ "name": "to",
1865
+ "type": "address"
1866
+ },
1867
+ {
1868
+ "internalType": "uint256",
1869
+ "name": "amount",
1870
+ "type": "uint256"
1871
+ }
1872
+ ],
1873
+ "name": "transfer",
1874
+ "outputs": [
1875
+ {
1876
+ "internalType": "bool",
1877
+ "name": "",
1878
+ "type": "bool"
1879
+ }
1880
+ ],
1881
+ "stateMutability": "nonpayable",
1882
+ "type": "function"
1883
+ },
1884
+ {
1885
+ "inputs": [
1886
+ {
1887
+ "internalType": "address",
1888
+ "name": "from",
1889
+ "type": "address"
1890
+ },
1891
+ {
1892
+ "internalType": "address",
1893
+ "name": "to",
1894
+ "type": "address"
1895
+ },
1896
+ {
1897
+ "internalType": "uint256",
1898
+ "name": "amount",
1899
+ "type": "uint256"
1900
+ }
1901
+ ],
1902
+ "name": "transferFrom",
1903
+ "outputs": [
1904
+ {
1905
+ "internalType": "bool",
1906
+ "name": "",
1907
+ "type": "bool"
1908
+ }
1909
+ ],
1910
+ "stateMutability": "nonpayable",
1911
+ "type": "function"
1912
+ },
1913
+ {
1914
+ "inputs": [
1915
+ {
1916
+ "internalType": "address",
1917
+ "name": "newOwner",
1918
+ "type": "address"
1919
+ }
1920
+ ],
1921
+ "name": "transferOwnership",
1922
+ "outputs": [],
1923
+ "stateMutability": "payable",
1924
+ "type": "function"
1925
+ },
1926
+ {
1927
+ "inputs": [
1928
+ {
1929
+ "internalType": "bytes",
1930
+ "name": "data",
1931
+ "type": "bytes"
1932
+ }
1933
+ ],
1934
+ "name": "unlockCallback",
1935
+ "outputs": [
1936
+ {
1937
+ "internalType": "bytes",
1938
+ "name": "",
1939
+ "type": "bytes"
1940
+ }
1941
+ ],
1942
+ "stateMutability": "nonpayable",
1943
+ "type": "function"
1944
+ },
1945
+ {
1946
+ "stateMutability": "payable",
1947
+ "type": "receive"
1948
+ }
1949
+ ] as const satisfies Abi;
1950
+
1951
+ /**
1952
+ * Type-safe ABI for Polypheme_json
1953
+ */
1954
+ export type Polypheme_jsonAbi = typeof Polypheme_jsonAbi;
1955
+
1956
+ /**
1957
+ * Contract instance type for Polypheme_json
1958
+ */
1959
+ // Use any for contract type to avoid complex viem type issues
1960
+ // The runtime behavior is type-safe through viem's ABI typing
1961
+ export type Polypheme_jsonContract = any;
1962
+
1963
+ /**
1964
+ * Polypheme_json Contract Class
1965
+ *
1966
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1967
+ *
1968
+ * @example
1969
+ * ```typescript
1970
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1971
+ * import { mainnet } from 'viem/chains';
1972
+ * import { Polypheme_json } from 'Polypheme_json';
1973
+ *
1974
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1975
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1976
+ *
1977
+ * const contract = new Polypheme_json('0x...', { publicClient, walletClient });
1978
+ *
1979
+ * // Read functions
1980
+ * const result = await contract.balanceOf('0x...');
1981
+ *
1982
+ * // Write functions
1983
+ * const hash = await contract.transfer('0x...', 1000n);
1984
+ *
1985
+ * // Simulate transactions (dry-run)
1986
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1987
+ * console.log('Gas estimate:', simulation.request.gas);
1988
+ *
1989
+ * // Watch events
1990
+ * const unwatch = contract.watch.Transfer((event) => {
1991
+ * console.log('Transfer event:', event);
1992
+ * });
1993
+ * ```
1994
+ */
1995
+ export class Polypheme_json {
1996
+ private contract: Polypheme_jsonContract;
1997
+ private contractAddress: Address;
1998
+ private publicClient: PublicClient;
1999
+
2000
+ constructor(
2001
+ address: Address,
2002
+ clients: {
2003
+ publicClient: PublicClient;
2004
+ walletClient?: WalletClient;
2005
+ }
2006
+ ) {
2007
+ this.contractAddress = address;
2008
+ this.publicClient = clients.publicClient;
2009
+ this.contract = getContract({
2010
+ address,
2011
+ abi: Polypheme_jsonAbi,
2012
+ client: {
2013
+ public: clients.publicClient,
2014
+ wallet: clients.walletClient,
2015
+ },
2016
+ });
2017
+ }
2018
+
2019
+ /**
2020
+ * Get the contract address
2021
+ */
2022
+ get address(): Address {
2023
+ return this.contractAddress;
2024
+ }
2025
+
2026
+ /**
2027
+ * Get the underlying viem contract instance
2028
+ */
2029
+ getContract(): Polypheme_jsonContract {
2030
+ return this.contract;
2031
+ }
2032
+
2033
+ /**
2034
+ * ARM_DELAY
2035
+ * view
2036
+ */
2037
+ async ARM_DELAY(): Promise<bigint> {
2038
+ return this.contract.read.ARM_DELAY() as Promise<bigint>;
2039
+ }
2040
+
2041
+ /**
2042
+ * BPS
2043
+ * view
2044
+ */
2045
+ async BPS(): Promise<bigint> {
2046
+ return this.contract.read.BPS() as Promise<bigint>;
2047
+ }
2048
+
2049
+ /**
2050
+ * DEV_SUPPLY
2051
+ * view
2052
+ */
2053
+ async DEV_SUPPLY(): Promise<bigint> {
2054
+ return this.contract.read.DEV_SUPPLY() as Promise<bigint>;
2055
+ }
2056
+
2057
+ /**
2058
+ * DOMAIN_SEPARATOR
2059
+ * view
2060
+ */
2061
+ async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
2062
+ return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
2063
+ }
2064
+
2065
+ /**
2066
+ * GIFT_POSITIONS
2067
+ * view
2068
+ */
2069
+ async GIFT_POSITIONS(): Promise<bigint> {
2070
+ return this.contract.read.GIFT_POSITIONS() as Promise<bigint>;
2071
+ }
2072
+
2073
+ /**
2074
+ * HOOK
2075
+ * view
2076
+ */
2077
+ async HOOK(): Promise<`0x${string}`> {
2078
+ return this.contract.read.HOOK() as Promise<`0x${string}`>;
2079
+ }
2080
+
2081
+ /**
2082
+ * LAUNCH_PRICE
2083
+ * view
2084
+ */
2085
+ async LAUNCH_PRICE(): Promise<bigint> {
2086
+ return this.contract.read.LAUNCH_PRICE() as Promise<bigint>;
2087
+ }
2088
+
2089
+ /**
2090
+ * MAX_POSITIONS
2091
+ * view
2092
+ */
2093
+ async MAX_POSITIONS(): Promise<bigint> {
2094
+ return this.contract.read.MAX_POSITIONS() as Promise<bigint>;
2095
+ }
2096
+
2097
+ /**
2098
+ * MAX_TERM
2099
+ * view
2100
+ */
2101
+ async MAX_TERM(): Promise<bigint> {
2102
+ return this.contract.read.MAX_TERM() as Promise<bigint>;
2103
+ }
2104
+
2105
+ /**
2106
+ * MIN_TERM
2107
+ * view
2108
+ */
2109
+ async MIN_TERM(): Promise<bigint> {
2110
+ return this.contract.read.MIN_TERM() as Promise<bigint>;
2111
+ }
2112
+
2113
+ /**
2114
+ * PROGRAM_FEE_BPS_PER_YEAR
2115
+ * view
2116
+ */
2117
+ async PROGRAM_FEE_BPS_PER_YEAR(): Promise<bigint> {
2118
+ return this.contract.read.PROGRAM_FEE_BPS_PER_YEAR() as Promise<bigint>;
2119
+ }
2120
+
2121
+ /**
2122
+ * PROGRAM_GAS
2123
+ * view
2124
+ */
2125
+ async PROGRAM_GAS(): Promise<bigint> {
2126
+ return this.contract.read.PROGRAM_GAS() as Promise<bigint>;
2127
+ }
2128
+
2129
+ /**
2130
+ * SELL_BAND_BPS
2131
+ * view
2132
+ */
2133
+ async SELL_BAND_BPS(): Promise<bigint> {
2134
+ return this.contract.read.SELL_BAND_BPS() as Promise<bigint>;
2135
+ }
2136
+
2137
+ /**
2138
+ * SUPPLY
2139
+ * view
2140
+ */
2141
+ async SUPPLY(): Promise<bigint> {
2142
+ return this.contract.read.SUPPLY() as Promise<bigint>;
2143
+ }
2144
+
2145
+ /**
2146
+ * TIP_FLAT_MAX
2147
+ * view
2148
+ */
2149
+ async TIP_FLAT_MAX(): Promise<bigint> {
2150
+ return this.contract.read.TIP_FLAT_MAX() as Promise<bigint>;
2151
+ }
2152
+
2153
+ /**
2154
+ * UNIT
2155
+ * view
2156
+ */
2157
+ async UNIT(): Promise<bigint> {
2158
+ return this.contract.read.UNIT() as Promise<bigint>;
2159
+ }
2160
+
2161
+ /**
2162
+ * acceptsCode
2163
+ * view
2164
+ */
2165
+ async acceptsCode(who: `0x${string}`): Promise<boolean> {
2166
+ return this.contract.read.acceptsCode([who] as const) as Promise<boolean>;
2167
+ }
2168
+
2169
+ /**
2170
+ * allowance
2171
+ * view
2172
+ */
2173
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
2174
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
2175
+ }
2176
+
2177
+ /**
2178
+ * balanceOf
2179
+ * view
2180
+ */
2181
+ async balanceOf(owner: `0x${string}`): Promise<bigint> {
2182
+ return this.contract.read.balanceOf([owner] as const) as Promise<bigint>;
2183
+ }
2184
+
2185
+ /**
2186
+ * burned
2187
+ * view
2188
+ */
2189
+ async burned(): Promise<bigint> {
2190
+ return this.contract.read.burned() as Promise<bigint>;
2191
+ }
2192
+
2193
+ /**
2194
+ * decimals
2195
+ * view
2196
+ */
2197
+ async decimals(): Promise<bigint> {
2198
+ return this.contract.read.decimals() as Promise<bigint>;
2199
+ }
2200
+
2201
+ /**
2202
+ * name
2203
+ * view
2204
+ */
2205
+ async name(): Promise<string> {
2206
+ return this.contract.read.name() as Promise<string>;
2207
+ }
2208
+
2209
+ /**
2210
+ * nextId
2211
+ * view
2212
+ */
2213
+ async nextId(): Promise<bigint> {
2214
+ return this.contract.read.nextId() as Promise<bigint>;
2215
+ }
2216
+
2217
+ /**
2218
+ * nonces
2219
+ * view
2220
+ */
2221
+ async nonces(owner: `0x${string}`): Promise<bigint> {
2222
+ return this.contract.read.nonces([owner] as const) as Promise<bigint>;
2223
+ }
2224
+
2225
+ /**
2226
+ * owed
2227
+ * view
2228
+ */
2229
+ async owed(arg0: `0x${string}`): Promise<bigint> {
2230
+ return this.contract.read.owed([arg0] as const) as Promise<bigint>;
2231
+ }
2232
+
2233
+ /**
2234
+ * owner
2235
+ * view
2236
+ */
2237
+ async owner(): Promise<`0x${string}`> {
2238
+ return this.contract.read.owner() as Promise<`0x${string}`>;
2239
+ }
2240
+
2241
+ /**
2242
+ * ownershipHandoverExpiresAt
2243
+ * view
2244
+ */
2245
+ async ownershipHandoverExpiresAt(pendingOwner: `0x${string}`): Promise<bigint> {
2246
+ return this.contract.read.ownershipHandoverExpiresAt([pendingOwner] as const) as Promise<bigint>;
2247
+ }
2248
+
2249
+ /**
2250
+ * plainOf
2251
+ * view
2252
+ */
2253
+ async plainOf(owner: `0x${string}`): Promise<bigint> {
2254
+ return this.contract.read.plainOf([owner] as const) as Promise<bigint>;
2255
+ }
2256
+
2257
+ /**
2258
+ * poolKey
2259
+ * view
2260
+ */
2261
+ async poolKey(): Promise<PoolKey> {
2262
+ return this.contract.read.poolKey() as Promise<PoolKey>;
2263
+ }
2264
+
2265
+ /**
2266
+ * poolManager
2267
+ * view
2268
+ */
2269
+ async poolManager(): Promise<`0x${string}`> {
2270
+ return this.contract.read.poolManager() as Promise<`0x${string}`>;
2271
+ }
2272
+
2273
+ /**
2274
+ * positionOf
2275
+ * view
2276
+ */
2277
+ async positionOf(id: bigint): Promise<Position> {
2278
+ return this.contract.read.positionOf([id] as const) as Promise<Position>;
2279
+ }
2280
+
2281
+ /**
2282
+ * positionsOf
2283
+ * view
2284
+ */
2285
+ async positionsOf(owner: `0x${string}`): Promise<bigint[]> {
2286
+ return this.contract.read.positionsOf([owner] as const) as Promise<bigint[]>;
2287
+ }
2288
+
2289
+ /**
2290
+ * programFee
2291
+ * view
2292
+ */
2293
+ async programFee(amount: bigint, end: bigint): Promise<bigint> {
2294
+ return this.contract.read.programFee([amount, end] as const) as Promise<bigint>;
2295
+ }
2296
+
2297
+ /**
2298
+ * programmedOf
2299
+ * view
2300
+ */
2301
+ async programmedOf(arg0: `0x${string}`): Promise<bigint> {
2302
+ return this.contract.read.programmedOf([arg0] as const) as Promise<bigint>;
2303
+ }
2304
+
2305
+ /**
2306
+ * programmedSupply
2307
+ * view
2308
+ */
2309
+ async programmedSupply(): Promise<bigint> {
2310
+ return this.contract.read.programmedSupply() as Promise<bigint>;
2311
+ }
2312
+
2313
+ /**
2314
+ * seeded
2315
+ * view
2316
+ */
2317
+ async seeded(): Promise<boolean> {
2318
+ return this.contract.read.seeded() as Promise<boolean>;
2319
+ }
2320
+
2321
+ /**
2322
+ * settledPrice
2323
+ * view
2324
+ */
2325
+ async settledPrice(): Promise<bigint> {
2326
+ return this.contract.read.settledPrice() as Promise<bigint>;
2327
+ }
2328
+
2329
+ /**
2330
+ * settledTick
2331
+ * view
2332
+ */
2333
+ async settledTick(): Promise<bigint> {
2334
+ return this.contract.read.settledTick() as Promise<bigint>;
2335
+ }
2336
+
2337
+ /**
2338
+ * symbol
2339
+ * view
2340
+ */
2341
+ async symbol(): Promise<string> {
2342
+ return this.contract.read.symbol() as Promise<string>;
2343
+ }
2344
+
2345
+ /**
2346
+ * tickCumulative
2347
+ * view
2348
+ */
2349
+ async tickCumulative(): Promise<bigint> {
2350
+ return this.contract.read.tickCumulative() as Promise<bigint>;
2351
+ }
2352
+
2353
+ /**
2354
+ * totalSupply
2355
+ * view
2356
+ */
2357
+ async totalSupply(): Promise<bigint> {
2358
+ return this.contract.read.totalSupply() as Promise<bigint>;
2359
+ }
2360
+
2361
+ /**
2362
+ * act
2363
+ * payable
2364
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2365
+ */
2366
+ async act(id: bigint, units: bigint, options?: {
2367
+ accessList?: import('viem').AccessList;
2368
+ authorizationList?: import('viem').AuthorizationList;
2369
+ chain?: import('viem').Chain | null;
2370
+ dataSuffix?: `0x${string}`;
2371
+ gas?: bigint;
2372
+ gasPrice?: bigint;
2373
+ maxFeePerGas?: bigint;
2374
+ maxPriorityFeePerGas?: bigint;
2375
+ nonce?: number;
2376
+ value?: bigint;
2377
+ }): Promise<`0x${string}`> {
2378
+ if (!this.contract.write) {
2379
+ throw new Error('Wallet client is required for write operations');
2380
+ }
2381
+ return this.contract.write.act([id, units] as const, options) as Promise<`0x${string}`>;
2382
+ }
2383
+
2384
+ /**
2385
+ * approve
2386
+ * nonpayable
2387
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2388
+ */
2389
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
2390
+ accessList?: import('viem').AccessList;
2391
+ authorizationList?: import('viem').AuthorizationList;
2392
+ chain?: import('viem').Chain | null;
2393
+ dataSuffix?: `0x${string}`;
2394
+ gas?: bigint;
2395
+ gasPrice?: bigint;
2396
+ maxFeePerGas?: bigint;
2397
+ maxPriorityFeePerGas?: bigint;
2398
+ nonce?: number;
2399
+ value?: bigint;
2400
+ }): Promise<`0x${string}`> {
2401
+ if (!this.contract.write) {
2402
+ throw new Error('Wallet client is required for write operations');
2403
+ }
2404
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
2405
+ }
2406
+
2407
+ /**
2408
+ * burn
2409
+ * nonpayable
2410
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2411
+ */
2412
+ async burn(amount: bigint, options?: {
2413
+ accessList?: import('viem').AccessList;
2414
+ authorizationList?: import('viem').AuthorizationList;
2415
+ chain?: import('viem').Chain | null;
2416
+ dataSuffix?: `0x${string}`;
2417
+ gas?: bigint;
2418
+ gasPrice?: bigint;
2419
+ maxFeePerGas?: bigint;
2420
+ maxPriorityFeePerGas?: bigint;
2421
+ nonce?: number;
2422
+ value?: bigint;
2423
+ }): Promise<`0x${string}`> {
2424
+ if (!this.contract.write) {
2425
+ throw new Error('Wallet client is required for write operations');
2426
+ }
2427
+ return this.contract.write.burn([amount] as const, options) as Promise<`0x${string}`>;
2428
+ }
2429
+
2430
+ /**
2431
+ * cancelOwnershipHandover
2432
+ * payable
2433
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2434
+ */
2435
+ async cancelOwnershipHandover(options?: {
2436
+ accessList?: import('viem').AccessList;
2437
+ authorizationList?: import('viem').AuthorizationList;
2438
+ chain?: import('viem').Chain | null;
2439
+ dataSuffix?: `0x${string}`;
2440
+ gas?: bigint;
2441
+ gasPrice?: bigint;
2442
+ maxFeePerGas?: bigint;
2443
+ maxPriorityFeePerGas?: bigint;
2444
+ nonce?: number;
2445
+ value?: bigint;
2446
+ }): Promise<`0x${string}`> {
2447
+ if (!this.contract.write) {
2448
+ throw new Error('Wallet client is required for write operations');
2449
+ }
2450
+ return this.contract.write.cancelOwnershipHandover(options) as Promise<`0x${string}`>;
2451
+ }
2452
+
2453
+ /**
2454
+ * claim
2455
+ * nonpayable
2456
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2457
+ */
2458
+ async claim(options?: {
2459
+ accessList?: import('viem').AccessList;
2460
+ authorizationList?: import('viem').AuthorizationList;
2461
+ chain?: import('viem').Chain | null;
2462
+ dataSuffix?: `0x${string}`;
2463
+ gas?: bigint;
2464
+ gasPrice?: bigint;
2465
+ maxFeePerGas?: bigint;
2466
+ maxPriorityFeePerGas?: bigint;
2467
+ nonce?: number;
2468
+ value?: bigint;
2469
+ }): Promise<`0x${string}`> {
2470
+ if (!this.contract.write) {
2471
+ throw new Error('Wallet client is required for write operations');
2472
+ }
2473
+ return this.contract.write.claim(options) as Promise<`0x${string}`>;
2474
+ }
2475
+
2476
+ /**
2477
+ * completeOwnershipHandover
2478
+ * payable
2479
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2480
+ */
2481
+ async completeOwnershipHandover(pendingOwner: `0x${string}`, options?: {
2482
+ accessList?: import('viem').AccessList;
2483
+ authorizationList?: import('viem').AuthorizationList;
2484
+ chain?: import('viem').Chain | null;
2485
+ dataSuffix?: `0x${string}`;
2486
+ gas?: bigint;
2487
+ gasPrice?: bigint;
2488
+ maxFeePerGas?: bigint;
2489
+ maxPriorityFeePerGas?: bigint;
2490
+ nonce?: number;
2491
+ value?: bigint;
2492
+ }): Promise<`0x${string}`> {
2493
+ if (!this.contract.write) {
2494
+ throw new Error('Wallet client is required for write operations');
2495
+ }
2496
+ return this.contract.write.completeOwnershipHandover([pendingOwner] as const, options) as Promise<`0x${string}`>;
2497
+ }
2498
+
2499
+ /**
2500
+ * disarm
2501
+ * nonpayable
2502
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2503
+ */
2504
+ async disarm(id: bigint, options?: {
2505
+ accessList?: import('viem').AccessList;
2506
+ authorizationList?: import('viem').AuthorizationList;
2507
+ chain?: import('viem').Chain | null;
2508
+ dataSuffix?: `0x${string}`;
2509
+ gas?: bigint;
2510
+ gasPrice?: bigint;
2511
+ maxFeePerGas?: bigint;
2512
+ maxPriorityFeePerGas?: bigint;
2513
+ nonce?: number;
2514
+ value?: bigint;
2515
+ }): Promise<`0x${string}`> {
2516
+ if (!this.contract.write) {
2517
+ throw new Error('Wallet client is required for write operations');
2518
+ }
2519
+ return this.contract.write.disarm([id] as const, options) as Promise<`0x${string}`>;
2520
+ }
2521
+
2522
+ /**
2523
+ * expire
2524
+ * nonpayable
2525
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2526
+ */
2527
+ async expire(id: bigint, options?: {
2528
+ accessList?: import('viem').AccessList;
2529
+ authorizationList?: import('viem').AuthorizationList;
2530
+ chain?: import('viem').Chain | null;
2531
+ dataSuffix?: `0x${string}`;
2532
+ gas?: bigint;
2533
+ gasPrice?: bigint;
2534
+ maxFeePerGas?: bigint;
2535
+ maxPriorityFeePerGas?: bigint;
2536
+ nonce?: number;
2537
+ value?: bigint;
2538
+ }): Promise<`0x${string}`> {
2539
+ if (!this.contract.write) {
2540
+ throw new Error('Wallet client is required for write operations');
2541
+ }
2542
+ return this.contract.write.expire([id] as const, options) as Promise<`0x${string}`>;
2543
+ }
2544
+
2545
+ /**
2546
+ * extend
2547
+ * payable
2548
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2549
+ */
2550
+ async extend(id: bigint, newEnd: bigint, options?: {
2551
+ accessList?: import('viem').AccessList;
2552
+ authorizationList?: import('viem').AuthorizationList;
2553
+ chain?: import('viem').Chain | null;
2554
+ dataSuffix?: `0x${string}`;
2555
+ gas?: bigint;
2556
+ gasPrice?: bigint;
2557
+ maxFeePerGas?: bigint;
2558
+ maxPriorityFeePerGas?: bigint;
2559
+ nonce?: number;
2560
+ value?: bigint;
2561
+ }): Promise<`0x${string}`> {
2562
+ if (!this.contract.write) {
2563
+ throw new Error('Wallet client is required for write operations');
2564
+ }
2565
+ return this.contract.write.extend([id, newEnd] as const, options) as Promise<`0x${string}`>;
2566
+ }
2567
+
2568
+ /**
2569
+ * openPool
2570
+ * nonpayable
2571
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2572
+ */
2573
+ async openPool(amount: bigint, options?: {
2574
+ accessList?: import('viem').AccessList;
2575
+ authorizationList?: import('viem').AuthorizationList;
2576
+ chain?: import('viem').Chain | null;
2577
+ dataSuffix?: `0x${string}`;
2578
+ gas?: bigint;
2579
+ gasPrice?: bigint;
2580
+ maxFeePerGas?: bigint;
2581
+ maxPriorityFeePerGas?: bigint;
2582
+ nonce?: number;
2583
+ value?: bigint;
2584
+ }): Promise<`0x${string}`> {
2585
+ if (!this.contract.write) {
2586
+ throw new Error('Wallet client is required for write operations');
2587
+ }
2588
+ return this.contract.write.openPool([amount] as const, options) as Promise<`0x${string}`>;
2589
+ }
2590
+
2591
+ /**
2592
+ * permit
2593
+ * nonpayable
2594
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2595
+ */
2596
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2597
+ accessList?: import('viem').AccessList;
2598
+ authorizationList?: import('viem').AuthorizationList;
2599
+ chain?: import('viem').Chain | null;
2600
+ dataSuffix?: `0x${string}`;
2601
+ gas?: bigint;
2602
+ gasPrice?: bigint;
2603
+ maxFeePerGas?: bigint;
2604
+ maxPriorityFeePerGas?: bigint;
2605
+ nonce?: number;
2606
+ value?: bigint;
2607
+ }): Promise<`0x${string}`> {
2608
+ if (!this.contract.write) {
2609
+ throw new Error('Wallet client is required for write operations');
2610
+ }
2611
+ return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
2612
+ }
2613
+
2614
+ /**
2615
+ * program
2616
+ * payable
2617
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2618
+ */
2619
+ async program(amount: bigint, program_: `0x${string}`, params: `0x${string}`, end: bigint, options?: {
2620
+ accessList?: import('viem').AccessList;
2621
+ authorizationList?: import('viem').AuthorizationList;
2622
+ chain?: import('viem').Chain | null;
2623
+ dataSuffix?: `0x${string}`;
2624
+ gas?: bigint;
2625
+ gasPrice?: bigint;
2626
+ maxFeePerGas?: bigint;
2627
+ maxPriorityFeePerGas?: bigint;
2628
+ nonce?: number;
2629
+ value?: bigint;
2630
+ }): Promise<`0x${string}`> {
2631
+ if (!this.contract.write) {
2632
+ throw new Error('Wallet client is required for write operations');
2633
+ }
2634
+ return this.contract.write.program([amount, program_, params, end] as const, options) as Promise<`0x${string}`>;
2635
+ }
2636
+
2637
+ /**
2638
+ * refuse
2639
+ * nonpayable
2640
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2641
+ */
2642
+ async refuse(id: bigint, options?: {
2643
+ accessList?: import('viem').AccessList;
2644
+ authorizationList?: import('viem').AuthorizationList;
2645
+ chain?: import('viem').Chain | null;
2646
+ dataSuffix?: `0x${string}`;
2647
+ gas?: bigint;
2648
+ gasPrice?: bigint;
2649
+ maxFeePerGas?: bigint;
2650
+ maxPriorityFeePerGas?: bigint;
2651
+ nonce?: number;
2652
+ value?: bigint;
2653
+ }): Promise<`0x${string}`> {
2654
+ if (!this.contract.write) {
2655
+ throw new Error('Wallet client is required for write operations');
2656
+ }
2657
+ return this.contract.write.refuse([id] as const, options) as Promise<`0x${string}`>;
2658
+ }
2659
+
2660
+ /**
2661
+ * renounceOwnership
2662
+ * payable
2663
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2664
+ */
2665
+ async renounceOwnership(options?: {
2666
+ accessList?: import('viem').AccessList;
2667
+ authorizationList?: import('viem').AuthorizationList;
2668
+ chain?: import('viem').Chain | null;
2669
+ dataSuffix?: `0x${string}`;
2670
+ gas?: bigint;
2671
+ gasPrice?: bigint;
2672
+ maxFeePerGas?: bigint;
2673
+ maxPriorityFeePerGas?: bigint;
2674
+ nonce?: number;
2675
+ value?: bigint;
2676
+ }): Promise<`0x${string}`> {
2677
+ if (!this.contract.write) {
2678
+ throw new Error('Wallet client is required for write operations');
2679
+ }
2680
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
2681
+ }
2682
+
2683
+ /**
2684
+ * requestOwnershipHandover
2685
+ * payable
2686
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2687
+ */
2688
+ async requestOwnershipHandover(options?: {
2689
+ accessList?: import('viem').AccessList;
2690
+ authorizationList?: import('viem').AuthorizationList;
2691
+ chain?: import('viem').Chain | null;
2692
+ dataSuffix?: `0x${string}`;
2693
+ gas?: bigint;
2694
+ gasPrice?: bigint;
2695
+ maxFeePerGas?: bigint;
2696
+ maxPriorityFeePerGas?: bigint;
2697
+ nonce?: number;
2698
+ value?: bigint;
2699
+ }): Promise<`0x${string}`> {
2700
+ if (!this.contract.write) {
2701
+ throw new Error('Wallet client is required for write operations');
2702
+ }
2703
+ return this.contract.write.requestOwnershipHandover(options) as Promise<`0x${string}`>;
2704
+ }
2705
+
2706
+ /**
2707
+ * sell
2708
+ * nonpayable
2709
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2710
+ */
2711
+ async sell(id: bigint, amount: bigint, minOut: bigint, options?: {
2712
+ accessList?: import('viem').AccessList;
2713
+ authorizationList?: import('viem').AuthorizationList;
2714
+ chain?: import('viem').Chain | null;
2715
+ dataSuffix?: `0x${string}`;
2716
+ gas?: bigint;
2717
+ gasPrice?: bigint;
2718
+ maxFeePerGas?: bigint;
2719
+ maxPriorityFeePerGas?: bigint;
2720
+ nonce?: number;
2721
+ value?: bigint;
2722
+ }): Promise<`0x${string}`> {
2723
+ if (!this.contract.write) {
2724
+ throw new Error('Wallet client is required for write operations');
2725
+ }
2726
+ return this.contract.write.sell([id, amount, minOut] as const, options) as Promise<`0x${string}`>;
2727
+ }
2728
+
2729
+ /**
2730
+ * sellPlain
2731
+ * nonpayable
2732
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2733
+ */
2734
+ async sellPlain(amount: bigint, minOut: bigint, options?: {
2735
+ accessList?: import('viem').AccessList;
2736
+ authorizationList?: import('viem').AuthorizationList;
2737
+ chain?: import('viem').Chain | null;
2738
+ dataSuffix?: `0x${string}`;
2739
+ gas?: bigint;
2740
+ gasPrice?: bigint;
2741
+ maxFeePerGas?: bigint;
2742
+ maxPriorityFeePerGas?: bigint;
2743
+ nonce?: number;
2744
+ value?: bigint;
2745
+ }): Promise<`0x${string}`> {
2746
+ if (!this.contract.write) {
2747
+ throw new Error('Wallet client is required for write operations');
2748
+ }
2749
+ return this.contract.write.sellPlain([amount, minOut] as const, options) as Promise<`0x${string}`>;
2750
+ }
2751
+
2752
+ /**
2753
+ * send
2754
+ * nonpayable
2755
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2756
+ */
2757
+ async send(id: bigint, to: `0x${string}`, amount: bigint, options?: {
2758
+ accessList?: import('viem').AccessList;
2759
+ authorizationList?: import('viem').AuthorizationList;
2760
+ chain?: import('viem').Chain | null;
2761
+ dataSuffix?: `0x${string}`;
2762
+ gas?: bigint;
2763
+ gasPrice?: bigint;
2764
+ maxFeePerGas?: bigint;
2765
+ maxPriorityFeePerGas?: bigint;
2766
+ nonce?: number;
2767
+ value?: bigint;
2768
+ }): Promise<`0x${string}`> {
2769
+ if (!this.contract.write) {
2770
+ throw new Error('Wallet client is required for write operations');
2771
+ }
2772
+ return this.contract.write.send([id, to, amount] as const, options) as Promise<`0x${string}`>;
2773
+ }
2774
+
2775
+ /**
2776
+ * sendMany
2777
+ * nonpayable
2778
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2779
+ */
2780
+ async sendMany(id: bigint, to: `0x${string}`[], amounts: bigint[], options?: {
2781
+ accessList?: import('viem').AccessList;
2782
+ authorizationList?: import('viem').AuthorizationList;
2783
+ chain?: import('viem').Chain | null;
2784
+ dataSuffix?: `0x${string}`;
2785
+ gas?: bigint;
2786
+ gasPrice?: bigint;
2787
+ maxFeePerGas?: bigint;
2788
+ maxPriorityFeePerGas?: bigint;
2789
+ nonce?: number;
2790
+ value?: bigint;
2791
+ }): Promise<`0x${string}`> {
2792
+ if (!this.contract.write) {
2793
+ throw new Error('Wallet client is required for write operations');
2794
+ }
2795
+ return this.contract.write.sendMany([id, to, amounts] as const, options) as Promise<`0x${string}`>;
2796
+ }
2797
+
2798
+ /**
2799
+ * setAcceptsCode
2800
+ * nonpayable
2801
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2802
+ */
2803
+ async setAcceptsCode(accepts: boolean, options?: {
2804
+ accessList?: import('viem').AccessList;
2805
+ authorizationList?: import('viem').AuthorizationList;
2806
+ chain?: import('viem').Chain | null;
2807
+ dataSuffix?: `0x${string}`;
2808
+ gas?: bigint;
2809
+ gasPrice?: bigint;
2810
+ maxFeePerGas?: bigint;
2811
+ maxPriorityFeePerGas?: bigint;
2812
+ nonce?: number;
2813
+ value?: bigint;
2814
+ }): Promise<`0x${string}`> {
2815
+ if (!this.contract.write) {
2816
+ throw new Error('Wallet client is required for write operations');
2817
+ }
2818
+ return this.contract.write.setAcceptsCode([accepts] as const, options) as Promise<`0x${string}`>;
2819
+ }
2820
+
2821
+ /**
2822
+ * transfer
2823
+ * nonpayable
2824
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2825
+ */
2826
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
2827
+ accessList?: import('viem').AccessList;
2828
+ authorizationList?: import('viem').AuthorizationList;
2829
+ chain?: import('viem').Chain | null;
2830
+ dataSuffix?: `0x${string}`;
2831
+ gas?: bigint;
2832
+ gasPrice?: bigint;
2833
+ maxFeePerGas?: bigint;
2834
+ maxPriorityFeePerGas?: bigint;
2835
+ nonce?: number;
2836
+ value?: bigint;
2837
+ }): Promise<`0x${string}`> {
2838
+ if (!this.contract.write) {
2839
+ throw new Error('Wallet client is required for write operations');
2840
+ }
2841
+ return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
2842
+ }
2843
+
2844
+ /**
2845
+ * transferFrom
2846
+ * nonpayable
2847
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2848
+ */
2849
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
2850
+ accessList?: import('viem').AccessList;
2851
+ authorizationList?: import('viem').AuthorizationList;
2852
+ chain?: import('viem').Chain | null;
2853
+ dataSuffix?: `0x${string}`;
2854
+ gas?: bigint;
2855
+ gasPrice?: bigint;
2856
+ maxFeePerGas?: bigint;
2857
+ maxPriorityFeePerGas?: bigint;
2858
+ nonce?: number;
2859
+ value?: bigint;
2860
+ }): Promise<`0x${string}`> {
2861
+ if (!this.contract.write) {
2862
+ throw new Error('Wallet client is required for write operations');
2863
+ }
2864
+ return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
2865
+ }
2866
+
2867
+ /**
2868
+ * transferOwnership
2869
+ * payable
2870
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2871
+ */
2872
+ async transferOwnership(newOwner: `0x${string}`, options?: {
2873
+ accessList?: import('viem').AccessList;
2874
+ authorizationList?: import('viem').AuthorizationList;
2875
+ chain?: import('viem').Chain | null;
2876
+ dataSuffix?: `0x${string}`;
2877
+ gas?: bigint;
2878
+ gasPrice?: bigint;
2879
+ maxFeePerGas?: bigint;
2880
+ maxPriorityFeePerGas?: bigint;
2881
+ nonce?: number;
2882
+ value?: bigint;
2883
+ }): Promise<`0x${string}`> {
2884
+ if (!this.contract.write) {
2885
+ throw new Error('Wallet client is required for write operations');
2886
+ }
2887
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
2888
+ }
2889
+
2890
+ /**
2891
+ * unlockCallback
2892
+ * nonpayable
2893
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2894
+ */
2895
+ async unlockCallback(data: `0x${string}`, options?: {
2896
+ accessList?: import('viem').AccessList;
2897
+ authorizationList?: import('viem').AuthorizationList;
2898
+ chain?: import('viem').Chain | null;
2899
+ dataSuffix?: `0x${string}`;
2900
+ gas?: bigint;
2901
+ gasPrice?: bigint;
2902
+ maxFeePerGas?: bigint;
2903
+ maxPriorityFeePerGas?: bigint;
2904
+ nonce?: number;
2905
+ value?: bigint;
2906
+ }): Promise<`0x${string}`> {
2907
+ if (!this.contract.write) {
2908
+ throw new Error('Wallet client is required for write operations');
2909
+ }
2910
+ return this.contract.write.unlockCallback([data] as const, options) as Promise<`0x${string}`>;
2911
+ }
2912
+
2913
+
2914
+
2915
+ /**
2916
+ * Simulate contract write operations (dry-run without sending transaction)
2917
+ *
2918
+ * @example
2919
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2920
+ * console.log('Gas estimate:', result.request.gas);
2921
+ * console.log('Would succeed:', result.result);
2922
+ */
2923
+ get simulate() {
2924
+ const contract = this.contract;
2925
+ if (!contract.simulate) {
2926
+ throw new Error('Public client is required for simulation');
2927
+ }
2928
+ return {
2929
+ /**
2930
+ * Simulate act
2931
+ * Returns gas estimate and result without sending transaction
2932
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2933
+ */
2934
+ async act(id: bigint, units: bigint, options?: {
2935
+ accessList?: import('viem').AccessList;
2936
+ authorizationList?: import('viem').AuthorizationList;
2937
+ chain?: import('viem').Chain | null;
2938
+ dataSuffix?: `0x${string}`;
2939
+ gas?: bigint;
2940
+ gasPrice?: bigint;
2941
+ maxFeePerGas?: bigint;
2942
+ maxPriorityFeePerGas?: bigint;
2943
+ nonce?: number;
2944
+ value?: bigint;
2945
+ }): Promise<bigint> {
2946
+ return contract.simulate.act([id, units] as const, options) as Promise<bigint>;
2947
+ },
2948
+ /**
2949
+ * Simulate approve
2950
+ * Returns gas estimate and result without sending transaction
2951
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2952
+ */
2953
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
2954
+ accessList?: import('viem').AccessList;
2955
+ authorizationList?: import('viem').AuthorizationList;
2956
+ chain?: import('viem').Chain | null;
2957
+ dataSuffix?: `0x${string}`;
2958
+ gas?: bigint;
2959
+ gasPrice?: bigint;
2960
+ maxFeePerGas?: bigint;
2961
+ maxPriorityFeePerGas?: bigint;
2962
+ nonce?: number;
2963
+ value?: bigint;
2964
+ }): Promise<boolean> {
2965
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
2966
+ },
2967
+ /**
2968
+ * Simulate burn
2969
+ * Returns gas estimate and result without sending transaction
2970
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2971
+ */
2972
+ async burn(amount: bigint, options?: {
2973
+ accessList?: import('viem').AccessList;
2974
+ authorizationList?: import('viem').AuthorizationList;
2975
+ chain?: import('viem').Chain | null;
2976
+ dataSuffix?: `0x${string}`;
2977
+ gas?: bigint;
2978
+ gasPrice?: bigint;
2979
+ maxFeePerGas?: bigint;
2980
+ maxPriorityFeePerGas?: bigint;
2981
+ nonce?: number;
2982
+ value?: bigint;
2983
+ }): Promise<void> {
2984
+ return contract.simulate.burn([amount] as const, options) as Promise<void>;
2985
+ },
2986
+ /**
2987
+ * Simulate cancelOwnershipHandover
2988
+ * Returns gas estimate and result without sending transaction
2989
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2990
+ */
2991
+ async cancelOwnershipHandover(options?: {
2992
+ accessList?: import('viem').AccessList;
2993
+ authorizationList?: import('viem').AuthorizationList;
2994
+ chain?: import('viem').Chain | null;
2995
+ dataSuffix?: `0x${string}`;
2996
+ gas?: bigint;
2997
+ gasPrice?: bigint;
2998
+ maxFeePerGas?: bigint;
2999
+ maxPriorityFeePerGas?: bigint;
3000
+ nonce?: number;
3001
+ value?: bigint;
3002
+ }): Promise<void> {
3003
+ return contract.simulate.cancelOwnershipHandover(options) as Promise<void>;
3004
+ },
3005
+ /**
3006
+ * Simulate claim
3007
+ * Returns gas estimate and result without sending transaction
3008
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3009
+ */
3010
+ async claim(options?: {
3011
+ accessList?: import('viem').AccessList;
3012
+ authorizationList?: import('viem').AuthorizationList;
3013
+ chain?: import('viem').Chain | null;
3014
+ dataSuffix?: `0x${string}`;
3015
+ gas?: bigint;
3016
+ gasPrice?: bigint;
3017
+ maxFeePerGas?: bigint;
3018
+ maxPriorityFeePerGas?: bigint;
3019
+ nonce?: number;
3020
+ value?: bigint;
3021
+ }): Promise<bigint> {
3022
+ return contract.simulate.claim(options) as Promise<bigint>;
3023
+ },
3024
+ /**
3025
+ * Simulate completeOwnershipHandover
3026
+ * Returns gas estimate and result without sending transaction
3027
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3028
+ */
3029
+ async completeOwnershipHandover(pendingOwner: `0x${string}`, options?: {
3030
+ accessList?: import('viem').AccessList;
3031
+ authorizationList?: import('viem').AuthorizationList;
3032
+ chain?: import('viem').Chain | null;
3033
+ dataSuffix?: `0x${string}`;
3034
+ gas?: bigint;
3035
+ gasPrice?: bigint;
3036
+ maxFeePerGas?: bigint;
3037
+ maxPriorityFeePerGas?: bigint;
3038
+ nonce?: number;
3039
+ value?: bigint;
3040
+ }): Promise<void> {
3041
+ return contract.simulate.completeOwnershipHandover([pendingOwner] as const, options) as Promise<void>;
3042
+ },
3043
+ /**
3044
+ * Simulate disarm
3045
+ * Returns gas estimate and result without sending transaction
3046
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3047
+ */
3048
+ async disarm(id: bigint, options?: {
3049
+ accessList?: import('viem').AccessList;
3050
+ authorizationList?: import('viem').AuthorizationList;
3051
+ chain?: import('viem').Chain | null;
3052
+ dataSuffix?: `0x${string}`;
3053
+ gas?: bigint;
3054
+ gasPrice?: bigint;
3055
+ maxFeePerGas?: bigint;
3056
+ maxPriorityFeePerGas?: bigint;
3057
+ nonce?: number;
3058
+ value?: bigint;
3059
+ }): Promise<void> {
3060
+ return contract.simulate.disarm([id] as const, options) as Promise<void>;
3061
+ },
3062
+ /**
3063
+ * Simulate expire
3064
+ * Returns gas estimate and result without sending transaction
3065
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3066
+ */
3067
+ async expire(id: bigint, options?: {
3068
+ accessList?: import('viem').AccessList;
3069
+ authorizationList?: import('viem').AuthorizationList;
3070
+ chain?: import('viem').Chain | null;
3071
+ dataSuffix?: `0x${string}`;
3072
+ gas?: bigint;
3073
+ gasPrice?: bigint;
3074
+ maxFeePerGas?: bigint;
3075
+ maxPriorityFeePerGas?: bigint;
3076
+ nonce?: number;
3077
+ value?: bigint;
3078
+ }): Promise<void> {
3079
+ return contract.simulate.expire([id] as const, options) as Promise<void>;
3080
+ },
3081
+ /**
3082
+ * Simulate extend
3083
+ * Returns gas estimate and result without sending transaction
3084
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3085
+ */
3086
+ async extend(id: bigint, newEnd: bigint, options?: {
3087
+ accessList?: import('viem').AccessList;
3088
+ authorizationList?: import('viem').AuthorizationList;
3089
+ chain?: import('viem').Chain | null;
3090
+ dataSuffix?: `0x${string}`;
3091
+ gas?: bigint;
3092
+ gasPrice?: bigint;
3093
+ maxFeePerGas?: bigint;
3094
+ maxPriorityFeePerGas?: bigint;
3095
+ nonce?: number;
3096
+ value?: bigint;
3097
+ }): Promise<bigint> {
3098
+ return contract.simulate.extend([id, newEnd] as const, options) as Promise<bigint>;
3099
+ },
3100
+ /**
3101
+ * Simulate openPool
3102
+ * Returns gas estimate and result without sending transaction
3103
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3104
+ */
3105
+ async openPool(amount: bigint, options?: {
3106
+ accessList?: import('viem').AccessList;
3107
+ authorizationList?: import('viem').AuthorizationList;
3108
+ chain?: import('viem').Chain | null;
3109
+ dataSuffix?: `0x${string}`;
3110
+ gas?: bigint;
3111
+ gasPrice?: bigint;
3112
+ maxFeePerGas?: bigint;
3113
+ maxPriorityFeePerGas?: bigint;
3114
+ nonce?: number;
3115
+ value?: bigint;
3116
+ }): Promise<void> {
3117
+ return contract.simulate.openPool([amount] as const, options) as Promise<void>;
3118
+ },
3119
+ /**
3120
+ * Simulate permit
3121
+ * Returns gas estimate and result without sending transaction
3122
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3123
+ */
3124
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
3125
+ accessList?: import('viem').AccessList;
3126
+ authorizationList?: import('viem').AuthorizationList;
3127
+ chain?: import('viem').Chain | null;
3128
+ dataSuffix?: `0x${string}`;
3129
+ gas?: bigint;
3130
+ gasPrice?: bigint;
3131
+ maxFeePerGas?: bigint;
3132
+ maxPriorityFeePerGas?: bigint;
3133
+ nonce?: number;
3134
+ value?: bigint;
3135
+ }): Promise<void> {
3136
+ return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
3137
+ },
3138
+ /**
3139
+ * Simulate program
3140
+ * Returns gas estimate and result without sending transaction
3141
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3142
+ */
3143
+ async program(amount: bigint, program_: `0x${string}`, params: `0x${string}`, end: bigint, options?: {
3144
+ accessList?: import('viem').AccessList;
3145
+ authorizationList?: import('viem').AuthorizationList;
3146
+ chain?: import('viem').Chain | null;
3147
+ dataSuffix?: `0x${string}`;
3148
+ gas?: bigint;
3149
+ gasPrice?: bigint;
3150
+ maxFeePerGas?: bigint;
3151
+ maxPriorityFeePerGas?: bigint;
3152
+ nonce?: number;
3153
+ value?: bigint;
3154
+ }): Promise<bigint> {
3155
+ return contract.simulate.program([amount, program_, params, end] as const, options) as Promise<bigint>;
3156
+ },
3157
+ /**
3158
+ * Simulate refuse
3159
+ * Returns gas estimate and result without sending transaction
3160
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3161
+ */
3162
+ async refuse(id: bigint, options?: {
3163
+ accessList?: import('viem').AccessList;
3164
+ authorizationList?: import('viem').AuthorizationList;
3165
+ chain?: import('viem').Chain | null;
3166
+ dataSuffix?: `0x${string}`;
3167
+ gas?: bigint;
3168
+ gasPrice?: bigint;
3169
+ maxFeePerGas?: bigint;
3170
+ maxPriorityFeePerGas?: bigint;
3171
+ nonce?: number;
3172
+ value?: bigint;
3173
+ }): Promise<void> {
3174
+ return contract.simulate.refuse([id] as const, options) as Promise<void>;
3175
+ },
3176
+ /**
3177
+ * Simulate renounceOwnership
3178
+ * Returns gas estimate and result without sending transaction
3179
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3180
+ */
3181
+ async renounceOwnership(options?: {
3182
+ accessList?: import('viem').AccessList;
3183
+ authorizationList?: import('viem').AuthorizationList;
3184
+ chain?: import('viem').Chain | null;
3185
+ dataSuffix?: `0x${string}`;
3186
+ gas?: bigint;
3187
+ gasPrice?: bigint;
3188
+ maxFeePerGas?: bigint;
3189
+ maxPriorityFeePerGas?: bigint;
3190
+ nonce?: number;
3191
+ value?: bigint;
3192
+ }): Promise<void> {
3193
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
3194
+ },
3195
+ /**
3196
+ * Simulate requestOwnershipHandover
3197
+ * Returns gas estimate and result without sending transaction
3198
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3199
+ */
3200
+ async requestOwnershipHandover(options?: {
3201
+ accessList?: import('viem').AccessList;
3202
+ authorizationList?: import('viem').AuthorizationList;
3203
+ chain?: import('viem').Chain | null;
3204
+ dataSuffix?: `0x${string}`;
3205
+ gas?: bigint;
3206
+ gasPrice?: bigint;
3207
+ maxFeePerGas?: bigint;
3208
+ maxPriorityFeePerGas?: bigint;
3209
+ nonce?: number;
3210
+ value?: bigint;
3211
+ }): Promise<void> {
3212
+ return contract.simulate.requestOwnershipHandover(options) as Promise<void>;
3213
+ },
3214
+ /**
3215
+ * Simulate sell
3216
+ * Returns gas estimate and result without sending transaction
3217
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3218
+ */
3219
+ async sell(id: bigint, amount: bigint, minOut: bigint, options?: {
3220
+ accessList?: import('viem').AccessList;
3221
+ authorizationList?: import('viem').AuthorizationList;
3222
+ chain?: import('viem').Chain | null;
3223
+ dataSuffix?: `0x${string}`;
3224
+ gas?: bigint;
3225
+ gasPrice?: bigint;
3226
+ maxFeePerGas?: bigint;
3227
+ maxPriorityFeePerGas?: bigint;
3228
+ nonce?: number;
3229
+ value?: bigint;
3230
+ }): Promise<bigint> {
3231
+ return contract.simulate.sell([id, amount, minOut] as const, options) as Promise<bigint>;
3232
+ },
3233
+ /**
3234
+ * Simulate sellPlain
3235
+ * Returns gas estimate and result without sending transaction
3236
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3237
+ */
3238
+ async sellPlain(amount: bigint, minOut: bigint, options?: {
3239
+ accessList?: import('viem').AccessList;
3240
+ authorizationList?: import('viem').AuthorizationList;
3241
+ chain?: import('viem').Chain | null;
3242
+ dataSuffix?: `0x${string}`;
3243
+ gas?: bigint;
3244
+ gasPrice?: bigint;
3245
+ maxFeePerGas?: bigint;
3246
+ maxPriorityFeePerGas?: bigint;
3247
+ nonce?: number;
3248
+ value?: bigint;
3249
+ }): Promise<bigint> {
3250
+ return contract.simulate.sellPlain([amount, minOut] as const, options) as Promise<bigint>;
3251
+ },
3252
+ /**
3253
+ * Simulate send
3254
+ * Returns gas estimate and result without sending transaction
3255
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3256
+ */
3257
+ async send(id: bigint, to: `0x${string}`, amount: bigint, options?: {
3258
+ accessList?: import('viem').AccessList;
3259
+ authorizationList?: import('viem').AuthorizationList;
3260
+ chain?: import('viem').Chain | null;
3261
+ dataSuffix?: `0x${string}`;
3262
+ gas?: bigint;
3263
+ gasPrice?: bigint;
3264
+ maxFeePerGas?: bigint;
3265
+ maxPriorityFeePerGas?: bigint;
3266
+ nonce?: number;
3267
+ value?: bigint;
3268
+ }): Promise<bigint> {
3269
+ return contract.simulate.send([id, to, amount] as const, options) as Promise<bigint>;
3270
+ },
3271
+ /**
3272
+ * Simulate sendMany
3273
+ * Returns gas estimate and result without sending transaction
3274
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3275
+ */
3276
+ async sendMany(id: bigint, to: `0x${string}`[], amounts: bigint[], options?: {
3277
+ accessList?: import('viem').AccessList;
3278
+ authorizationList?: import('viem').AuthorizationList;
3279
+ chain?: import('viem').Chain | null;
3280
+ dataSuffix?: `0x${string}`;
3281
+ gas?: bigint;
3282
+ gasPrice?: bigint;
3283
+ maxFeePerGas?: bigint;
3284
+ maxPriorityFeePerGas?: bigint;
3285
+ nonce?: number;
3286
+ value?: bigint;
3287
+ }): Promise<bigint> {
3288
+ return contract.simulate.sendMany([id, to, amounts] as const, options) as Promise<bigint>;
3289
+ },
3290
+ /**
3291
+ * Simulate setAcceptsCode
3292
+ * Returns gas estimate and result without sending transaction
3293
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3294
+ */
3295
+ async setAcceptsCode(accepts: boolean, options?: {
3296
+ accessList?: import('viem').AccessList;
3297
+ authorizationList?: import('viem').AuthorizationList;
3298
+ chain?: import('viem').Chain | null;
3299
+ dataSuffix?: `0x${string}`;
3300
+ gas?: bigint;
3301
+ gasPrice?: bigint;
3302
+ maxFeePerGas?: bigint;
3303
+ maxPriorityFeePerGas?: bigint;
3304
+ nonce?: number;
3305
+ value?: bigint;
3306
+ }): Promise<void> {
3307
+ return contract.simulate.setAcceptsCode([accepts] as const, options) as Promise<void>;
3308
+ },
3309
+ /**
3310
+ * Simulate transfer
3311
+ * Returns gas estimate and result without sending transaction
3312
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3313
+ */
3314
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
3315
+ accessList?: import('viem').AccessList;
3316
+ authorizationList?: import('viem').AuthorizationList;
3317
+ chain?: import('viem').Chain | null;
3318
+ dataSuffix?: `0x${string}`;
3319
+ gas?: bigint;
3320
+ gasPrice?: bigint;
3321
+ maxFeePerGas?: bigint;
3322
+ maxPriorityFeePerGas?: bigint;
3323
+ nonce?: number;
3324
+ value?: bigint;
3325
+ }): Promise<boolean> {
3326
+ return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
3327
+ },
3328
+ /**
3329
+ * Simulate transferFrom
3330
+ * Returns gas estimate and result without sending transaction
3331
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3332
+ */
3333
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
3334
+ accessList?: import('viem').AccessList;
3335
+ authorizationList?: import('viem').AuthorizationList;
3336
+ chain?: import('viem').Chain | null;
3337
+ dataSuffix?: `0x${string}`;
3338
+ gas?: bigint;
3339
+ gasPrice?: bigint;
3340
+ maxFeePerGas?: bigint;
3341
+ maxPriorityFeePerGas?: bigint;
3342
+ nonce?: number;
3343
+ value?: bigint;
3344
+ }): Promise<boolean> {
3345
+ return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
3346
+ },
3347
+ /**
3348
+ * Simulate transferOwnership
3349
+ * Returns gas estimate and result without sending transaction
3350
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3351
+ */
3352
+ async transferOwnership(newOwner: `0x${string}`, options?: {
3353
+ accessList?: import('viem').AccessList;
3354
+ authorizationList?: import('viem').AuthorizationList;
3355
+ chain?: import('viem').Chain | null;
3356
+ dataSuffix?: `0x${string}`;
3357
+ gas?: bigint;
3358
+ gasPrice?: bigint;
3359
+ maxFeePerGas?: bigint;
3360
+ maxPriorityFeePerGas?: bigint;
3361
+ nonce?: number;
3362
+ value?: bigint;
3363
+ }): Promise<void> {
3364
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
3365
+ },
3366
+ /**
3367
+ * Simulate unlockCallback
3368
+ * Returns gas estimate and result without sending transaction
3369
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3370
+ */
3371
+ async unlockCallback(data: `0x${string}`, options?: {
3372
+ accessList?: import('viem').AccessList;
3373
+ authorizationList?: import('viem').AuthorizationList;
3374
+ chain?: import('viem').Chain | null;
3375
+ dataSuffix?: `0x${string}`;
3376
+ gas?: bigint;
3377
+ gasPrice?: bigint;
3378
+ maxFeePerGas?: bigint;
3379
+ maxPriorityFeePerGas?: bigint;
3380
+ nonce?: number;
3381
+ value?: bigint;
3382
+ }): Promise<`0x${string}`> {
3383
+ return contract.simulate.unlockCallback([data] as const, options) as Promise<`0x${string}`>;
3384
+ }
3385
+ };
3386
+ }
3387
+
3388
+ /**
3389
+ * Watch contract events
3390
+ *
3391
+ * @example
3392
+ * // Watch all Transfer events
3393
+ * const unwatch = contract.watch.Transfer((event) => {
3394
+ * console.log('Transfer:', event);
3395
+ * });
3396
+ *
3397
+ * // Stop watching
3398
+ * unwatch();
3399
+ */
3400
+ get watch() {
3401
+ return {
3402
+ /**
3403
+ * Watch Approval events
3404
+ * @param callback Function to call when event is emitted
3405
+ * @param filter Optional filter for indexed parameters
3406
+ * @returns Unwatch function to stop listening
3407
+ */
3408
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; amount: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
3409
+ return this.publicClient.watchContractEvent({
3410
+ address: this.contractAddress,
3411
+ abi: Polypheme_jsonAbi,
3412
+ eventName: 'Approval',
3413
+ args: filter,
3414
+ onLogs: (logs: any[]) => {
3415
+ logs.forEach((log: any) => {
3416
+ callback(log.args as any);
3417
+ });
3418
+ },
3419
+ }) as () => void;
3420
+ },
3421
+ /**
3422
+ * Watch Bought events
3423
+ * @param callback Function to call when event is emitted
3424
+ * @param filter Optional filter for indexed parameters
3425
+ * @returns Unwatch function to stop listening
3426
+ */
3427
+ Bought: (callback: (event: { buyer: `0x${string}`; ethIn: bigint; unitsOut: bigint }) => void, filter?: { buyer: `0x${string}` }) => {
3428
+ return this.publicClient.watchContractEvent({
3429
+ address: this.contractAddress,
3430
+ abi: Polypheme_jsonAbi,
3431
+ eventName: 'Bought',
3432
+ args: filter,
3433
+ onLogs: (logs: any[]) => {
3434
+ logs.forEach((log: any) => {
3435
+ callback(log.args as any);
3436
+ });
3437
+ },
3438
+ }) as () => void;
3439
+ },
3440
+ /**
3441
+ * Watch Claimed events
3442
+ * @param callback Function to call when event is emitted
3443
+ * @param filter Optional filter for indexed parameters
3444
+ * @returns Unwatch function to stop listening
3445
+ */
3446
+ Claimed: (callback: (event: { owner: `0x${string}`; eth: bigint }) => void, filter?: { owner: `0x${string}` }) => {
3447
+ return this.publicClient.watchContractEvent({
3448
+ address: this.contractAddress,
3449
+ abi: Polypheme_jsonAbi,
3450
+ eventName: 'Claimed',
3451
+ args: filter,
3452
+ onLogs: (logs: any[]) => {
3453
+ logs.forEach((log: any) => {
3454
+ callback(log.args as any);
3455
+ });
3456
+ },
3457
+ }) as () => void;
3458
+ },
3459
+ /**
3460
+ * Watch CodeAcceptance events
3461
+ * @param callback Function to call when event is emitted
3462
+ * @param filter Optional filter for indexed parameters
3463
+ * @returns Unwatch function to stop listening
3464
+ */
3465
+ CodeAcceptance: (callback: (event: { who: `0x${string}`; accepts: boolean }) => void, filter?: { who: `0x${string}` }) => {
3466
+ return this.publicClient.watchContractEvent({
3467
+ address: this.contractAddress,
3468
+ abi: Polypheme_jsonAbi,
3469
+ eventName: 'CodeAcceptance',
3470
+ args: filter,
3471
+ onLogs: (logs: any[]) => {
3472
+ logs.forEach((log: any) => {
3473
+ callback(log.args as any);
3474
+ });
3475
+ },
3476
+ }) as () => void;
3477
+ },
3478
+ /**
3479
+ * Watch Disarmed events
3480
+ * @param callback Function to call when event is emitted
3481
+ * @param filter Optional filter for indexed parameters
3482
+ * @returns Unwatch function to stop listening
3483
+ */
3484
+ Disarmed: (callback: (event: { id: bigint }) => void, filter?: { id: bigint }) => {
3485
+ return this.publicClient.watchContractEvent({
3486
+ address: this.contractAddress,
3487
+ abi: Polypheme_jsonAbi,
3488
+ eventName: 'Disarmed',
3489
+ args: filter,
3490
+ onLogs: (logs: any[]) => {
3491
+ logs.forEach((log: any) => {
3492
+ callback(log.args as any);
3493
+ });
3494
+ },
3495
+ }) as () => void;
3496
+ },
3497
+ /**
3498
+ * Watch Erased events
3499
+ * @param callback Function to call when event is emitted
3500
+ * @param filter Optional filter for indexed parameters
3501
+ * @returns Unwatch function to stop listening
3502
+ */
3503
+ Erased: (callback: (event: { id: bigint; owner: `0x${string}`; amount: bigint; byPool: boolean }) => void, filter?: { id: bigint; owner: `0x${string}` }) => {
3504
+ return this.publicClient.watchContractEvent({
3505
+ address: this.contractAddress,
3506
+ abi: Polypheme_jsonAbi,
3507
+ eventName: 'Erased',
3508
+ args: filter,
3509
+ onLogs: (logs: any[]) => {
3510
+ logs.forEach((log: any) => {
3511
+ callback(log.args as any);
3512
+ });
3513
+ },
3514
+ }) as () => void;
3515
+ },
3516
+ /**
3517
+ * Watch Extended events
3518
+ * @param callback Function to call when event is emitted
3519
+ * @param filter Optional filter for indexed parameters
3520
+ * @returns Unwatch function to stop listening
3521
+ */
3522
+ Extended: (callback: (event: { id: bigint; oldEnd: bigint; newEnd: bigint; fee: bigint }) => void, filter?: { id: bigint }) => {
3523
+ return this.publicClient.watchContractEvent({
3524
+ address: this.contractAddress,
3525
+ abi: Polypheme_jsonAbi,
3526
+ eventName: 'Extended',
3527
+ args: filter,
3528
+ onLogs: (logs: any[]) => {
3529
+ logs.forEach((log: any) => {
3530
+ callback(log.args as any);
3531
+ });
3532
+ },
3533
+ }) as () => void;
3534
+ },
3535
+ /**
3536
+ * Watch FeePaid events
3537
+ * @param callback Function to call when event is emitted
3538
+ * @param filter Optional filter for indexed parameters
3539
+ * @returns Unwatch function to stop listening
3540
+ */
3541
+ FeePaid: (callback: (event: { id: bigint; fee: bigint }) => void, filter?: { id: bigint }) => {
3542
+ return this.publicClient.watchContractEvent({
3543
+ address: this.contractAddress,
3544
+ abi: Polypheme_jsonAbi,
3545
+ eventName: 'FeePaid',
3546
+ args: filter,
3547
+ onLogs: (logs: any[]) => {
3548
+ logs.forEach((log: any) => {
3549
+ callback(log.args as any);
3550
+ });
3551
+ },
3552
+ }) as () => void;
3553
+ },
3554
+ /**
3555
+ * Watch Marked events
3556
+ * @param callback Function to call when event is emitted
3557
+ * @param filter Optional filter for indexed parameters
3558
+ * @returns Unwatch function to stop listening
3559
+ */
3560
+ Marked: (callback: (event: { id: bigint; note: `0x${string}` }) => void, filter?: { id: bigint }) => {
3561
+ return this.publicClient.watchContractEvent({
3562
+ address: this.contractAddress,
3563
+ abi: Polypheme_jsonAbi,
3564
+ eventName: 'Marked',
3565
+ args: filter,
3566
+ onLogs: (logs: any[]) => {
3567
+ logs.forEach((log: any) => {
3568
+ callback(log.args as any);
3569
+ });
3570
+ },
3571
+ }) as () => void;
3572
+ },
3573
+ /**
3574
+ * Watch OwnershipHandoverCanceled events
3575
+ * @param callback Function to call when event is emitted
3576
+ * @param filter Optional filter for indexed parameters
3577
+ * @returns Unwatch function to stop listening
3578
+ */
3579
+ OwnershipHandoverCanceled: (callback: (event: { pendingOwner: `0x${string}` }) => void, filter?: { pendingOwner: `0x${string}` }) => {
3580
+ return this.publicClient.watchContractEvent({
3581
+ address: this.contractAddress,
3582
+ abi: Polypheme_jsonAbi,
3583
+ eventName: 'OwnershipHandoverCanceled',
3584
+ args: filter,
3585
+ onLogs: (logs: any[]) => {
3586
+ logs.forEach((log: any) => {
3587
+ callback(log.args as any);
3588
+ });
3589
+ },
3590
+ }) as () => void;
3591
+ },
3592
+ /**
3593
+ * Watch OwnershipHandoverRequested events
3594
+ * @param callback Function to call when event is emitted
3595
+ * @param filter Optional filter for indexed parameters
3596
+ * @returns Unwatch function to stop listening
3597
+ */
3598
+ OwnershipHandoverRequested: (callback: (event: { pendingOwner: `0x${string}` }) => void, filter?: { pendingOwner: `0x${string}` }) => {
3599
+ return this.publicClient.watchContractEvent({
3600
+ address: this.contractAddress,
3601
+ abi: Polypheme_jsonAbi,
3602
+ eventName: 'OwnershipHandoverRequested',
3603
+ args: filter,
3604
+ onLogs: (logs: any[]) => {
3605
+ logs.forEach((log: any) => {
3606
+ callback(log.args as any);
3607
+ });
3608
+ },
3609
+ }) as () => void;
3610
+ },
3611
+ /**
3612
+ * Watch OwnershipTransferred events
3613
+ * @param callback Function to call when event is emitted
3614
+ * @param filter Optional filter for indexed parameters
3615
+ * @returns Unwatch function to stop listening
3616
+ */
3617
+ OwnershipTransferred: (callback: (event: { oldOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { oldOwner: `0x${string}`; newOwner: `0x${string}` }) => {
3618
+ return this.publicClient.watchContractEvent({
3619
+ address: this.contractAddress,
3620
+ abi: Polypheme_jsonAbi,
3621
+ eventName: 'OwnershipTransferred',
3622
+ args: filter,
3623
+ onLogs: (logs: any[]) => {
3624
+ logs.forEach((log: any) => {
3625
+ callback(log.args as any);
3626
+ });
3627
+ },
3628
+ }) as () => void;
3629
+ },
3630
+ /**
3631
+ * Watch Programmed events
3632
+ * @param callback Function to call when event is emitted
3633
+ * @param filter Optional filter for indexed parameters
3634
+ * @returns Unwatch function to stop listening
3635
+ */
3636
+ Programmed: (callback: (event: { id: bigint; owner: `0x${string}`; program: `0x${string}`; amount: bigint; end: bigint; params: `0x${string}` }) => void, filter?: { id: bigint; owner: `0x${string}`; program: `0x${string}` }) => {
3637
+ return this.publicClient.watchContractEvent({
3638
+ address: this.contractAddress,
3639
+ abi: Polypheme_jsonAbi,
3640
+ eventName: 'Programmed',
3641
+ args: filter,
3642
+ onLogs: (logs: any[]) => {
3643
+ logs.forEach((log: any) => {
3644
+ callback(log.args as any);
3645
+ });
3646
+ },
3647
+ }) as () => void;
3648
+ },
3649
+ /**
3650
+ * Watch Refused events
3651
+ * @param callback Function to call when event is emitted
3652
+ * @param filter Optional filter for indexed parameters
3653
+ * @returns Unwatch function to stop listening
3654
+ */
3655
+ Refused: (callback: (event: { id: bigint; owner: `0x${string}`; amount: bigint }) => void, filter?: { id: bigint; owner: `0x${string}` }) => {
3656
+ return this.publicClient.watchContractEvent({
3657
+ address: this.contractAddress,
3658
+ abi: Polypheme_jsonAbi,
3659
+ eventName: 'Refused',
3660
+ args: filter,
3661
+ onLogs: (logs: any[]) => {
3662
+ logs.forEach((log: any) => {
3663
+ callback(log.args as any);
3664
+ });
3665
+ },
3666
+ }) as () => void;
3667
+ },
3668
+ /**
3669
+ * Watch Sent events
3670
+ * @param callback Function to call when event is emitted
3671
+ * @param filter Optional filter for indexed parameters
3672
+ * @returns Unwatch function to stop listening
3673
+ */
3674
+ Sent: (callback: (event: { id: bigint; newId: bigint; to: `0x${string}`; from: `0x${string}`; amount: bigint }) => void, filter?: { id: bigint; newId: bigint; to: `0x${string}` }) => {
3675
+ return this.publicClient.watchContractEvent({
3676
+ address: this.contractAddress,
3677
+ abi: Polypheme_jsonAbi,
3678
+ eventName: 'Sent',
3679
+ args: filter,
3680
+ onLogs: (logs: any[]) => {
3681
+ logs.forEach((log: any) => {
3682
+ callback(log.args as any);
3683
+ });
3684
+ },
3685
+ }) as () => void;
3686
+ },
3687
+ /**
3688
+ * Watch Sold events
3689
+ * @param callback Function to call when event is emitted
3690
+ * @param filter Optional filter for indexed parameters
3691
+ * @returns Unwatch function to stop listening
3692
+ */
3693
+ Sold: (callback: (event: { id: bigint; owner: `0x${string}`; amount: bigint; ethOut: bigint }) => void, filter?: { id: bigint; owner: `0x${string}` }) => {
3694
+ return this.publicClient.watchContractEvent({
3695
+ address: this.contractAddress,
3696
+ abi: Polypheme_jsonAbi,
3697
+ eventName: 'Sold',
3698
+ args: filter,
3699
+ onLogs: (logs: any[]) => {
3700
+ logs.forEach((log: any) => {
3701
+ callback(log.args as any);
3702
+ });
3703
+ },
3704
+ }) as () => void;
3705
+ },
3706
+ /**
3707
+ * Watch SoldFor events
3708
+ * @param callback Function to call when event is emitted
3709
+ * @param filter Optional filter for indexed parameters
3710
+ * @returns Unwatch function to stop listening
3711
+ */
3712
+ SoldFor: (callback: (event: { id: bigint; caller: `0x${string}`; units: bigint; ethOut: bigint; tip: bigint }) => void, filter?: { id: bigint; caller: `0x${string}` }) => {
3713
+ return this.publicClient.watchContractEvent({
3714
+ address: this.contractAddress,
3715
+ abi: Polypheme_jsonAbi,
3716
+ eventName: 'SoldFor',
3717
+ args: filter,
3718
+ onLogs: (logs: any[]) => {
3719
+ logs.forEach((log: any) => {
3720
+ callback(log.args as any);
3721
+ });
3722
+ },
3723
+ }) as () => void;
3724
+ },
3725
+ /**
3726
+ * Watch SoldPlain events
3727
+ * @param callback Function to call when event is emitted
3728
+ * @param filter Optional filter for indexed parameters
3729
+ * @returns Unwatch function to stop listening
3730
+ */
3731
+ SoldPlain: (callback: (event: { seller: `0x${string}`; unitsIn: bigint; ethOut: bigint }) => void, filter?: { seller: `0x${string}` }) => {
3732
+ return this.publicClient.watchContractEvent({
3733
+ address: this.contractAddress,
3734
+ abi: Polypheme_jsonAbi,
3735
+ eventName: 'SoldPlain',
3736
+ args: filter,
3737
+ onLogs: (logs: any[]) => {
3738
+ logs.forEach((log: any) => {
3739
+ callback(log.args as any);
3740
+ });
3741
+ },
3742
+ }) as () => void;
3743
+ },
3744
+ /**
3745
+ * Watch Taken events
3746
+ * @param callback Function to call when event is emitted
3747
+ * @param filter Optional filter for indexed parameters
3748
+ * @returns Unwatch function to stop listening
3749
+ */
3750
+ Taken: (callback: (event: { id: bigint; from: `0x${string}`; to: `0x${string}`; cost: bigint }) => void, filter?: { id: bigint; from: `0x${string}`; to: `0x${string}` }) => {
3751
+ return this.publicClient.watchContractEvent({
3752
+ address: this.contractAddress,
3753
+ abi: Polypheme_jsonAbi,
3754
+ eventName: 'Taken',
3755
+ args: filter,
3756
+ onLogs: (logs: any[]) => {
3757
+ logs.forEach((log: any) => {
3758
+ callback(log.args as any);
3759
+ });
3760
+ },
3761
+ }) as () => void;
3762
+ },
3763
+ /**
3764
+ * Watch Transfer events
3765
+ * @param callback Function to call when event is emitted
3766
+ * @param filter Optional filter for indexed parameters
3767
+ * @returns Unwatch function to stop listening
3768
+ */
3769
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; amount: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
3770
+ return this.publicClient.watchContractEvent({
3771
+ address: this.contractAddress,
3772
+ abi: Polypheme_jsonAbi,
3773
+ eventName: 'Transfer',
3774
+ args: filter,
3775
+ onLogs: (logs: any[]) => {
3776
+ logs.forEach((log: any) => {
3777
+ callback(log.args as any);
3778
+ });
3779
+ },
3780
+ }) as () => void;
3781
+ }
3782
+ };
3783
+ }
3784
+ }