@gitmyabi/eth2x-fli 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,2832 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * ISetToken.Position struct type
7
+ */
8
+ export type ISetToken_Position = {
9
+ component: `0x${string}`;
10
+ module: `0x${string}`;
11
+ unit: bigint;
12
+ positionState: bigint;
13
+ data: `0x${string}`;
14
+ };
15
+ /**
16
+ * SetToken_json ABI
17
+ *
18
+ * This ABI is typed using viem's type system for full type safety.
19
+ */
20
+ export const SetToken_jsonAbi = [
21
+ {
22
+ "inputs": [
23
+ {
24
+ "internalType": "address[]",
25
+ "name": "_components",
26
+ "type": "address[]"
27
+ },
28
+ {
29
+ "internalType": "int256[]",
30
+ "name": "_units",
31
+ "type": "int256[]"
32
+ },
33
+ {
34
+ "internalType": "address[]",
35
+ "name": "_modules",
36
+ "type": "address[]"
37
+ },
38
+ {
39
+ "internalType": "contract IController",
40
+ "name": "_controller",
41
+ "type": "address"
42
+ },
43
+ {
44
+ "internalType": "address",
45
+ "name": "_manager",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "internalType": "string",
50
+ "name": "_name",
51
+ "type": "string"
52
+ },
53
+ {
54
+ "internalType": "string",
55
+ "name": "_symbol",
56
+ "type": "string"
57
+ }
58
+ ],
59
+ "stateMutability": "nonpayable",
60
+ "type": "constructor"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [
65
+ {
66
+ "indexed": true,
67
+ "internalType": "address",
68
+ "name": "owner",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "spender",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "internalType": "uint256",
80
+ "name": "value",
81
+ "type": "uint256"
82
+ }
83
+ ],
84
+ "name": "Approval",
85
+ "type": "event"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": true,
92
+ "internalType": "address",
93
+ "name": "_component",
94
+ "type": "address"
95
+ }
96
+ ],
97
+ "name": "ComponentAdded",
98
+ "type": "event"
99
+ },
100
+ {
101
+ "anonymous": false,
102
+ "inputs": [
103
+ {
104
+ "indexed": true,
105
+ "internalType": "address",
106
+ "name": "_component",
107
+ "type": "address"
108
+ }
109
+ ],
110
+ "name": "ComponentRemoved",
111
+ "type": "event"
112
+ },
113
+ {
114
+ "anonymous": false,
115
+ "inputs": [
116
+ {
117
+ "indexed": true,
118
+ "internalType": "address",
119
+ "name": "_component",
120
+ "type": "address"
121
+ },
122
+ {
123
+ "indexed": false,
124
+ "internalType": "int256",
125
+ "name": "_realUnit",
126
+ "type": "int256"
127
+ }
128
+ ],
129
+ "name": "DefaultPositionUnitEdited",
130
+ "type": "event"
131
+ },
132
+ {
133
+ "anonymous": false,
134
+ "inputs": [
135
+ {
136
+ "indexed": true,
137
+ "internalType": "address",
138
+ "name": "_component",
139
+ "type": "address"
140
+ },
141
+ {
142
+ "indexed": true,
143
+ "internalType": "address",
144
+ "name": "_positionModule",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "indexed": false,
149
+ "internalType": "bytes",
150
+ "name": "_data",
151
+ "type": "bytes"
152
+ }
153
+ ],
154
+ "name": "ExternalPositionDataEdited",
155
+ "type": "event"
156
+ },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": true,
162
+ "internalType": "address",
163
+ "name": "_component",
164
+ "type": "address"
165
+ },
166
+ {
167
+ "indexed": true,
168
+ "internalType": "address",
169
+ "name": "_positionModule",
170
+ "type": "address"
171
+ },
172
+ {
173
+ "indexed": false,
174
+ "internalType": "int256",
175
+ "name": "_realUnit",
176
+ "type": "int256"
177
+ }
178
+ ],
179
+ "name": "ExternalPositionUnitEdited",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "anonymous": false,
184
+ "inputs": [
185
+ {
186
+ "indexed": true,
187
+ "internalType": "address",
188
+ "name": "_target",
189
+ "type": "address"
190
+ },
191
+ {
192
+ "indexed": true,
193
+ "internalType": "uint256",
194
+ "name": "_value",
195
+ "type": "uint256"
196
+ },
197
+ {
198
+ "indexed": false,
199
+ "internalType": "bytes",
200
+ "name": "_data",
201
+ "type": "bytes"
202
+ },
203
+ {
204
+ "indexed": false,
205
+ "internalType": "bytes",
206
+ "name": "_returnValue",
207
+ "type": "bytes"
208
+ }
209
+ ],
210
+ "name": "Invoked",
211
+ "type": "event"
212
+ },
213
+ {
214
+ "anonymous": false,
215
+ "inputs": [
216
+ {
217
+ "indexed": false,
218
+ "internalType": "address",
219
+ "name": "_newManager",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "indexed": false,
224
+ "internalType": "address",
225
+ "name": "_oldManager",
226
+ "type": "address"
227
+ }
228
+ ],
229
+ "name": "ManagerEdited",
230
+ "type": "event"
231
+ },
232
+ {
233
+ "anonymous": false,
234
+ "inputs": [
235
+ {
236
+ "indexed": true,
237
+ "internalType": "address",
238
+ "name": "_module",
239
+ "type": "address"
240
+ }
241
+ ],
242
+ "name": "ModuleAdded",
243
+ "type": "event"
244
+ },
245
+ {
246
+ "anonymous": false,
247
+ "inputs": [
248
+ {
249
+ "indexed": true,
250
+ "internalType": "address",
251
+ "name": "_module",
252
+ "type": "address"
253
+ }
254
+ ],
255
+ "name": "ModuleInitialized",
256
+ "type": "event"
257
+ },
258
+ {
259
+ "anonymous": false,
260
+ "inputs": [
261
+ {
262
+ "indexed": true,
263
+ "internalType": "address",
264
+ "name": "_module",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "name": "ModuleRemoved",
269
+ "type": "event"
270
+ },
271
+ {
272
+ "anonymous": false,
273
+ "inputs": [
274
+ {
275
+ "indexed": true,
276
+ "internalType": "address",
277
+ "name": "_module",
278
+ "type": "address"
279
+ }
280
+ ],
281
+ "name": "PendingModuleRemoved",
282
+ "type": "event"
283
+ },
284
+ {
285
+ "anonymous": false,
286
+ "inputs": [
287
+ {
288
+ "indexed": true,
289
+ "internalType": "address",
290
+ "name": "_component",
291
+ "type": "address"
292
+ },
293
+ {
294
+ "indexed": true,
295
+ "internalType": "address",
296
+ "name": "_positionModule",
297
+ "type": "address"
298
+ }
299
+ ],
300
+ "name": "PositionModuleAdded",
301
+ "type": "event"
302
+ },
303
+ {
304
+ "anonymous": false,
305
+ "inputs": [
306
+ {
307
+ "indexed": true,
308
+ "internalType": "address",
309
+ "name": "_component",
310
+ "type": "address"
311
+ },
312
+ {
313
+ "indexed": true,
314
+ "internalType": "address",
315
+ "name": "_positionModule",
316
+ "type": "address"
317
+ }
318
+ ],
319
+ "name": "PositionModuleRemoved",
320
+ "type": "event"
321
+ },
322
+ {
323
+ "anonymous": false,
324
+ "inputs": [
325
+ {
326
+ "indexed": false,
327
+ "internalType": "int256",
328
+ "name": "_newMultiplier",
329
+ "type": "int256"
330
+ }
331
+ ],
332
+ "name": "PositionMultiplierEdited",
333
+ "type": "event"
334
+ },
335
+ {
336
+ "anonymous": false,
337
+ "inputs": [
338
+ {
339
+ "indexed": true,
340
+ "internalType": "address",
341
+ "name": "from",
342
+ "type": "address"
343
+ },
344
+ {
345
+ "indexed": true,
346
+ "internalType": "address",
347
+ "name": "to",
348
+ "type": "address"
349
+ },
350
+ {
351
+ "indexed": false,
352
+ "internalType": "uint256",
353
+ "name": "value",
354
+ "type": "uint256"
355
+ }
356
+ ],
357
+ "name": "Transfer",
358
+ "type": "event"
359
+ },
360
+ {
361
+ "inputs": [
362
+ {
363
+ "internalType": "address",
364
+ "name": "_component",
365
+ "type": "address"
366
+ }
367
+ ],
368
+ "name": "addComponent",
369
+ "outputs": [],
370
+ "stateMutability": "nonpayable",
371
+ "type": "function"
372
+ },
373
+ {
374
+ "inputs": [
375
+ {
376
+ "internalType": "address",
377
+ "name": "_component",
378
+ "type": "address"
379
+ },
380
+ {
381
+ "internalType": "address",
382
+ "name": "_positionModule",
383
+ "type": "address"
384
+ }
385
+ ],
386
+ "name": "addExternalPositionModule",
387
+ "outputs": [],
388
+ "stateMutability": "nonpayable",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "inputs": [
393
+ {
394
+ "internalType": "address",
395
+ "name": "_module",
396
+ "type": "address"
397
+ }
398
+ ],
399
+ "name": "addModule",
400
+ "outputs": [],
401
+ "stateMutability": "nonpayable",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "address",
408
+ "name": "owner",
409
+ "type": "address"
410
+ },
411
+ {
412
+ "internalType": "address",
413
+ "name": "spender",
414
+ "type": "address"
415
+ }
416
+ ],
417
+ "name": "allowance",
418
+ "outputs": [
419
+ {
420
+ "internalType": "uint256",
421
+ "name": "",
422
+ "type": "uint256"
423
+ }
424
+ ],
425
+ "stateMutability": "view",
426
+ "type": "function"
427
+ },
428
+ {
429
+ "inputs": [
430
+ {
431
+ "internalType": "address",
432
+ "name": "spender",
433
+ "type": "address"
434
+ },
435
+ {
436
+ "internalType": "uint256",
437
+ "name": "amount",
438
+ "type": "uint256"
439
+ }
440
+ ],
441
+ "name": "approve",
442
+ "outputs": [
443
+ {
444
+ "internalType": "bool",
445
+ "name": "",
446
+ "type": "bool"
447
+ }
448
+ ],
449
+ "stateMutability": "nonpayable",
450
+ "type": "function"
451
+ },
452
+ {
453
+ "inputs": [
454
+ {
455
+ "internalType": "address",
456
+ "name": "account",
457
+ "type": "address"
458
+ }
459
+ ],
460
+ "name": "balanceOf",
461
+ "outputs": [
462
+ {
463
+ "internalType": "uint256",
464
+ "name": "",
465
+ "type": "uint256"
466
+ }
467
+ ],
468
+ "stateMutability": "view",
469
+ "type": "function"
470
+ },
471
+ {
472
+ "inputs": [
473
+ {
474
+ "internalType": "address",
475
+ "name": "_account",
476
+ "type": "address"
477
+ },
478
+ {
479
+ "internalType": "uint256",
480
+ "name": "_quantity",
481
+ "type": "uint256"
482
+ }
483
+ ],
484
+ "name": "burn",
485
+ "outputs": [],
486
+ "stateMutability": "nonpayable",
487
+ "type": "function"
488
+ },
489
+ {
490
+ "inputs": [
491
+ {
492
+ "internalType": "uint256",
493
+ "name": "",
494
+ "type": "uint256"
495
+ }
496
+ ],
497
+ "name": "components",
498
+ "outputs": [
499
+ {
500
+ "internalType": "address",
501
+ "name": "",
502
+ "type": "address"
503
+ }
504
+ ],
505
+ "stateMutability": "view",
506
+ "type": "function"
507
+ },
508
+ {
509
+ "inputs": [],
510
+ "name": "controller",
511
+ "outputs": [
512
+ {
513
+ "internalType": "contract IController",
514
+ "name": "",
515
+ "type": "address"
516
+ }
517
+ ],
518
+ "stateMutability": "view",
519
+ "type": "function"
520
+ },
521
+ {
522
+ "inputs": [],
523
+ "name": "decimals",
524
+ "outputs": [
525
+ {
526
+ "internalType": "uint8",
527
+ "name": "",
528
+ "type": "uint8"
529
+ }
530
+ ],
531
+ "stateMutability": "view",
532
+ "type": "function"
533
+ },
534
+ {
535
+ "inputs": [
536
+ {
537
+ "internalType": "address",
538
+ "name": "spender",
539
+ "type": "address"
540
+ },
541
+ {
542
+ "internalType": "uint256",
543
+ "name": "subtractedValue",
544
+ "type": "uint256"
545
+ }
546
+ ],
547
+ "name": "decreaseAllowance",
548
+ "outputs": [
549
+ {
550
+ "internalType": "bool",
551
+ "name": "",
552
+ "type": "bool"
553
+ }
554
+ ],
555
+ "stateMutability": "nonpayable",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [
560
+ {
561
+ "internalType": "address",
562
+ "name": "_component",
563
+ "type": "address"
564
+ },
565
+ {
566
+ "internalType": "int256",
567
+ "name": "_realUnit",
568
+ "type": "int256"
569
+ }
570
+ ],
571
+ "name": "editDefaultPositionUnit",
572
+ "outputs": [],
573
+ "stateMutability": "nonpayable",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [
578
+ {
579
+ "internalType": "address",
580
+ "name": "_component",
581
+ "type": "address"
582
+ },
583
+ {
584
+ "internalType": "address",
585
+ "name": "_positionModule",
586
+ "type": "address"
587
+ },
588
+ {
589
+ "internalType": "bytes",
590
+ "name": "_data",
591
+ "type": "bytes"
592
+ }
593
+ ],
594
+ "name": "editExternalPositionData",
595
+ "outputs": [],
596
+ "stateMutability": "nonpayable",
597
+ "type": "function"
598
+ },
599
+ {
600
+ "inputs": [
601
+ {
602
+ "internalType": "address",
603
+ "name": "_component",
604
+ "type": "address"
605
+ },
606
+ {
607
+ "internalType": "address",
608
+ "name": "_positionModule",
609
+ "type": "address"
610
+ },
611
+ {
612
+ "internalType": "int256",
613
+ "name": "_realUnit",
614
+ "type": "int256"
615
+ }
616
+ ],
617
+ "name": "editExternalPositionUnit",
618
+ "outputs": [],
619
+ "stateMutability": "nonpayable",
620
+ "type": "function"
621
+ },
622
+ {
623
+ "inputs": [
624
+ {
625
+ "internalType": "int256",
626
+ "name": "_newMultiplier",
627
+ "type": "int256"
628
+ }
629
+ ],
630
+ "name": "editPositionMultiplier",
631
+ "outputs": [],
632
+ "stateMutability": "nonpayable",
633
+ "type": "function"
634
+ },
635
+ {
636
+ "inputs": [],
637
+ "name": "getComponents",
638
+ "outputs": [
639
+ {
640
+ "internalType": "address[]",
641
+ "name": "",
642
+ "type": "address[]"
643
+ }
644
+ ],
645
+ "stateMutability": "view",
646
+ "type": "function"
647
+ },
648
+ {
649
+ "inputs": [
650
+ {
651
+ "internalType": "address",
652
+ "name": "_component",
653
+ "type": "address"
654
+ }
655
+ ],
656
+ "name": "getDefaultPositionRealUnit",
657
+ "outputs": [
658
+ {
659
+ "internalType": "int256",
660
+ "name": "",
661
+ "type": "int256"
662
+ }
663
+ ],
664
+ "stateMutability": "view",
665
+ "type": "function"
666
+ },
667
+ {
668
+ "inputs": [
669
+ {
670
+ "internalType": "address",
671
+ "name": "_component",
672
+ "type": "address"
673
+ },
674
+ {
675
+ "internalType": "address",
676
+ "name": "_positionModule",
677
+ "type": "address"
678
+ }
679
+ ],
680
+ "name": "getExternalPositionData",
681
+ "outputs": [
682
+ {
683
+ "internalType": "bytes",
684
+ "name": "",
685
+ "type": "bytes"
686
+ }
687
+ ],
688
+ "stateMutability": "view",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "address",
695
+ "name": "_component",
696
+ "type": "address"
697
+ }
698
+ ],
699
+ "name": "getExternalPositionModules",
700
+ "outputs": [
701
+ {
702
+ "internalType": "address[]",
703
+ "name": "",
704
+ "type": "address[]"
705
+ }
706
+ ],
707
+ "stateMutability": "view",
708
+ "type": "function"
709
+ },
710
+ {
711
+ "inputs": [
712
+ {
713
+ "internalType": "address",
714
+ "name": "_component",
715
+ "type": "address"
716
+ },
717
+ {
718
+ "internalType": "address",
719
+ "name": "_positionModule",
720
+ "type": "address"
721
+ }
722
+ ],
723
+ "name": "getExternalPositionRealUnit",
724
+ "outputs": [
725
+ {
726
+ "internalType": "int256",
727
+ "name": "",
728
+ "type": "int256"
729
+ }
730
+ ],
731
+ "stateMutability": "view",
732
+ "type": "function"
733
+ },
734
+ {
735
+ "inputs": [],
736
+ "name": "getModules",
737
+ "outputs": [
738
+ {
739
+ "internalType": "address[]",
740
+ "name": "",
741
+ "type": "address[]"
742
+ }
743
+ ],
744
+ "stateMutability": "view",
745
+ "type": "function"
746
+ },
747
+ {
748
+ "inputs": [],
749
+ "name": "getPositions",
750
+ "outputs": [
751
+ {
752
+ "components": [
753
+ {
754
+ "internalType": "address",
755
+ "name": "component",
756
+ "type": "address"
757
+ },
758
+ {
759
+ "internalType": "address",
760
+ "name": "module",
761
+ "type": "address"
762
+ },
763
+ {
764
+ "internalType": "int256",
765
+ "name": "unit",
766
+ "type": "int256"
767
+ },
768
+ {
769
+ "internalType": "uint8",
770
+ "name": "positionState",
771
+ "type": "uint8"
772
+ },
773
+ {
774
+ "internalType": "bytes",
775
+ "name": "data",
776
+ "type": "bytes"
777
+ }
778
+ ],
779
+ "internalType": "struct ISetToken.Position[]",
780
+ "name": "",
781
+ "type": "tuple[]"
782
+ }
783
+ ],
784
+ "stateMutability": "view",
785
+ "type": "function"
786
+ },
787
+ {
788
+ "inputs": [
789
+ {
790
+ "internalType": "address",
791
+ "name": "_component",
792
+ "type": "address"
793
+ }
794
+ ],
795
+ "name": "getTotalComponentRealUnits",
796
+ "outputs": [
797
+ {
798
+ "internalType": "int256",
799
+ "name": "",
800
+ "type": "int256"
801
+ }
802
+ ],
803
+ "stateMutability": "view",
804
+ "type": "function"
805
+ },
806
+ {
807
+ "inputs": [
808
+ {
809
+ "internalType": "address",
810
+ "name": "spender",
811
+ "type": "address"
812
+ },
813
+ {
814
+ "internalType": "uint256",
815
+ "name": "addedValue",
816
+ "type": "uint256"
817
+ }
818
+ ],
819
+ "name": "increaseAllowance",
820
+ "outputs": [
821
+ {
822
+ "internalType": "bool",
823
+ "name": "",
824
+ "type": "bool"
825
+ }
826
+ ],
827
+ "stateMutability": "nonpayable",
828
+ "type": "function"
829
+ },
830
+ {
831
+ "inputs": [],
832
+ "name": "initializeModule",
833
+ "outputs": [],
834
+ "stateMutability": "nonpayable",
835
+ "type": "function"
836
+ },
837
+ {
838
+ "inputs": [
839
+ {
840
+ "internalType": "address",
841
+ "name": "_target",
842
+ "type": "address"
843
+ },
844
+ {
845
+ "internalType": "uint256",
846
+ "name": "_value",
847
+ "type": "uint256"
848
+ },
849
+ {
850
+ "internalType": "bytes",
851
+ "name": "_data",
852
+ "type": "bytes"
853
+ }
854
+ ],
855
+ "name": "invoke",
856
+ "outputs": [
857
+ {
858
+ "internalType": "bytes",
859
+ "name": "_returnValue",
860
+ "type": "bytes"
861
+ }
862
+ ],
863
+ "stateMutability": "nonpayable",
864
+ "type": "function"
865
+ },
866
+ {
867
+ "inputs": [
868
+ {
869
+ "internalType": "address",
870
+ "name": "_component",
871
+ "type": "address"
872
+ }
873
+ ],
874
+ "name": "isComponent",
875
+ "outputs": [
876
+ {
877
+ "internalType": "bool",
878
+ "name": "",
879
+ "type": "bool"
880
+ }
881
+ ],
882
+ "stateMutability": "view",
883
+ "type": "function"
884
+ },
885
+ {
886
+ "inputs": [
887
+ {
888
+ "internalType": "address",
889
+ "name": "_component",
890
+ "type": "address"
891
+ },
892
+ {
893
+ "internalType": "address",
894
+ "name": "_module",
895
+ "type": "address"
896
+ }
897
+ ],
898
+ "name": "isExternalPositionModule",
899
+ "outputs": [
900
+ {
901
+ "internalType": "bool",
902
+ "name": "",
903
+ "type": "bool"
904
+ }
905
+ ],
906
+ "stateMutability": "view",
907
+ "type": "function"
908
+ },
909
+ {
910
+ "inputs": [
911
+ {
912
+ "internalType": "address",
913
+ "name": "_module",
914
+ "type": "address"
915
+ }
916
+ ],
917
+ "name": "isInitializedModule",
918
+ "outputs": [
919
+ {
920
+ "internalType": "bool",
921
+ "name": "",
922
+ "type": "bool"
923
+ }
924
+ ],
925
+ "stateMutability": "view",
926
+ "type": "function"
927
+ },
928
+ {
929
+ "inputs": [],
930
+ "name": "isLocked",
931
+ "outputs": [
932
+ {
933
+ "internalType": "bool",
934
+ "name": "",
935
+ "type": "bool"
936
+ }
937
+ ],
938
+ "stateMutability": "view",
939
+ "type": "function"
940
+ },
941
+ {
942
+ "inputs": [
943
+ {
944
+ "internalType": "address",
945
+ "name": "_module",
946
+ "type": "address"
947
+ }
948
+ ],
949
+ "name": "isPendingModule",
950
+ "outputs": [
951
+ {
952
+ "internalType": "bool",
953
+ "name": "",
954
+ "type": "bool"
955
+ }
956
+ ],
957
+ "stateMutability": "view",
958
+ "type": "function"
959
+ },
960
+ {
961
+ "inputs": [],
962
+ "name": "lock",
963
+ "outputs": [],
964
+ "stateMutability": "nonpayable",
965
+ "type": "function"
966
+ },
967
+ {
968
+ "inputs": [],
969
+ "name": "locker",
970
+ "outputs": [
971
+ {
972
+ "internalType": "address",
973
+ "name": "",
974
+ "type": "address"
975
+ }
976
+ ],
977
+ "stateMutability": "view",
978
+ "type": "function"
979
+ },
980
+ {
981
+ "inputs": [],
982
+ "name": "manager",
983
+ "outputs": [
984
+ {
985
+ "internalType": "address",
986
+ "name": "",
987
+ "type": "address"
988
+ }
989
+ ],
990
+ "stateMutability": "view",
991
+ "type": "function"
992
+ },
993
+ {
994
+ "inputs": [
995
+ {
996
+ "internalType": "address",
997
+ "name": "_account",
998
+ "type": "address"
999
+ },
1000
+ {
1001
+ "internalType": "uint256",
1002
+ "name": "_quantity",
1003
+ "type": "uint256"
1004
+ }
1005
+ ],
1006
+ "name": "mint",
1007
+ "outputs": [],
1008
+ "stateMutability": "nonpayable",
1009
+ "type": "function"
1010
+ },
1011
+ {
1012
+ "inputs": [
1013
+ {
1014
+ "internalType": "address",
1015
+ "name": "",
1016
+ "type": "address"
1017
+ }
1018
+ ],
1019
+ "name": "moduleStates",
1020
+ "outputs": [
1021
+ {
1022
+ "internalType": "enum ISetToken.ModuleState",
1023
+ "name": "",
1024
+ "type": "uint8"
1025
+ }
1026
+ ],
1027
+ "stateMutability": "view",
1028
+ "type": "function"
1029
+ },
1030
+ {
1031
+ "inputs": [
1032
+ {
1033
+ "internalType": "uint256",
1034
+ "name": "",
1035
+ "type": "uint256"
1036
+ }
1037
+ ],
1038
+ "name": "modules",
1039
+ "outputs": [
1040
+ {
1041
+ "internalType": "address",
1042
+ "name": "",
1043
+ "type": "address"
1044
+ }
1045
+ ],
1046
+ "stateMutability": "view",
1047
+ "type": "function"
1048
+ },
1049
+ {
1050
+ "inputs": [],
1051
+ "name": "name",
1052
+ "outputs": [
1053
+ {
1054
+ "internalType": "string",
1055
+ "name": "",
1056
+ "type": "string"
1057
+ }
1058
+ ],
1059
+ "stateMutability": "view",
1060
+ "type": "function"
1061
+ },
1062
+ {
1063
+ "inputs": [],
1064
+ "name": "positionMultiplier",
1065
+ "outputs": [
1066
+ {
1067
+ "internalType": "int256",
1068
+ "name": "",
1069
+ "type": "int256"
1070
+ }
1071
+ ],
1072
+ "stateMutability": "view",
1073
+ "type": "function"
1074
+ },
1075
+ {
1076
+ "inputs": [
1077
+ {
1078
+ "internalType": "address",
1079
+ "name": "_component",
1080
+ "type": "address"
1081
+ }
1082
+ ],
1083
+ "name": "removeComponent",
1084
+ "outputs": [],
1085
+ "stateMutability": "nonpayable",
1086
+ "type": "function"
1087
+ },
1088
+ {
1089
+ "inputs": [
1090
+ {
1091
+ "internalType": "address",
1092
+ "name": "_component",
1093
+ "type": "address"
1094
+ },
1095
+ {
1096
+ "internalType": "address",
1097
+ "name": "_positionModule",
1098
+ "type": "address"
1099
+ }
1100
+ ],
1101
+ "name": "removeExternalPositionModule",
1102
+ "outputs": [],
1103
+ "stateMutability": "nonpayable",
1104
+ "type": "function"
1105
+ },
1106
+ {
1107
+ "inputs": [
1108
+ {
1109
+ "internalType": "address",
1110
+ "name": "_module",
1111
+ "type": "address"
1112
+ }
1113
+ ],
1114
+ "name": "removeModule",
1115
+ "outputs": [],
1116
+ "stateMutability": "nonpayable",
1117
+ "type": "function"
1118
+ },
1119
+ {
1120
+ "inputs": [
1121
+ {
1122
+ "internalType": "address",
1123
+ "name": "_module",
1124
+ "type": "address"
1125
+ }
1126
+ ],
1127
+ "name": "removePendingModule",
1128
+ "outputs": [],
1129
+ "stateMutability": "nonpayable",
1130
+ "type": "function"
1131
+ },
1132
+ {
1133
+ "inputs": [
1134
+ {
1135
+ "internalType": "address",
1136
+ "name": "_manager",
1137
+ "type": "address"
1138
+ }
1139
+ ],
1140
+ "name": "setManager",
1141
+ "outputs": [],
1142
+ "stateMutability": "nonpayable",
1143
+ "type": "function"
1144
+ },
1145
+ {
1146
+ "inputs": [],
1147
+ "name": "symbol",
1148
+ "outputs": [
1149
+ {
1150
+ "internalType": "string",
1151
+ "name": "",
1152
+ "type": "string"
1153
+ }
1154
+ ],
1155
+ "stateMutability": "view",
1156
+ "type": "function"
1157
+ },
1158
+ {
1159
+ "inputs": [],
1160
+ "name": "totalSupply",
1161
+ "outputs": [
1162
+ {
1163
+ "internalType": "uint256",
1164
+ "name": "",
1165
+ "type": "uint256"
1166
+ }
1167
+ ],
1168
+ "stateMutability": "view",
1169
+ "type": "function"
1170
+ },
1171
+ {
1172
+ "inputs": [
1173
+ {
1174
+ "internalType": "address",
1175
+ "name": "recipient",
1176
+ "type": "address"
1177
+ },
1178
+ {
1179
+ "internalType": "uint256",
1180
+ "name": "amount",
1181
+ "type": "uint256"
1182
+ }
1183
+ ],
1184
+ "name": "transfer",
1185
+ "outputs": [
1186
+ {
1187
+ "internalType": "bool",
1188
+ "name": "",
1189
+ "type": "bool"
1190
+ }
1191
+ ],
1192
+ "stateMutability": "nonpayable",
1193
+ "type": "function"
1194
+ },
1195
+ {
1196
+ "inputs": [
1197
+ {
1198
+ "internalType": "address",
1199
+ "name": "sender",
1200
+ "type": "address"
1201
+ },
1202
+ {
1203
+ "internalType": "address",
1204
+ "name": "recipient",
1205
+ "type": "address"
1206
+ },
1207
+ {
1208
+ "internalType": "uint256",
1209
+ "name": "amount",
1210
+ "type": "uint256"
1211
+ }
1212
+ ],
1213
+ "name": "transferFrom",
1214
+ "outputs": [
1215
+ {
1216
+ "internalType": "bool",
1217
+ "name": "",
1218
+ "type": "bool"
1219
+ }
1220
+ ],
1221
+ "stateMutability": "nonpayable",
1222
+ "type": "function"
1223
+ },
1224
+ {
1225
+ "inputs": [],
1226
+ "name": "unlock",
1227
+ "outputs": [],
1228
+ "stateMutability": "nonpayable",
1229
+ "type": "function"
1230
+ },
1231
+ {
1232
+ "stateMutability": "payable",
1233
+ "type": "receive"
1234
+ }
1235
+ ] as const satisfies Abi;
1236
+
1237
+ /**
1238
+ * Type-safe ABI for SetToken_json
1239
+ */
1240
+ export type SetToken_jsonAbi = typeof SetToken_jsonAbi;
1241
+
1242
+ /**
1243
+ * Contract instance type for SetToken_json
1244
+ */
1245
+ // Use any for contract type to avoid complex viem type issues
1246
+ // The runtime behavior is type-safe through viem's ABI typing
1247
+ export type SetToken_jsonContract = any;
1248
+
1249
+ /**
1250
+ * SetToken_json Contract Class
1251
+ *
1252
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1253
+ *
1254
+ * @example
1255
+ * ```typescript
1256
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1257
+ * import { mainnet } from 'viem/chains';
1258
+ * import { SetToken_json } from 'SetToken_json';
1259
+ *
1260
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1261
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1262
+ *
1263
+ * const contract = new SetToken_json('0x...', { publicClient, walletClient });
1264
+ *
1265
+ * // Read functions
1266
+ * const result = await contract.balanceOf('0x...');
1267
+ *
1268
+ * // Write functions
1269
+ * const hash = await contract.transfer('0x...', 1000n);
1270
+ *
1271
+ * // Simulate transactions (dry-run)
1272
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1273
+ * console.log('Gas estimate:', simulation.request.gas);
1274
+ *
1275
+ * // Watch events
1276
+ * const unwatch = contract.watch.Transfer((event) => {
1277
+ * console.log('Transfer event:', event);
1278
+ * });
1279
+ * ```
1280
+ */
1281
+ export class SetToken_json {
1282
+ private contract: SetToken_jsonContract;
1283
+ private contractAddress: Address;
1284
+ private publicClient: PublicClient;
1285
+
1286
+ constructor(
1287
+ address: Address,
1288
+ clients: {
1289
+ publicClient: PublicClient;
1290
+ walletClient?: WalletClient;
1291
+ }
1292
+ ) {
1293
+ this.contractAddress = address;
1294
+ this.publicClient = clients.publicClient;
1295
+ this.contract = getContract({
1296
+ address,
1297
+ abi: SetToken_jsonAbi,
1298
+ client: {
1299
+ public: clients.publicClient,
1300
+ wallet: clients.walletClient,
1301
+ },
1302
+ });
1303
+ }
1304
+
1305
+ /**
1306
+ * Get the contract address
1307
+ */
1308
+ get address(): Address {
1309
+ return this.contractAddress;
1310
+ }
1311
+
1312
+ /**
1313
+ * Get the underlying viem contract instance
1314
+ */
1315
+ getContract(): SetToken_jsonContract {
1316
+ return this.contract;
1317
+ }
1318
+
1319
+ /**
1320
+ * allowance
1321
+ * view
1322
+ */
1323
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
1324
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
1325
+ }
1326
+
1327
+ /**
1328
+ * balanceOf
1329
+ * view
1330
+ */
1331
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1332
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1333
+ }
1334
+
1335
+ /**
1336
+ * components
1337
+ * view
1338
+ */
1339
+ async components(arg0: bigint): Promise<`0x${string}`> {
1340
+ return this.contract.read.components([arg0] as const) as Promise<`0x${string}`>;
1341
+ }
1342
+
1343
+ /**
1344
+ * controller
1345
+ * view
1346
+ */
1347
+ async controller(): Promise<`0x${string}`> {
1348
+ return this.contract.read.controller() as Promise<`0x${string}`>;
1349
+ }
1350
+
1351
+ /**
1352
+ * decimals
1353
+ * view
1354
+ */
1355
+ async decimals(): Promise<bigint> {
1356
+ return this.contract.read.decimals() as Promise<bigint>;
1357
+ }
1358
+
1359
+ /**
1360
+ * getComponents
1361
+ * view
1362
+ */
1363
+ async getComponents(): Promise<`0x${string}`[]> {
1364
+ return this.contract.read.getComponents() as Promise<`0x${string}`[]>;
1365
+ }
1366
+
1367
+ /**
1368
+ * getDefaultPositionRealUnit
1369
+ * view
1370
+ */
1371
+ async getDefaultPositionRealUnit(_component: `0x${string}`): Promise<bigint> {
1372
+ return this.contract.read.getDefaultPositionRealUnit([_component] as const) as Promise<bigint>;
1373
+ }
1374
+
1375
+ /**
1376
+ * getExternalPositionData
1377
+ * view
1378
+ */
1379
+ async getExternalPositionData(_component: `0x${string}`, _positionModule: `0x${string}`): Promise<`0x${string}`> {
1380
+ return this.contract.read.getExternalPositionData([_component, _positionModule] as const) as Promise<`0x${string}`>;
1381
+ }
1382
+
1383
+ /**
1384
+ * getExternalPositionModules
1385
+ * view
1386
+ */
1387
+ async getExternalPositionModules(_component: `0x${string}`): Promise<`0x${string}`[]> {
1388
+ return this.contract.read.getExternalPositionModules([_component] as const) as Promise<`0x${string}`[]>;
1389
+ }
1390
+
1391
+ /**
1392
+ * getExternalPositionRealUnit
1393
+ * view
1394
+ */
1395
+ async getExternalPositionRealUnit(_component: `0x${string}`, _positionModule: `0x${string}`): Promise<bigint> {
1396
+ return this.contract.read.getExternalPositionRealUnit([_component, _positionModule] as const) as Promise<bigint>;
1397
+ }
1398
+
1399
+ /**
1400
+ * getModules
1401
+ * view
1402
+ */
1403
+ async getModules(): Promise<`0x${string}`[]> {
1404
+ return this.contract.read.getModules() as Promise<`0x${string}`[]>;
1405
+ }
1406
+
1407
+ /**
1408
+ * getPositions
1409
+ * view
1410
+ */
1411
+ async getPositions(): Promise<ISetToken_Position[]> {
1412
+ return this.contract.read.getPositions() as Promise<ISetToken_Position[]>;
1413
+ }
1414
+
1415
+ /**
1416
+ * getTotalComponentRealUnits
1417
+ * view
1418
+ */
1419
+ async getTotalComponentRealUnits(_component: `0x${string}`): Promise<bigint> {
1420
+ return this.contract.read.getTotalComponentRealUnits([_component] as const) as Promise<bigint>;
1421
+ }
1422
+
1423
+ /**
1424
+ * isComponent
1425
+ * view
1426
+ */
1427
+ async isComponent(_component: `0x${string}`): Promise<boolean> {
1428
+ return this.contract.read.isComponent([_component] as const) as Promise<boolean>;
1429
+ }
1430
+
1431
+ /**
1432
+ * isExternalPositionModule
1433
+ * view
1434
+ */
1435
+ async isExternalPositionModule(_component: `0x${string}`, _module: `0x${string}`): Promise<boolean> {
1436
+ return this.contract.read.isExternalPositionModule([_component, _module] as const) as Promise<boolean>;
1437
+ }
1438
+
1439
+ /**
1440
+ * isInitializedModule
1441
+ * view
1442
+ */
1443
+ async isInitializedModule(_module: `0x${string}`): Promise<boolean> {
1444
+ return this.contract.read.isInitializedModule([_module] as const) as Promise<boolean>;
1445
+ }
1446
+
1447
+ /**
1448
+ * isLocked
1449
+ * view
1450
+ */
1451
+ async isLocked(): Promise<boolean> {
1452
+ return this.contract.read.isLocked() as Promise<boolean>;
1453
+ }
1454
+
1455
+ /**
1456
+ * isPendingModule
1457
+ * view
1458
+ */
1459
+ async isPendingModule(_module: `0x${string}`): Promise<boolean> {
1460
+ return this.contract.read.isPendingModule([_module] as const) as Promise<boolean>;
1461
+ }
1462
+
1463
+ /**
1464
+ * locker
1465
+ * view
1466
+ */
1467
+ async locker(): Promise<`0x${string}`> {
1468
+ return this.contract.read.locker() as Promise<`0x${string}`>;
1469
+ }
1470
+
1471
+ /**
1472
+ * manager
1473
+ * view
1474
+ */
1475
+ async manager(): Promise<`0x${string}`> {
1476
+ return this.contract.read.manager() as Promise<`0x${string}`>;
1477
+ }
1478
+
1479
+ /**
1480
+ * moduleStates
1481
+ * view
1482
+ */
1483
+ async moduleStates(arg0: `0x${string}`): Promise<bigint> {
1484
+ return this.contract.read.moduleStates([arg0] as const) as Promise<bigint>;
1485
+ }
1486
+
1487
+ /**
1488
+ * modules
1489
+ * view
1490
+ */
1491
+ async modules(arg0: bigint): Promise<`0x${string}`> {
1492
+ return this.contract.read.modules([arg0] as const) as Promise<`0x${string}`>;
1493
+ }
1494
+
1495
+ /**
1496
+ * name
1497
+ * view
1498
+ */
1499
+ async name(): Promise<string> {
1500
+ return this.contract.read.name() as Promise<string>;
1501
+ }
1502
+
1503
+ /**
1504
+ * positionMultiplier
1505
+ * view
1506
+ */
1507
+ async positionMultiplier(): Promise<bigint> {
1508
+ return this.contract.read.positionMultiplier() as Promise<bigint>;
1509
+ }
1510
+
1511
+ /**
1512
+ * symbol
1513
+ * view
1514
+ */
1515
+ async symbol(): Promise<string> {
1516
+ return this.contract.read.symbol() as Promise<string>;
1517
+ }
1518
+
1519
+ /**
1520
+ * totalSupply
1521
+ * view
1522
+ */
1523
+ async totalSupply(): Promise<bigint> {
1524
+ return this.contract.read.totalSupply() as Promise<bigint>;
1525
+ }
1526
+
1527
+ /**
1528
+ * addComponent
1529
+ * nonpayable
1530
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1531
+ */
1532
+ async addComponent(_component: `0x${string}`, options?: {
1533
+ accessList?: import('viem').AccessList;
1534
+ authorizationList?: import('viem').AuthorizationList;
1535
+ chain?: import('viem').Chain | null;
1536
+ dataSuffix?: `0x${string}`;
1537
+ gas?: bigint;
1538
+ gasPrice?: bigint;
1539
+ maxFeePerGas?: bigint;
1540
+ maxPriorityFeePerGas?: bigint;
1541
+ nonce?: number;
1542
+ value?: bigint;
1543
+ }): Promise<`0x${string}`> {
1544
+ if (!this.contract.write) {
1545
+ throw new Error('Wallet client is required for write operations');
1546
+ }
1547
+ return this.contract.write.addComponent([_component] as const, options) as Promise<`0x${string}`>;
1548
+ }
1549
+
1550
+ /**
1551
+ * addExternalPositionModule
1552
+ * nonpayable
1553
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1554
+ */
1555
+ async addExternalPositionModule(_component: `0x${string}`, _positionModule: `0x${string}`, options?: {
1556
+ accessList?: import('viem').AccessList;
1557
+ authorizationList?: import('viem').AuthorizationList;
1558
+ chain?: import('viem').Chain | null;
1559
+ dataSuffix?: `0x${string}`;
1560
+ gas?: bigint;
1561
+ gasPrice?: bigint;
1562
+ maxFeePerGas?: bigint;
1563
+ maxPriorityFeePerGas?: bigint;
1564
+ nonce?: number;
1565
+ value?: bigint;
1566
+ }): Promise<`0x${string}`> {
1567
+ if (!this.contract.write) {
1568
+ throw new Error('Wallet client is required for write operations');
1569
+ }
1570
+ return this.contract.write.addExternalPositionModule([_component, _positionModule] as const, options) as Promise<`0x${string}`>;
1571
+ }
1572
+
1573
+ /**
1574
+ * addModule
1575
+ * nonpayable
1576
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1577
+ */
1578
+ async addModule(_module: `0x${string}`, options?: {
1579
+ accessList?: import('viem').AccessList;
1580
+ authorizationList?: import('viem').AuthorizationList;
1581
+ chain?: import('viem').Chain | null;
1582
+ dataSuffix?: `0x${string}`;
1583
+ gas?: bigint;
1584
+ gasPrice?: bigint;
1585
+ maxFeePerGas?: bigint;
1586
+ maxPriorityFeePerGas?: bigint;
1587
+ nonce?: number;
1588
+ value?: bigint;
1589
+ }): Promise<`0x${string}`> {
1590
+ if (!this.contract.write) {
1591
+ throw new Error('Wallet client is required for write operations');
1592
+ }
1593
+ return this.contract.write.addModule([_module] as const, options) as Promise<`0x${string}`>;
1594
+ }
1595
+
1596
+ /**
1597
+ * approve
1598
+ * nonpayable
1599
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1600
+ */
1601
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1602
+ accessList?: import('viem').AccessList;
1603
+ authorizationList?: import('viem').AuthorizationList;
1604
+ chain?: import('viem').Chain | null;
1605
+ dataSuffix?: `0x${string}`;
1606
+ gas?: bigint;
1607
+ gasPrice?: bigint;
1608
+ maxFeePerGas?: bigint;
1609
+ maxPriorityFeePerGas?: bigint;
1610
+ nonce?: number;
1611
+ value?: bigint;
1612
+ }): Promise<`0x${string}`> {
1613
+ if (!this.contract.write) {
1614
+ throw new Error('Wallet client is required for write operations');
1615
+ }
1616
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
1617
+ }
1618
+
1619
+ /**
1620
+ * burn
1621
+ * nonpayable
1622
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1623
+ */
1624
+ async burn(_account: `0x${string}`, _quantity: bigint, options?: {
1625
+ accessList?: import('viem').AccessList;
1626
+ authorizationList?: import('viem').AuthorizationList;
1627
+ chain?: import('viem').Chain | null;
1628
+ dataSuffix?: `0x${string}`;
1629
+ gas?: bigint;
1630
+ gasPrice?: bigint;
1631
+ maxFeePerGas?: bigint;
1632
+ maxPriorityFeePerGas?: bigint;
1633
+ nonce?: number;
1634
+ value?: bigint;
1635
+ }): Promise<`0x${string}`> {
1636
+ if (!this.contract.write) {
1637
+ throw new Error('Wallet client is required for write operations');
1638
+ }
1639
+ return this.contract.write.burn([_account, _quantity] as const, options) as Promise<`0x${string}`>;
1640
+ }
1641
+
1642
+ /**
1643
+ * decreaseAllowance
1644
+ * nonpayable
1645
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1646
+ */
1647
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
1648
+ accessList?: import('viem').AccessList;
1649
+ authorizationList?: import('viem').AuthorizationList;
1650
+ chain?: import('viem').Chain | null;
1651
+ dataSuffix?: `0x${string}`;
1652
+ gas?: bigint;
1653
+ gasPrice?: bigint;
1654
+ maxFeePerGas?: bigint;
1655
+ maxPriorityFeePerGas?: bigint;
1656
+ nonce?: number;
1657
+ value?: bigint;
1658
+ }): Promise<`0x${string}`> {
1659
+ if (!this.contract.write) {
1660
+ throw new Error('Wallet client is required for write operations');
1661
+ }
1662
+ return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
1663
+ }
1664
+
1665
+ /**
1666
+ * editDefaultPositionUnit
1667
+ * nonpayable
1668
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1669
+ */
1670
+ async editDefaultPositionUnit(_component: `0x${string}`, _realUnit: bigint, options?: {
1671
+ accessList?: import('viem').AccessList;
1672
+ authorizationList?: import('viem').AuthorizationList;
1673
+ chain?: import('viem').Chain | null;
1674
+ dataSuffix?: `0x${string}`;
1675
+ gas?: bigint;
1676
+ gasPrice?: bigint;
1677
+ maxFeePerGas?: bigint;
1678
+ maxPriorityFeePerGas?: bigint;
1679
+ nonce?: number;
1680
+ value?: bigint;
1681
+ }): Promise<`0x${string}`> {
1682
+ if (!this.contract.write) {
1683
+ throw new Error('Wallet client is required for write operations');
1684
+ }
1685
+ return this.contract.write.editDefaultPositionUnit([_component, _realUnit] as const, options) as Promise<`0x${string}`>;
1686
+ }
1687
+
1688
+ /**
1689
+ * editExternalPositionData
1690
+ * nonpayable
1691
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1692
+ */
1693
+ async editExternalPositionData(_component: `0x${string}`, _positionModule: `0x${string}`, _data: `0x${string}`, options?: {
1694
+ accessList?: import('viem').AccessList;
1695
+ authorizationList?: import('viem').AuthorizationList;
1696
+ chain?: import('viem').Chain | null;
1697
+ dataSuffix?: `0x${string}`;
1698
+ gas?: bigint;
1699
+ gasPrice?: bigint;
1700
+ maxFeePerGas?: bigint;
1701
+ maxPriorityFeePerGas?: bigint;
1702
+ nonce?: number;
1703
+ value?: bigint;
1704
+ }): Promise<`0x${string}`> {
1705
+ if (!this.contract.write) {
1706
+ throw new Error('Wallet client is required for write operations');
1707
+ }
1708
+ return this.contract.write.editExternalPositionData([_component, _positionModule, _data] as const, options) as Promise<`0x${string}`>;
1709
+ }
1710
+
1711
+ /**
1712
+ * editExternalPositionUnit
1713
+ * nonpayable
1714
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1715
+ */
1716
+ async editExternalPositionUnit(_component: `0x${string}`, _positionModule: `0x${string}`, _realUnit: bigint, options?: {
1717
+ accessList?: import('viem').AccessList;
1718
+ authorizationList?: import('viem').AuthorizationList;
1719
+ chain?: import('viem').Chain | null;
1720
+ dataSuffix?: `0x${string}`;
1721
+ gas?: bigint;
1722
+ gasPrice?: bigint;
1723
+ maxFeePerGas?: bigint;
1724
+ maxPriorityFeePerGas?: bigint;
1725
+ nonce?: number;
1726
+ value?: bigint;
1727
+ }): Promise<`0x${string}`> {
1728
+ if (!this.contract.write) {
1729
+ throw new Error('Wallet client is required for write operations');
1730
+ }
1731
+ return this.contract.write.editExternalPositionUnit([_component, _positionModule, _realUnit] as const, options) as Promise<`0x${string}`>;
1732
+ }
1733
+
1734
+ /**
1735
+ * editPositionMultiplier
1736
+ * nonpayable
1737
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1738
+ */
1739
+ async editPositionMultiplier(_newMultiplier: bigint, options?: {
1740
+ accessList?: import('viem').AccessList;
1741
+ authorizationList?: import('viem').AuthorizationList;
1742
+ chain?: import('viem').Chain | null;
1743
+ dataSuffix?: `0x${string}`;
1744
+ gas?: bigint;
1745
+ gasPrice?: bigint;
1746
+ maxFeePerGas?: bigint;
1747
+ maxPriorityFeePerGas?: bigint;
1748
+ nonce?: number;
1749
+ value?: bigint;
1750
+ }): Promise<`0x${string}`> {
1751
+ if (!this.contract.write) {
1752
+ throw new Error('Wallet client is required for write operations');
1753
+ }
1754
+ return this.contract.write.editPositionMultiplier([_newMultiplier] as const, options) as Promise<`0x${string}`>;
1755
+ }
1756
+
1757
+ /**
1758
+ * increaseAllowance
1759
+ * nonpayable
1760
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1761
+ */
1762
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
1763
+ accessList?: import('viem').AccessList;
1764
+ authorizationList?: import('viem').AuthorizationList;
1765
+ chain?: import('viem').Chain | null;
1766
+ dataSuffix?: `0x${string}`;
1767
+ gas?: bigint;
1768
+ gasPrice?: bigint;
1769
+ maxFeePerGas?: bigint;
1770
+ maxPriorityFeePerGas?: bigint;
1771
+ nonce?: number;
1772
+ value?: bigint;
1773
+ }): Promise<`0x${string}`> {
1774
+ if (!this.contract.write) {
1775
+ throw new Error('Wallet client is required for write operations');
1776
+ }
1777
+ return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
1778
+ }
1779
+
1780
+ /**
1781
+ * initializeModule
1782
+ * nonpayable
1783
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1784
+ */
1785
+ async initializeModule(options?: {
1786
+ accessList?: import('viem').AccessList;
1787
+ authorizationList?: import('viem').AuthorizationList;
1788
+ chain?: import('viem').Chain | null;
1789
+ dataSuffix?: `0x${string}`;
1790
+ gas?: bigint;
1791
+ gasPrice?: bigint;
1792
+ maxFeePerGas?: bigint;
1793
+ maxPriorityFeePerGas?: bigint;
1794
+ nonce?: number;
1795
+ value?: bigint;
1796
+ }): Promise<`0x${string}`> {
1797
+ if (!this.contract.write) {
1798
+ throw new Error('Wallet client is required for write operations');
1799
+ }
1800
+ return this.contract.write.initializeModule(options) as Promise<`0x${string}`>;
1801
+ }
1802
+
1803
+ /**
1804
+ * invoke
1805
+ * nonpayable
1806
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1807
+ */
1808
+ async invoke(_target: `0x${string}`, _value: bigint, _data: `0x${string}`, options?: {
1809
+ accessList?: import('viem').AccessList;
1810
+ authorizationList?: import('viem').AuthorizationList;
1811
+ chain?: import('viem').Chain | null;
1812
+ dataSuffix?: `0x${string}`;
1813
+ gas?: bigint;
1814
+ gasPrice?: bigint;
1815
+ maxFeePerGas?: bigint;
1816
+ maxPriorityFeePerGas?: bigint;
1817
+ nonce?: number;
1818
+ value?: bigint;
1819
+ }): Promise<`0x${string}`> {
1820
+ if (!this.contract.write) {
1821
+ throw new Error('Wallet client is required for write operations');
1822
+ }
1823
+ return this.contract.write.invoke([_target, _value, _data] as const, options) as Promise<`0x${string}`>;
1824
+ }
1825
+
1826
+ /**
1827
+ * lock
1828
+ * nonpayable
1829
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1830
+ */
1831
+ async lock(options?: {
1832
+ accessList?: import('viem').AccessList;
1833
+ authorizationList?: import('viem').AuthorizationList;
1834
+ chain?: import('viem').Chain | null;
1835
+ dataSuffix?: `0x${string}`;
1836
+ gas?: bigint;
1837
+ gasPrice?: bigint;
1838
+ maxFeePerGas?: bigint;
1839
+ maxPriorityFeePerGas?: bigint;
1840
+ nonce?: number;
1841
+ value?: bigint;
1842
+ }): Promise<`0x${string}`> {
1843
+ if (!this.contract.write) {
1844
+ throw new Error('Wallet client is required for write operations');
1845
+ }
1846
+ return this.contract.write.lock(options) as Promise<`0x${string}`>;
1847
+ }
1848
+
1849
+ /**
1850
+ * mint
1851
+ * nonpayable
1852
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1853
+ */
1854
+ async mint(_account: `0x${string}`, _quantity: bigint, options?: {
1855
+ accessList?: import('viem').AccessList;
1856
+ authorizationList?: import('viem').AuthorizationList;
1857
+ chain?: import('viem').Chain | null;
1858
+ dataSuffix?: `0x${string}`;
1859
+ gas?: bigint;
1860
+ gasPrice?: bigint;
1861
+ maxFeePerGas?: bigint;
1862
+ maxPriorityFeePerGas?: bigint;
1863
+ nonce?: number;
1864
+ value?: bigint;
1865
+ }): Promise<`0x${string}`> {
1866
+ if (!this.contract.write) {
1867
+ throw new Error('Wallet client is required for write operations');
1868
+ }
1869
+ return this.contract.write.mint([_account, _quantity] as const, options) as Promise<`0x${string}`>;
1870
+ }
1871
+
1872
+ /**
1873
+ * removeComponent
1874
+ * nonpayable
1875
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1876
+ */
1877
+ async removeComponent(_component: `0x${string}`, options?: {
1878
+ accessList?: import('viem').AccessList;
1879
+ authorizationList?: import('viem').AuthorizationList;
1880
+ chain?: import('viem').Chain | null;
1881
+ dataSuffix?: `0x${string}`;
1882
+ gas?: bigint;
1883
+ gasPrice?: bigint;
1884
+ maxFeePerGas?: bigint;
1885
+ maxPriorityFeePerGas?: bigint;
1886
+ nonce?: number;
1887
+ value?: bigint;
1888
+ }): Promise<`0x${string}`> {
1889
+ if (!this.contract.write) {
1890
+ throw new Error('Wallet client is required for write operations');
1891
+ }
1892
+ return this.contract.write.removeComponent([_component] as const, options) as Promise<`0x${string}`>;
1893
+ }
1894
+
1895
+ /**
1896
+ * removeExternalPositionModule
1897
+ * nonpayable
1898
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1899
+ */
1900
+ async removeExternalPositionModule(_component: `0x${string}`, _positionModule: `0x${string}`, options?: {
1901
+ accessList?: import('viem').AccessList;
1902
+ authorizationList?: import('viem').AuthorizationList;
1903
+ chain?: import('viem').Chain | null;
1904
+ dataSuffix?: `0x${string}`;
1905
+ gas?: bigint;
1906
+ gasPrice?: bigint;
1907
+ maxFeePerGas?: bigint;
1908
+ maxPriorityFeePerGas?: bigint;
1909
+ nonce?: number;
1910
+ value?: bigint;
1911
+ }): Promise<`0x${string}`> {
1912
+ if (!this.contract.write) {
1913
+ throw new Error('Wallet client is required for write operations');
1914
+ }
1915
+ return this.contract.write.removeExternalPositionModule([_component, _positionModule] as const, options) as Promise<`0x${string}`>;
1916
+ }
1917
+
1918
+ /**
1919
+ * removeModule
1920
+ * nonpayable
1921
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1922
+ */
1923
+ async removeModule(_module: `0x${string}`, options?: {
1924
+ accessList?: import('viem').AccessList;
1925
+ authorizationList?: import('viem').AuthorizationList;
1926
+ chain?: import('viem').Chain | null;
1927
+ dataSuffix?: `0x${string}`;
1928
+ gas?: bigint;
1929
+ gasPrice?: bigint;
1930
+ maxFeePerGas?: bigint;
1931
+ maxPriorityFeePerGas?: bigint;
1932
+ nonce?: number;
1933
+ value?: bigint;
1934
+ }): Promise<`0x${string}`> {
1935
+ if (!this.contract.write) {
1936
+ throw new Error('Wallet client is required for write operations');
1937
+ }
1938
+ return this.contract.write.removeModule([_module] as const, options) as Promise<`0x${string}`>;
1939
+ }
1940
+
1941
+ /**
1942
+ * removePendingModule
1943
+ * nonpayable
1944
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1945
+ */
1946
+ async removePendingModule(_module: `0x${string}`, options?: {
1947
+ accessList?: import('viem').AccessList;
1948
+ authorizationList?: import('viem').AuthorizationList;
1949
+ chain?: import('viem').Chain | null;
1950
+ dataSuffix?: `0x${string}`;
1951
+ gas?: bigint;
1952
+ gasPrice?: bigint;
1953
+ maxFeePerGas?: bigint;
1954
+ maxPriorityFeePerGas?: bigint;
1955
+ nonce?: number;
1956
+ value?: bigint;
1957
+ }): Promise<`0x${string}`> {
1958
+ if (!this.contract.write) {
1959
+ throw new Error('Wallet client is required for write operations');
1960
+ }
1961
+ return this.contract.write.removePendingModule([_module] as const, options) as Promise<`0x${string}`>;
1962
+ }
1963
+
1964
+ /**
1965
+ * setManager
1966
+ * nonpayable
1967
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1968
+ */
1969
+ async setManager(_manager: `0x${string}`, options?: {
1970
+ accessList?: import('viem').AccessList;
1971
+ authorizationList?: import('viem').AuthorizationList;
1972
+ chain?: import('viem').Chain | null;
1973
+ dataSuffix?: `0x${string}`;
1974
+ gas?: bigint;
1975
+ gasPrice?: bigint;
1976
+ maxFeePerGas?: bigint;
1977
+ maxPriorityFeePerGas?: bigint;
1978
+ nonce?: number;
1979
+ value?: bigint;
1980
+ }): Promise<`0x${string}`> {
1981
+ if (!this.contract.write) {
1982
+ throw new Error('Wallet client is required for write operations');
1983
+ }
1984
+ return this.contract.write.setManager([_manager] as const, options) as Promise<`0x${string}`>;
1985
+ }
1986
+
1987
+ /**
1988
+ * transfer
1989
+ * nonpayable
1990
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1991
+ */
1992
+ async transfer(recipient: `0x${string}`, amount: bigint, options?: {
1993
+ accessList?: import('viem').AccessList;
1994
+ authorizationList?: import('viem').AuthorizationList;
1995
+ chain?: import('viem').Chain | null;
1996
+ dataSuffix?: `0x${string}`;
1997
+ gas?: bigint;
1998
+ gasPrice?: bigint;
1999
+ maxFeePerGas?: bigint;
2000
+ maxPriorityFeePerGas?: bigint;
2001
+ nonce?: number;
2002
+ value?: bigint;
2003
+ }): Promise<`0x${string}`> {
2004
+ if (!this.contract.write) {
2005
+ throw new Error('Wallet client is required for write operations');
2006
+ }
2007
+ return this.contract.write.transfer([recipient, amount] as const, options) as Promise<`0x${string}`>;
2008
+ }
2009
+
2010
+ /**
2011
+ * transferFrom
2012
+ * nonpayable
2013
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2014
+ */
2015
+ async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
2016
+ accessList?: import('viem').AccessList;
2017
+ authorizationList?: import('viem').AuthorizationList;
2018
+ chain?: import('viem').Chain | null;
2019
+ dataSuffix?: `0x${string}`;
2020
+ gas?: bigint;
2021
+ gasPrice?: bigint;
2022
+ maxFeePerGas?: bigint;
2023
+ maxPriorityFeePerGas?: bigint;
2024
+ nonce?: number;
2025
+ value?: bigint;
2026
+ }): Promise<`0x${string}`> {
2027
+ if (!this.contract.write) {
2028
+ throw new Error('Wallet client is required for write operations');
2029
+ }
2030
+ return this.contract.write.transferFrom([sender, recipient, amount] as const, options) as Promise<`0x${string}`>;
2031
+ }
2032
+
2033
+ /**
2034
+ * unlock
2035
+ * nonpayable
2036
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2037
+ */
2038
+ async unlock(options?: {
2039
+ accessList?: import('viem').AccessList;
2040
+ authorizationList?: import('viem').AuthorizationList;
2041
+ chain?: import('viem').Chain | null;
2042
+ dataSuffix?: `0x${string}`;
2043
+ gas?: bigint;
2044
+ gasPrice?: bigint;
2045
+ maxFeePerGas?: bigint;
2046
+ maxPriorityFeePerGas?: bigint;
2047
+ nonce?: number;
2048
+ value?: bigint;
2049
+ }): Promise<`0x${string}`> {
2050
+ if (!this.contract.write) {
2051
+ throw new Error('Wallet client is required for write operations');
2052
+ }
2053
+ return this.contract.write.unlock(options) as Promise<`0x${string}`>;
2054
+ }
2055
+
2056
+
2057
+
2058
+ /**
2059
+ * Simulate contract write operations (dry-run without sending transaction)
2060
+ *
2061
+ * @example
2062
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2063
+ * console.log('Gas estimate:', result.request.gas);
2064
+ * console.log('Would succeed:', result.result);
2065
+ */
2066
+ get simulate() {
2067
+ const contract = this.contract;
2068
+ if (!contract.simulate) {
2069
+ throw new Error('Public client is required for simulation');
2070
+ }
2071
+ return {
2072
+ /**
2073
+ * Simulate addComponent
2074
+ * Returns gas estimate and result without sending transaction
2075
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2076
+ */
2077
+ async addComponent(_component: `0x${string}`, options?: {
2078
+ accessList?: import('viem').AccessList;
2079
+ authorizationList?: import('viem').AuthorizationList;
2080
+ chain?: import('viem').Chain | null;
2081
+ dataSuffix?: `0x${string}`;
2082
+ gas?: bigint;
2083
+ gasPrice?: bigint;
2084
+ maxFeePerGas?: bigint;
2085
+ maxPriorityFeePerGas?: bigint;
2086
+ nonce?: number;
2087
+ value?: bigint;
2088
+ }): Promise<void> {
2089
+ return contract.simulate.addComponent([_component] as const, options) as Promise<void>;
2090
+ },
2091
+ /**
2092
+ * Simulate addExternalPositionModule
2093
+ * Returns gas estimate and result without sending transaction
2094
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2095
+ */
2096
+ async addExternalPositionModule(_component: `0x${string}`, _positionModule: `0x${string}`, options?: {
2097
+ accessList?: import('viem').AccessList;
2098
+ authorizationList?: import('viem').AuthorizationList;
2099
+ chain?: import('viem').Chain | null;
2100
+ dataSuffix?: `0x${string}`;
2101
+ gas?: bigint;
2102
+ gasPrice?: bigint;
2103
+ maxFeePerGas?: bigint;
2104
+ maxPriorityFeePerGas?: bigint;
2105
+ nonce?: number;
2106
+ value?: bigint;
2107
+ }): Promise<void> {
2108
+ return contract.simulate.addExternalPositionModule([_component, _positionModule] as const, options) as Promise<void>;
2109
+ },
2110
+ /**
2111
+ * Simulate addModule
2112
+ * Returns gas estimate and result without sending transaction
2113
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2114
+ */
2115
+ async addModule(_module: `0x${string}`, options?: {
2116
+ accessList?: import('viem').AccessList;
2117
+ authorizationList?: import('viem').AuthorizationList;
2118
+ chain?: import('viem').Chain | null;
2119
+ dataSuffix?: `0x${string}`;
2120
+ gas?: bigint;
2121
+ gasPrice?: bigint;
2122
+ maxFeePerGas?: bigint;
2123
+ maxPriorityFeePerGas?: bigint;
2124
+ nonce?: number;
2125
+ value?: bigint;
2126
+ }): Promise<void> {
2127
+ return contract.simulate.addModule([_module] as const, options) as Promise<void>;
2128
+ },
2129
+ /**
2130
+ * Simulate approve
2131
+ * Returns gas estimate and result without sending transaction
2132
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2133
+ */
2134
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
2135
+ accessList?: import('viem').AccessList;
2136
+ authorizationList?: import('viem').AuthorizationList;
2137
+ chain?: import('viem').Chain | null;
2138
+ dataSuffix?: `0x${string}`;
2139
+ gas?: bigint;
2140
+ gasPrice?: bigint;
2141
+ maxFeePerGas?: bigint;
2142
+ maxPriorityFeePerGas?: bigint;
2143
+ nonce?: number;
2144
+ value?: bigint;
2145
+ }): Promise<boolean> {
2146
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
2147
+ },
2148
+ /**
2149
+ * Simulate burn
2150
+ * Returns gas estimate and result without sending transaction
2151
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2152
+ */
2153
+ async burn(_account: `0x${string}`, _quantity: bigint, options?: {
2154
+ accessList?: import('viem').AccessList;
2155
+ authorizationList?: import('viem').AuthorizationList;
2156
+ chain?: import('viem').Chain | null;
2157
+ dataSuffix?: `0x${string}`;
2158
+ gas?: bigint;
2159
+ gasPrice?: bigint;
2160
+ maxFeePerGas?: bigint;
2161
+ maxPriorityFeePerGas?: bigint;
2162
+ nonce?: number;
2163
+ value?: bigint;
2164
+ }): Promise<void> {
2165
+ return contract.simulate.burn([_account, _quantity] as const, options) as Promise<void>;
2166
+ },
2167
+ /**
2168
+ * Simulate decreaseAllowance
2169
+ * Returns gas estimate and result without sending transaction
2170
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2171
+ */
2172
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
2173
+ accessList?: import('viem').AccessList;
2174
+ authorizationList?: import('viem').AuthorizationList;
2175
+ chain?: import('viem').Chain | null;
2176
+ dataSuffix?: `0x${string}`;
2177
+ gas?: bigint;
2178
+ gasPrice?: bigint;
2179
+ maxFeePerGas?: bigint;
2180
+ maxPriorityFeePerGas?: bigint;
2181
+ nonce?: number;
2182
+ value?: bigint;
2183
+ }): Promise<boolean> {
2184
+ return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
2185
+ },
2186
+ /**
2187
+ * Simulate editDefaultPositionUnit
2188
+ * Returns gas estimate and result without sending transaction
2189
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2190
+ */
2191
+ async editDefaultPositionUnit(_component: `0x${string}`, _realUnit: bigint, options?: {
2192
+ accessList?: import('viem').AccessList;
2193
+ authorizationList?: import('viem').AuthorizationList;
2194
+ chain?: import('viem').Chain | null;
2195
+ dataSuffix?: `0x${string}`;
2196
+ gas?: bigint;
2197
+ gasPrice?: bigint;
2198
+ maxFeePerGas?: bigint;
2199
+ maxPriorityFeePerGas?: bigint;
2200
+ nonce?: number;
2201
+ value?: bigint;
2202
+ }): Promise<void> {
2203
+ return contract.simulate.editDefaultPositionUnit([_component, _realUnit] as const, options) as Promise<void>;
2204
+ },
2205
+ /**
2206
+ * Simulate editExternalPositionData
2207
+ * Returns gas estimate and result without sending transaction
2208
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2209
+ */
2210
+ async editExternalPositionData(_component: `0x${string}`, _positionModule: `0x${string}`, _data: `0x${string}`, options?: {
2211
+ accessList?: import('viem').AccessList;
2212
+ authorizationList?: import('viem').AuthorizationList;
2213
+ chain?: import('viem').Chain | null;
2214
+ dataSuffix?: `0x${string}`;
2215
+ gas?: bigint;
2216
+ gasPrice?: bigint;
2217
+ maxFeePerGas?: bigint;
2218
+ maxPriorityFeePerGas?: bigint;
2219
+ nonce?: number;
2220
+ value?: bigint;
2221
+ }): Promise<void> {
2222
+ return contract.simulate.editExternalPositionData([_component, _positionModule, _data] as const, options) as Promise<void>;
2223
+ },
2224
+ /**
2225
+ * Simulate editExternalPositionUnit
2226
+ * Returns gas estimate and result without sending transaction
2227
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2228
+ */
2229
+ async editExternalPositionUnit(_component: `0x${string}`, _positionModule: `0x${string}`, _realUnit: bigint, options?: {
2230
+ accessList?: import('viem').AccessList;
2231
+ authorizationList?: import('viem').AuthorizationList;
2232
+ chain?: import('viem').Chain | null;
2233
+ dataSuffix?: `0x${string}`;
2234
+ gas?: bigint;
2235
+ gasPrice?: bigint;
2236
+ maxFeePerGas?: bigint;
2237
+ maxPriorityFeePerGas?: bigint;
2238
+ nonce?: number;
2239
+ value?: bigint;
2240
+ }): Promise<void> {
2241
+ return contract.simulate.editExternalPositionUnit([_component, _positionModule, _realUnit] as const, options) as Promise<void>;
2242
+ },
2243
+ /**
2244
+ * Simulate editPositionMultiplier
2245
+ * Returns gas estimate and result without sending transaction
2246
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2247
+ */
2248
+ async editPositionMultiplier(_newMultiplier: bigint, options?: {
2249
+ accessList?: import('viem').AccessList;
2250
+ authorizationList?: import('viem').AuthorizationList;
2251
+ chain?: import('viem').Chain | null;
2252
+ dataSuffix?: `0x${string}`;
2253
+ gas?: bigint;
2254
+ gasPrice?: bigint;
2255
+ maxFeePerGas?: bigint;
2256
+ maxPriorityFeePerGas?: bigint;
2257
+ nonce?: number;
2258
+ value?: bigint;
2259
+ }): Promise<void> {
2260
+ return contract.simulate.editPositionMultiplier([_newMultiplier] as const, options) as Promise<void>;
2261
+ },
2262
+ /**
2263
+ * Simulate increaseAllowance
2264
+ * Returns gas estimate and result without sending transaction
2265
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2266
+ */
2267
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
2268
+ accessList?: import('viem').AccessList;
2269
+ authorizationList?: import('viem').AuthorizationList;
2270
+ chain?: import('viem').Chain | null;
2271
+ dataSuffix?: `0x${string}`;
2272
+ gas?: bigint;
2273
+ gasPrice?: bigint;
2274
+ maxFeePerGas?: bigint;
2275
+ maxPriorityFeePerGas?: bigint;
2276
+ nonce?: number;
2277
+ value?: bigint;
2278
+ }): Promise<boolean> {
2279
+ return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
2280
+ },
2281
+ /**
2282
+ * Simulate initializeModule
2283
+ * Returns gas estimate and result without sending transaction
2284
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2285
+ */
2286
+ async initializeModule(options?: {
2287
+ accessList?: import('viem').AccessList;
2288
+ authorizationList?: import('viem').AuthorizationList;
2289
+ chain?: import('viem').Chain | null;
2290
+ dataSuffix?: `0x${string}`;
2291
+ gas?: bigint;
2292
+ gasPrice?: bigint;
2293
+ maxFeePerGas?: bigint;
2294
+ maxPriorityFeePerGas?: bigint;
2295
+ nonce?: number;
2296
+ value?: bigint;
2297
+ }): Promise<void> {
2298
+ return contract.simulate.initializeModule(options) as Promise<void>;
2299
+ },
2300
+ /**
2301
+ * Simulate invoke
2302
+ * Returns gas estimate and result without sending transaction
2303
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2304
+ */
2305
+ async invoke(_target: `0x${string}`, _value: bigint, _data: `0x${string}`, options?: {
2306
+ accessList?: import('viem').AccessList;
2307
+ authorizationList?: import('viem').AuthorizationList;
2308
+ chain?: import('viem').Chain | null;
2309
+ dataSuffix?: `0x${string}`;
2310
+ gas?: bigint;
2311
+ gasPrice?: bigint;
2312
+ maxFeePerGas?: bigint;
2313
+ maxPriorityFeePerGas?: bigint;
2314
+ nonce?: number;
2315
+ value?: bigint;
2316
+ }): Promise<`0x${string}`> {
2317
+ return contract.simulate.invoke([_target, _value, _data] as const, options) as Promise<`0x${string}`>;
2318
+ },
2319
+ /**
2320
+ * Simulate lock
2321
+ * Returns gas estimate and result without sending transaction
2322
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2323
+ */
2324
+ async lock(options?: {
2325
+ accessList?: import('viem').AccessList;
2326
+ authorizationList?: import('viem').AuthorizationList;
2327
+ chain?: import('viem').Chain | null;
2328
+ dataSuffix?: `0x${string}`;
2329
+ gas?: bigint;
2330
+ gasPrice?: bigint;
2331
+ maxFeePerGas?: bigint;
2332
+ maxPriorityFeePerGas?: bigint;
2333
+ nonce?: number;
2334
+ value?: bigint;
2335
+ }): Promise<void> {
2336
+ return contract.simulate.lock(options) as Promise<void>;
2337
+ },
2338
+ /**
2339
+ * Simulate mint
2340
+ * Returns gas estimate and result without sending transaction
2341
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2342
+ */
2343
+ async mint(_account: `0x${string}`, _quantity: bigint, options?: {
2344
+ accessList?: import('viem').AccessList;
2345
+ authorizationList?: import('viem').AuthorizationList;
2346
+ chain?: import('viem').Chain | null;
2347
+ dataSuffix?: `0x${string}`;
2348
+ gas?: bigint;
2349
+ gasPrice?: bigint;
2350
+ maxFeePerGas?: bigint;
2351
+ maxPriorityFeePerGas?: bigint;
2352
+ nonce?: number;
2353
+ value?: bigint;
2354
+ }): Promise<void> {
2355
+ return contract.simulate.mint([_account, _quantity] as const, options) as Promise<void>;
2356
+ },
2357
+ /**
2358
+ * Simulate removeComponent
2359
+ * Returns gas estimate and result without sending transaction
2360
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2361
+ */
2362
+ async removeComponent(_component: `0x${string}`, options?: {
2363
+ accessList?: import('viem').AccessList;
2364
+ authorizationList?: import('viem').AuthorizationList;
2365
+ chain?: import('viem').Chain | null;
2366
+ dataSuffix?: `0x${string}`;
2367
+ gas?: bigint;
2368
+ gasPrice?: bigint;
2369
+ maxFeePerGas?: bigint;
2370
+ maxPriorityFeePerGas?: bigint;
2371
+ nonce?: number;
2372
+ value?: bigint;
2373
+ }): Promise<void> {
2374
+ return contract.simulate.removeComponent([_component] as const, options) as Promise<void>;
2375
+ },
2376
+ /**
2377
+ * Simulate removeExternalPositionModule
2378
+ * Returns gas estimate and result without sending transaction
2379
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2380
+ */
2381
+ async removeExternalPositionModule(_component: `0x${string}`, _positionModule: `0x${string}`, options?: {
2382
+ accessList?: import('viem').AccessList;
2383
+ authorizationList?: import('viem').AuthorizationList;
2384
+ chain?: import('viem').Chain | null;
2385
+ dataSuffix?: `0x${string}`;
2386
+ gas?: bigint;
2387
+ gasPrice?: bigint;
2388
+ maxFeePerGas?: bigint;
2389
+ maxPriorityFeePerGas?: bigint;
2390
+ nonce?: number;
2391
+ value?: bigint;
2392
+ }): Promise<void> {
2393
+ return contract.simulate.removeExternalPositionModule([_component, _positionModule] as const, options) as Promise<void>;
2394
+ },
2395
+ /**
2396
+ * Simulate removeModule
2397
+ * Returns gas estimate and result without sending transaction
2398
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2399
+ */
2400
+ async removeModule(_module: `0x${string}`, options?: {
2401
+ accessList?: import('viem').AccessList;
2402
+ authorizationList?: import('viem').AuthorizationList;
2403
+ chain?: import('viem').Chain | null;
2404
+ dataSuffix?: `0x${string}`;
2405
+ gas?: bigint;
2406
+ gasPrice?: bigint;
2407
+ maxFeePerGas?: bigint;
2408
+ maxPriorityFeePerGas?: bigint;
2409
+ nonce?: number;
2410
+ value?: bigint;
2411
+ }): Promise<void> {
2412
+ return contract.simulate.removeModule([_module] as const, options) as Promise<void>;
2413
+ },
2414
+ /**
2415
+ * Simulate removePendingModule
2416
+ * Returns gas estimate and result without sending transaction
2417
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2418
+ */
2419
+ async removePendingModule(_module: `0x${string}`, options?: {
2420
+ accessList?: import('viem').AccessList;
2421
+ authorizationList?: import('viem').AuthorizationList;
2422
+ chain?: import('viem').Chain | null;
2423
+ dataSuffix?: `0x${string}`;
2424
+ gas?: bigint;
2425
+ gasPrice?: bigint;
2426
+ maxFeePerGas?: bigint;
2427
+ maxPriorityFeePerGas?: bigint;
2428
+ nonce?: number;
2429
+ value?: bigint;
2430
+ }): Promise<void> {
2431
+ return contract.simulate.removePendingModule([_module] as const, options) as Promise<void>;
2432
+ },
2433
+ /**
2434
+ * Simulate setManager
2435
+ * Returns gas estimate and result without sending transaction
2436
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2437
+ */
2438
+ async setManager(_manager: `0x${string}`, options?: {
2439
+ accessList?: import('viem').AccessList;
2440
+ authorizationList?: import('viem').AuthorizationList;
2441
+ chain?: import('viem').Chain | null;
2442
+ dataSuffix?: `0x${string}`;
2443
+ gas?: bigint;
2444
+ gasPrice?: bigint;
2445
+ maxFeePerGas?: bigint;
2446
+ maxPriorityFeePerGas?: bigint;
2447
+ nonce?: number;
2448
+ value?: bigint;
2449
+ }): Promise<void> {
2450
+ return contract.simulate.setManager([_manager] as const, options) as Promise<void>;
2451
+ },
2452
+ /**
2453
+ * Simulate transfer
2454
+ * Returns gas estimate and result without sending transaction
2455
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2456
+ */
2457
+ async transfer(recipient: `0x${string}`, amount: bigint, options?: {
2458
+ accessList?: import('viem').AccessList;
2459
+ authorizationList?: import('viem').AuthorizationList;
2460
+ chain?: import('viem').Chain | null;
2461
+ dataSuffix?: `0x${string}`;
2462
+ gas?: bigint;
2463
+ gasPrice?: bigint;
2464
+ maxFeePerGas?: bigint;
2465
+ maxPriorityFeePerGas?: bigint;
2466
+ nonce?: number;
2467
+ value?: bigint;
2468
+ }): Promise<boolean> {
2469
+ return contract.simulate.transfer([recipient, amount] as const, options) as Promise<boolean>;
2470
+ },
2471
+ /**
2472
+ * Simulate transferFrom
2473
+ * Returns gas estimate and result without sending transaction
2474
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2475
+ */
2476
+ async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
2477
+ accessList?: import('viem').AccessList;
2478
+ authorizationList?: import('viem').AuthorizationList;
2479
+ chain?: import('viem').Chain | null;
2480
+ dataSuffix?: `0x${string}`;
2481
+ gas?: bigint;
2482
+ gasPrice?: bigint;
2483
+ maxFeePerGas?: bigint;
2484
+ maxPriorityFeePerGas?: bigint;
2485
+ nonce?: number;
2486
+ value?: bigint;
2487
+ }): Promise<boolean> {
2488
+ return contract.simulate.transferFrom([sender, recipient, amount] as const, options) as Promise<boolean>;
2489
+ },
2490
+ /**
2491
+ * Simulate unlock
2492
+ * Returns gas estimate and result without sending transaction
2493
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2494
+ */
2495
+ async unlock(options?: {
2496
+ accessList?: import('viem').AccessList;
2497
+ authorizationList?: import('viem').AuthorizationList;
2498
+ chain?: import('viem').Chain | null;
2499
+ dataSuffix?: `0x${string}`;
2500
+ gas?: bigint;
2501
+ gasPrice?: bigint;
2502
+ maxFeePerGas?: bigint;
2503
+ maxPriorityFeePerGas?: bigint;
2504
+ nonce?: number;
2505
+ value?: bigint;
2506
+ }): Promise<void> {
2507
+ return contract.simulate.unlock(options) as Promise<void>;
2508
+ }
2509
+ };
2510
+ }
2511
+
2512
+ /**
2513
+ * Watch contract events
2514
+ *
2515
+ * @example
2516
+ * // Watch all Transfer events
2517
+ * const unwatch = contract.watch.Transfer((event) => {
2518
+ * console.log('Transfer:', event);
2519
+ * });
2520
+ *
2521
+ * // Stop watching
2522
+ * unwatch();
2523
+ */
2524
+ get watch() {
2525
+ return {
2526
+ /**
2527
+ * Watch Approval events
2528
+ * @param callback Function to call when event is emitted
2529
+ * @param filter Optional filter for indexed parameters
2530
+ * @returns Unwatch function to stop listening
2531
+ */
2532
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
2533
+ return this.publicClient.watchContractEvent({
2534
+ address: this.contractAddress,
2535
+ abi: SetToken_jsonAbi,
2536
+ eventName: 'Approval',
2537
+ args: filter,
2538
+ onLogs: (logs: any[]) => {
2539
+ logs.forEach((log: any) => {
2540
+ callback(log.args as any);
2541
+ });
2542
+ },
2543
+ }) as () => void;
2544
+ },
2545
+ /**
2546
+ * Watch ComponentAdded events
2547
+ * @param callback Function to call when event is emitted
2548
+ * @param filter Optional filter for indexed parameters
2549
+ * @returns Unwatch function to stop listening
2550
+ */
2551
+ ComponentAdded: (callback: (event: { _component: `0x${string}` }) => void, filter?: { _component: `0x${string}` }) => {
2552
+ return this.publicClient.watchContractEvent({
2553
+ address: this.contractAddress,
2554
+ abi: SetToken_jsonAbi,
2555
+ eventName: 'ComponentAdded',
2556
+ args: filter,
2557
+ onLogs: (logs: any[]) => {
2558
+ logs.forEach((log: any) => {
2559
+ callback(log.args as any);
2560
+ });
2561
+ },
2562
+ }) as () => void;
2563
+ },
2564
+ /**
2565
+ * Watch ComponentRemoved events
2566
+ * @param callback Function to call when event is emitted
2567
+ * @param filter Optional filter for indexed parameters
2568
+ * @returns Unwatch function to stop listening
2569
+ */
2570
+ ComponentRemoved: (callback: (event: { _component: `0x${string}` }) => void, filter?: { _component: `0x${string}` }) => {
2571
+ return this.publicClient.watchContractEvent({
2572
+ address: this.contractAddress,
2573
+ abi: SetToken_jsonAbi,
2574
+ eventName: 'ComponentRemoved',
2575
+ args: filter,
2576
+ onLogs: (logs: any[]) => {
2577
+ logs.forEach((log: any) => {
2578
+ callback(log.args as any);
2579
+ });
2580
+ },
2581
+ }) as () => void;
2582
+ },
2583
+ /**
2584
+ * Watch DefaultPositionUnitEdited events
2585
+ * @param callback Function to call when event is emitted
2586
+ * @param filter Optional filter for indexed parameters
2587
+ * @returns Unwatch function to stop listening
2588
+ */
2589
+ DefaultPositionUnitEdited: (callback: (event: { _component: `0x${string}`; _realUnit: bigint }) => void, filter?: { _component: `0x${string}` }) => {
2590
+ return this.publicClient.watchContractEvent({
2591
+ address: this.contractAddress,
2592
+ abi: SetToken_jsonAbi,
2593
+ eventName: 'DefaultPositionUnitEdited',
2594
+ args: filter,
2595
+ onLogs: (logs: any[]) => {
2596
+ logs.forEach((log: any) => {
2597
+ callback(log.args as any);
2598
+ });
2599
+ },
2600
+ }) as () => void;
2601
+ },
2602
+ /**
2603
+ * Watch ExternalPositionDataEdited events
2604
+ * @param callback Function to call when event is emitted
2605
+ * @param filter Optional filter for indexed parameters
2606
+ * @returns Unwatch function to stop listening
2607
+ */
2608
+ ExternalPositionDataEdited: (callback: (event: { _component: `0x${string}`; _positionModule: `0x${string}`; _data: `0x${string}` }) => void, filter?: { _component: `0x${string}`; _positionModule: `0x${string}` }) => {
2609
+ return this.publicClient.watchContractEvent({
2610
+ address: this.contractAddress,
2611
+ abi: SetToken_jsonAbi,
2612
+ eventName: 'ExternalPositionDataEdited',
2613
+ args: filter,
2614
+ onLogs: (logs: any[]) => {
2615
+ logs.forEach((log: any) => {
2616
+ callback(log.args as any);
2617
+ });
2618
+ },
2619
+ }) as () => void;
2620
+ },
2621
+ /**
2622
+ * Watch ExternalPositionUnitEdited events
2623
+ * @param callback Function to call when event is emitted
2624
+ * @param filter Optional filter for indexed parameters
2625
+ * @returns Unwatch function to stop listening
2626
+ */
2627
+ ExternalPositionUnitEdited: (callback: (event: { _component: `0x${string}`; _positionModule: `0x${string}`; _realUnit: bigint }) => void, filter?: { _component: `0x${string}`; _positionModule: `0x${string}` }) => {
2628
+ return this.publicClient.watchContractEvent({
2629
+ address: this.contractAddress,
2630
+ abi: SetToken_jsonAbi,
2631
+ eventName: 'ExternalPositionUnitEdited',
2632
+ args: filter,
2633
+ onLogs: (logs: any[]) => {
2634
+ logs.forEach((log: any) => {
2635
+ callback(log.args as any);
2636
+ });
2637
+ },
2638
+ }) as () => void;
2639
+ },
2640
+ /**
2641
+ * Watch Invoked events
2642
+ * @param callback Function to call when event is emitted
2643
+ * @param filter Optional filter for indexed parameters
2644
+ * @returns Unwatch function to stop listening
2645
+ */
2646
+ Invoked: (callback: (event: { _target: `0x${string}`; _value: bigint; _data: `0x${string}`; _returnValue: `0x${string}` }) => void, filter?: { _target: `0x${string}`; _value: bigint }) => {
2647
+ return this.publicClient.watchContractEvent({
2648
+ address: this.contractAddress,
2649
+ abi: SetToken_jsonAbi,
2650
+ eventName: 'Invoked',
2651
+ args: filter,
2652
+ onLogs: (logs: any[]) => {
2653
+ logs.forEach((log: any) => {
2654
+ callback(log.args as any);
2655
+ });
2656
+ },
2657
+ }) as () => void;
2658
+ },
2659
+ /**
2660
+ * Watch ManagerEdited events
2661
+ * @param callback Function to call when event is emitted
2662
+ * @param filter Optional filter for indexed parameters
2663
+ * @returns Unwatch function to stop listening
2664
+ */
2665
+ ManagerEdited: (callback: (event: { _newManager: `0x${string}`; _oldManager: `0x${string}` }) => void) => {
2666
+ return this.publicClient.watchContractEvent({
2667
+ address: this.contractAddress,
2668
+ abi: SetToken_jsonAbi,
2669
+ eventName: 'ManagerEdited',
2670
+
2671
+ onLogs: (logs: any[]) => {
2672
+ logs.forEach((log: any) => {
2673
+ callback(log.args as any);
2674
+ });
2675
+ },
2676
+ }) as () => void;
2677
+ },
2678
+ /**
2679
+ * Watch ModuleAdded events
2680
+ * @param callback Function to call when event is emitted
2681
+ * @param filter Optional filter for indexed parameters
2682
+ * @returns Unwatch function to stop listening
2683
+ */
2684
+ ModuleAdded: (callback: (event: { _module: `0x${string}` }) => void, filter?: { _module: `0x${string}` }) => {
2685
+ return this.publicClient.watchContractEvent({
2686
+ address: this.contractAddress,
2687
+ abi: SetToken_jsonAbi,
2688
+ eventName: 'ModuleAdded',
2689
+ args: filter,
2690
+ onLogs: (logs: any[]) => {
2691
+ logs.forEach((log: any) => {
2692
+ callback(log.args as any);
2693
+ });
2694
+ },
2695
+ }) as () => void;
2696
+ },
2697
+ /**
2698
+ * Watch ModuleInitialized events
2699
+ * @param callback Function to call when event is emitted
2700
+ * @param filter Optional filter for indexed parameters
2701
+ * @returns Unwatch function to stop listening
2702
+ */
2703
+ ModuleInitialized: (callback: (event: { _module: `0x${string}` }) => void, filter?: { _module: `0x${string}` }) => {
2704
+ return this.publicClient.watchContractEvent({
2705
+ address: this.contractAddress,
2706
+ abi: SetToken_jsonAbi,
2707
+ eventName: 'ModuleInitialized',
2708
+ args: filter,
2709
+ onLogs: (logs: any[]) => {
2710
+ logs.forEach((log: any) => {
2711
+ callback(log.args as any);
2712
+ });
2713
+ },
2714
+ }) as () => void;
2715
+ },
2716
+ /**
2717
+ * Watch ModuleRemoved events
2718
+ * @param callback Function to call when event is emitted
2719
+ * @param filter Optional filter for indexed parameters
2720
+ * @returns Unwatch function to stop listening
2721
+ */
2722
+ ModuleRemoved: (callback: (event: { _module: `0x${string}` }) => void, filter?: { _module: `0x${string}` }) => {
2723
+ return this.publicClient.watchContractEvent({
2724
+ address: this.contractAddress,
2725
+ abi: SetToken_jsonAbi,
2726
+ eventName: 'ModuleRemoved',
2727
+ args: filter,
2728
+ onLogs: (logs: any[]) => {
2729
+ logs.forEach((log: any) => {
2730
+ callback(log.args as any);
2731
+ });
2732
+ },
2733
+ }) as () => void;
2734
+ },
2735
+ /**
2736
+ * Watch PendingModuleRemoved events
2737
+ * @param callback Function to call when event is emitted
2738
+ * @param filter Optional filter for indexed parameters
2739
+ * @returns Unwatch function to stop listening
2740
+ */
2741
+ PendingModuleRemoved: (callback: (event: { _module: `0x${string}` }) => void, filter?: { _module: `0x${string}` }) => {
2742
+ return this.publicClient.watchContractEvent({
2743
+ address: this.contractAddress,
2744
+ abi: SetToken_jsonAbi,
2745
+ eventName: 'PendingModuleRemoved',
2746
+ args: filter,
2747
+ onLogs: (logs: any[]) => {
2748
+ logs.forEach((log: any) => {
2749
+ callback(log.args as any);
2750
+ });
2751
+ },
2752
+ }) as () => void;
2753
+ },
2754
+ /**
2755
+ * Watch PositionModuleAdded events
2756
+ * @param callback Function to call when event is emitted
2757
+ * @param filter Optional filter for indexed parameters
2758
+ * @returns Unwatch function to stop listening
2759
+ */
2760
+ PositionModuleAdded: (callback: (event: { _component: `0x${string}`; _positionModule: `0x${string}` }) => void, filter?: { _component: `0x${string}`; _positionModule: `0x${string}` }) => {
2761
+ return this.publicClient.watchContractEvent({
2762
+ address: this.contractAddress,
2763
+ abi: SetToken_jsonAbi,
2764
+ eventName: 'PositionModuleAdded',
2765
+ args: filter,
2766
+ onLogs: (logs: any[]) => {
2767
+ logs.forEach((log: any) => {
2768
+ callback(log.args as any);
2769
+ });
2770
+ },
2771
+ }) as () => void;
2772
+ },
2773
+ /**
2774
+ * Watch PositionModuleRemoved events
2775
+ * @param callback Function to call when event is emitted
2776
+ * @param filter Optional filter for indexed parameters
2777
+ * @returns Unwatch function to stop listening
2778
+ */
2779
+ PositionModuleRemoved: (callback: (event: { _component: `0x${string}`; _positionModule: `0x${string}` }) => void, filter?: { _component: `0x${string}`; _positionModule: `0x${string}` }) => {
2780
+ return this.publicClient.watchContractEvent({
2781
+ address: this.contractAddress,
2782
+ abi: SetToken_jsonAbi,
2783
+ eventName: 'PositionModuleRemoved',
2784
+ args: filter,
2785
+ onLogs: (logs: any[]) => {
2786
+ logs.forEach((log: any) => {
2787
+ callback(log.args as any);
2788
+ });
2789
+ },
2790
+ }) as () => void;
2791
+ },
2792
+ /**
2793
+ * Watch PositionMultiplierEdited events
2794
+ * @param callback Function to call when event is emitted
2795
+ * @param filter Optional filter for indexed parameters
2796
+ * @returns Unwatch function to stop listening
2797
+ */
2798
+ PositionMultiplierEdited: (callback: (event: { _newMultiplier: bigint }) => void) => {
2799
+ return this.publicClient.watchContractEvent({
2800
+ address: this.contractAddress,
2801
+ abi: SetToken_jsonAbi,
2802
+ eventName: 'PositionMultiplierEdited',
2803
+
2804
+ onLogs: (logs: any[]) => {
2805
+ logs.forEach((log: any) => {
2806
+ callback(log.args as any);
2807
+ });
2808
+ },
2809
+ }) as () => void;
2810
+ },
2811
+ /**
2812
+ * Watch Transfer events
2813
+ * @param callback Function to call when event is emitted
2814
+ * @param filter Optional filter for indexed parameters
2815
+ * @returns Unwatch function to stop listening
2816
+ */
2817
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
2818
+ return this.publicClient.watchContractEvent({
2819
+ address: this.contractAddress,
2820
+ abi: SetToken_jsonAbi,
2821
+ eventName: 'Transfer',
2822
+ args: filter,
2823
+ onLogs: (logs: any[]) => {
2824
+ logs.forEach((log: any) => {
2825
+ callback(log.args as any);
2826
+ });
2827
+ },
2828
+ }) as () => void;
2829
+ }
2830
+ };
2831
+ }
2832
+ }