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