-
Notifications
You must be signed in to change notification settings - Fork 0
/
go.abi
908 lines (764 loc) · 64.2 KB
/
go.abi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package coder
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// CoderABI is the input ABI used to generate the binding from.
const CoderABI = "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bts\",\"type\":\"bytes\"}],\"name\":\"abiDecodeStr\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"abiEncodeStr\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"bts\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"v\",\"type\":\"bytes\"}],\"name\":\"decodeCcmArgs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"txHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"crossChainId\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromContract\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"method\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"args\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"v\",\"type\":\"bytes\"}],\"name\":\"decodeSwapArgs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOut\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"toPoolId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"fromAssetHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"v\",\"type\":\"bytes\"}],\"name\":\"decodeTxArgs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"txHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"crossChainId\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromContract\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"method\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"args\",\"type\":\"bytes\"}],\"name\":\"encodeCcmArgs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOut\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"toPoolId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"fromAssetHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"}],\"name\":\"encodeSwapArgs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"encodeTxArgs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"method\",\"type\":\"string\"}],\"name\":\"selector\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"_selector\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]"
// CoderFuncSigs maps the 4-byte function signature to its string representation.
var CoderFuncSigs = map[string]string{
"1860f9c2": "abiDecodeStr(bytes)",
"4555adb2": "abiEncodeStr(string)",
"dfc89bdd": "decodeCcmArgs(bytes)",
"1157cbab": "decodeSwapArgs(bytes)",
"dd037ae1": "decodeTxArgs(bytes)",
"7e6a7c31": "encodeCcmArgs(bytes,bytes,bytes,uint64,bytes,bytes,bytes)",
"67bc9dae": "encodeSwapArgs(uint256,uint256,uint64,uint64,bytes,bytes,bytes,bytes)",
"64d97eea": "encodeTxArgs(bytes,bytes,uint256)",
"bb50646c": "selector(string)",
}
// CoderBin is the compiled bytecode used for deploying new contracts.
var CoderBin = "0x608060405234801561001057600080fd5b50612825806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806367bc9dae1161006657806367bc9dae146105fc5780637e6a7c3114610855578063bb50646c14610ba3578063dd037ae114610c64578063dfc89bdd14610ded57610093565b80631157cbab146100985780631860f9c2146103145780634555adb21461042d57806364d97eea146104d1575b600080fd5b61013c600480360360208110156100ae57600080fd5b810190602081018135600160201b8111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111600160201b831117156100fb57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611117945050505050565b60405180898152602001888152602001876001600160401b03168152602001866001600160401b0316815260200180602001806020018060200180602001858103855289818151815260200191508051906020019080838360005b838110156101af578181015183820152602001610197565b50505050905090810190601f1680156101dc5780820380516001836020036101000a031916815260200191505b5085810384528851815288516020918201918a019080838360005b8381101561020f5781810151838201526020016101f7565b50505050905090810190601f16801561023c5780820380516001836020036101000a031916815260200191505b50858103835287518152875160209182019189019080838360005b8381101561026f578181015183820152602001610257565b50505050905090810190601f16801561029c5780820380516001836020036101000a031916815260200191505b50858103825286518152865160209182019188019080838360005b838110156102cf5781810151838201526020016102b7565b50505050905090810190601f1680156102fc5780820380516001836020036101000a031916815260200191505b509c5050505050505050505050505060405180910390f35b6103b86004803603602081101561032a57600080fd5b810190602081018135600160201b81111561034457600080fd5b82018360208201111561035657600080fd5b803590602001918460018302840111600160201b8311171561037757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061117a945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103f25781810151838201526020016103da565b50505050905090810190601f16801561041f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103b86004803603602081101561044357600080fd5b810190602081018135600160201b81111561045d57600080fd5b82018360208201111561046f57600080fd5b803590602001918460018302840111600160201b8311171561049057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611247945050505050565b6103b8600480360360608110156104e757600080fd5b810190602081018135600160201b81111561050157600080fd5b82018360208201111561051357600080fd5b803590602001918460018302840111600160201b8311171561053457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561058657600080fd5b82018360208201111561059857600080fd5b803590602001918460018302840111600160201b831117156105b957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506112d1915050565b6103b8600480360361010081101561061357600080fd5b8135916020810135916001600160401b03604083013581169260608101359091169181019060a081016080820135600160201b81111561065257600080fd5b82018360208201111561066457600080fd5b803590602001918460018302840111600160201b8311171561068557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156106d757600080fd5b8201836020820111156106e957600080fd5b803590602001918460018302840111600160201b8311171561070a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561075c57600080fd5b82018360208201111561076e57600080fd5b803590602001918460018302840111600160201b8311171561078f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156107e157600080fd5b8201836020820111156107f357600080fd5b803590602001918460018302840111600160201b8311171561081457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061130a945050505050565b6103b8600480360360e081101561086b57600080fd5b810190602081018135600160201b81111561088557600080fd5b82018360208201111561089757600080fd5b803590602001918460018302840111600160201b831117156108b857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561090a57600080fd5b82018360208201111561091c57600080fd5b803590602001918460018302840111600160201b8311171561093d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561098f57600080fd5b8201836020820111156109a157600080fd5b803590602001918460018302840111600160201b831117156109c257600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160401b03853516959094909350604081019250602001359050600160201b811115610a2557600080fd5b820183602082011115610a3757600080fd5b803590602001918460018302840111600160201b83111715610a5857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610aaa57600080fd5b820183602082011115610abc57600080fd5b803590602001918460018302840111600160201b83111715610add57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610b2f57600080fd5b820183602082011115610b4157600080fd5b803590602001918460018302840111600160201b83111715610b6257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611379945050505050565b610c4760048036036020811015610bb957600080fd5b810190602081018135600160201b811115610bd357600080fd5b820183602082011115610be557600080fd5b803590602001918460018302840111600160201b83111715610c0657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506113d7945050505050565b604080516001600160e01b03199092168252519081900360200190f35b610d0860048036036020811015610c7a57600080fd5b810190602081018135600160201b811115610c9457600080fd5b820183602082011115610ca657600080fd5b803590602001918460018302840111600160201b83111715610cc757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506113e2945050505050565b604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d4f578181015183820152602001610d37565b50505050905090810190601f168015610d7c5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610daf578181015183820152602001610d97565b50505050905090810190601f168015610ddc5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b610e9160048036036020811015610e0357600080fd5b810190602081018135600160201b811115610e1d57600080fd5b820183602082011115610e2f57600080fd5b803590602001918460018302840111600160201b83111715610e5057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611412945050505050565b60405180806020018060200180602001886001600160401b0316815260200180602001806020018060200187810387528e818151815260200191508051906020019080838360005b83811015610ef1578181015183820152602001610ed9565b50505050905090810190601f168015610f1e5780820380516001836020036101000a031916815260200191505b5087810386528d5181528d516020918201918f019080838360005b83811015610f51578181015183820152602001610f39565b50505050905090810190601f168015610f7e5780820380516001836020036101000a031916815260200191505b5087810385528c5181528c516020918201918e019080838360005b83811015610fb1578181015183820152602001610f99565b50505050905090810190601f168015610fde5780820380516001836020036101000a031916815260200191505b5087810384528a5181528a516020918201918c019080838360005b83811015611011578181015183820152602001610ff9565b50505050905090810190601f16801561103e5780820380516001836020036101000a031916815260200191505b5087810383528951815289516020918201918b019080838360005b83811015611071578181015183820152602001611059565b50505050905090810190601f16801561109e5780820380516001836020036101000a031916815260200191505b5087810382528851815288516020918201918a019080838360005b838110156110d15781810151838201526020016110b9565b50505050905090810190601f1680156110fe5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b60008060008060608060608061112b612684565b6111348a611467565b9050806000015181602001518260400151836060015184608001518560a001518660c001518760e001519850985098509850985098509850985050919395975091939597565b606081806020019051602081101561119157600080fd5b8101908080516040519392919084600160201b8211156111b057600080fd5b9083019060208201858111156111c557600080fd5b8251600160201b8111828201881017156111de57600080fd5b82525081516020918201929091019080838360005b8381101561120b5781810151838201526020016111f3565b50505050905090810190601f1680156112385780820380516001836020036101000a031916815260200191505b5060405250505090505b919050565b6060816040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561128a578181015183820152602001611272565b50505050905090810190601f1680156112b75780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291905295945050505050565b60606112db6126db565b604051806060016040528086815260200185815260200184815250905061130181611527565b95945050505050565b6060611314612684565b6040518061010001604052808b81526020018a8152602001896001600160401b03168152602001886001600160401b0316815260200187815260200186815260200185815260200184815250905061136b81611654565b9a9950505050505050505050565b60606113836126fc565b6040518060e001604052808a8152602001898152602001888152602001876001600160401b031681526020018681526020018581526020018481525090506113ca8161192f565b9998505050505050505050565b805160209091012090565b60608060006113ef6126db565b6113f885611bb4565b805160208201516040909201519097919650945092505050565b6060806060600060608060606114266126fc565b61142f89611c00565b8051602082015160408301516060840151608085015160a086015160c090960151949f939e50919c509a509850919650945092505050565b61146f612684565b611477612684565b60006114838482611ca4565b90835290506114928482611ca4565b602084019190915290506114a68482611da3565b6001600160401b03909116604084015290506114c28482611da3565b6001600160401b03909116606084015290506114de8482611e49565b608084019190915290506114f28482611e49565b60a084019190915290506115068482611e49565b60c0840191909152905061151a8482611e49565b5060e08301525092915050565b6060806115378360000151611f1c565b6115448460200151611f1c565b6115518560400151611fe2565b6040516020018084805190602001908083835b602083106115835780518252601f199092019160209182019101611564565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b602083106115cb5780518252601f1990920191602091820191016115ac565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106116135780518252601f1990920191602091820191016115f4565b6001836020036101000a0380198251168184511680821785525050505050509050019350505050604051602081830303815290604052905080915050919050565b6060806116648360000151611fe2565b6116718460200151611fe2565b61167e856040015161207f565b61168b866060015161207f565b6116988760800151611f1c565b6116a58860a00151611f1c565b6116b28960c00151611f1c565b6116bf8a60e00151611f1c565b6040516020018089805190602001908083835b602083106116f15780518252601f1990920191602091820191016116d2565b51815160209384036101000a60001901801990921691161790528b5191909301928b0191508083835b602083106117395780518252601f19909201916020918201910161171a565b51815160209384036101000a60001901801990921691161790528a5191909301928a0191508083835b602083106117815780518252601f199092019160209182019101611762565b51815160209384036101000a600019018019909216911617905289519190930192890191508083835b602083106117c95780518252601f1990920191602091820191016117aa565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b602083106118115780518252601f1990920191602091820191016117f2565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b602083106118595780518252601f19909201916020918201910161183a565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b602083106118a15780518252601f199092019160209182019101611882565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106118e95780518252601f1990920191602091820191016118ca565b6001836020036101000a03801982511681845116808217855250505050505090500198505050505050505050604051602081830303815290604052905080915050919050565b60608061193f8360000151611f1c565b61194c8460200151611f1c565b6119598560400151611f1c565b611966866060015161207f565b6119738760800151611f1c565b6119808860a00151611f1c565b61198d8960c00151611f1c565b6040516020018088805190602001908083835b602083106119bf5780518252601f1990920191602091820191016119a0565b51815160209384036101000a60001901801990921691161790528a5191909301928a0191508083835b60208310611a075780518252601f1990920191602091820191016119e8565b51815160209384036101000a600019018019909216911617905289519190930192890191508083835b60208310611a4f5780518252601f199092019160209182019101611a30565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b60208310611a975780518252601f199092019160209182019101611a78565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310611adf5780518252601f199092019160209182019101611ac0565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611b275780518252601f199092019160209182019101611b08565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611b6f5780518252601f199092019160209182019101611b50565b6001836020036101000a038019825116818451168082178552505050505050905001975050505050505050604051602081830303815290604052905080915050919050565b611bbc6126db565b611bc46126db565b6000611bd08482611e49565b9083529050611bdf8482611e49565b60208401919091529050611bf38482611ca4565b5060408301525092915050565b611c086126fc565b611c106126fc565b6000611c1c8482611e49565b9083529050611c2b8482611e49565b60208401919091529050611c3f8482611e49565b60408401919091529050611c538482611da3565b6001600160401b0390911660608401529050611c6f8482611e49565b60808401919091529050611c838482611e49565b60a08401919091529050611c978482611e49565b5060c08301525092915050565b60008083518360200111158015611cbd57508260200183105b611cf85760405162461bcd60e51b81526004018080602001828103825260238152602001806127436023913960400191505060405180910390fd5b600060405160206000600182038760208a0101515b83831015611d2d5780821a83860153600183019250600182039150611d0d565b50505081016040525190506001600160ff1b03811115611d94576040805162461bcd60e51b815260206004820152601760248201527f56616c75652065786365656473207468652072616e6765000000000000000000604482015290519081900360640190fd5b915050602082015b9250929050565b60008083518360080111158015611dbc57508260080183105b611df75760405162461bcd60e51b81526004018080602001828103825260228152602001806127886022913960400191505060405180910390fd5b600060405160086000600182038760208a0101515b83831015611e2c5780821a83860153600183019250600182039150611e0c565b505050808201604052602003900351956008949094019450505050565b6060600080611e5885856120c2565b865190955090915081850111801590611e72575080840184105b611ead5760405162461bcd60e51b81526004018080602001828103825260248152602001806127cc6024913960400191505060405180910390fd5b606081158015611ec857604051915060208201604052611f12565b6040519150601f8316801560200281840101848101888315602002848c0101015b81831015611f01578051835260209283019201611ee9565b5050848452601f01601f1916604052505b5095930193505050565b8051606090611f2a816122db565b836040516020018083805190602001908083835b60208310611f5d5780518252601f199092019160209182019101611f3e565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611fa55780518252601f199092019160209182019101611f86565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b60606001600160ff1b03821115612040576040805162461bcd60e51b815260206004820152601b60248201527f56616c756520657863656564732075696e743235352072616e67650000000000604482015290519081900360640190fd5b60405160208082526000601f5b8282101561206f5785811a82602086010153600191909101906000190161204d565b5050506040818101905292915050565b6040516008808252606091906000601f5b828210156120b25785811a826020860101536001919091019060001901612090565b5050506028810160405292915050565b60008060006120d18585612421565b94509050600060fd60f81b6001600160f81b03198316141561216f576120f7868661249f565b955061ffff16905060fd8110801590612112575061ffff8111155b612163576040805162461bcd60e51b815260206004820152601f60248201527f4e65787455696e7431362c2076616c7565206f7574736964652072616e676500604482015290519081900360640190fd5b9250839150611d9c9050565b607f60f91b6001600160f81b0319831614156121ff5761218f8686612528565b955063ffffffff16905061ffff811180156121ae575063ffffffff8111155b612163576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6001600160f81b031980831614156122805761221b8686611da3565b95506001600160401b0316905063ffffffff8111612163576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b5060f881901c60fd8110612163576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b606060fd826001600160401b031610156122ff576122f8826125ce565b9050611242565b61ffff826001600160401b0316116123dd5761231e60fd60f81b6125ea565b612327836125fe565b6040516020018083805190602001908083835b602083106123595780518252601f19909201916020918201910161233a565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106123a15780518252601f199092019160209182019101612382565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050611242565b63ffffffff826001600160401b031611612407576123fe607f60f91b6125ea565b61232783612641565b6124186001600160f81b03196125ea565b6123278361207f565b6000808351836001011115801561243a57508260010183105b61248b576040805162461bcd60e51b815260206004820181905260248201527f4e657874427974652c204f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b505081810160200151600182019250929050565b600080835183600201111580156124b857508260020183105b6124f35760405162461bcd60e51b81526004018080602001828103825260228152602001806127666022913960400191505060405180910390fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b6000808351836004011115801561254157508260040183105b61257c5760405162461bcd60e51b81526004018080602001828103825260228152602001806127aa6022913960400191505060405180910390fd5b600060405160046000600182038760208a0101515b838310156125b15780821a83860153600183019250600182039150612591565b505050808201604052602003900351956004949094019450505050565b604080516001815260f89290921b602083015260218201905290565b60606125f88260f81c6125ce565b92915050565b6040516002808252606091906000601f5b828210156126315785811a82602086010153600191909101906000190161260f565b5050506022810160405292915050565b6040516004808252606091906000601f5b828210156126745785811a826020860101536001919091019060001901612652565b5050506024810160405292915050565b604051806101000160405280600081526020016000815260200160006001600160401b0316815260200160006001600160401b03168152602001606081526020016060815260200160608152602001606081525090565b60405180606001604052806060815260200160608152602001600081525090565b6040518060e0016040528060608152602001606081526020016060815260200160006001600160401b03168152602001606081526020016060815260200160608152509056fe4e65787455696e743235352c206f66667365742065786365656473206d6178696d756d4e65787455696e7431362c206f66667365742065786365656473206d6178696d756d4e65787455696e7436342c206f66667365742065786365656473206d6178696d756d4e65787455696e7433322c206f66667365742065786365656473206d6178696d756d4e65787456617242797465732c206f66667365742065786365656473206d6178696d756da26469706673582212203f85c563f168f5868bc40629cb86fa7763ee9768604a53e58a785a6dbca4677464736f6c634300060c0033"
// DeployCoder deploys a new Ethereum contract, binding an instance of Coder to it.
func DeployCoder(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Coder, error) {
parsed, err := abi.JSON(strings.NewReader(CoderABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(CoderBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &Coder{CoderCaller: CoderCaller{contract: contract}, CoderTransactor: CoderTransactor{contract: contract}, CoderFilterer: CoderFilterer{contract: contract}}, nil
}
// Coder is an auto generated Go binding around an Ethereum contract.
type Coder struct {
CoderCaller // Read-only binding to the contract
CoderTransactor // Write-only binding to the contract
CoderFilterer // Log filterer for contract events
}
// CoderCaller is an auto generated read-only Go binding around an Ethereum contract.
type CoderCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// CoderTransactor is an auto generated write-only Go binding around an Ethereum contract.
type CoderTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// CoderFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type CoderFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// CoderSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type CoderSession struct {
Contract *Coder // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// CoderCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type CoderCallerSession struct {
Contract *CoderCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// CoderTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type CoderTransactorSession struct {
Contract *CoderTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// CoderRaw is an auto generated low-level Go binding around an Ethereum contract.
type CoderRaw struct {
Contract *Coder // Generic contract binding to access the raw methods on
}
// CoderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type CoderCallerRaw struct {
Contract *CoderCaller // Generic read-only contract binding to access the raw methods on
}
// CoderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type CoderTransactorRaw struct {
Contract *CoderTransactor // Generic write-only contract binding to access the raw methods on
}
// NewCoder creates a new instance of Coder, bound to a specific deployed contract.
func NewCoder(address common.Address, backend bind.ContractBackend) (*Coder, error) {
contract, err := bindCoder(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Coder{CoderCaller: CoderCaller{contract: contract}, CoderTransactor: CoderTransactor{contract: contract}, CoderFilterer: CoderFilterer{contract: contract}}, nil
}
// NewCoderCaller creates a new read-only instance of Coder, bound to a specific deployed contract.
func NewCoderCaller(address common.Address, caller bind.ContractCaller) (*CoderCaller, error) {
contract, err := bindCoder(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &CoderCaller{contract: contract}, nil
}
// NewCoderTransactor creates a new write-only instance of Coder, bound to a specific deployed contract.
func NewCoderTransactor(address common.Address, transactor bind.ContractTransactor) (*CoderTransactor, error) {
contract, err := bindCoder(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &CoderTransactor{contract: contract}, nil
}
// NewCoderFilterer creates a new log filterer instance of Coder, bound to a specific deployed contract.
func NewCoderFilterer(address common.Address, filterer bind.ContractFilterer) (*CoderFilterer, error) {
contract, err := bindCoder(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &CoderFilterer{contract: contract}, nil
}
// bindCoder binds a generic wrapper to an already deployed contract.
func bindCoder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(CoderABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Coder *CoderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Coder.Contract.CoderCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Coder *CoderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Coder.Contract.CoderTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Coder *CoderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Coder.Contract.CoderTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Coder *CoderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Coder.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Coder *CoderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Coder.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Coder *CoderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Coder.Contract.contract.Transact(opts, method, params...)
}
// AbiDecodeStr is a free data retrieval call binding the contract method 0x1860f9c2.
//
// Solidity: function abiDecodeStr(bytes bts) pure returns(string str)
func (_Coder *CoderCaller) AbiDecodeStr(opts *bind.CallOpts, bts []byte) (string, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "abiDecodeStr", bts)
if err != nil {
return *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err
}
// AbiDecodeStr is a free data retrieval call binding the contract method 0x1860f9c2.
//
// Solidity: function abiDecodeStr(bytes bts) pure returns(string str)
func (_Coder *CoderSession) AbiDecodeStr(bts []byte) (string, error) {
return _Coder.Contract.AbiDecodeStr(&_Coder.CallOpts, bts)
}
// AbiDecodeStr is a free data retrieval call binding the contract method 0x1860f9c2.
//
// Solidity: function abiDecodeStr(bytes bts) pure returns(string str)
func (_Coder *CoderCallerSession) AbiDecodeStr(bts []byte) (string, error) {
return _Coder.Contract.AbiDecodeStr(&_Coder.CallOpts, bts)
}
// AbiEncodeStr is a free data retrieval call binding the contract method 0x4555adb2.
//
// Solidity: function abiEncodeStr(string str) pure returns(bytes bts)
func (_Coder *CoderCaller) AbiEncodeStr(opts *bind.CallOpts, str string) ([]byte, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "abiEncodeStr", str)
if err != nil {
return *new([]byte), err
}
out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)
return out0, err
}
// AbiEncodeStr is a free data retrieval call binding the contract method 0x4555adb2.
//
// Solidity: function abiEncodeStr(string str) pure returns(bytes bts)
func (_Coder *CoderSession) AbiEncodeStr(str string) ([]byte, error) {
return _Coder.Contract.AbiEncodeStr(&_Coder.CallOpts, str)
}
// AbiEncodeStr is a free data retrieval call binding the contract method 0x4555adb2.
//
// Solidity: function abiEncodeStr(string str) pure returns(bytes bts)
func (_Coder *CoderCallerSession) AbiEncodeStr(str string) ([]byte, error) {
return _Coder.Contract.AbiEncodeStr(&_Coder.CallOpts, str)
}
// DecodeCcmArgs is a free data retrieval call binding the contract method 0xdfc89bdd.
//
// Solidity: function decodeCcmArgs(bytes v) pure returns(bytes txHash, bytes crossChainId, bytes fromContract, uint64 toChainId, bytes toContract, bytes method, bytes args)
func (_Coder *CoderCaller) DecodeCcmArgs(opts *bind.CallOpts, v []byte) (struct {
TxHash []byte
CrossChainId []byte
FromContract []byte
ToChainId uint64
ToContract []byte
Method []byte
Args []byte
}, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "decodeCcmArgs", v)
outstruct := new(struct {
TxHash []byte
CrossChainId []byte
FromContract []byte
ToChainId uint64
ToContract []byte
Method []byte
Args []byte
})
if err != nil {
return *outstruct, err
}
outstruct.TxHash = *abi.ConvertType(out[0], new([]byte)).(*[]byte)
outstruct.CrossChainId = *abi.ConvertType(out[1], new([]byte)).(*[]byte)
outstruct.FromContract = *abi.ConvertType(out[2], new([]byte)).(*[]byte)
outstruct.ToChainId = *abi.ConvertType(out[3], new(uint64)).(*uint64)
outstruct.ToContract = *abi.ConvertType(out[4], new([]byte)).(*[]byte)
outstruct.Method = *abi.ConvertType(out[5], new([]byte)).(*[]byte)
outstruct.Args = *abi.ConvertType(out[6], new([]byte)).(*[]byte)
return *outstruct, err
}
// DecodeCcmArgs is a free data retrieval call binding the contract method 0xdfc89bdd.
//
// Solidity: function decodeCcmArgs(bytes v) pure returns(bytes txHash, bytes crossChainId, bytes fromContract, uint64 toChainId, bytes toContract, bytes method, bytes args)
func (_Coder *CoderSession) DecodeCcmArgs(v []byte) (struct {
TxHash []byte
CrossChainId []byte
FromContract []byte
ToChainId uint64
ToContract []byte
Method []byte
Args []byte
}, error) {
return _Coder.Contract.DecodeCcmArgs(&_Coder.CallOpts, v)
}
// DecodeCcmArgs is a free data retrieval call binding the contract method 0xdfc89bdd.
//
// Solidity: function decodeCcmArgs(bytes v) pure returns(bytes txHash, bytes crossChainId, bytes fromContract, uint64 toChainId, bytes toContract, bytes method, bytes args)
func (_Coder *CoderCallerSession) DecodeCcmArgs(v []byte) (struct {
TxHash []byte
CrossChainId []byte
FromContract []byte
ToChainId uint64
ToContract []byte
Method []byte
Args []byte
}, error) {
return _Coder.Contract.DecodeCcmArgs(&_Coder.CallOpts, v)
}
// DecodeSwapArgs is a free data retrieval call binding the contract method 0x1157cbab.
//
// Solidity: function decodeSwapArgs(bytes v) pure returns(uint256 amount, uint256 minOut, uint64 toPoolId, uint64 toChainId, bytes fromAssetHash, bytes fromAddress, bytes toAssetHash, bytes toAddress)
func (_Coder *CoderCaller) DecodeSwapArgs(opts *bind.CallOpts, v []byte) (struct {
Amount *big.Int
MinOut *big.Int
ToPoolId uint64
ToChainId uint64
FromAssetHash []byte
FromAddress []byte
ToAssetHash []byte
ToAddress []byte
}, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "decodeSwapArgs", v)
outstruct := new(struct {
Amount *big.Int
MinOut *big.Int
ToPoolId uint64
ToChainId uint64
FromAssetHash []byte
FromAddress []byte
ToAssetHash []byte
ToAddress []byte
})
if err != nil {
return *outstruct, err
}
outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
outstruct.MinOut = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
outstruct.ToPoolId = *abi.ConvertType(out[2], new(uint64)).(*uint64)
outstruct.ToChainId = *abi.ConvertType(out[3], new(uint64)).(*uint64)
outstruct.FromAssetHash = *abi.ConvertType(out[4], new([]byte)).(*[]byte)
outstruct.FromAddress = *abi.ConvertType(out[5], new([]byte)).(*[]byte)
outstruct.ToAssetHash = *abi.ConvertType(out[6], new([]byte)).(*[]byte)
outstruct.ToAddress = *abi.ConvertType(out[7], new([]byte)).(*[]byte)
return *outstruct, err
}
// DecodeSwapArgs is a free data retrieval call binding the contract method 0x1157cbab.
//
// Solidity: function decodeSwapArgs(bytes v) pure returns(uint256 amount, uint256 minOut, uint64 toPoolId, uint64 toChainId, bytes fromAssetHash, bytes fromAddress, bytes toAssetHash, bytes toAddress)
func (_Coder *CoderSession) DecodeSwapArgs(v []byte) (struct {
Amount *big.Int
MinOut *big.Int
ToPoolId uint64
ToChainId uint64
FromAssetHash []byte
FromAddress []byte
ToAssetHash []byte
ToAddress []byte
}, error) {
return _Coder.Contract.DecodeSwapArgs(&_Coder.CallOpts, v)
}
// DecodeSwapArgs is a free data retrieval call binding the contract method 0x1157cbab.
//
// Solidity: function decodeSwapArgs(bytes v) pure returns(uint256 amount, uint256 minOut, uint64 toPoolId, uint64 toChainId, bytes fromAssetHash, bytes fromAddress, bytes toAssetHash, bytes toAddress)
func (_Coder *CoderCallerSession) DecodeSwapArgs(v []byte) (struct {
Amount *big.Int
MinOut *big.Int
ToPoolId uint64
ToChainId uint64
FromAssetHash []byte
FromAddress []byte
ToAssetHash []byte
ToAddress []byte
}, error) {
return _Coder.Contract.DecodeSwapArgs(&_Coder.CallOpts, v)
}
// DecodeTxArgs is a free data retrieval call binding the contract method 0xdd037ae1.
//
// Solidity: function decodeTxArgs(bytes v) pure returns(bytes toAssetHash, bytes toAddress, uint256 amount)
func (_Coder *CoderCaller) DecodeTxArgs(opts *bind.CallOpts, v []byte) (struct {
ToAssetHash []byte
ToAddress []byte
Amount *big.Int
}, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "decodeTxArgs", v)
outstruct := new(struct {
ToAssetHash []byte
ToAddress []byte
Amount *big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.ToAssetHash = *abi.ConvertType(out[0], new([]byte)).(*[]byte)
outstruct.ToAddress = *abi.ConvertType(out[1], new([]byte)).(*[]byte)
outstruct.Amount = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
return *outstruct, err
}
// DecodeTxArgs is a free data retrieval call binding the contract method 0xdd037ae1.
//
// Solidity: function decodeTxArgs(bytes v) pure returns(bytes toAssetHash, bytes toAddress, uint256 amount)
func (_Coder *CoderSession) DecodeTxArgs(v []byte) (struct {
ToAssetHash []byte
ToAddress []byte
Amount *big.Int
}, error) {
return _Coder.Contract.DecodeTxArgs(&_Coder.CallOpts, v)
}
// DecodeTxArgs is a free data retrieval call binding the contract method 0xdd037ae1.
//
// Solidity: function decodeTxArgs(bytes v) pure returns(bytes toAssetHash, bytes toAddress, uint256 amount)
func (_Coder *CoderCallerSession) DecodeTxArgs(v []byte) (struct {
ToAssetHash []byte
ToAddress []byte
Amount *big.Int
}, error) {
return _Coder.Contract.DecodeTxArgs(&_Coder.CallOpts, v)
}
// EncodeCcmArgs is a free data retrieval call binding the contract method 0x7e6a7c31.
//
// Solidity: function encodeCcmArgs(bytes txHash, bytes crossChainId, bytes fromContract, uint64 toChainId, bytes toContract, bytes method, bytes args) pure returns(bytes)
func (_Coder *CoderCaller) EncodeCcmArgs(opts *bind.CallOpts, txHash []byte, crossChainId []byte, fromContract []byte, toChainId uint64, toContract []byte, method []byte, args []byte) ([]byte, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "encodeCcmArgs", txHash, crossChainId, fromContract, toChainId, toContract, method, args)
if err != nil {
return *new([]byte), err
}
out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)
return out0, err
}
// EncodeCcmArgs is a free data retrieval call binding the contract method 0x7e6a7c31.
//
// Solidity: function encodeCcmArgs(bytes txHash, bytes crossChainId, bytes fromContract, uint64 toChainId, bytes toContract, bytes method, bytes args) pure returns(bytes)
func (_Coder *CoderSession) EncodeCcmArgs(txHash []byte, crossChainId []byte, fromContract []byte, toChainId uint64, toContract []byte, method []byte, args []byte) ([]byte, error) {
return _Coder.Contract.EncodeCcmArgs(&_Coder.CallOpts, txHash, crossChainId, fromContract, toChainId, toContract, method, args)
}
// EncodeCcmArgs is a free data retrieval call binding the contract method 0x7e6a7c31.
//
// Solidity: function encodeCcmArgs(bytes txHash, bytes crossChainId, bytes fromContract, uint64 toChainId, bytes toContract, bytes method, bytes args) pure returns(bytes)
func (_Coder *CoderCallerSession) EncodeCcmArgs(txHash []byte, crossChainId []byte, fromContract []byte, toChainId uint64, toContract []byte, method []byte, args []byte) ([]byte, error) {
return _Coder.Contract.EncodeCcmArgs(&_Coder.CallOpts, txHash, crossChainId, fromContract, toChainId, toContract, method, args)
}
// EncodeSwapArgs is a free data retrieval call binding the contract method 0x67bc9dae.
//
// Solidity: function encodeSwapArgs(uint256 amount, uint256 minOut, uint64 toPoolId, uint64 toChainId, bytes fromAssetHash, bytes fromAddress, bytes toAssetHash, bytes toAddress) pure returns(bytes)
func (_Coder *CoderCaller) EncodeSwapArgs(opts *bind.CallOpts, amount *big.Int, minOut *big.Int, toPoolId uint64, toChainId uint64, fromAssetHash []byte, fromAddress []byte, toAssetHash []byte, toAddress []byte) ([]byte, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "encodeSwapArgs", amount, minOut, toPoolId, toChainId, fromAssetHash, fromAddress, toAssetHash, toAddress)
if err != nil {
return *new([]byte), err
}
out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)
return out0, err
}
// EncodeSwapArgs is a free data retrieval call binding the contract method 0x67bc9dae.
//
// Solidity: function encodeSwapArgs(uint256 amount, uint256 minOut, uint64 toPoolId, uint64 toChainId, bytes fromAssetHash, bytes fromAddress, bytes toAssetHash, bytes toAddress) pure returns(bytes)
func (_Coder *CoderSession) EncodeSwapArgs(amount *big.Int, minOut *big.Int, toPoolId uint64, toChainId uint64, fromAssetHash []byte, fromAddress []byte, toAssetHash []byte, toAddress []byte) ([]byte, error) {
return _Coder.Contract.EncodeSwapArgs(&_Coder.CallOpts, amount, minOut, toPoolId, toChainId, fromAssetHash, fromAddress, toAssetHash, toAddress)
}
// EncodeSwapArgs is a free data retrieval call binding the contract method 0x67bc9dae.
//
// Solidity: function encodeSwapArgs(uint256 amount, uint256 minOut, uint64 toPoolId, uint64 toChainId, bytes fromAssetHash, bytes fromAddress, bytes toAssetHash, bytes toAddress) pure returns(bytes)
func (_Coder *CoderCallerSession) EncodeSwapArgs(amount *big.Int, minOut *big.Int, toPoolId uint64, toChainId uint64, fromAssetHash []byte, fromAddress []byte, toAssetHash []byte, toAddress []byte) ([]byte, error) {
return _Coder.Contract.EncodeSwapArgs(&_Coder.CallOpts, amount, minOut, toPoolId, toChainId, fromAssetHash, fromAddress, toAssetHash, toAddress)
}
// EncodeTxArgs is a free data retrieval call binding the contract method 0x64d97eea.
//
// Solidity: function encodeTxArgs(bytes toAssetHash, bytes toAddress, uint256 amount) pure returns(bytes)
func (_Coder *CoderCaller) EncodeTxArgs(opts *bind.CallOpts, toAssetHash []byte, toAddress []byte, amount *big.Int) ([]byte, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "encodeTxArgs", toAssetHash, toAddress, amount)
if err != nil {
return *new([]byte), err
}
out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)
return out0, err
}
// EncodeTxArgs is a free data retrieval call binding the contract method 0x64d97eea.
//
// Solidity: function encodeTxArgs(bytes toAssetHash, bytes toAddress, uint256 amount) pure returns(bytes)
func (_Coder *CoderSession) EncodeTxArgs(toAssetHash []byte, toAddress []byte, amount *big.Int) ([]byte, error) {
return _Coder.Contract.EncodeTxArgs(&_Coder.CallOpts, toAssetHash, toAddress, amount)
}
// EncodeTxArgs is a free data retrieval call binding the contract method 0x64d97eea.
//
// Solidity: function encodeTxArgs(bytes toAssetHash, bytes toAddress, uint256 amount) pure returns(bytes)
func (_Coder *CoderCallerSession) EncodeTxArgs(toAssetHash []byte, toAddress []byte, amount *big.Int) ([]byte, error) {
return _Coder.Contract.EncodeTxArgs(&_Coder.CallOpts, toAssetHash, toAddress, amount)
}
// Selector is a free data retrieval call binding the contract method 0xbb50646c.
//
// Solidity: function selector(string method) pure returns(bytes4 _selector)
func (_Coder *CoderCaller) Selector(opts *bind.CallOpts, method string) ([4]byte, error) {
var out []interface{}
err := _Coder.contract.Call(opts, &out, "selector", method)
if err != nil {
return *new([4]byte), err
}
out0 := *abi.ConvertType(out[0], new([4]byte)).(*[4]byte)
return out0, err
}
// Selector is a free data retrieval call binding the contract method 0xbb50646c.
//
// Solidity: function selector(string method) pure returns(bytes4 _selector)
func (_Coder *CoderSession) Selector(method string) ([4]byte, error) {
return _Coder.Contract.Selector(&_Coder.CallOpts, method)
}
// Selector is a free data retrieval call binding the contract method 0xbb50646c.
//
// Solidity: function selector(string method) pure returns(bytes4 _selector)
func (_Coder *CoderCallerSession) Selector(method string) ([4]byte, error) {
return _Coder.Contract.Selector(&_Coder.CallOpts, method)
}
// ZeroCopySinkABI is the input ABI used to generate the binding from.
const ZeroCopySinkABI = "[]"
// ZeroCopySinkBin is the compiled bytecode used for deploying new contracts.
var ZeroCopySinkBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f42ded2b0543c941008657fad30a51d6f8332316c179e65b000bb86a48f7c21664736f6c634300060c0033"
// DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it.
func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) {
parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySinkBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil
}
// ZeroCopySink is an auto generated Go binding around an Ethereum contract.
type ZeroCopySink struct {
ZeroCopySinkCaller // Read-only binding to the contract
ZeroCopySinkTransactor // Write-only binding to the contract
ZeroCopySinkFilterer // Log filterer for contract events
}
// ZeroCopySinkCaller is an auto generated read-only Go binding around an Ethereum contract.
type ZeroCopySinkCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ZeroCopySinkTransactor is an auto generated write-only Go binding around an Ethereum contract.
type ZeroCopySinkTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ZeroCopySinkFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type ZeroCopySinkFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ZeroCopySinkSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type ZeroCopySinkSession struct {
Contract *ZeroCopySink // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// ZeroCopySinkCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type ZeroCopySinkCallerSession struct {
Contract *ZeroCopySinkCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// ZeroCopySinkTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type ZeroCopySinkTransactorSession struct {
Contract *ZeroCopySinkTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// ZeroCopySinkRaw is an auto generated low-level Go binding around an Ethereum contract.
type ZeroCopySinkRaw struct {
Contract *ZeroCopySink // Generic contract binding to access the raw methods on
}
// ZeroCopySinkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type ZeroCopySinkCallerRaw struct {
Contract *ZeroCopySinkCaller // Generic read-only contract binding to access the raw methods on
}
// ZeroCopySinkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type ZeroCopySinkTransactorRaw struct {
Contract *ZeroCopySinkTransactor // Generic write-only contract binding to access the raw methods on
}
// NewZeroCopySink creates a new instance of ZeroCopySink, bound to a specific deployed contract.
func NewZeroCopySink(address common.Address, backend bind.ContractBackend) (*ZeroCopySink, error) {
contract, err := bindZeroCopySink(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil
}
// NewZeroCopySinkCaller creates a new read-only instance of ZeroCopySink, bound to a specific deployed contract.
func NewZeroCopySinkCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySinkCaller, error) {
contract, err := bindZeroCopySink(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &ZeroCopySinkCaller{contract: contract}, nil
}
// NewZeroCopySinkTransactor creates a new write-only instance of ZeroCopySink, bound to a specific deployed contract.
func NewZeroCopySinkTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySinkTransactor, error) {
contract, err := bindZeroCopySink(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &ZeroCopySinkTransactor{contract: contract}, nil
}
// NewZeroCopySinkFilterer creates a new log filterer instance of ZeroCopySink, bound to a specific deployed contract.
func NewZeroCopySinkFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySinkFilterer, error) {
contract, err := bindZeroCopySink(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &ZeroCopySinkFilterer{contract: contract}, nil
}
// bindZeroCopySink binds a generic wrapper to an already deployed contract.
func bindZeroCopySink(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_ZeroCopySink *ZeroCopySinkRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _ZeroCopySink.Contract.ZeroCopySinkCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_ZeroCopySink *ZeroCopySinkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_ZeroCopySink *ZeroCopySinkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_ZeroCopySink *ZeroCopySinkCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _ZeroCopySink.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _ZeroCopySink.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _ZeroCopySink.Contract.contract.Transact(opts, method, params...)
}
// ZeroCopySourceABI is the input ABI used to generate the binding from.
const ZeroCopySourceABI = "[]"
// ZeroCopySourceBin is the compiled bytecode used for deploying new contracts.
var ZeroCopySourceBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122022e7abcfe2aa593b25b590f0fc253e3b976cbfb77be88c1cc3e673683d4eb9ba64736f6c634300060c0033"
// DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it.
func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) {
parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySourceBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil
}
// ZeroCopySource is an auto generated Go binding around an Ethereum contract.
type ZeroCopySource struct {
ZeroCopySourceCaller // Read-only binding to the contract
ZeroCopySourceTransactor // Write-only binding to the contract
ZeroCopySourceFilterer // Log filterer for contract events
}
// ZeroCopySourceCaller is an auto generated read-only Go binding around an Ethereum contract.
type ZeroCopySourceCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ZeroCopySourceTransactor is an auto generated write-only Go binding around an Ethereum contract.
type ZeroCopySourceTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ZeroCopySourceFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type ZeroCopySourceFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ZeroCopySourceSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type ZeroCopySourceSession struct {
Contract *ZeroCopySource // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// ZeroCopySourceCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type ZeroCopySourceCallerSession struct {
Contract *ZeroCopySourceCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// ZeroCopySourceTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type ZeroCopySourceTransactorSession struct {
Contract *ZeroCopySourceTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// ZeroCopySourceRaw is an auto generated low-level Go binding around an Ethereum contract.
type ZeroCopySourceRaw struct {
Contract *ZeroCopySource // Generic contract binding to access the raw methods on
}
// ZeroCopySourceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type ZeroCopySourceCallerRaw struct {
Contract *ZeroCopySourceCaller // Generic read-only contract binding to access the raw methods on
}
// ZeroCopySourceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type ZeroCopySourceTransactorRaw struct {
Contract *ZeroCopySourceTransactor // Generic write-only contract binding to access the raw methods on
}
// NewZeroCopySource creates a new instance of ZeroCopySource, bound to a specific deployed contract.
func NewZeroCopySource(address common.Address, backend bind.ContractBackend) (*ZeroCopySource, error) {
contract, err := bindZeroCopySource(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil
}
// NewZeroCopySourceCaller creates a new read-only instance of ZeroCopySource, bound to a specific deployed contract.
func NewZeroCopySourceCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySourceCaller, error) {
contract, err := bindZeroCopySource(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &ZeroCopySourceCaller{contract: contract}, nil
}
// NewZeroCopySourceTransactor creates a new write-only instance of ZeroCopySource, bound to a specific deployed contract.
func NewZeroCopySourceTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySourceTransactor, error) {
contract, err := bindZeroCopySource(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &ZeroCopySourceTransactor{contract: contract}, nil
}
// NewZeroCopySourceFilterer creates a new log filterer instance of ZeroCopySource, bound to a specific deployed contract.
func NewZeroCopySourceFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySourceFilterer, error) {
contract, err := bindZeroCopySource(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &ZeroCopySourceFilterer{contract: contract}, nil
}
// bindZeroCopySource binds a generic wrapper to an already deployed contract.
func bindZeroCopySource(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_ZeroCopySource *ZeroCopySourceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _ZeroCopySource.Contract.ZeroCopySourceCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_ZeroCopySource *ZeroCopySourceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_ZeroCopySource *ZeroCopySourceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_ZeroCopySource *ZeroCopySourceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _ZeroCopySource.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _ZeroCopySource.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _ZeroCopySource.Contract.contract.Transact(opts, method, params...)
}