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