-
Notifications
You must be signed in to change notification settings - Fork 30
/
bridge.go
4051 lines (3488 loc) · 185 KB
/
bridge.go
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
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bridge
import (
"errors"
"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 (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// AuthorizableMetaData contains all meta data concerning the Authorizable contract.
var AuthorizableMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAuthorizers\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAuthorizers\",\"type\":\"address\"}],\"name\":\"AuthorizersTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authorizers\",\"outputs\":[{\"internalType\":\"contractIAuthorizers\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Sigs: map[string]string{
"56741b2c": "authorizers()",
"8da5cb5b": "owner()",
"715018a6": "renounceOwnership()",
"f2fde38b": "transferOwnership(address)",
},
}
// AuthorizableABI is the input ABI used to generate the binding from.
// Deprecated: Use AuthorizableMetaData.ABI instead.
var AuthorizableABI = AuthorizableMetaData.ABI
// Deprecated: Use AuthorizableMetaData.Sigs instead.
// AuthorizableFuncSigs maps the 4-byte function signature to its string representation.
var AuthorizableFuncSigs = AuthorizableMetaData.Sigs
// Authorizable is an auto generated Go binding around an Ethereum contract.
type Authorizable struct {
AuthorizableCaller // Read-only binding to the contract
AuthorizableTransactor // Write-only binding to the contract
AuthorizableFilterer // Log filterer for contract events
}
// AuthorizableCaller is an auto generated read-only Go binding around an Ethereum contract.
type AuthorizableCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// AuthorizableTransactor is an auto generated write-only Go binding around an Ethereum contract.
type AuthorizableTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// AuthorizableFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type AuthorizableFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// AuthorizableSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type AuthorizableSession struct {
Contract *Authorizable // 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
}
// AuthorizableCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type AuthorizableCallerSession struct {
Contract *AuthorizableCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// AuthorizableTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type AuthorizableTransactorSession struct {
Contract *AuthorizableTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// AuthorizableRaw is an auto generated low-level Go binding around an Ethereum contract.
type AuthorizableRaw struct {
Contract *Authorizable // Generic contract binding to access the raw methods on
}
// AuthorizableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type AuthorizableCallerRaw struct {
Contract *AuthorizableCaller // Generic read-only contract binding to access the raw methods on
}
// AuthorizableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type AuthorizableTransactorRaw struct {
Contract *AuthorizableTransactor // Generic write-only contract binding to access the raw methods on
}
// NewAuthorizable creates a new instance of Authorizable, bound to a specific deployed contract.
func NewAuthorizable(address common.Address, backend bind.ContractBackend) (*Authorizable, error) {
contract, err := bindAuthorizable(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Authorizable{AuthorizableCaller: AuthorizableCaller{contract: contract}, AuthorizableTransactor: AuthorizableTransactor{contract: contract}, AuthorizableFilterer: AuthorizableFilterer{contract: contract}}, nil
}
// NewAuthorizableCaller creates a new read-only instance of Authorizable, bound to a specific deployed contract.
func NewAuthorizableCaller(address common.Address, caller bind.ContractCaller) (*AuthorizableCaller, error) {
contract, err := bindAuthorizable(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &AuthorizableCaller{contract: contract}, nil
}
// NewAuthorizableTransactor creates a new write-only instance of Authorizable, bound to a specific deployed contract.
func NewAuthorizableTransactor(address common.Address, transactor bind.ContractTransactor) (*AuthorizableTransactor, error) {
contract, err := bindAuthorizable(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &AuthorizableTransactor{contract: contract}, nil
}
// NewAuthorizableFilterer creates a new log filterer instance of Authorizable, bound to a specific deployed contract.
func NewAuthorizableFilterer(address common.Address, filterer bind.ContractFilterer) (*AuthorizableFilterer, error) {
contract, err := bindAuthorizable(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &AuthorizableFilterer{contract: contract}, nil
}
// bindAuthorizable binds a generic wrapper to an already deployed contract.
func bindAuthorizable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(AuthorizableABI))
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 (_Authorizable *AuthorizableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Authorizable.Contract.AuthorizableCaller.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 (_Authorizable *AuthorizableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Authorizable.Contract.AuthorizableTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Authorizable *AuthorizableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Authorizable.Contract.AuthorizableTransactor.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 (_Authorizable *AuthorizableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Authorizable.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 (_Authorizable *AuthorizableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Authorizable.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Authorizable *AuthorizableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Authorizable.Contract.contract.Transact(opts, method, params...)
}
// Authorizers is a free data retrieval call binding the contract method 0x56741b2c.
//
// Solidity: function authorizers() view returns(address)
func (_Authorizable *AuthorizableCaller) Authorizers(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Authorizable.contract.Call(opts, &out, "authorizers")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Authorizers is a free data retrieval call binding the contract method 0x56741b2c.
//
// Solidity: function authorizers() view returns(address)
func (_Authorizable *AuthorizableSession) Authorizers() (common.Address, error) {
return _Authorizable.Contract.Authorizers(&_Authorizable.CallOpts)
}
// Authorizers is a free data retrieval call binding the contract method 0x56741b2c.
//
// Solidity: function authorizers() view returns(address)
func (_Authorizable *AuthorizableCallerSession) Authorizers() (common.Address, error) {
return _Authorizable.Contract.Authorizers(&_Authorizable.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Authorizable *AuthorizableCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Authorizable.contract.Call(opts, &out, "owner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Authorizable *AuthorizableSession) Owner() (common.Address, error) {
return _Authorizable.Contract.Owner(&_Authorizable.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Authorizable *AuthorizableCallerSession) Owner() (common.Address, error) {
return _Authorizable.Contract.Owner(&_Authorizable.CallOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Authorizable *AuthorizableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Authorizable.contract.Transact(opts, "renounceOwnership")
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Authorizable *AuthorizableSession) RenounceOwnership() (*types.Transaction, error) {
return _Authorizable.Contract.RenounceOwnership(&_Authorizable.TransactOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Authorizable *AuthorizableTransactorSession) RenounceOwnership() (*types.Transaction, error) {
return _Authorizable.Contract.RenounceOwnership(&_Authorizable.TransactOpts)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Authorizable *AuthorizableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
return _Authorizable.contract.Transact(opts, "transferOwnership", newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Authorizable *AuthorizableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _Authorizable.Contract.TransferOwnership(&_Authorizable.TransactOpts, newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Authorizable *AuthorizableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _Authorizable.Contract.TransferOwnership(&_Authorizable.TransactOpts, newOwner)
}
// AuthorizableAuthorizersTransferredIterator is returned from FilterAuthorizersTransferred and is used to iterate over the raw logs and unpacked data for AuthorizersTransferred events raised by the Authorizable contract.
type AuthorizableAuthorizersTransferredIterator struct {
Event *AuthorizableAuthorizersTransferred // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *AuthorizableAuthorizersTransferredIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(AuthorizableAuthorizersTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(AuthorizableAuthorizersTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *AuthorizableAuthorizersTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *AuthorizableAuthorizersTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// AuthorizableAuthorizersTransferred represents a AuthorizersTransferred event raised by the Authorizable contract.
type AuthorizableAuthorizersTransferred struct {
PreviousAuthorizers common.Address
NewAuthorizers common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterAuthorizersTransferred is a free log retrieval operation binding the contract event 0xc44d874e85f1c5b65d10c0c33020d49211b91e9f2704457f2ef269e5fb7a6b5d.
//
// Solidity: event AuthorizersTransferred(address indexed previousAuthorizers, address indexed newAuthorizers)
func (_Authorizable *AuthorizableFilterer) FilterAuthorizersTransferred(opts *bind.FilterOpts, previousAuthorizers []common.Address, newAuthorizers []common.Address) (*AuthorizableAuthorizersTransferredIterator, error) {
var previousAuthorizersRule []interface{}
for _, previousAuthorizersItem := range previousAuthorizers {
previousAuthorizersRule = append(previousAuthorizersRule, previousAuthorizersItem)
}
var newAuthorizersRule []interface{}
for _, newAuthorizersItem := range newAuthorizers {
newAuthorizersRule = append(newAuthorizersRule, newAuthorizersItem)
}
logs, sub, err := _Authorizable.contract.FilterLogs(opts, "AuthorizersTransferred", previousAuthorizersRule, newAuthorizersRule)
if err != nil {
return nil, err
}
return &AuthorizableAuthorizersTransferredIterator{contract: _Authorizable.contract, event: "AuthorizersTransferred", logs: logs, sub: sub}, nil
}
// WatchAuthorizersTransferred is a free log subscription operation binding the contract event 0xc44d874e85f1c5b65d10c0c33020d49211b91e9f2704457f2ef269e5fb7a6b5d.
//
// Solidity: event AuthorizersTransferred(address indexed previousAuthorizers, address indexed newAuthorizers)
func (_Authorizable *AuthorizableFilterer) WatchAuthorizersTransferred(opts *bind.WatchOpts, sink chan<- *AuthorizableAuthorizersTransferred, previousAuthorizers []common.Address, newAuthorizers []common.Address) (event.Subscription, error) {
var previousAuthorizersRule []interface{}
for _, previousAuthorizersItem := range previousAuthorizers {
previousAuthorizersRule = append(previousAuthorizersRule, previousAuthorizersItem)
}
var newAuthorizersRule []interface{}
for _, newAuthorizersItem := range newAuthorizers {
newAuthorizersRule = append(newAuthorizersRule, newAuthorizersItem)
}
logs, sub, err := _Authorizable.contract.WatchLogs(opts, "AuthorizersTransferred", previousAuthorizersRule, newAuthorizersRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(AuthorizableAuthorizersTransferred)
if err := _Authorizable.contract.UnpackLog(event, "AuthorizersTransferred", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseAuthorizersTransferred is a log parse operation binding the contract event 0xc44d874e85f1c5b65d10c0c33020d49211b91e9f2704457f2ef269e5fb7a6b5d.
//
// Solidity: event AuthorizersTransferred(address indexed previousAuthorizers, address indexed newAuthorizers)
func (_Authorizable *AuthorizableFilterer) ParseAuthorizersTransferred(log types.Log) (*AuthorizableAuthorizersTransferred, error) {
event := new(AuthorizableAuthorizersTransferred)
if err := _Authorizable.contract.UnpackLog(event, "AuthorizersTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// AuthorizableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Authorizable contract.
type AuthorizableOwnershipTransferredIterator struct {
Event *AuthorizableOwnershipTransferred // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *AuthorizableOwnershipTransferredIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(AuthorizableOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(AuthorizableOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *AuthorizableOwnershipTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *AuthorizableOwnershipTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// AuthorizableOwnershipTransferred represents a OwnershipTransferred event raised by the Authorizable contract.
type AuthorizableOwnershipTransferred struct {
PreviousOwner common.Address
NewOwner common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Authorizable *AuthorizableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*AuthorizableOwnershipTransferredIterator, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
}
var newOwnerRule []interface{}
for _, newOwnerItem := range newOwner {
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
logs, sub, err := _Authorizable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
return &AuthorizableOwnershipTransferredIterator{contract: _Authorizable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}
// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Authorizable *AuthorizableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AuthorizableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
}
var newOwnerRule []interface{}
for _, newOwnerItem := range newOwner {
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
logs, sub, err := _Authorizable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(AuthorizableOwnershipTransferred)
if err := _Authorizable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Authorizable *AuthorizableFilterer) ParseOwnershipTransferred(log types.Log) (*AuthorizableOwnershipTransferred, error) {
event := new(AuthorizableOwnershipTransferred)
if err := _Authorizable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// BridgeMetaData contains all meta data concerning the Bridge contract.
var BridgeMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contractIAuthorizers\",\"name\":\"_authorizers\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAuthorizers\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAuthorizers\",\"type\":\"address\"}],\"name\":\"AuthorizersTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"clientId\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"txid\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authorizers\",\"outputs\":[{\"internalType\":\"contractIAuthorizers\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_clientId\",\"type\":\"bytes\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_txid\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isAuthorizationValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_txid\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_for\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_txid\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"mintFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenToRescue\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"rescueFunds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Sigs: map[string]string{
"56741b2c": "authorizers()",
"b69ef8a8": "balance()",
"fe9d9303": "burn(uint256,bytes)",
"408a12e6": "isAuthorizationValid(uint256,bytes,uint256,bytes)",
"4d02be9f": "mint(uint256,bytes,uint256,bytes)",
"d44a8430": "mintFor(address,uint256,bytes,uint256,bytes)",
"8da5cb5b": "owner()",
"715018a6": "renounceOwnership()",
"6ccae054": "rescueFunds(address,address,uint256)",
"fc0c546a": "token()",
"f2fde38b": "transferOwnership(address)",
},
Bin: "0x6080604052600060035534801561001557600080fd5b506040516112af3803806112af833981016040819052610034916100f2565b600080546001600160a01b03191633908117825560405183928592918291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039283166001600160a01b0319918216179091556002805492841692909116821790556040516000907fc44d874e85f1c5b65d10c0c33020d49211b91e9f2704457f2ef269e5fb7a6b5d908290a350505061012c565b6001600160a01b03811681146100ef57600080fd5b50565b6000806040838503121561010557600080fd5b8251610110816100da565b6020840151909250610121816100da565b809150509250929050565b6111748061013b6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b1461012b578063b69ef8a81461013c578063d44a843014610152578063f2fde38b14610165578063fc0c546a14610178578063fe9d93031461018b57600080fd5b8063408a12e6146100ae5780634d02be9f146100d657806356741b2c146100eb5780636ccae05414610110578063715018a614610123575b600080fd5b6100c16100bc366004610d4f565b61019e565b60405190151581526020015b60405180910390f35b6100e96100e4366004610d4f565b610251565b005b6002546001600160a01b03165b6040516001600160a01b0390911681526020016100cd565b6100c161011e366004610dea565b610395565b6100e96104c3565b6000546001600160a01b03166100f8565b610144610537565b6040519081526020016100cd565b6100e9610160366004610e2b565b6105b8565b6100e9610173366004610ec1565b6106f8565b6001546100f8906001600160a01b031681565b6100e9610199366004610ee5565b6107e2565b6000806101b36002546001600160a01b031690565b6001600160a01b031663f4fd62e3338a8a8a8a6040518663ffffffff1660e01b81526004016101e6959493929190610f5a565b602060405180830381600087803b15801561020057600080fd5b505af1158015610214573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102389190610f94565b9050610245818585610828565b98975050505050505050565b60008381526004602052604090205460ff16156102aa5760405162461bcd60e51b8152602060048201526012602482015271139bdb98d948185b1c9958591e481d5cd95960721b60448201526064015b60405180910390fd5b60006102be6002546001600160a01b031690565b6001600160a01b031663f4fd62e333898989896040518663ffffffff1660e01b81526004016102f1959493929190610f5a565b602060405180830381600087803b15801561030b57600080fd5b505af115801561031f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103439190610f94565b905061038c338888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250879150899050886108e0565b50505050505050565b600080546001600160a01b031633146103c05760405162461bcd60e51b81526004016102a190610fad565b6001546001600160a01b03858116911614156104395760405162461bcd60e51b815260206004820152603260248201527f546f6b656e506f6f6c3a2043616e6e6f7420636c61696d20746f6b656e2068656044820152711b1908189e481d1a194818dbdb9d1c9858dd60721b60648201526084016102a1565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905285169063a9059cbb90604401602060405180830381600087803b15801561048357600080fd5b505af1158015610497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb9190610fe2565b949350505050565b6000546001600160a01b031633146104ed5760405162461bcd60e51b81526004016102a190610fad565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561057b57600080fd5b505afa15801561058f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b39190610f94565b905090565b60008381526004602052604090205460ff161561060c5760405162461bcd60e51b8152602060048201526012602482015271139bdb98d948185b1c9958591e481d5cd95960721b60448201526064016102a1565b60006106206002546001600160a01b031690565b6001600160a01b031663f4fd62e389898989896040518663ffffffff1660e01b8152600401610653959493929190610f5a565b602060405180830381600087803b15801561066d57600080fd5b505af1158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190610f94565b90506106ee888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250879150899050886108e0565b5050505050505050565b6000546001600160a01b031633146107225760405162461bcd60e51b81526004016102a190610fad565b6001600160a01b0381166107875760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102a1565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610823338484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610b3f92505050565b505050565b6002546040516314b5dc0b60e11b81526000918591859185916001600160a01b039091169063296bb8169061086590869086908690600401611004565b602060405180830381600087803b15801561087f57600080fd5b505af1158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190610fe2565b6108d35760405162461bcd60e51b81526004016102a190611027565b5060019695505050505050565b6002546040516314b5dc0b60e11b81528491849184916001600160a01b03169063296bb8169061091890869086908690600401611004565b602060405180830381600087803b15801561093257600080fd5b505af1158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190610fe2565b6109865760405162461bcd60e51b81526004016102a190611027565b306001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109bf57600080fd5b505afa1580156109d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f7919061106d565b60405163a9059cbb60e01b81526001600160a01b038c81166004830152602482018c9052919091169063a9059cbb90604401602060405180830381600087803b158015610a4357600080fd5b505af1158015610a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7b9190610fe2565b610ad35760405162461bcd60e51b815260206004820152602360248201527f4272696467653a207472616e73666572206f7574206f6620706f6f6c206661696044820152621b195960ea1b60648201526084016102a1565b60008781526004602052604090819020805460ff19166001179055516001600160a01b038b16907fe04478a4154dc31a079fa36b9ee1af057f492a47c1524ac67f2ea4c214c3de9290610b2b908c908c908c906110ba565b60405180910390a250505050505050505050565b306001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b7857600080fd5b505afa158015610b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb0919061106d565b6040516323b872dd60e01b81526001600160a01b0385811660048301523060248301526044820185905291909116906323b872dd90606401602060405180830381600087803b158015610c0257600080fd5b505af1158015610c16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3a9190610fe2565b610c955760405162461bcd60e51b815260206004820152602660248201527f4272696467653a207472616e7366657220696e746f206275726e20706f6f6c2060448201526519985a5b195960d21b60648201526084016102a1565b600354610ca39060016110fc565b6003819055604051610cb6908390611122565b6040518091039020846001600160a01b03167f2b1155a5de2441854f3781130b980daa499b3412053ee40fcde076774bb12df285604051610cf991815260200190565b60405180910390a4505050565b60008083601f840112610d1857600080fd5b50813567ffffffffffffffff811115610d3057600080fd5b602083019150836020828501011115610d4857600080fd5b9250929050565b60008060008060008060808789031215610d6857600080fd5b86359550602087013567ffffffffffffffff80821115610d8757600080fd5b610d938a838b01610d06565b9097509550604089013594506060890135915080821115610db357600080fd5b50610dc089828a01610d06565b979a9699509497509295939492505050565b6001600160a01b0381168114610de757600080fd5b50565b600080600060608486031215610dff57600080fd5b8335610e0a81610dd2565b92506020840135610e1a81610dd2565b929592945050506040919091013590565b600080600080600080600060a0888a031215610e4657600080fd5b8735610e5181610dd2565b965060208801359550604088013567ffffffffffffffff80821115610e7557600080fd5b610e818b838c01610d06565b909750955060608a0135945060808a0135915080821115610ea157600080fd5b50610eae8a828b01610d06565b989b979a50959850939692959293505050565b600060208284031215610ed357600080fd5b8135610ede81610dd2565b9392505050565b600080600060408486031215610efa57600080fd5b83359250602084013567ffffffffffffffff811115610f1857600080fd5b610f2486828701610d06565b9497909650939450505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b0386168152846020820152608060408201526000610f82608083018587610f31565b90508260608301529695505050505050565b600060208284031215610fa657600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215610ff457600080fd5b81518015158114610ede57600080fd5b83815260406020820152600061101e604083018486610f31565b95945050505050565b60208082526026908201527f417574686f72697a6572733a207369676e617475726573206e6f7420617574686040820152651bdc9a5e995960d21b606082015260800190565b60006020828403121561107f57600080fd5b8151610ede81610dd2565b60005b838110156110a557818101518382015260200161108d565b838111156110b4576000848401525b50505050565b83815260606020820152600083518060608401526110df81608085016020880161108a565b604083019390935250601f91909101601f19160160800192915050565b6000821982111561111d57634e487b7160e01b600052601160045260246000fd5b500190565b6000825161113481846020870161108a565b919091019291505056fea2646970667358221220b552b7380e61d622d53ca633a6557f71c075ff38b34d9a7f8dc4e58fb3248e4f64736f6c63430008090033",
}
// BridgeABI is the input ABI used to generate the binding from.
// Deprecated: Use BridgeMetaData.ABI instead.
var BridgeABI = BridgeMetaData.ABI
// Deprecated: Use BridgeMetaData.Sigs instead.
// BridgeFuncSigs maps the 4-byte function signature to its string representation.
var BridgeFuncSigs = BridgeMetaData.Sigs
// BridgeBin is the compiled bytecode used for deploying new contracts.
// Deprecated: Use BridgeMetaData.Bin instead.
var BridgeBin = BridgeMetaData.Bin
// DeployBridge deploys a new Ethereum contract, binding an instance of Bridge to it.
func DeployBridge(auth *bind.TransactOpts, backend bind.ContractBackend, _token common.Address, _authorizers common.Address) (common.Address, *types.Transaction, *Bridge, error) {
parsed, err := BridgeMetaData.GetAbi()
if err != nil {
return common.Address{}, nil, nil, err
}
if parsed == nil {
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
}
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BridgeBin), backend, _token, _authorizers)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &Bridge{BridgeCaller: BridgeCaller{contract: contract}, BridgeTransactor: BridgeTransactor{contract: contract}, BridgeFilterer: BridgeFilterer{contract: contract}}, nil
}
// Bridge is an auto generated Go binding around an Ethereum contract.
type Bridge struct {
BridgeCaller // Read-only binding to the contract
BridgeTransactor // Write-only binding to the contract
BridgeFilterer // Log filterer for contract events
}
// BridgeCaller is an auto generated read-only Go binding around an Ethereum contract.
type BridgeCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract.
type BridgeTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type BridgeFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BridgeSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type BridgeSession struct {
Contract *Bridge // 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
}
// BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type BridgeCallerSession struct {
Contract *BridgeCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type BridgeTransactorSession struct {
Contract *BridgeTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// BridgeRaw is an auto generated low-level Go binding around an Ethereum contract.
type BridgeRaw struct {
Contract *Bridge // Generic contract binding to access the raw methods on
}
// BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type BridgeCallerRaw struct {
Contract *BridgeCaller // Generic read-only contract binding to access the raw methods on
}
// BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type BridgeTransactorRaw struct {
Contract *BridgeTransactor // Generic write-only contract binding to access the raw methods on
}
// NewBridge creates a new instance of Bridge, bound to a specific deployed contract.
func NewBridge(address common.Address, backend bind.ContractBackend) (*Bridge, error) {
contract, err := bindBridge(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Bridge{BridgeCaller: BridgeCaller{contract: contract}, BridgeTransactor: BridgeTransactor{contract: contract}, BridgeFilterer: BridgeFilterer{contract: contract}}, nil
}
// NewBridgeCaller creates a new read-only instance of Bridge, bound to a specific deployed contract.
func NewBridgeCaller(address common.Address, caller bind.ContractCaller) (*BridgeCaller, error) {
contract, err := bindBridge(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &BridgeCaller{contract: contract}, nil
}
// NewBridgeTransactor creates a new write-only instance of Bridge, bound to a specific deployed contract.
func NewBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeTransactor, error) {
contract, err := bindBridge(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &BridgeTransactor{contract: contract}, nil
}
// NewBridgeFilterer creates a new log filterer instance of Bridge, bound to a specific deployed contract.
func NewBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeFilterer, error) {
contract, err := bindBridge(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &BridgeFilterer{contract: contract}, nil
}
// bindBridge binds a generic wrapper to an already deployed contract.
func bindBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(BridgeABI))
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 (_Bridge *BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Bridge.Contract.BridgeCaller.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 (_Bridge *BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Bridge.Contract.BridgeTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Bridge *BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Bridge.Contract.BridgeTransactor.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 (_Bridge *BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Bridge.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 (_Bridge *BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Bridge.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Bridge *BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Bridge.Contract.contract.Transact(opts, method, params...)
}
// Authorizers is a free data retrieval call binding the contract method 0x56741b2c.
//
// Solidity: function authorizers() view returns(address)
func (_Bridge *BridgeCaller) Authorizers(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "authorizers")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Authorizers is a free data retrieval call binding the contract method 0x56741b2c.
//
// Solidity: function authorizers() view returns(address)
func (_Bridge *BridgeSession) Authorizers() (common.Address, error) {
return _Bridge.Contract.Authorizers(&_Bridge.CallOpts)
}
// Authorizers is a free data retrieval call binding the contract method 0x56741b2c.
//
// Solidity: function authorizers() view returns(address)
func (_Bridge *BridgeCallerSession) Authorizers() (common.Address, error) {
return _Bridge.Contract.Authorizers(&_Bridge.CallOpts)
}
// Balance is a free data retrieval call binding the contract method 0xb69ef8a8.
//
// Solidity: function balance() view returns(uint256)
func (_Bridge *BridgeCaller) Balance(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "balance")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// Balance is a free data retrieval call binding the contract method 0xb69ef8a8.
//
// Solidity: function balance() view returns(uint256)
func (_Bridge *BridgeSession) Balance() (*big.Int, error) {
return _Bridge.Contract.Balance(&_Bridge.CallOpts)
}
// Balance is a free data retrieval call binding the contract method 0xb69ef8a8.
//
// Solidity: function balance() view returns(uint256)
func (_Bridge *BridgeCallerSession) Balance() (*big.Int, error) {
return _Bridge.Contract.Balance(&_Bridge.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "owner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Bridge *BridgeSession) Owner() (common.Address, error) {
return _Bridge.Contract.Owner(&_Bridge.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) {
return _Bridge.Contract.Owner(&_Bridge.CallOpts)
}
// Token is a free data retrieval call binding the contract method 0xfc0c546a.
//
// Solidity: function token() view returns(address)
func (_Bridge *BridgeCaller) Token(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "token")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Token is a free data retrieval call binding the contract method 0xfc0c546a.
//
// Solidity: function token() view returns(address)
func (_Bridge *BridgeSession) Token() (common.Address, error) {
return _Bridge.Contract.Token(&_Bridge.CallOpts)
}
// Token is a free data retrieval call binding the contract method 0xfc0c546a.
//
// Solidity: function token() view returns(address)
func (_Bridge *BridgeCallerSession) Token() (common.Address, error) {
return _Bridge.Contract.Token(&_Bridge.CallOpts)
}
// Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
//
// Solidity: function burn(uint256 _amount, bytes _clientId) returns()
func (_Bridge *BridgeTransactor) Burn(opts *bind.TransactOpts, _amount *big.Int, _clientId []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "burn", _amount, _clientId)
}
// Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
//
// Solidity: function burn(uint256 _amount, bytes _clientId) returns()
func (_Bridge *BridgeSession) Burn(_amount *big.Int, _clientId []byte) (*types.Transaction, error) {
return _Bridge.Contract.Burn(&_Bridge.TransactOpts, _amount, _clientId)
}
// Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
//
// Solidity: function burn(uint256 _amount, bytes _clientId) returns()
func (_Bridge *BridgeTransactorSession) Burn(_amount *big.Int, _clientId []byte) (*types.Transaction, error) {
return _Bridge.Contract.Burn(&_Bridge.TransactOpts, _amount, _clientId)
}
// IsAuthorizationValid is a paid mutator transaction binding the contract method 0x408a12e6.
//
// Solidity: function isAuthorizationValid(uint256 _amount, bytes _txid, uint256 _nonce, bytes signature) returns(bool)
func (_Bridge *BridgeTransactor) IsAuthorizationValid(opts *bind.TransactOpts, _amount *big.Int, _txid []byte, _nonce *big.Int, signature []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "isAuthorizationValid", _amount, _txid, _nonce, signature)
}
// IsAuthorizationValid is a paid mutator transaction binding the contract method 0x408a12e6.
//
// Solidity: function isAuthorizationValid(uint256 _amount, bytes _txid, uint256 _nonce, bytes signature) returns(bool)
func (_Bridge *BridgeSession) IsAuthorizationValid(_amount *big.Int, _txid []byte, _nonce *big.Int, signature []byte) (*types.Transaction, error) {
return _Bridge.Contract.IsAuthorizationValid(&_Bridge.TransactOpts, _amount, _txid, _nonce, signature)
}
// IsAuthorizationValid is a paid mutator transaction binding the contract method 0x408a12e6.
//
// Solidity: function isAuthorizationValid(uint256 _amount, bytes _txid, uint256 _nonce, bytes signature) returns(bool)
func (_Bridge *BridgeTransactorSession) IsAuthorizationValid(_amount *big.Int, _txid []byte, _nonce *big.Int, signature []byte) (*types.Transaction, error) {
return _Bridge.Contract.IsAuthorizationValid(&_Bridge.TransactOpts, _amount, _txid, _nonce, signature)
}
// Mint is a paid mutator transaction binding the contract method 0x4d02be9f.
//
// Solidity: function mint(uint256 _amount, bytes _txid, uint256 _nonce, bytes signatures) returns()
func (_Bridge *BridgeTransactor) Mint(opts *bind.TransactOpts, _amount *big.Int, _txid []byte, _nonce *big.Int, signatures []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "mint", _amount, _txid, _nonce, signatures)
}
// Mint is a paid mutator transaction binding the contract method 0x4d02be9f.
//
// Solidity: function mint(uint256 _amount, bytes _txid, uint256 _nonce, bytes signatures) returns()
func (_Bridge *BridgeSession) Mint(_amount *big.Int, _txid []byte, _nonce *big.Int, signatures []byte) (*types.Transaction, error) {
return _Bridge.Contract.Mint(&_Bridge.TransactOpts, _amount, _txid, _nonce, signatures)
}
// Mint is a paid mutator transaction binding the contract method 0x4d02be9f.
//
// Solidity: function mint(uint256 _amount, bytes _txid, uint256 _nonce, bytes signatures) returns()
func (_Bridge *BridgeTransactorSession) Mint(_amount *big.Int, _txid []byte, _nonce *big.Int, signatures []byte) (*types.Transaction, error) {
return _Bridge.Contract.Mint(&_Bridge.TransactOpts, _amount, _txid, _nonce, signatures)
}
// MintFor is a paid mutator transaction binding the contract method 0xd44a8430.
//
// Solidity: function mintFor(address _for, uint256 _amount, bytes _txid, uint256 _nonce, bytes signatures) returns()
func (_Bridge *BridgeTransactor) MintFor(opts *bind.TransactOpts, _for common.Address, _amount *big.Int, _txid []byte, _nonce *big.Int, signatures []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "mintFor", _for, _amount, _txid, _nonce, signatures)
}
// MintFor is a paid mutator transaction binding the contract method 0xd44a8430.
//
// Solidity: function mintFor(address _for, uint256 _amount, bytes _txid, uint256 _nonce, bytes signatures) returns()
func (_Bridge *BridgeSession) MintFor(_for common.Address, _amount *big.Int, _txid []byte, _nonce *big.Int, signatures []byte) (*types.Transaction, error) {
return _Bridge.Contract.MintFor(&_Bridge.TransactOpts, _for, _amount, _txid, _nonce, signatures)
}
// MintFor is a paid mutator transaction binding the contract method 0xd44a8430.
//
// Solidity: function mintFor(address _for, uint256 _amount, bytes _txid, uint256 _nonce, bytes signatures) returns()
func (_Bridge *BridgeTransactorSession) MintFor(_for common.Address, _amount *big.Int, _txid []byte, _nonce *big.Int, signatures []byte) (*types.Transaction, error) {
return _Bridge.Contract.MintFor(&_Bridge.TransactOpts, _for, _amount, _txid, _nonce, signatures)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.