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