@gitmyabi-stg/amp 0.0.1

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,2128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Amp = exports.AmpAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * Amp ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.AmpAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "_swapTokenAddress_",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "string",
20
+ "name": "_name_",
21
+ "type": "string"
22
+ },
23
+ {
24
+ "internalType": "string",
25
+ "name": "_symbol_",
26
+ "type": "string"
27
+ }
28
+ ],
29
+ "stateMutability": "nonpayable",
30
+ "type": "constructor"
31
+ },
32
+ {
33
+ "anonymous": false,
34
+ "inputs": [
35
+ {
36
+ "indexed": true,
37
+ "internalType": "address",
38
+ "name": "owner",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "indexed": true,
43
+ "internalType": "address",
44
+ "name": "spender",
45
+ "type": "address"
46
+ },
47
+ {
48
+ "indexed": false,
49
+ "internalType": "uint256",
50
+ "name": "value",
51
+ "type": "uint256"
52
+ }
53
+ ],
54
+ "name": "Approval",
55
+ "type": "event"
56
+ },
57
+ {
58
+ "anonymous": false,
59
+ "inputs": [
60
+ {
61
+ "indexed": true,
62
+ "internalType": "bytes32",
63
+ "name": "partition",
64
+ "type": "bytes32"
65
+ },
66
+ {
67
+ "indexed": true,
68
+ "internalType": "address",
69
+ "name": "owner",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "indexed": true,
74
+ "internalType": "address",
75
+ "name": "spender",
76
+ "type": "address"
77
+ },
78
+ {
79
+ "indexed": false,
80
+ "internalType": "uint256",
81
+ "name": "value",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "name": "ApprovalByPartition",
86
+ "type": "event"
87
+ },
88
+ {
89
+ "anonymous": false,
90
+ "inputs": [
91
+ {
92
+ "indexed": true,
93
+ "internalType": "address",
94
+ "name": "operator",
95
+ "type": "address"
96
+ },
97
+ {
98
+ "indexed": true,
99
+ "internalType": "address",
100
+ "name": "tokenHolder",
101
+ "type": "address"
102
+ }
103
+ ],
104
+ "name": "AuthorizedOperator",
105
+ "type": "event"
106
+ },
107
+ {
108
+ "anonymous": false,
109
+ "inputs": [
110
+ {
111
+ "indexed": true,
112
+ "internalType": "bytes32",
113
+ "name": "partition",
114
+ "type": "bytes32"
115
+ },
116
+ {
117
+ "indexed": true,
118
+ "internalType": "address",
119
+ "name": "operator",
120
+ "type": "address"
121
+ },
122
+ {
123
+ "indexed": true,
124
+ "internalType": "address",
125
+ "name": "tokenHolder",
126
+ "type": "address"
127
+ }
128
+ ],
129
+ "name": "AuthorizedOperatorByPartition",
130
+ "type": "event"
131
+ },
132
+ {
133
+ "anonymous": false,
134
+ "inputs": [
135
+ {
136
+ "indexed": true,
137
+ "internalType": "bytes32",
138
+ "name": "fromPartition",
139
+ "type": "bytes32"
140
+ },
141
+ {
142
+ "indexed": true,
143
+ "internalType": "bytes32",
144
+ "name": "toPartition",
145
+ "type": "bytes32"
146
+ },
147
+ {
148
+ "indexed": false,
149
+ "internalType": "uint256",
150
+ "name": "value",
151
+ "type": "uint256"
152
+ }
153
+ ],
154
+ "name": "ChangedPartition",
155
+ "type": "event"
156
+ },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": false,
162
+ "internalType": "address",
163
+ "name": "collateralManager",
164
+ "type": "address"
165
+ }
166
+ ],
167
+ "name": "CollateralManagerRegistered",
168
+ "type": "event"
169
+ },
170
+ {
171
+ "anonymous": false,
172
+ "inputs": [
173
+ {
174
+ "indexed": true,
175
+ "internalType": "address",
176
+ "name": "operator",
177
+ "type": "address"
178
+ },
179
+ {
180
+ "indexed": true,
181
+ "internalType": "address",
182
+ "name": "to",
183
+ "type": "address"
184
+ },
185
+ {
186
+ "indexed": false,
187
+ "internalType": "uint256",
188
+ "name": "value",
189
+ "type": "uint256"
190
+ },
191
+ {
192
+ "indexed": false,
193
+ "internalType": "bytes",
194
+ "name": "data",
195
+ "type": "bytes"
196
+ }
197
+ ],
198
+ "name": "Minted",
199
+ "type": "event"
200
+ },
201
+ {
202
+ "anonymous": false,
203
+ "inputs": [
204
+ {
205
+ "indexed": true,
206
+ "internalType": "address",
207
+ "name": "oldValue",
208
+ "type": "address"
209
+ },
210
+ {
211
+ "indexed": true,
212
+ "internalType": "address",
213
+ "name": "newValue",
214
+ "type": "address"
215
+ }
216
+ ],
217
+ "name": "OwnerUpdate",
218
+ "type": "event"
219
+ },
220
+ {
221
+ "anonymous": false,
222
+ "inputs": [
223
+ {
224
+ "indexed": true,
225
+ "internalType": "address",
226
+ "name": "authorizedAddress",
227
+ "type": "address"
228
+ }
229
+ ],
230
+ "name": "OwnershipTransferAuthorization",
231
+ "type": "event"
232
+ },
233
+ {
234
+ "anonymous": false,
235
+ "inputs": [
236
+ {
237
+ "indexed": false,
238
+ "internalType": "bytes4",
239
+ "name": "flag",
240
+ "type": "bytes4"
241
+ },
242
+ {
243
+ "indexed": false,
244
+ "internalType": "string",
245
+ "name": "name",
246
+ "type": "string"
247
+ },
248
+ {
249
+ "indexed": true,
250
+ "internalType": "address",
251
+ "name": "implementation",
252
+ "type": "address"
253
+ }
254
+ ],
255
+ "name": "PartitionStrategySet",
256
+ "type": "event"
257
+ },
258
+ {
259
+ "anonymous": false,
260
+ "inputs": [
261
+ {
262
+ "indexed": true,
263
+ "internalType": "address",
264
+ "name": "operator",
265
+ "type": "address"
266
+ },
267
+ {
268
+ "indexed": true,
269
+ "internalType": "address",
270
+ "name": "tokenHolder",
271
+ "type": "address"
272
+ }
273
+ ],
274
+ "name": "RevokedOperator",
275
+ "type": "event"
276
+ },
277
+ {
278
+ "anonymous": false,
279
+ "inputs": [
280
+ {
281
+ "indexed": true,
282
+ "internalType": "bytes32",
283
+ "name": "partition",
284
+ "type": "bytes32"
285
+ },
286
+ {
287
+ "indexed": true,
288
+ "internalType": "address",
289
+ "name": "operator",
290
+ "type": "address"
291
+ },
292
+ {
293
+ "indexed": true,
294
+ "internalType": "address",
295
+ "name": "tokenHolder",
296
+ "type": "address"
297
+ }
298
+ ],
299
+ "name": "RevokedOperatorByPartition",
300
+ "type": "event"
301
+ },
302
+ {
303
+ "anonymous": false,
304
+ "inputs": [
305
+ {
306
+ "indexed": true,
307
+ "internalType": "address",
308
+ "name": "operator",
309
+ "type": "address"
310
+ },
311
+ {
312
+ "indexed": true,
313
+ "internalType": "address",
314
+ "name": "from",
315
+ "type": "address"
316
+ },
317
+ {
318
+ "indexed": false,
319
+ "internalType": "uint256",
320
+ "name": "value",
321
+ "type": "uint256"
322
+ }
323
+ ],
324
+ "name": "Swap",
325
+ "type": "event"
326
+ },
327
+ {
328
+ "anonymous": false,
329
+ "inputs": [
330
+ {
331
+ "indexed": true,
332
+ "internalType": "address",
333
+ "name": "from",
334
+ "type": "address"
335
+ },
336
+ {
337
+ "indexed": true,
338
+ "internalType": "address",
339
+ "name": "to",
340
+ "type": "address"
341
+ },
342
+ {
343
+ "indexed": false,
344
+ "internalType": "uint256",
345
+ "name": "value",
346
+ "type": "uint256"
347
+ }
348
+ ],
349
+ "name": "Transfer",
350
+ "type": "event"
351
+ },
352
+ {
353
+ "anonymous": false,
354
+ "inputs": [
355
+ {
356
+ "indexed": true,
357
+ "internalType": "bytes32",
358
+ "name": "fromPartition",
359
+ "type": "bytes32"
360
+ },
361
+ {
362
+ "indexed": false,
363
+ "internalType": "address",
364
+ "name": "operator",
365
+ "type": "address"
366
+ },
367
+ {
368
+ "indexed": true,
369
+ "internalType": "address",
370
+ "name": "from",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "indexed": true,
375
+ "internalType": "address",
376
+ "name": "to",
377
+ "type": "address"
378
+ },
379
+ {
380
+ "indexed": false,
381
+ "internalType": "uint256",
382
+ "name": "value",
383
+ "type": "uint256"
384
+ },
385
+ {
386
+ "indexed": false,
387
+ "internalType": "bytes",
388
+ "name": "data",
389
+ "type": "bytes"
390
+ },
391
+ {
392
+ "indexed": false,
393
+ "internalType": "bytes",
394
+ "name": "operatorData",
395
+ "type": "bytes"
396
+ }
397
+ ],
398
+ "name": "TransferByPartition",
399
+ "type": "event"
400
+ },
401
+ {
402
+ "inputs": [
403
+ {
404
+ "internalType": "address",
405
+ "name": "_owner",
406
+ "type": "address"
407
+ },
408
+ {
409
+ "internalType": "address",
410
+ "name": "_spender",
411
+ "type": "address"
412
+ }
413
+ ],
414
+ "name": "allowance",
415
+ "outputs": [
416
+ {
417
+ "internalType": "uint256",
418
+ "name": "",
419
+ "type": "uint256"
420
+ }
421
+ ],
422
+ "stateMutability": "view",
423
+ "type": "function"
424
+ },
425
+ {
426
+ "inputs": [
427
+ {
428
+ "internalType": "bytes32",
429
+ "name": "_partition",
430
+ "type": "bytes32"
431
+ },
432
+ {
433
+ "internalType": "address",
434
+ "name": "_owner",
435
+ "type": "address"
436
+ },
437
+ {
438
+ "internalType": "address",
439
+ "name": "_spender",
440
+ "type": "address"
441
+ }
442
+ ],
443
+ "name": "allowanceByPartition",
444
+ "outputs": [
445
+ {
446
+ "internalType": "uint256",
447
+ "name": "",
448
+ "type": "uint256"
449
+ }
450
+ ],
451
+ "stateMutability": "view",
452
+ "type": "function"
453
+ },
454
+ {
455
+ "inputs": [
456
+ {
457
+ "internalType": "address",
458
+ "name": "_spender",
459
+ "type": "address"
460
+ },
461
+ {
462
+ "internalType": "uint256",
463
+ "name": "_value",
464
+ "type": "uint256"
465
+ }
466
+ ],
467
+ "name": "approve",
468
+ "outputs": [
469
+ {
470
+ "internalType": "bool",
471
+ "name": "",
472
+ "type": "bool"
473
+ }
474
+ ],
475
+ "stateMutability": "nonpayable",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [
480
+ {
481
+ "internalType": "bytes32",
482
+ "name": "_partition",
483
+ "type": "bytes32"
484
+ },
485
+ {
486
+ "internalType": "address",
487
+ "name": "_spender",
488
+ "type": "address"
489
+ },
490
+ {
491
+ "internalType": "uint256",
492
+ "name": "_value",
493
+ "type": "uint256"
494
+ }
495
+ ],
496
+ "name": "approveByPartition",
497
+ "outputs": [
498
+ {
499
+ "internalType": "bool",
500
+ "name": "",
501
+ "type": "bool"
502
+ }
503
+ ],
504
+ "stateMutability": "nonpayable",
505
+ "type": "function"
506
+ },
507
+ {
508
+ "inputs": [],
509
+ "name": "assumeOwnership",
510
+ "outputs": [],
511
+ "stateMutability": "nonpayable",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [
516
+ {
517
+ "internalType": "address",
518
+ "name": "_operator",
519
+ "type": "address"
520
+ }
521
+ ],
522
+ "name": "authorizeOperator",
523
+ "outputs": [],
524
+ "stateMutability": "nonpayable",
525
+ "type": "function"
526
+ },
527
+ {
528
+ "inputs": [
529
+ {
530
+ "internalType": "bytes32",
531
+ "name": "_partition",
532
+ "type": "bytes32"
533
+ },
534
+ {
535
+ "internalType": "address",
536
+ "name": "_operator",
537
+ "type": "address"
538
+ }
539
+ ],
540
+ "name": "authorizeOperatorByPartition",
541
+ "outputs": [],
542
+ "stateMutability": "nonpayable",
543
+ "type": "function"
544
+ },
545
+ {
546
+ "inputs": [
547
+ {
548
+ "internalType": "address",
549
+ "name": "_authorizedAddress",
550
+ "type": "address"
551
+ }
552
+ ],
553
+ "name": "authorizeOwnershipTransfer",
554
+ "outputs": [],
555
+ "stateMutability": "nonpayable",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [],
560
+ "name": "authorizedNewOwner",
561
+ "outputs": [
562
+ {
563
+ "internalType": "address",
564
+ "name": "",
565
+ "type": "address"
566
+ }
567
+ ],
568
+ "stateMutability": "view",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [
573
+ {
574
+ "internalType": "address",
575
+ "name": "_tokenHolder",
576
+ "type": "address"
577
+ }
578
+ ],
579
+ "name": "balanceOf",
580
+ "outputs": [
581
+ {
582
+ "internalType": "uint256",
583
+ "name": "",
584
+ "type": "uint256"
585
+ }
586
+ ],
587
+ "stateMutability": "view",
588
+ "type": "function"
589
+ },
590
+ {
591
+ "inputs": [
592
+ {
593
+ "internalType": "bytes32",
594
+ "name": "_partition",
595
+ "type": "bytes32"
596
+ },
597
+ {
598
+ "internalType": "address",
599
+ "name": "_tokenHolder",
600
+ "type": "address"
601
+ }
602
+ ],
603
+ "name": "balanceOfByPartition",
604
+ "outputs": [
605
+ {
606
+ "internalType": "uint256",
607
+ "name": "",
608
+ "type": "uint256"
609
+ }
610
+ ],
611
+ "stateMutability": "view",
612
+ "type": "function"
613
+ },
614
+ {
615
+ "inputs": [
616
+ {
617
+ "internalType": "bytes32",
618
+ "name": "_interfaceHash",
619
+ "type": "bytes32"
620
+ },
621
+ {
622
+ "internalType": "address",
623
+ "name": "",
624
+ "type": "address"
625
+ }
626
+ ],
627
+ "name": "canImplementInterfaceForAddress",
628
+ "outputs": [
629
+ {
630
+ "internalType": "bytes32",
631
+ "name": "",
632
+ "type": "bytes32"
633
+ }
634
+ ],
635
+ "stateMutability": "view",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "",
643
+ "type": "uint256"
644
+ }
645
+ ],
646
+ "name": "collateralManagers",
647
+ "outputs": [
648
+ {
649
+ "internalType": "address",
650
+ "name": "",
651
+ "type": "address"
652
+ }
653
+ ],
654
+ "stateMutability": "view",
655
+ "type": "function"
656
+ },
657
+ {
658
+ "inputs": [],
659
+ "name": "decimals",
660
+ "outputs": [
661
+ {
662
+ "internalType": "uint8",
663
+ "name": "",
664
+ "type": "uint8"
665
+ }
666
+ ],
667
+ "stateMutability": "pure",
668
+ "type": "function"
669
+ },
670
+ {
671
+ "inputs": [
672
+ {
673
+ "internalType": "address",
674
+ "name": "_spender",
675
+ "type": "address"
676
+ },
677
+ {
678
+ "internalType": "uint256",
679
+ "name": "_subtractedValue",
680
+ "type": "uint256"
681
+ }
682
+ ],
683
+ "name": "decreaseAllowance",
684
+ "outputs": [
685
+ {
686
+ "internalType": "bool",
687
+ "name": "",
688
+ "type": "bool"
689
+ }
690
+ ],
691
+ "stateMutability": "nonpayable",
692
+ "type": "function"
693
+ },
694
+ {
695
+ "inputs": [
696
+ {
697
+ "internalType": "bytes32",
698
+ "name": "_partition",
699
+ "type": "bytes32"
700
+ },
701
+ {
702
+ "internalType": "address",
703
+ "name": "_spender",
704
+ "type": "address"
705
+ },
706
+ {
707
+ "internalType": "uint256",
708
+ "name": "_subtractedValue",
709
+ "type": "uint256"
710
+ }
711
+ ],
712
+ "name": "decreaseAllowanceByPartition",
713
+ "outputs": [
714
+ {
715
+ "internalType": "bool",
716
+ "name": "",
717
+ "type": "bool"
718
+ }
719
+ ],
720
+ "stateMutability": "nonpayable",
721
+ "type": "function"
722
+ },
723
+ {
724
+ "inputs": [],
725
+ "name": "defaultPartition",
726
+ "outputs": [
727
+ {
728
+ "internalType": "bytes32",
729
+ "name": "",
730
+ "type": "bytes32"
731
+ }
732
+ ],
733
+ "stateMutability": "view",
734
+ "type": "function"
735
+ },
736
+ {
737
+ "inputs": [],
738
+ "name": "granularity",
739
+ "outputs": [
740
+ {
741
+ "internalType": "uint256",
742
+ "name": "",
743
+ "type": "uint256"
744
+ }
745
+ ],
746
+ "stateMutability": "pure",
747
+ "type": "function"
748
+ },
749
+ {
750
+ "inputs": [
751
+ {
752
+ "internalType": "address",
753
+ "name": "_spender",
754
+ "type": "address"
755
+ },
756
+ {
757
+ "internalType": "uint256",
758
+ "name": "_addedValue",
759
+ "type": "uint256"
760
+ }
761
+ ],
762
+ "name": "increaseAllowance",
763
+ "outputs": [
764
+ {
765
+ "internalType": "bool",
766
+ "name": "",
767
+ "type": "bool"
768
+ }
769
+ ],
770
+ "stateMutability": "nonpayable",
771
+ "type": "function"
772
+ },
773
+ {
774
+ "inputs": [
775
+ {
776
+ "internalType": "bytes32",
777
+ "name": "_partition",
778
+ "type": "bytes32"
779
+ },
780
+ {
781
+ "internalType": "address",
782
+ "name": "_spender",
783
+ "type": "address"
784
+ },
785
+ {
786
+ "internalType": "uint256",
787
+ "name": "_addedValue",
788
+ "type": "uint256"
789
+ }
790
+ ],
791
+ "name": "increaseAllowanceByPartition",
792
+ "outputs": [
793
+ {
794
+ "internalType": "bool",
795
+ "name": "",
796
+ "type": "bool"
797
+ }
798
+ ],
799
+ "stateMutability": "nonpayable",
800
+ "type": "function"
801
+ },
802
+ {
803
+ "inputs": [
804
+ {
805
+ "internalType": "address",
806
+ "name": "_collateralManager",
807
+ "type": "address"
808
+ }
809
+ ],
810
+ "name": "isCollateralManager",
811
+ "outputs": [
812
+ {
813
+ "internalType": "bool",
814
+ "name": "",
815
+ "type": "bool"
816
+ }
817
+ ],
818
+ "stateMutability": "view",
819
+ "type": "function"
820
+ },
821
+ {
822
+ "inputs": [
823
+ {
824
+ "internalType": "address",
825
+ "name": "_operator",
826
+ "type": "address"
827
+ },
828
+ {
829
+ "internalType": "address",
830
+ "name": "_tokenHolder",
831
+ "type": "address"
832
+ }
833
+ ],
834
+ "name": "isOperator",
835
+ "outputs": [
836
+ {
837
+ "internalType": "bool",
838
+ "name": "",
839
+ "type": "bool"
840
+ }
841
+ ],
842
+ "stateMutability": "view",
843
+ "type": "function"
844
+ },
845
+ {
846
+ "inputs": [
847
+ {
848
+ "internalType": "bytes32",
849
+ "name": "_partition",
850
+ "type": "bytes32"
851
+ },
852
+ {
853
+ "internalType": "address",
854
+ "name": "_operator",
855
+ "type": "address"
856
+ },
857
+ {
858
+ "internalType": "address",
859
+ "name": "_collateralManager",
860
+ "type": "address"
861
+ }
862
+ ],
863
+ "name": "isOperatorForCollateralManager",
864
+ "outputs": [
865
+ {
866
+ "internalType": "bool",
867
+ "name": "",
868
+ "type": "bool"
869
+ }
870
+ ],
871
+ "stateMutability": "view",
872
+ "type": "function"
873
+ },
874
+ {
875
+ "inputs": [
876
+ {
877
+ "internalType": "bytes32",
878
+ "name": "_partition",
879
+ "type": "bytes32"
880
+ },
881
+ {
882
+ "internalType": "address",
883
+ "name": "_operator",
884
+ "type": "address"
885
+ },
886
+ {
887
+ "internalType": "address",
888
+ "name": "_tokenHolder",
889
+ "type": "address"
890
+ }
891
+ ],
892
+ "name": "isOperatorForPartition",
893
+ "outputs": [
894
+ {
895
+ "internalType": "bool",
896
+ "name": "",
897
+ "type": "bool"
898
+ }
899
+ ],
900
+ "stateMutability": "view",
901
+ "type": "function"
902
+ },
903
+ {
904
+ "inputs": [
905
+ {
906
+ "internalType": "bytes4",
907
+ "name": "_prefix",
908
+ "type": "bytes4"
909
+ }
910
+ ],
911
+ "name": "isPartitionStrategy",
912
+ "outputs": [
913
+ {
914
+ "internalType": "bool",
915
+ "name": "",
916
+ "type": "bool"
917
+ }
918
+ ],
919
+ "stateMutability": "view",
920
+ "type": "function"
921
+ },
922
+ {
923
+ "inputs": [],
924
+ "name": "name",
925
+ "outputs": [
926
+ {
927
+ "internalType": "string",
928
+ "name": "",
929
+ "type": "string"
930
+ }
931
+ ],
932
+ "stateMutability": "view",
933
+ "type": "function"
934
+ },
935
+ {
936
+ "inputs": [],
937
+ "name": "owner",
938
+ "outputs": [
939
+ {
940
+ "internalType": "address",
941
+ "name": "",
942
+ "type": "address"
943
+ }
944
+ ],
945
+ "stateMutability": "view",
946
+ "type": "function"
947
+ },
948
+ {
949
+ "inputs": [
950
+ {
951
+ "internalType": "uint256",
952
+ "name": "",
953
+ "type": "uint256"
954
+ }
955
+ ],
956
+ "name": "partitionStrategies",
957
+ "outputs": [
958
+ {
959
+ "internalType": "bytes4",
960
+ "name": "",
961
+ "type": "bytes4"
962
+ }
963
+ ],
964
+ "stateMutability": "view",
965
+ "type": "function"
966
+ },
967
+ {
968
+ "inputs": [
969
+ {
970
+ "internalType": "address",
971
+ "name": "_tokenHolder",
972
+ "type": "address"
973
+ }
974
+ ],
975
+ "name": "partitionsOf",
976
+ "outputs": [
977
+ {
978
+ "internalType": "bytes32[]",
979
+ "name": "",
980
+ "type": "bytes32[]"
981
+ }
982
+ ],
983
+ "stateMutability": "view",
984
+ "type": "function"
985
+ },
986
+ {
987
+ "inputs": [],
988
+ "name": "registerCollateralManager",
989
+ "outputs": [],
990
+ "stateMutability": "nonpayable",
991
+ "type": "function"
992
+ },
993
+ {
994
+ "inputs": [
995
+ {
996
+ "internalType": "address",
997
+ "name": "_operator",
998
+ "type": "address"
999
+ }
1000
+ ],
1001
+ "name": "revokeOperator",
1002
+ "outputs": [],
1003
+ "stateMutability": "nonpayable",
1004
+ "type": "function"
1005
+ },
1006
+ {
1007
+ "inputs": [
1008
+ {
1009
+ "internalType": "bytes32",
1010
+ "name": "_partition",
1011
+ "type": "bytes32"
1012
+ },
1013
+ {
1014
+ "internalType": "address",
1015
+ "name": "_operator",
1016
+ "type": "address"
1017
+ }
1018
+ ],
1019
+ "name": "revokeOperatorByPartition",
1020
+ "outputs": [],
1021
+ "stateMutability": "nonpayable",
1022
+ "type": "function"
1023
+ },
1024
+ {
1025
+ "inputs": [
1026
+ {
1027
+ "internalType": "bytes4",
1028
+ "name": "_prefix",
1029
+ "type": "bytes4"
1030
+ },
1031
+ {
1032
+ "internalType": "address",
1033
+ "name": "_implementation",
1034
+ "type": "address"
1035
+ }
1036
+ ],
1037
+ "name": "setPartitionStrategy",
1038
+ "outputs": [],
1039
+ "stateMutability": "nonpayable",
1040
+ "type": "function"
1041
+ },
1042
+ {
1043
+ "inputs": [
1044
+ {
1045
+ "internalType": "address",
1046
+ "name": "_from",
1047
+ "type": "address"
1048
+ }
1049
+ ],
1050
+ "name": "swap",
1051
+ "outputs": [],
1052
+ "stateMutability": "nonpayable",
1053
+ "type": "function"
1054
+ },
1055
+ {
1056
+ "inputs": [],
1057
+ "name": "swapToken",
1058
+ "outputs": [
1059
+ {
1060
+ "internalType": "contract ISwapToken",
1061
+ "name": "",
1062
+ "type": "address"
1063
+ }
1064
+ ],
1065
+ "stateMutability": "view",
1066
+ "type": "function"
1067
+ },
1068
+ {
1069
+ "inputs": [],
1070
+ "name": "swapTokenGraveyard",
1071
+ "outputs": [
1072
+ {
1073
+ "internalType": "address",
1074
+ "name": "",
1075
+ "type": "address"
1076
+ }
1077
+ ],
1078
+ "stateMutability": "view",
1079
+ "type": "function"
1080
+ },
1081
+ {
1082
+ "inputs": [],
1083
+ "name": "symbol",
1084
+ "outputs": [
1085
+ {
1086
+ "internalType": "string",
1087
+ "name": "",
1088
+ "type": "string"
1089
+ }
1090
+ ],
1091
+ "stateMutability": "view",
1092
+ "type": "function"
1093
+ },
1094
+ {
1095
+ "inputs": [],
1096
+ "name": "totalPartitions",
1097
+ "outputs": [
1098
+ {
1099
+ "internalType": "bytes32[]",
1100
+ "name": "",
1101
+ "type": "bytes32[]"
1102
+ }
1103
+ ],
1104
+ "stateMutability": "view",
1105
+ "type": "function"
1106
+ },
1107
+ {
1108
+ "inputs": [],
1109
+ "name": "totalSupply",
1110
+ "outputs": [
1111
+ {
1112
+ "internalType": "uint256",
1113
+ "name": "",
1114
+ "type": "uint256"
1115
+ }
1116
+ ],
1117
+ "stateMutability": "view",
1118
+ "type": "function"
1119
+ },
1120
+ {
1121
+ "inputs": [
1122
+ {
1123
+ "internalType": "bytes32",
1124
+ "name": "",
1125
+ "type": "bytes32"
1126
+ }
1127
+ ],
1128
+ "name": "totalSupplyByPartition",
1129
+ "outputs": [
1130
+ {
1131
+ "internalType": "uint256",
1132
+ "name": "",
1133
+ "type": "uint256"
1134
+ }
1135
+ ],
1136
+ "stateMutability": "view",
1137
+ "type": "function"
1138
+ },
1139
+ {
1140
+ "inputs": [
1141
+ {
1142
+ "internalType": "address",
1143
+ "name": "_to",
1144
+ "type": "address"
1145
+ },
1146
+ {
1147
+ "internalType": "uint256",
1148
+ "name": "_value",
1149
+ "type": "uint256"
1150
+ }
1151
+ ],
1152
+ "name": "transfer",
1153
+ "outputs": [
1154
+ {
1155
+ "internalType": "bool",
1156
+ "name": "",
1157
+ "type": "bool"
1158
+ }
1159
+ ],
1160
+ "stateMutability": "nonpayable",
1161
+ "type": "function"
1162
+ },
1163
+ {
1164
+ "inputs": [
1165
+ {
1166
+ "internalType": "bytes32",
1167
+ "name": "_partition",
1168
+ "type": "bytes32"
1169
+ },
1170
+ {
1171
+ "internalType": "address",
1172
+ "name": "_from",
1173
+ "type": "address"
1174
+ },
1175
+ {
1176
+ "internalType": "address",
1177
+ "name": "_to",
1178
+ "type": "address"
1179
+ },
1180
+ {
1181
+ "internalType": "uint256",
1182
+ "name": "_value",
1183
+ "type": "uint256"
1184
+ },
1185
+ {
1186
+ "internalType": "bytes",
1187
+ "name": "_data",
1188
+ "type": "bytes"
1189
+ },
1190
+ {
1191
+ "internalType": "bytes",
1192
+ "name": "_operatorData",
1193
+ "type": "bytes"
1194
+ }
1195
+ ],
1196
+ "name": "transferByPartition",
1197
+ "outputs": [
1198
+ {
1199
+ "internalType": "bytes32",
1200
+ "name": "",
1201
+ "type": "bytes32"
1202
+ }
1203
+ ],
1204
+ "stateMutability": "nonpayable",
1205
+ "type": "function"
1206
+ },
1207
+ {
1208
+ "inputs": [
1209
+ {
1210
+ "internalType": "address",
1211
+ "name": "_from",
1212
+ "type": "address"
1213
+ },
1214
+ {
1215
+ "internalType": "address",
1216
+ "name": "_to",
1217
+ "type": "address"
1218
+ },
1219
+ {
1220
+ "internalType": "uint256",
1221
+ "name": "_value",
1222
+ "type": "uint256"
1223
+ }
1224
+ ],
1225
+ "name": "transferFrom",
1226
+ "outputs": [
1227
+ {
1228
+ "internalType": "bool",
1229
+ "name": "",
1230
+ "type": "bool"
1231
+ }
1232
+ ],
1233
+ "stateMutability": "nonpayable",
1234
+ "type": "function"
1235
+ }
1236
+ ];
1237
+ /**
1238
+ * Amp Contract Class
1239
+ *
1240
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1241
+ *
1242
+ * @example
1243
+ * ```typescript
1244
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1245
+ * import { mainnet } from 'viem/chains';
1246
+ * import { Amp } from 'Amp';
1247
+ *
1248
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1249
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1250
+ *
1251
+ * const contract = new Amp('0x...', { publicClient, walletClient });
1252
+ *
1253
+ * // Read functions
1254
+ * const result = await contract.balanceOf('0x...');
1255
+ *
1256
+ * // Write functions
1257
+ * const hash = await contract.transfer('0x...', 1000n);
1258
+ *
1259
+ * // Simulate transactions (dry-run)
1260
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1261
+ * console.log('Gas estimate:', simulation.request.gas);
1262
+ *
1263
+ * // Watch events
1264
+ * const unwatch = contract.watch.Transfer((event) => {
1265
+ * console.log('Transfer event:', event);
1266
+ * });
1267
+ * ```
1268
+ */
1269
+ class Amp {
1270
+ constructor(address, clients) {
1271
+ this.contractAddress = address;
1272
+ this.publicClient = clients.publicClient;
1273
+ this.contract = (0, viem_1.getContract)({
1274
+ address,
1275
+ abi: exports.AmpAbi,
1276
+ client: {
1277
+ public: clients.publicClient,
1278
+ wallet: clients.walletClient,
1279
+ },
1280
+ });
1281
+ }
1282
+ /**
1283
+ * Get the contract address
1284
+ */
1285
+ get address() {
1286
+ return this.contractAddress;
1287
+ }
1288
+ /**
1289
+ * Get the underlying viem contract instance.
1290
+ */
1291
+ getContract() {
1292
+ return this.contract;
1293
+ }
1294
+ /**
1295
+ * allowance
1296
+ * view
1297
+ */
1298
+ async allowance(_owner, _spender) {
1299
+ return this.contract.read.allowance([_owner, _spender]);
1300
+ }
1301
+ /**
1302
+ * allowanceByPartition
1303
+ * view
1304
+ */
1305
+ async allowanceByPartition(_partition, _owner, _spender) {
1306
+ return this.contract.read.allowanceByPartition([_partition, _owner, _spender]);
1307
+ }
1308
+ /**
1309
+ * authorizedNewOwner
1310
+ * view
1311
+ */
1312
+ async authorizedNewOwner() {
1313
+ return this.contract.read.authorizedNewOwner();
1314
+ }
1315
+ /**
1316
+ * balanceOf
1317
+ * view
1318
+ */
1319
+ async balanceOf(_tokenHolder) {
1320
+ return this.contract.read.balanceOf([_tokenHolder]);
1321
+ }
1322
+ /**
1323
+ * balanceOfByPartition
1324
+ * view
1325
+ */
1326
+ async balanceOfByPartition(_partition, _tokenHolder) {
1327
+ return this.contract.read.balanceOfByPartition([_partition, _tokenHolder]);
1328
+ }
1329
+ /**
1330
+ * canImplementInterfaceForAddress
1331
+ * view
1332
+ */
1333
+ async canImplementInterfaceForAddress(_interfaceHash, arg1) {
1334
+ return this.contract.read.canImplementInterfaceForAddress([_interfaceHash, arg1]);
1335
+ }
1336
+ /**
1337
+ * collateralManagers
1338
+ * view
1339
+ */
1340
+ async collateralManagers(arg0) {
1341
+ return this.contract.read.collateralManagers([arg0]);
1342
+ }
1343
+ /**
1344
+ * decimals
1345
+ * pure
1346
+ */
1347
+ async decimals() {
1348
+ return this.contract.read.decimals();
1349
+ }
1350
+ /**
1351
+ * defaultPartition
1352
+ * view
1353
+ */
1354
+ async defaultPartition() {
1355
+ return this.contract.read.defaultPartition();
1356
+ }
1357
+ /**
1358
+ * granularity
1359
+ * pure
1360
+ */
1361
+ async granularity() {
1362
+ return this.contract.read.granularity();
1363
+ }
1364
+ /**
1365
+ * isCollateralManager
1366
+ * view
1367
+ */
1368
+ async isCollateralManager(_collateralManager) {
1369
+ return this.contract.read.isCollateralManager([_collateralManager]);
1370
+ }
1371
+ /**
1372
+ * isOperator
1373
+ * view
1374
+ */
1375
+ async isOperator(_operator, _tokenHolder) {
1376
+ return this.contract.read.isOperator([_operator, _tokenHolder]);
1377
+ }
1378
+ /**
1379
+ * isOperatorForCollateralManager
1380
+ * view
1381
+ */
1382
+ async isOperatorForCollateralManager(_partition, _operator, _collateralManager) {
1383
+ return this.contract.read.isOperatorForCollateralManager([_partition, _operator, _collateralManager]);
1384
+ }
1385
+ /**
1386
+ * isOperatorForPartition
1387
+ * view
1388
+ */
1389
+ async isOperatorForPartition(_partition, _operator, _tokenHolder) {
1390
+ return this.contract.read.isOperatorForPartition([_partition, _operator, _tokenHolder]);
1391
+ }
1392
+ /**
1393
+ * isPartitionStrategy
1394
+ * view
1395
+ */
1396
+ async isPartitionStrategy(_prefix) {
1397
+ return this.contract.read.isPartitionStrategy([_prefix]);
1398
+ }
1399
+ /**
1400
+ * name
1401
+ * view
1402
+ */
1403
+ async name() {
1404
+ return this.contract.read.name();
1405
+ }
1406
+ /**
1407
+ * owner
1408
+ * view
1409
+ */
1410
+ async owner() {
1411
+ return this.contract.read.owner();
1412
+ }
1413
+ /**
1414
+ * partitionStrategies
1415
+ * view
1416
+ */
1417
+ async partitionStrategies(arg0) {
1418
+ return this.contract.read.partitionStrategies([arg0]);
1419
+ }
1420
+ /**
1421
+ * partitionsOf
1422
+ * view
1423
+ */
1424
+ async partitionsOf(_tokenHolder) {
1425
+ return this.contract.read.partitionsOf([_tokenHolder]);
1426
+ }
1427
+ /**
1428
+ * swapToken
1429
+ * view
1430
+ */
1431
+ async swapToken() {
1432
+ return this.contract.read.swapToken();
1433
+ }
1434
+ /**
1435
+ * swapTokenGraveyard
1436
+ * view
1437
+ */
1438
+ async swapTokenGraveyard() {
1439
+ return this.contract.read.swapTokenGraveyard();
1440
+ }
1441
+ /**
1442
+ * symbol
1443
+ * view
1444
+ */
1445
+ async symbol() {
1446
+ return this.contract.read.symbol();
1447
+ }
1448
+ /**
1449
+ * totalPartitions
1450
+ * view
1451
+ */
1452
+ async totalPartitions() {
1453
+ return this.contract.read.totalPartitions();
1454
+ }
1455
+ /**
1456
+ * totalSupply
1457
+ * view
1458
+ */
1459
+ async totalSupply() {
1460
+ return this.contract.read.totalSupply();
1461
+ }
1462
+ /**
1463
+ * totalSupplyByPartition
1464
+ * view
1465
+ */
1466
+ async totalSupplyByPartition(arg0) {
1467
+ return this.contract.read.totalSupplyByPartition([arg0]);
1468
+ }
1469
+ /**
1470
+ * approve
1471
+ * nonpayable
1472
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1473
+ */
1474
+ async approve(_spender, _value, options) {
1475
+ if (!this.contract.write) {
1476
+ throw new Error('Wallet client is required for write operations');
1477
+ }
1478
+ return this.contract.write.approve([_spender, _value], options);
1479
+ }
1480
+ /**
1481
+ * approveByPartition
1482
+ * nonpayable
1483
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1484
+ */
1485
+ async approveByPartition(_partition, _spender, _value, options) {
1486
+ if (!this.contract.write) {
1487
+ throw new Error('Wallet client is required for write operations');
1488
+ }
1489
+ return this.contract.write.approveByPartition([_partition, _spender, _value], options);
1490
+ }
1491
+ /**
1492
+ * assumeOwnership
1493
+ * nonpayable
1494
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1495
+ */
1496
+ async assumeOwnership(options) {
1497
+ if (!this.contract.write) {
1498
+ throw new Error('Wallet client is required for write operations');
1499
+ }
1500
+ return this.contract.write.assumeOwnership(options);
1501
+ }
1502
+ /**
1503
+ * authorizeOperator
1504
+ * nonpayable
1505
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1506
+ */
1507
+ async authorizeOperator(_operator, options) {
1508
+ if (!this.contract.write) {
1509
+ throw new Error('Wallet client is required for write operations');
1510
+ }
1511
+ return this.contract.write.authorizeOperator([_operator], options);
1512
+ }
1513
+ /**
1514
+ * authorizeOperatorByPartition
1515
+ * nonpayable
1516
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1517
+ */
1518
+ async authorizeOperatorByPartition(_partition, _operator, options) {
1519
+ if (!this.contract.write) {
1520
+ throw new Error('Wallet client is required for write operations');
1521
+ }
1522
+ return this.contract.write.authorizeOperatorByPartition([_partition, _operator], options);
1523
+ }
1524
+ /**
1525
+ * authorizeOwnershipTransfer
1526
+ * nonpayable
1527
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1528
+ */
1529
+ async authorizeOwnershipTransfer(_authorizedAddress, options) {
1530
+ if (!this.contract.write) {
1531
+ throw new Error('Wallet client is required for write operations');
1532
+ }
1533
+ return this.contract.write.authorizeOwnershipTransfer([_authorizedAddress], options);
1534
+ }
1535
+ /**
1536
+ * decreaseAllowance
1537
+ * nonpayable
1538
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1539
+ */
1540
+ async decreaseAllowance(_spender, _subtractedValue, options) {
1541
+ if (!this.contract.write) {
1542
+ throw new Error('Wallet client is required for write operations');
1543
+ }
1544
+ return this.contract.write.decreaseAllowance([_spender, _subtractedValue], options);
1545
+ }
1546
+ /**
1547
+ * decreaseAllowanceByPartition
1548
+ * nonpayable
1549
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1550
+ */
1551
+ async decreaseAllowanceByPartition(_partition, _spender, _subtractedValue, options) {
1552
+ if (!this.contract.write) {
1553
+ throw new Error('Wallet client is required for write operations');
1554
+ }
1555
+ return this.contract.write.decreaseAllowanceByPartition([_partition, _spender, _subtractedValue], options);
1556
+ }
1557
+ /**
1558
+ * increaseAllowance
1559
+ * nonpayable
1560
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1561
+ */
1562
+ async increaseAllowance(_spender, _addedValue, options) {
1563
+ if (!this.contract.write) {
1564
+ throw new Error('Wallet client is required for write operations');
1565
+ }
1566
+ return this.contract.write.increaseAllowance([_spender, _addedValue], options);
1567
+ }
1568
+ /**
1569
+ * increaseAllowanceByPartition
1570
+ * nonpayable
1571
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1572
+ */
1573
+ async increaseAllowanceByPartition(_partition, _spender, _addedValue, options) {
1574
+ if (!this.contract.write) {
1575
+ throw new Error('Wallet client is required for write operations');
1576
+ }
1577
+ return this.contract.write.increaseAllowanceByPartition([_partition, _spender, _addedValue], options);
1578
+ }
1579
+ /**
1580
+ * registerCollateralManager
1581
+ * nonpayable
1582
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1583
+ */
1584
+ async registerCollateralManager(options) {
1585
+ if (!this.contract.write) {
1586
+ throw new Error('Wallet client is required for write operations');
1587
+ }
1588
+ return this.contract.write.registerCollateralManager(options);
1589
+ }
1590
+ /**
1591
+ * revokeOperator
1592
+ * nonpayable
1593
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1594
+ */
1595
+ async revokeOperator(_operator, options) {
1596
+ if (!this.contract.write) {
1597
+ throw new Error('Wallet client is required for write operations');
1598
+ }
1599
+ return this.contract.write.revokeOperator([_operator], options);
1600
+ }
1601
+ /**
1602
+ * revokeOperatorByPartition
1603
+ * nonpayable
1604
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1605
+ */
1606
+ async revokeOperatorByPartition(_partition, _operator, options) {
1607
+ if (!this.contract.write) {
1608
+ throw new Error('Wallet client is required for write operations');
1609
+ }
1610
+ return this.contract.write.revokeOperatorByPartition([_partition, _operator], options);
1611
+ }
1612
+ /**
1613
+ * setPartitionStrategy
1614
+ * nonpayable
1615
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1616
+ */
1617
+ async setPartitionStrategy(_prefix, _implementation, options) {
1618
+ if (!this.contract.write) {
1619
+ throw new Error('Wallet client is required for write operations');
1620
+ }
1621
+ return this.contract.write.setPartitionStrategy([_prefix, _implementation], options);
1622
+ }
1623
+ /**
1624
+ * swap
1625
+ * nonpayable
1626
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1627
+ */
1628
+ async swap(_from, options) {
1629
+ if (!this.contract.write) {
1630
+ throw new Error('Wallet client is required for write operations');
1631
+ }
1632
+ return this.contract.write.swap([_from], options);
1633
+ }
1634
+ /**
1635
+ * transfer
1636
+ * nonpayable
1637
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1638
+ */
1639
+ async transfer(_to, _value, options) {
1640
+ if (!this.contract.write) {
1641
+ throw new Error('Wallet client is required for write operations');
1642
+ }
1643
+ return this.contract.write.transfer([_to, _value], options);
1644
+ }
1645
+ /**
1646
+ * transferByPartition
1647
+ * nonpayable
1648
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1649
+ */
1650
+ async transferByPartition(_partition, _from, _to, _value, _data, _operatorData, options) {
1651
+ if (!this.contract.write) {
1652
+ throw new Error('Wallet client is required for write operations');
1653
+ }
1654
+ return this.contract.write.transferByPartition([_partition, _from, _to, _value, _data, _operatorData], options);
1655
+ }
1656
+ /**
1657
+ * transferFrom
1658
+ * nonpayable
1659
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1660
+ */
1661
+ async transferFrom(_from, _to, _value, options) {
1662
+ if (!this.contract.write) {
1663
+ throw new Error('Wallet client is required for write operations');
1664
+ }
1665
+ return this.contract.write.transferFrom([_from, _to, _value], options);
1666
+ }
1667
+ /**
1668
+ * Simulate contract write operations (dry-run without sending transaction)
1669
+ *
1670
+ * @example
1671
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1672
+ * console.log('Gas estimate:', result.request.gas);
1673
+ * console.log('Would succeed:', result.result);
1674
+ */
1675
+ get simulate() {
1676
+ const contract = this.contract;
1677
+ if (!contract.simulate) {
1678
+ throw new Error('Public client is required for simulation');
1679
+ }
1680
+ return {
1681
+ /**
1682
+ * Simulate approve
1683
+ * Returns gas estimate and result without sending transaction
1684
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1685
+ */
1686
+ async approve(_spender, _value, options) {
1687
+ return contract.simulate.approve([_spender, _value], options);
1688
+ },
1689
+ /**
1690
+ * Simulate approveByPartition
1691
+ * Returns gas estimate and result without sending transaction
1692
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1693
+ */
1694
+ async approveByPartition(_partition, _spender, _value, options) {
1695
+ return contract.simulate.approveByPartition([_partition, _spender, _value], options);
1696
+ },
1697
+ /**
1698
+ * Simulate assumeOwnership
1699
+ * Returns gas estimate and result without sending transaction
1700
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1701
+ */
1702
+ async assumeOwnership(options) {
1703
+ return contract.simulate.assumeOwnership(options);
1704
+ },
1705
+ /**
1706
+ * Simulate authorizeOperator
1707
+ * Returns gas estimate and result without sending transaction
1708
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1709
+ */
1710
+ async authorizeOperator(_operator, options) {
1711
+ return contract.simulate.authorizeOperator([_operator], options);
1712
+ },
1713
+ /**
1714
+ * Simulate authorizeOperatorByPartition
1715
+ * Returns gas estimate and result without sending transaction
1716
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1717
+ */
1718
+ async authorizeOperatorByPartition(_partition, _operator, options) {
1719
+ return contract.simulate.authorizeOperatorByPartition([_partition, _operator], options);
1720
+ },
1721
+ /**
1722
+ * Simulate authorizeOwnershipTransfer
1723
+ * Returns gas estimate and result without sending transaction
1724
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1725
+ */
1726
+ async authorizeOwnershipTransfer(_authorizedAddress, options) {
1727
+ return contract.simulate.authorizeOwnershipTransfer([_authorizedAddress], options);
1728
+ },
1729
+ /**
1730
+ * Simulate decreaseAllowance
1731
+ * Returns gas estimate and result without sending transaction
1732
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1733
+ */
1734
+ async decreaseAllowance(_spender, _subtractedValue, options) {
1735
+ return contract.simulate.decreaseAllowance([_spender, _subtractedValue], options);
1736
+ },
1737
+ /**
1738
+ * Simulate decreaseAllowanceByPartition
1739
+ * Returns gas estimate and result without sending transaction
1740
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1741
+ */
1742
+ async decreaseAllowanceByPartition(_partition, _spender, _subtractedValue, options) {
1743
+ return contract.simulate.decreaseAllowanceByPartition([_partition, _spender, _subtractedValue], options);
1744
+ },
1745
+ /**
1746
+ * Simulate increaseAllowance
1747
+ * Returns gas estimate and result without sending transaction
1748
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1749
+ */
1750
+ async increaseAllowance(_spender, _addedValue, options) {
1751
+ return contract.simulate.increaseAllowance([_spender, _addedValue], options);
1752
+ },
1753
+ /**
1754
+ * Simulate increaseAllowanceByPartition
1755
+ * Returns gas estimate and result without sending transaction
1756
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1757
+ */
1758
+ async increaseAllowanceByPartition(_partition, _spender, _addedValue, options) {
1759
+ return contract.simulate.increaseAllowanceByPartition([_partition, _spender, _addedValue], options);
1760
+ },
1761
+ /**
1762
+ * Simulate registerCollateralManager
1763
+ * Returns gas estimate and result without sending transaction
1764
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1765
+ */
1766
+ async registerCollateralManager(options) {
1767
+ return contract.simulate.registerCollateralManager(options);
1768
+ },
1769
+ /**
1770
+ * Simulate revokeOperator
1771
+ * Returns gas estimate and result without sending transaction
1772
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1773
+ */
1774
+ async revokeOperator(_operator, options) {
1775
+ return contract.simulate.revokeOperator([_operator], options);
1776
+ },
1777
+ /**
1778
+ * Simulate revokeOperatorByPartition
1779
+ * Returns gas estimate and result without sending transaction
1780
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1781
+ */
1782
+ async revokeOperatorByPartition(_partition, _operator, options) {
1783
+ return contract.simulate.revokeOperatorByPartition([_partition, _operator], options);
1784
+ },
1785
+ /**
1786
+ * Simulate setPartitionStrategy
1787
+ * Returns gas estimate and result without sending transaction
1788
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1789
+ */
1790
+ async setPartitionStrategy(_prefix, _implementation, options) {
1791
+ return contract.simulate.setPartitionStrategy([_prefix, _implementation], options);
1792
+ },
1793
+ /**
1794
+ * Simulate swap
1795
+ * Returns gas estimate and result without sending transaction
1796
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1797
+ */
1798
+ async swap(_from, options) {
1799
+ return contract.simulate.swap([_from], options);
1800
+ },
1801
+ /**
1802
+ * Simulate transfer
1803
+ * Returns gas estimate and result without sending transaction
1804
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1805
+ */
1806
+ async transfer(_to, _value, options) {
1807
+ return contract.simulate.transfer([_to, _value], options);
1808
+ },
1809
+ /**
1810
+ * Simulate transferByPartition
1811
+ * Returns gas estimate and result without sending transaction
1812
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1813
+ */
1814
+ async transferByPartition(_partition, _from, _to, _value, _data, _operatorData, options) {
1815
+ return contract.simulate.transferByPartition([_partition, _from, _to, _value, _data, _operatorData], options);
1816
+ },
1817
+ /**
1818
+ * Simulate transferFrom
1819
+ * Returns gas estimate and result without sending transaction
1820
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1821
+ */
1822
+ async transferFrom(_from, _to, _value, options) {
1823
+ return contract.simulate.transferFrom([_from, _to, _value], options);
1824
+ }
1825
+ };
1826
+ }
1827
+ /**
1828
+ * Watch contract events
1829
+ *
1830
+ * @example
1831
+ * // Watch all Transfer events
1832
+ * const unwatch = contract.watch.Transfer((event) => {
1833
+ * console.log('Transfer:', event);
1834
+ * });
1835
+ *
1836
+ * // Stop watching
1837
+ * unwatch();
1838
+ */
1839
+ get watch() {
1840
+ return {
1841
+ /**
1842
+ * Watch Approval events
1843
+ * @param callback Function to call when event is emitted
1844
+ * @param filter Optional filter for indexed parameters
1845
+ * @returns Unwatch function to stop listening
1846
+ */
1847
+ Approval: (callback, filter) => {
1848
+ return this.publicClient.watchContractEvent({
1849
+ address: this.contractAddress,
1850
+ abi: exports.AmpAbi,
1851
+ eventName: 'Approval',
1852
+ args: filter,
1853
+ onLogs: (logs) => {
1854
+ logs.forEach((log) => {
1855
+ callback(log.args);
1856
+ });
1857
+ },
1858
+ });
1859
+ },
1860
+ /**
1861
+ * Watch ApprovalByPartition events
1862
+ * @param callback Function to call when event is emitted
1863
+ * @param filter Optional filter for indexed parameters
1864
+ * @returns Unwatch function to stop listening
1865
+ */
1866
+ ApprovalByPartition: (callback, filter) => {
1867
+ return this.publicClient.watchContractEvent({
1868
+ address: this.contractAddress,
1869
+ abi: exports.AmpAbi,
1870
+ eventName: 'ApprovalByPartition',
1871
+ args: filter,
1872
+ onLogs: (logs) => {
1873
+ logs.forEach((log) => {
1874
+ callback(log.args);
1875
+ });
1876
+ },
1877
+ });
1878
+ },
1879
+ /**
1880
+ * Watch AuthorizedOperator events
1881
+ * @param callback Function to call when event is emitted
1882
+ * @param filter Optional filter for indexed parameters
1883
+ * @returns Unwatch function to stop listening
1884
+ */
1885
+ AuthorizedOperator: (callback, filter) => {
1886
+ return this.publicClient.watchContractEvent({
1887
+ address: this.contractAddress,
1888
+ abi: exports.AmpAbi,
1889
+ eventName: 'AuthorizedOperator',
1890
+ args: filter,
1891
+ onLogs: (logs) => {
1892
+ logs.forEach((log) => {
1893
+ callback(log.args);
1894
+ });
1895
+ },
1896
+ });
1897
+ },
1898
+ /**
1899
+ * Watch AuthorizedOperatorByPartition events
1900
+ * @param callback Function to call when event is emitted
1901
+ * @param filter Optional filter for indexed parameters
1902
+ * @returns Unwatch function to stop listening
1903
+ */
1904
+ AuthorizedOperatorByPartition: (callback, filter) => {
1905
+ return this.publicClient.watchContractEvent({
1906
+ address: this.contractAddress,
1907
+ abi: exports.AmpAbi,
1908
+ eventName: 'AuthorizedOperatorByPartition',
1909
+ args: filter,
1910
+ onLogs: (logs) => {
1911
+ logs.forEach((log) => {
1912
+ callback(log.args);
1913
+ });
1914
+ },
1915
+ });
1916
+ },
1917
+ /**
1918
+ * Watch ChangedPartition events
1919
+ * @param callback Function to call when event is emitted
1920
+ * @param filter Optional filter for indexed parameters
1921
+ * @returns Unwatch function to stop listening
1922
+ */
1923
+ ChangedPartition: (callback, filter) => {
1924
+ return this.publicClient.watchContractEvent({
1925
+ address: this.contractAddress,
1926
+ abi: exports.AmpAbi,
1927
+ eventName: 'ChangedPartition',
1928
+ args: filter,
1929
+ onLogs: (logs) => {
1930
+ logs.forEach((log) => {
1931
+ callback(log.args);
1932
+ });
1933
+ },
1934
+ });
1935
+ },
1936
+ /**
1937
+ * Watch CollateralManagerRegistered events
1938
+ * @param callback Function to call when event is emitted
1939
+ * @param filter Optional filter for indexed parameters
1940
+ * @returns Unwatch function to stop listening
1941
+ */
1942
+ CollateralManagerRegistered: (callback) => {
1943
+ return this.publicClient.watchContractEvent({
1944
+ address: this.contractAddress,
1945
+ abi: exports.AmpAbi,
1946
+ eventName: 'CollateralManagerRegistered',
1947
+ onLogs: (logs) => {
1948
+ logs.forEach((log) => {
1949
+ callback(log.args);
1950
+ });
1951
+ },
1952
+ });
1953
+ },
1954
+ /**
1955
+ * Watch Minted events
1956
+ * @param callback Function to call when event is emitted
1957
+ * @param filter Optional filter for indexed parameters
1958
+ * @returns Unwatch function to stop listening
1959
+ */
1960
+ Minted: (callback, filter) => {
1961
+ return this.publicClient.watchContractEvent({
1962
+ address: this.contractAddress,
1963
+ abi: exports.AmpAbi,
1964
+ eventName: 'Minted',
1965
+ args: filter,
1966
+ onLogs: (logs) => {
1967
+ logs.forEach((log) => {
1968
+ callback(log.args);
1969
+ });
1970
+ },
1971
+ });
1972
+ },
1973
+ /**
1974
+ * Watch OwnerUpdate events
1975
+ * @param callback Function to call when event is emitted
1976
+ * @param filter Optional filter for indexed parameters
1977
+ * @returns Unwatch function to stop listening
1978
+ */
1979
+ OwnerUpdate: (callback, filter) => {
1980
+ return this.publicClient.watchContractEvent({
1981
+ address: this.contractAddress,
1982
+ abi: exports.AmpAbi,
1983
+ eventName: 'OwnerUpdate',
1984
+ args: filter,
1985
+ onLogs: (logs) => {
1986
+ logs.forEach((log) => {
1987
+ callback(log.args);
1988
+ });
1989
+ },
1990
+ });
1991
+ },
1992
+ /**
1993
+ * Watch OwnershipTransferAuthorization events
1994
+ * @param callback Function to call when event is emitted
1995
+ * @param filter Optional filter for indexed parameters
1996
+ * @returns Unwatch function to stop listening
1997
+ */
1998
+ OwnershipTransferAuthorization: (callback, filter) => {
1999
+ return this.publicClient.watchContractEvent({
2000
+ address: this.contractAddress,
2001
+ abi: exports.AmpAbi,
2002
+ eventName: 'OwnershipTransferAuthorization',
2003
+ args: filter,
2004
+ onLogs: (logs) => {
2005
+ logs.forEach((log) => {
2006
+ callback(log.args);
2007
+ });
2008
+ },
2009
+ });
2010
+ },
2011
+ /**
2012
+ * Watch PartitionStrategySet events
2013
+ * @param callback Function to call when event is emitted
2014
+ * @param filter Optional filter for indexed parameters
2015
+ * @returns Unwatch function to stop listening
2016
+ */
2017
+ PartitionStrategySet: (callback, filter) => {
2018
+ return this.publicClient.watchContractEvent({
2019
+ address: this.contractAddress,
2020
+ abi: exports.AmpAbi,
2021
+ eventName: 'PartitionStrategySet',
2022
+ args: filter,
2023
+ onLogs: (logs) => {
2024
+ logs.forEach((log) => {
2025
+ callback(log.args);
2026
+ });
2027
+ },
2028
+ });
2029
+ },
2030
+ /**
2031
+ * Watch RevokedOperator events
2032
+ * @param callback Function to call when event is emitted
2033
+ * @param filter Optional filter for indexed parameters
2034
+ * @returns Unwatch function to stop listening
2035
+ */
2036
+ RevokedOperator: (callback, filter) => {
2037
+ return this.publicClient.watchContractEvent({
2038
+ address: this.contractAddress,
2039
+ abi: exports.AmpAbi,
2040
+ eventName: 'RevokedOperator',
2041
+ args: filter,
2042
+ onLogs: (logs) => {
2043
+ logs.forEach((log) => {
2044
+ callback(log.args);
2045
+ });
2046
+ },
2047
+ });
2048
+ },
2049
+ /**
2050
+ * Watch RevokedOperatorByPartition events
2051
+ * @param callback Function to call when event is emitted
2052
+ * @param filter Optional filter for indexed parameters
2053
+ * @returns Unwatch function to stop listening
2054
+ */
2055
+ RevokedOperatorByPartition: (callback, filter) => {
2056
+ return this.publicClient.watchContractEvent({
2057
+ address: this.contractAddress,
2058
+ abi: exports.AmpAbi,
2059
+ eventName: 'RevokedOperatorByPartition',
2060
+ args: filter,
2061
+ onLogs: (logs) => {
2062
+ logs.forEach((log) => {
2063
+ callback(log.args);
2064
+ });
2065
+ },
2066
+ });
2067
+ },
2068
+ /**
2069
+ * Watch Swap events
2070
+ * @param callback Function to call when event is emitted
2071
+ * @param filter Optional filter for indexed parameters
2072
+ * @returns Unwatch function to stop listening
2073
+ */
2074
+ Swap: (callback, filter) => {
2075
+ return this.publicClient.watchContractEvent({
2076
+ address: this.contractAddress,
2077
+ abi: exports.AmpAbi,
2078
+ eventName: 'Swap',
2079
+ args: filter,
2080
+ onLogs: (logs) => {
2081
+ logs.forEach((log) => {
2082
+ callback(log.args);
2083
+ });
2084
+ },
2085
+ });
2086
+ },
2087
+ /**
2088
+ * Watch Transfer events
2089
+ * @param callback Function to call when event is emitted
2090
+ * @param filter Optional filter for indexed parameters
2091
+ * @returns Unwatch function to stop listening
2092
+ */
2093
+ Transfer: (callback, filter) => {
2094
+ return this.publicClient.watchContractEvent({
2095
+ address: this.contractAddress,
2096
+ abi: exports.AmpAbi,
2097
+ eventName: 'Transfer',
2098
+ args: filter,
2099
+ onLogs: (logs) => {
2100
+ logs.forEach((log) => {
2101
+ callback(log.args);
2102
+ });
2103
+ },
2104
+ });
2105
+ },
2106
+ /**
2107
+ * Watch TransferByPartition events
2108
+ * @param callback Function to call when event is emitted
2109
+ * @param filter Optional filter for indexed parameters
2110
+ * @returns Unwatch function to stop listening
2111
+ */
2112
+ TransferByPartition: (callback, filter) => {
2113
+ return this.publicClient.watchContractEvent({
2114
+ address: this.contractAddress,
2115
+ abi: exports.AmpAbi,
2116
+ eventName: 'TransferByPartition',
2117
+ args: filter,
2118
+ onLogs: (logs) => {
2119
+ logs.forEach((log) => {
2120
+ callback(log.args);
2121
+ });
2122
+ },
2123
+ });
2124
+ }
2125
+ };
2126
+ }
2127
+ }
2128
+ exports.Amp = Amp;