@xswap-link/sdk 0.12.1 → 0.13.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.
@@ -1,953 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "stateMutability": "nonpayable",
5
- "type": "constructor"
6
- },
7
- {
8
- "inputs": [
9
- {
10
- "internalType": "uint64",
11
- "name": "destinationChainSelector",
12
- "type": "uint64"
13
- }
14
- ],
15
- "name": "DestinationChainNotWhitelisted",
16
- "type": "error"
17
- },
18
- {
19
- "inputs": [],
20
- "name": "FailedToSendNative",
21
- "type": "error"
22
- },
23
- {
24
- "inputs": [],
25
- "name": "IncorrectArrayLength",
26
- "type": "error"
27
- },
28
- {
29
- "inputs": [
30
- {
31
- "internalType": "address",
32
- "name": "token",
33
- "type": "address"
34
- }
35
- ],
36
- "name": "InsufficientTokenBalance",
37
- "type": "error"
38
- },
39
- {
40
- "inputs": [],
41
- "name": "InvalidAddress",
42
- "type": "error"
43
- },
44
- {
45
- "inputs": [
46
- {
47
- "internalType": "address",
48
- "name": "sourceTokenAddress",
49
- "type": "address"
50
- },
51
- {
52
- "internalType": "uint64",
53
- "name": "chainId",
54
- "type": "uint64"
55
- },
56
- {
57
- "internalType": "address",
58
- "name": "destinationTokenAddress",
59
- "type": "address"
60
- }
61
- ],
62
- "name": "InvalidMappedTokenOnSelectedChain",
63
- "type": "error"
64
- },
65
- {
66
- "inputs": [
67
- {
68
- "internalType": "address",
69
- "name": "router",
70
- "type": "address"
71
- }
72
- ],
73
- "name": "InvalidRouter",
74
- "type": "error"
75
- },
76
- {
77
- "inputs": [
78
- {
79
- "internalType": "uint64",
80
- "name": "chainId",
81
- "type": "uint64"
82
- }
83
- ],
84
- "name": "NoCorrespondingRouterOnSelectedChain",
85
- "type": "error"
86
- },
87
- {
88
- "inputs": [
89
- {
90
- "internalType": "uint256",
91
- "name": "currentBalance",
92
- "type": "uint256"
93
- },
94
- {
95
- "internalType": "uint256",
96
- "name": "calculatedFees",
97
- "type": "uint256"
98
- }
99
- ],
100
- "name": "NotEnoughBalance",
101
- "type": "error"
102
- },
103
- {
104
- "inputs": [
105
- {
106
- "internalType": "uint64",
107
- "name": "sourceChainSelector",
108
- "type": "uint64"
109
- },
110
- {
111
- "internalType": "address",
112
- "name": "sender",
113
- "type": "address"
114
- }
115
- ],
116
- "name": "SenderNotWhitelisted",
117
- "type": "error"
118
- },
119
- {
120
- "inputs": [
121
- {
122
- "internalType": "address",
123
- "name": "token",
124
- "type": "address"
125
- }
126
- ],
127
- "name": "TokenNotWhitelisted",
128
- "type": "error"
129
- },
130
- {
131
- "anonymous": false,
132
- "inputs": [
133
- {
134
- "indexed": false,
135
- "internalType": "address",
136
- "name": "previousAdmin",
137
- "type": "address"
138
- },
139
- {
140
- "indexed": false,
141
- "internalType": "address",
142
- "name": "newAdmin",
143
- "type": "address"
144
- }
145
- ],
146
- "name": "AdminChanged",
147
- "type": "event"
148
- },
149
- {
150
- "anonymous": false,
151
- "inputs": [
152
- {
153
- "indexed": true,
154
- "internalType": "address",
155
- "name": "beacon",
156
- "type": "address"
157
- }
158
- ],
159
- "name": "BeaconUpgraded",
160
- "type": "event"
161
- },
162
- {
163
- "anonymous": false,
164
- "inputs": [
165
- {
166
- "indexed": false,
167
- "internalType": "address",
168
- "name": "token",
169
- "type": "address"
170
- },
171
- {
172
- "indexed": false,
173
- "internalType": "uint256",
174
- "name": "tokenAmount",
175
- "type": "uint256"
176
- }
177
- ],
178
- "name": "EmergencyWithdraw",
179
- "type": "event"
180
- },
181
- {
182
- "anonymous": false,
183
- "inputs": [
184
- {
185
- "indexed": false,
186
- "internalType": "uint8",
187
- "name": "version",
188
- "type": "uint8"
189
- }
190
- ],
191
- "name": "Initialized",
192
- "type": "event"
193
- },
194
- {
195
- "anonymous": false,
196
- "inputs": [
197
- {
198
- "indexed": true,
199
- "internalType": "bytes32",
200
- "name": "messageId",
201
- "type": "bytes32"
202
- },
203
- {
204
- "indexed": true,
205
- "internalType": "uint64",
206
- "name": "sourceChainSelector",
207
- "type": "uint64"
208
- },
209
- {
210
- "indexed": true,
211
- "internalType": "address",
212
- "name": "sender",
213
- "type": "address"
214
- },
215
- {
216
- "indexed": false,
217
- "internalType": "bytes",
218
- "name": "data",
219
- "type": "bytes"
220
- }
221
- ],
222
- "name": "MessageReceived",
223
- "type": "event"
224
- },
225
- {
226
- "anonymous": false,
227
- "inputs": [
228
- {
229
- "indexed": true,
230
- "internalType": "bytes32",
231
- "name": "messageId",
232
- "type": "bytes32"
233
- },
234
- {
235
- "indexed": true,
236
- "internalType": "uint64",
237
- "name": "destinationChainSelector",
238
- "type": "uint64"
239
- },
240
- {
241
- "indexed": true,
242
- "internalType": "address",
243
- "name": "sender",
244
- "type": "address"
245
- },
246
- {
247
- "indexed": false,
248
- "internalType": "address",
249
- "name": "receiver",
250
- "type": "address"
251
- },
252
- {
253
- "indexed": false,
254
- "internalType": "address",
255
- "name": "burnedToken",
256
- "type": "address"
257
- },
258
- {
259
- "indexed": false,
260
- "internalType": "address",
261
- "name": "mintedToken",
262
- "type": "address"
263
- },
264
- {
265
- "indexed": false,
266
- "internalType": "uint256",
267
- "name": "amount",
268
- "type": "uint256"
269
- }
270
- ],
271
- "name": "MessageSent",
272
- "type": "event"
273
- },
274
- {
275
- "anonymous": false,
276
- "inputs": [
277
- {
278
- "indexed": true,
279
- "internalType": "address",
280
- "name": "previousOwner",
281
- "type": "address"
282
- },
283
- {
284
- "indexed": true,
285
- "internalType": "address",
286
- "name": "newOwner",
287
- "type": "address"
288
- }
289
- ],
290
- "name": "OwnershipTransferred",
291
- "type": "event"
292
- },
293
- {
294
- "anonymous": false,
295
- "inputs": [
296
- {
297
- "indexed": false,
298
- "internalType": "address",
299
- "name": "newFeeCollectorAddress",
300
- "type": "address"
301
- }
302
- ],
303
- "name": "SetFeeCollectorAddress",
304
- "type": "event"
305
- },
306
- {
307
- "anonymous": false,
308
- "inputs": [
309
- {
310
- "indexed": false,
311
- "internalType": "address",
312
- "name": "newFeeOracleAddress",
313
- "type": "address"
314
- }
315
- ],
316
- "name": "SetFeeOracleAddress",
317
- "type": "event"
318
- },
319
- {
320
- "anonymous": false,
321
- "inputs": [
322
- {
323
- "indexed": true,
324
- "internalType": "address",
325
- "name": "implementation",
326
- "type": "address"
327
- }
328
- ],
329
- "name": "Upgraded",
330
- "type": "event"
331
- },
332
- {
333
- "inputs": [
334
- {
335
- "components": [
336
- {
337
- "internalType": "bytes32",
338
- "name": "messageId",
339
- "type": "bytes32"
340
- },
341
- {
342
- "internalType": "uint64",
343
- "name": "sourceChainSelector",
344
- "type": "uint64"
345
- },
346
- {
347
- "internalType": "bytes",
348
- "name": "sender",
349
- "type": "bytes"
350
- },
351
- {
352
- "internalType": "bytes",
353
- "name": "data",
354
- "type": "bytes"
355
- },
356
- {
357
- "components": [
358
- {
359
- "internalType": "address",
360
- "name": "token",
361
- "type": "address"
362
- },
363
- {
364
- "internalType": "uint256",
365
- "name": "amount",
366
- "type": "uint256"
367
- }
368
- ],
369
- "internalType": "struct Client.EVMTokenAmount[]",
370
- "name": "destTokenAmounts",
371
- "type": "tuple[]"
372
- }
373
- ],
374
- "internalType": "struct Client.Any2EVMMessage",
375
- "name": "message",
376
- "type": "tuple"
377
- }
378
- ],
379
- "name": "ccipReceive",
380
- "outputs": [],
381
- "stateMutability": "nonpayable",
382
- "type": "function"
383
- },
384
- {
385
- "inputs": [
386
- {
387
- "internalType": "uint64",
388
- "name": "",
389
- "type": "uint64"
390
- }
391
- ],
392
- "name": "chainSelectorToCorrespondingRouterMap",
393
- "outputs": [
394
- {
395
- "internalType": "address",
396
- "name": "",
397
- "type": "address"
398
- }
399
- ],
400
- "stateMutability": "view",
401
- "type": "function"
402
- },
403
- {
404
- "inputs": [
405
- {
406
- "internalType": "address",
407
- "name": "_tokenToWithdraw",
408
- "type": "address"
409
- },
410
- {
411
- "internalType": "uint256",
412
- "name": "_amountToWithdraw",
413
- "type": "uint256"
414
- }
415
- ],
416
- "name": "emergencyWithdraw",
417
- "outputs": [],
418
- "stateMutability": "nonpayable",
419
- "type": "function"
420
- },
421
- {
422
- "inputs": [],
423
- "name": "feeCollectorAddress",
424
- "outputs": [
425
- {
426
- "internalType": "address",
427
- "name": "",
428
- "type": "address"
429
- }
430
- ],
431
- "stateMutability": "view",
432
- "type": "function"
433
- },
434
- {
435
- "inputs": [],
436
- "name": "feeOracleAddress",
437
- "outputs": [
438
- {
439
- "internalType": "address",
440
- "name": "",
441
- "type": "address"
442
- }
443
- ],
444
- "stateMutability": "view",
445
- "type": "function"
446
- },
447
- {
448
- "inputs": [
449
- {
450
- "internalType": "address",
451
- "name": "_paymentToken",
452
- "type": "address"
453
- },
454
- {
455
- "internalType": "uint64",
456
- "name": "_destinationChainSelector",
457
- "type": "uint64"
458
- },
459
- {
460
- "components": [
461
- {
462
- "internalType": "address",
463
- "name": "receiver",
464
- "type": "address"
465
- },
466
- {
467
- "internalType": "address",
468
- "name": "sourceTokenAddress",
469
- "type": "address"
470
- },
471
- {
472
- "internalType": "address",
473
- "name": "destinationTokenAddress",
474
- "type": "address"
475
- },
476
- {
477
- "internalType": "uint256",
478
- "name": "amount",
479
- "type": "uint256"
480
- }
481
- ],
482
- "internalType": "struct TokenData",
483
- "name": "_tokenData",
484
- "type": "tuple"
485
- },
486
- {
487
- "internalType": "uint256",
488
- "name": "_gasLimit",
489
- "type": "uint256"
490
- }
491
- ],
492
- "name": "getFees",
493
- "outputs": [
494
- {
495
- "components": [
496
- {
497
- "internalType": "uint256",
498
- "name": "ccipFee",
499
- "type": "uint256"
500
- },
501
- {
502
- "components": [
503
- {
504
- "internalType": "uint256",
505
- "name": "tokenFee",
506
- "type": "uint256"
507
- },
508
- {
509
- "internalType": "uint256",
510
- "name": "nativeFee",
511
- "type": "uint256"
512
- }
513
- ],
514
- "internalType": "struct XSwapFee",
515
- "name": "xSwapFee",
516
- "type": "tuple"
517
- }
518
- ],
519
- "internalType": "struct MessageFees",
520
- "name": "fees",
521
- "type": "tuple"
522
- }
523
- ],
524
- "stateMutability": "view",
525
- "type": "function"
526
- },
527
- {
528
- "inputs": [],
529
- "name": "getRouter",
530
- "outputs": [
531
- {
532
- "internalType": "address",
533
- "name": "",
534
- "type": "address"
535
- }
536
- ],
537
- "stateMutability": "view",
538
- "type": "function"
539
- },
540
- {
541
- "inputs": [
542
- {
543
- "internalType": "address",
544
- "name": "_ccipRouter",
545
- "type": "address"
546
- },
547
- {
548
- "internalType": "address",
549
- "name": "_feeOracle",
550
- "type": "address"
551
- },
552
- {
553
- "internalType": "address",
554
- "name": "_feeCollector",
555
- "type": "address"
556
- },
557
- {
558
- "internalType": "address",
559
- "name": "_owner",
560
- "type": "address"
561
- }
562
- ],
563
- "name": "initialize",
564
- "outputs": [],
565
- "stateMutability": "nonpayable",
566
- "type": "function"
567
- },
568
- {
569
- "inputs": [],
570
- "name": "owner",
571
- "outputs": [
572
- {
573
- "internalType": "address",
574
- "name": "",
575
- "type": "address"
576
- }
577
- ],
578
- "stateMutability": "view",
579
- "type": "function"
580
- },
581
- {
582
- "inputs": [],
583
- "name": "proxiableUUID",
584
- "outputs": [
585
- {
586
- "internalType": "bytes32",
587
- "name": "",
588
- "type": "bytes32"
589
- }
590
- ],
591
- "stateMutability": "view",
592
- "type": "function"
593
- },
594
- {
595
- "inputs": [],
596
- "name": "renounceOwnership",
597
- "outputs": [],
598
- "stateMutability": "nonpayable",
599
- "type": "function"
600
- },
601
- {
602
- "inputs": [
603
- {
604
- "internalType": "address",
605
- "name": "_paymentToken",
606
- "type": "address"
607
- },
608
- {
609
- "internalType": "uint64",
610
- "name": "_destinationChainSelector",
611
- "type": "uint64"
612
- },
613
- {
614
- "components": [
615
- {
616
- "internalType": "address",
617
- "name": "receiver",
618
- "type": "address"
619
- },
620
- {
621
- "internalType": "address",
622
- "name": "sourceTokenAddress",
623
- "type": "address"
624
- },
625
- {
626
- "internalType": "address",
627
- "name": "destinationTokenAddress",
628
- "type": "address"
629
- },
630
- {
631
- "internalType": "uint256",
632
- "name": "amount",
633
- "type": "uint256"
634
- }
635
- ],
636
- "internalType": "struct TokenData",
637
- "name": "_tokenData",
638
- "type": "tuple"
639
- },
640
- {
641
- "internalType": "uint256",
642
- "name": "_gasLimit",
643
- "type": "uint256"
644
- }
645
- ],
646
- "name": "sendMessage",
647
- "outputs": [
648
- {
649
- "internalType": "bytes32",
650
- "name": "messageId",
651
- "type": "bytes32"
652
- }
653
- ],
654
- "stateMutability": "payable",
655
- "type": "function"
656
- },
657
- {
658
- "inputs": [
659
- {
660
- "internalType": "address",
661
- "name": "_feeCollectorAddress",
662
- "type": "address"
663
- }
664
- ],
665
- "name": "setFeeCollectorAddress",
666
- "outputs": [],
667
- "stateMutability": "nonpayable",
668
- "type": "function"
669
- },
670
- {
671
- "inputs": [
672
- {
673
- "internalType": "address",
674
- "name": "_feeOracleAddress",
675
- "type": "address"
676
- }
677
- ],
678
- "name": "setFeeOracleAddress",
679
- "outputs": [],
680
- "stateMutability": "nonpayable",
681
- "type": "function"
682
- },
683
- {
684
- "inputs": [
685
- {
686
- "internalType": "address",
687
- "name": "_sourceTokenAddress",
688
- "type": "address"
689
- },
690
- {
691
- "internalType": "uint64",
692
- "name": "_destinationChainSelector",
693
- "type": "uint64"
694
- },
695
- {
696
- "internalType": "address",
697
- "name": "_destinationTokenAddress",
698
- "type": "address"
699
- }
700
- ],
701
- "name": "setMappedTokens",
702
- "outputs": [],
703
- "stateMutability": "nonpayable",
704
- "type": "function"
705
- },
706
- {
707
- "inputs": [
708
- {
709
- "internalType": "address",
710
- "name": "_router",
711
- "type": "address"
712
- }
713
- ],
714
- "name": "setRouter",
715
- "outputs": [],
716
- "stateMutability": "nonpayable",
717
- "type": "function"
718
- },
719
- {
720
- "inputs": [
721
- {
722
- "internalType": "address",
723
- "name": "",
724
- "type": "address"
725
- },
726
- {
727
- "internalType": "uint64",
728
- "name": "",
729
- "type": "uint64"
730
- }
731
- ],
732
- "name": "sourceTokenToDestinationChainSelectorToDestinationTokenMap",
733
- "outputs": [
734
- {
735
- "internalType": "address",
736
- "name": "",
737
- "type": "address"
738
- }
739
- ],
740
- "stateMutability": "view",
741
- "type": "function"
742
- },
743
- {
744
- "inputs": [
745
- {
746
- "internalType": "bytes4",
747
- "name": "interfaceId",
748
- "type": "bytes4"
749
- }
750
- ],
751
- "name": "supportsInterface",
752
- "outputs": [
753
- {
754
- "internalType": "bool",
755
- "name": "",
756
- "type": "bool"
757
- }
758
- ],
759
- "stateMutability": "pure",
760
- "type": "function"
761
- },
762
- {
763
- "inputs": [
764
- {
765
- "internalType": "address",
766
- "name": "newOwner",
767
- "type": "address"
768
- }
769
- ],
770
- "name": "transferOwnership",
771
- "outputs": [],
772
- "stateMutability": "nonpayable",
773
- "type": "function"
774
- },
775
- {
776
- "inputs": [
777
- {
778
- "internalType": "uint64",
779
- "name": "_chainSelector",
780
- "type": "uint64"
781
- },
782
- {
783
- "internalType": "address",
784
- "name": "_correspondingRouter",
785
- "type": "address"
786
- }
787
- ],
788
- "name": "updateChainSelectorToCorrespondingRouterMap",
789
- "outputs": [],
790
- "stateMutability": "nonpayable",
791
- "type": "function"
792
- },
793
- {
794
- "inputs": [
795
- {
796
- "internalType": "uint64[]",
797
- "name": "_chainSelectors",
798
- "type": "uint64[]"
799
- },
800
- {
801
- "internalType": "address[]",
802
- "name": "_correspondingRouters",
803
- "type": "address[]"
804
- }
805
- ],
806
- "name": "updateChainSelectorToCorrespondingRouterMapMany",
807
- "outputs": [],
808
- "stateMutability": "nonpayable",
809
- "type": "function"
810
- },
811
- {
812
- "inputs": [
813
- {
814
- "internalType": "uint64",
815
- "name": "_sourceChainSelector",
816
- "type": "uint64"
817
- },
818
- {
819
- "internalType": "address",
820
- "name": "_sender",
821
- "type": "address"
822
- },
823
- {
824
- "internalType": "bool",
825
- "name": "_isWhitelisted",
826
- "type": "bool"
827
- }
828
- ],
829
- "name": "updateWhitelistSender",
830
- "outputs": [],
831
- "stateMutability": "nonpayable",
832
- "type": "function"
833
- },
834
- {
835
- "inputs": [
836
- {
837
- "internalType": "uint64[]",
838
- "name": "_sourceChainSelectors",
839
- "type": "uint64[]"
840
- },
841
- {
842
- "internalType": "address[]",
843
- "name": "_senders",
844
- "type": "address[]"
845
- },
846
- {
847
- "internalType": "bool[]",
848
- "name": "_areWhitelisted",
849
- "type": "bool[]"
850
- }
851
- ],
852
- "name": "updateWhitelistSenderMany",
853
- "outputs": [],
854
- "stateMutability": "nonpayable",
855
- "type": "function"
856
- },
857
- {
858
- "inputs": [
859
- {
860
- "internalType": "address",
861
- "name": "_token",
862
- "type": "address"
863
- },
864
- {
865
- "internalType": "bool",
866
- "name": "_isWhitelisted",
867
- "type": "bool"
868
- }
869
- ],
870
- "name": "updateWhitelistToken",
871
- "outputs": [],
872
- "stateMutability": "nonpayable",
873
- "type": "function"
874
- },
875
- {
876
- "inputs": [
877
- {
878
- "internalType": "address",
879
- "name": "newImplementation",
880
- "type": "address"
881
- }
882
- ],
883
- "name": "upgradeTo",
884
- "outputs": [],
885
- "stateMutability": "nonpayable",
886
- "type": "function"
887
- },
888
- {
889
- "inputs": [
890
- {
891
- "internalType": "address",
892
- "name": "newImplementation",
893
- "type": "address"
894
- },
895
- {
896
- "internalType": "bytes",
897
- "name": "data",
898
- "type": "bytes"
899
- }
900
- ],
901
- "name": "upgradeToAndCall",
902
- "outputs": [],
903
- "stateMutability": "payable",
904
- "type": "function"
905
- },
906
- {
907
- "inputs": [
908
- {
909
- "internalType": "uint64",
910
- "name": "",
911
- "type": "uint64"
912
- },
913
- {
914
- "internalType": "address",
915
- "name": "",
916
- "type": "address"
917
- }
918
- ],
919
- "name": "whitelistedSenders",
920
- "outputs": [
921
- {
922
- "internalType": "bool",
923
- "name": "",
924
- "type": "bool"
925
- }
926
- ],
927
- "stateMutability": "view",
928
- "type": "function"
929
- },
930
- {
931
- "inputs": [
932
- {
933
- "internalType": "address",
934
- "name": "",
935
- "type": "address"
936
- }
937
- ],
938
- "name": "whitelistedTokens",
939
- "outputs": [
940
- {
941
- "internalType": "bool",
942
- "name": "",
943
- "type": "bool"
944
- }
945
- ],
946
- "stateMutability": "view",
947
- "type": "function"
948
- },
949
- {
950
- "stateMutability": "payable",
951
- "type": "receive"
952
- }
953
- ]