@gitmyabi/gm-btc-usd-btc-btc 0.0.0-stage → 1.0.0

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