github.com/0chain/gosdk@v1.17.11/zcnbridge/ethereum/bridge/bridge.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package bridge
     5  
     6  import (
     7  	"errors"
     8  	"math/big"
     9  	"strings"
    10  
    11  	ethereum "github.com/ethereum/go-ethereum"
    12  	"github.com/ethereum/go-ethereum/accounts/abi"
    13  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    14  	"github.com/ethereum/go-ethereum/common"
    15  	"github.com/ethereum/go-ethereum/core/types"
    16  	"github.com/ethereum/go-ethereum/event"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var (
    21  	_ = errors.New
    22  	_ = big.NewInt
    23  	_ = strings.NewReader
    24  	_ = ethereum.NotFound
    25  	_ = bind.Bind
    26  	_ = common.Big1
    27  	_ = types.BloomLookup
    28  	_ = event.NewSubscription
    29  )
    30  
    31  // BridgeMetaData contains all meta data concerning the Bridge contract.
    32  var BridgeMetaData = &bind.MetaData{
    33  	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\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"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\":\"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\":\"BurnedFullIndex\",\"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\":true,\"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\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNonceMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"}],\"name\":\"getUserNonceMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[],\"name\":\"resetUserNonceMinted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"clientId_\",\"type\":\"bytes\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to_\",\"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\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
    34  	Bin: "0x60806040526000600455600060055534801561001a57600080fd5b50604051610e2e380380610e2e833981016040819052610039916100e6565b806100433361007e565b600180546001600160a01b039283166001600160a01b0319918216178255600291909155600380549490921693169290921790915550610120565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146100e357600080fd5b50565b600080604083850312156100f957600080fd5b8251610104816100ce565b6020840151909250610115816100ce565b809150509250929050565b610cff8061012f6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80639e2aa15c1161005b5780639e2aa15c146100f8578063e563e52614610100578063f2fde38b14610129578063fe9d93031461013c57600080fd5b8063062f950e1461008d57806356f6dd62146100c0578063715018a6146100d55780638da5cb5b146100dd575b600080fd5b6100ad61009b36600461093f565b60076020526000908152604090205481565b6040519081526020015b60405180910390f35b6100d36100ce3660046109aa565b61014f565b005b6100d36102ee565b6000546040516001600160a01b0390911681526020016100b7565b6100d3610302565b6100ad61010e36600461093f565b6001600160a01b031660009081526007602052604090205490565b6100d361013736600461093f565b610350565b6100d361014a366004610a6e565b6103c6565b6001600160a01b038716600090815260076020526040902054879084908190610179906001610ad0565b146101f15760405162461bcd60e51b815260206004820152603e60248201527f50726f7669646564206e6f6e6365206d7573742062652031206772656174657260448201527f207468616e207468652070726576696f7573206275726e206e6f6e63652e000060648201526084015b60405180910390fd5b600060405180608001604052808b6001600160a01b031681526020018a815260200189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505060209091018890526001546040516302c926b960e21b815292935090916001600160a01b0390911690630b249ae490610290908e908e908e908e908e90600401610b11565b6020604051808303816000875af11580156102af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d39190610b4b565b90506102e18282888861040c565b5050505050505050505050565b6102f6610684565b61030060006106de565b565b61030a610684565b60005b600554811161034d576000818152600660209081526040808320546001600160a01b0316835260079091528120558061034581610b64565b91505061030d565b50565b610358610684565b6001600160a01b0381166103bd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101e8565b61034d816106de565b610407338484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061072e92505050565b505050565b6104146108cc565b60015460405163e304688f60e01b81528491849184916001600160a01b03169063e304688f9061044c90869086908690600401610b7d565b6020604051808303816000875af115801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190610c25565b6104e75760405162461bcd60e51b815260206004820152602360248201527f476976656e207369676e61747572657320617265206e6f7420617574686f72696044820152621e995960ea1b60648201526084016101e8565b6003548751602089015160405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af1158015610541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105659190610c25565b6105bd5760405162461bcd60e51b815260206004820152602360248201527f4272696467653a207472616e73666572206f7574206f6620706f6f6c206661696044820152621b195960ea1b60648201526084016101e8565b606087015187516001600160a01b039081166000908152600760209081526040808320949094558a51600580548452600690925293822080546001600160a01b03191694909316939093179091558154919061061883610b64565b9190505550866060015187600001516001600160a01b03167fe04478a4154dc31a079fa36b9ee1af057f492a47c1524ac67f2ea4c214c3de9289602001518a60400151604051610669929190610c73565b60405180910390a350505061067e6001600255565b50505050565b6000546001600160a01b031633146103005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101e8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107366108cc565b6003546040516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201859052909116906323b872dd906064016020604051808303816000875af115801561078f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b39190610c25565b61080e5760405162461bcd60e51b815260206004820152602660248201527f4272696467653a207472616e7366657220696e746f206275726e20706f6f6c2060448201526519985a5b195960d21b60648201526084016101e8565b60045461081c906001610ad0565b60048190556040516001600160a01b038516907f2b1155a5de2441854f3781130b980daa499b3412053ee40fcde076774bb12df29061085e9086908690610c73565b60405180910390a3600454816040516108779190610cad565b6040518091039020846001600160a01b03167ff92c63d6a65a604ac5f7ddd105b1934f80b49d81059edec60935b8f0b3ea29f3856040516108ba91815260200190565b60405180910390a46104076001600255565b600280540361091d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101e8565b60028055565b80356001600160a01b038116811461093a57600080fd5b919050565b60006020828403121561095157600080fd5b61095a82610923565b9392505050565b60008083601f84011261097357600080fd5b50813567ffffffffffffffff81111561098b57600080fd5b6020830191508360208285010111156109a357600080fd5b9250929050565b600080600080600080600060a0888a0312156109c557600080fd5b6109ce88610923565b965060208801359550604088013567ffffffffffffffff808211156109f257600080fd5b6109fe8b838c01610961565b909750955060608a0135945060808a0135915080821115610a1e57600080fd5b818a0191508a601f830112610a3257600080fd5b813581811115610a4157600080fd5b8b60208260051b8501011115610a5657600080fd5b60208301945080935050505092959891949750929550565b600080600060408486031215610a8357600080fd5b83359250602084013567ffffffffffffffff811115610aa157600080fd5b610aad86828701610961565b9497909650939450505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ae357610ae3610aba565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b0386168152846020820152608060408201526000610b39608083018587610ae8565b90508260608301529695505050505050565b600060208284031215610b5d57600080fd5b5051919050565b600060018201610b7657610b76610aba565b5060010190565b60006040820185835260206040818501528185835260608501905060608660051b86010192508660005b87811015610c1757868503605f190183528135368a9003601e19018112610bcd57600080fd5b8901848101903567ffffffffffffffff811115610be957600080fd5b803603821315610bf857600080fd5b610c03878284610ae8565b965050509183019190830190600101610ba7565b509298975050505050505050565b600060208284031215610c3757600080fd5b8151801515811461095a57600080fd5b60005b83811015610c62578181015183820152602001610c4a565b8381111561067e5750506000910152565b8281526040602082015260008251806040840152610c98816060850160208701610c47565b601f01601f1916919091016060019392505050565b60008251610cbf818460208701610c47565b919091019291505056fea2646970667358221220593b31edb9b383d640436fd13816dc16719b624f004e4f16867b6170fd6a70a864736f6c634300080f0033",
    35  }
    36  
    37  // BridgeABI is the input ABI used to generate the binding from.
    38  // Deprecated: Use BridgeMetaData.ABI instead.
    39  var BridgeABI = BridgeMetaData.ABI
    40  
    41  // BridgeBin is the compiled bytecode used for deploying new contracts.
    42  // Deprecated: Use BridgeMetaData.Bin instead.
    43  var BridgeBin = BridgeMetaData.Bin
    44  
    45  // DeployBridge deploys a new Ethereum contract, binding an instance of Bridge to it.
    46  func DeployBridge(auth *bind.TransactOpts, backend bind.ContractBackend, token_ common.Address, authorizers_ common.Address) (common.Address, *types.Transaction, *Bridge, error) {
    47  	parsed, err := BridgeMetaData.GetAbi()
    48  	if err != nil {
    49  		return common.Address{}, nil, nil, err
    50  	}
    51  	if parsed == nil {
    52  		return common.Address{}, nil, nil, errors.New("GetABI returned nil")
    53  	}
    54  
    55  	address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BridgeBin), backend, token_, authorizers_)
    56  	if err != nil {
    57  		return common.Address{}, nil, nil, err
    58  	}
    59  	return address, tx, &Bridge{BridgeCaller: BridgeCaller{contract: contract}, BridgeTransactor: BridgeTransactor{contract: contract}, BridgeFilterer: BridgeFilterer{contract: contract}}, nil
    60  }
    61  
    62  // Bridge is an auto generated Go binding around an Ethereum contract.
    63  type Bridge struct {
    64  	BridgeCaller     // Read-only binding to the contract
    65  	BridgeTransactor // Write-only binding to the contract
    66  	BridgeFilterer   // Log filterer for contract events
    67  }
    68  
    69  // BridgeCaller is an auto generated read-only Go binding around an Ethereum contract.
    70  type BridgeCaller struct {
    71  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    72  }
    73  
    74  // BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract.
    75  type BridgeTransactor struct {
    76  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    77  }
    78  
    79  // BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    80  type BridgeFilterer struct {
    81  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    82  }
    83  
    84  // BridgeSession is an auto generated Go binding around an Ethereum contract,
    85  // with pre-set call and transact options.
    86  type BridgeSession struct {
    87  	Contract     *Bridge           // Generic contract binding to set the session for
    88  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    89  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    90  }
    91  
    92  // BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    93  // with pre-set call options.
    94  type BridgeCallerSession struct {
    95  	Contract *BridgeCaller // Generic contract caller binding to set the session for
    96  	CallOpts bind.CallOpts // Call options to use throughout this session
    97  }
    98  
    99  // BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   100  // with pre-set transact options.
   101  type BridgeTransactorSession struct {
   102  	Contract     *BridgeTransactor // Generic contract transactor binding to set the session for
   103  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   104  }
   105  
   106  // BridgeRaw is an auto generated low-level Go binding around an Ethereum contract.
   107  type BridgeRaw struct {
   108  	Contract *Bridge // Generic contract binding to access the raw methods on
   109  }
   110  
   111  // BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   112  type BridgeCallerRaw struct {
   113  	Contract *BridgeCaller // Generic read-only contract binding to access the raw methods on
   114  }
   115  
   116  // BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   117  type BridgeTransactorRaw struct {
   118  	Contract *BridgeTransactor // Generic write-only contract binding to access the raw methods on
   119  }
   120  
   121  // NewBridge creates a new instance of Bridge, bound to a specific deployed contract.
   122  func NewBridge(address common.Address, backend bind.ContractBackend) (*Bridge, error) {
   123  	contract, err := bindBridge(address, backend, backend, backend)
   124  	if err != nil {
   125  		return nil, err
   126  	}
   127  	return &Bridge{BridgeCaller: BridgeCaller{contract: contract}, BridgeTransactor: BridgeTransactor{contract: contract}, BridgeFilterer: BridgeFilterer{contract: contract}}, nil
   128  }
   129  
   130  // NewBridgeCaller creates a new read-only instance of Bridge, bound to a specific deployed contract.
   131  func NewBridgeCaller(address common.Address, caller bind.ContractCaller) (*BridgeCaller, error) {
   132  	contract, err := bindBridge(address, caller, nil, nil)
   133  	if err != nil {
   134  		return nil, err
   135  	}
   136  	return &BridgeCaller{contract: contract}, nil
   137  }
   138  
   139  // NewBridgeTransactor creates a new write-only instance of Bridge, bound to a specific deployed contract.
   140  func NewBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeTransactor, error) {
   141  	contract, err := bindBridge(address, nil, transactor, nil)
   142  	if err != nil {
   143  		return nil, err
   144  	}
   145  	return &BridgeTransactor{contract: contract}, nil
   146  }
   147  
   148  // NewBridgeFilterer creates a new log filterer instance of Bridge, bound to a specific deployed contract.
   149  func NewBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeFilterer, error) {
   150  	contract, err := bindBridge(address, nil, nil, filterer)
   151  	if err != nil {
   152  		return nil, err
   153  	}
   154  	return &BridgeFilterer{contract: contract}, nil
   155  }
   156  
   157  // bindBridge binds a generic wrapper to an already deployed contract.
   158  func bindBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   159  	parsed, err := abi.JSON(strings.NewReader(BridgeABI))
   160  	if err != nil {
   161  		return nil, err
   162  	}
   163  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   164  }
   165  
   166  // Call invokes the (constant) contract method with params as input values and
   167  // sets the output to result. The result type might be a single field for simple
   168  // returns, a slice of interfaces for anonymous returns and a struct for named
   169  // returns.
   170  func (_Bridge *BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   171  	return _Bridge.Contract.BridgeCaller.contract.Call(opts, result, method, params...)
   172  }
   173  
   174  // Transfer initiates a plain transaction to move funds to the contract, calling
   175  // its default method if one is available.
   176  func (_Bridge *BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   177  	return _Bridge.Contract.BridgeTransactor.contract.Transfer(opts)
   178  }
   179  
   180  // Transact invokes the (paid) contract method with params as input values.
   181  func (_Bridge *BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   182  	return _Bridge.Contract.BridgeTransactor.contract.Transact(opts, method, params...)
   183  }
   184  
   185  // Call invokes the (constant) contract method with params as input values and
   186  // sets the output to result. The result type might be a single field for simple
   187  // returns, a slice of interfaces for anonymous returns and a struct for named
   188  // returns.
   189  func (_Bridge *BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   190  	return _Bridge.Contract.contract.Call(opts, result, method, params...)
   191  }
   192  
   193  // Transfer initiates a plain transaction to move funds to the contract, calling
   194  // its default method if one is available.
   195  func (_Bridge *BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   196  	return _Bridge.Contract.contract.Transfer(opts)
   197  }
   198  
   199  // Transact invokes the (paid) contract method with params as input values.
   200  func (_Bridge *BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   201  	return _Bridge.Contract.contract.Transact(opts, method, params...)
   202  }
   203  
   204  // GetUserNonceMinted is a free data retrieval call binding the contract method 0xe563e526.
   205  //
   206  // Solidity: function getUserNonceMinted(address to_) view returns(uint256)
   207  func (_Bridge *BridgeCaller) GetUserNonceMinted(opts *bind.CallOpts, to_ common.Address) (*big.Int, error) {
   208  	var out []interface{}
   209  	err := _Bridge.contract.Call(opts, &out, "getUserNonceMinted", to_)
   210  
   211  	if err != nil {
   212  		return *new(*big.Int), err
   213  	}
   214  
   215  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   216  
   217  	return out0, err
   218  
   219  }
   220  
   221  // GetUserNonceMinted is a free data retrieval call binding the contract method 0xe563e526.
   222  //
   223  // Solidity: function getUserNonceMinted(address to_) view returns(uint256)
   224  func (_Bridge *BridgeSession) GetUserNonceMinted(to_ common.Address) (*big.Int, error) {
   225  	return _Bridge.Contract.GetUserNonceMinted(&_Bridge.CallOpts, to_)
   226  }
   227  
   228  // GetUserNonceMinted is a free data retrieval call binding the contract method 0xe563e526.
   229  //
   230  // Solidity: function getUserNonceMinted(address to_) view returns(uint256)
   231  func (_Bridge *BridgeCallerSession) GetUserNonceMinted(to_ common.Address) (*big.Int, error) {
   232  	return _Bridge.Contract.GetUserNonceMinted(&_Bridge.CallOpts, to_)
   233  }
   234  
   235  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   236  //
   237  // Solidity: function owner() view returns(address)
   238  func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
   239  	var out []interface{}
   240  	err := _Bridge.contract.Call(opts, &out, "owner")
   241  
   242  	if err != nil {
   243  		return *new(common.Address), err
   244  	}
   245  
   246  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   247  
   248  	return out0, err
   249  
   250  }
   251  
   252  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   253  //
   254  // Solidity: function owner() view returns(address)
   255  func (_Bridge *BridgeSession) Owner() (common.Address, error) {
   256  	return _Bridge.Contract.Owner(&_Bridge.CallOpts)
   257  }
   258  
   259  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   260  //
   261  // Solidity: function owner() view returns(address)
   262  func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) {
   263  	return _Bridge.Contract.Owner(&_Bridge.CallOpts)
   264  }
   265  
   266  // UserNonceMinted is a free data retrieval call binding the contract method 0x062f950e.
   267  //
   268  // Solidity: function userNonceMinted(address ) view returns(uint256)
   269  func (_Bridge *BridgeCaller) UserNonceMinted(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
   270  	var out []interface{}
   271  	err := _Bridge.contract.Call(opts, &out, "userNonceMinted", arg0)
   272  
   273  	if err != nil {
   274  		return *new(*big.Int), err
   275  	}
   276  
   277  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   278  
   279  	return out0, err
   280  
   281  }
   282  
   283  // UserNonceMinted is a free data retrieval call binding the contract method 0x062f950e.
   284  //
   285  // Solidity: function userNonceMinted(address ) view returns(uint256)
   286  func (_Bridge *BridgeSession) UserNonceMinted(arg0 common.Address) (*big.Int, error) {
   287  	return _Bridge.Contract.UserNonceMinted(&_Bridge.CallOpts, arg0)
   288  }
   289  
   290  // UserNonceMinted is a free data retrieval call binding the contract method 0x062f950e.
   291  //
   292  // Solidity: function userNonceMinted(address ) view returns(uint256)
   293  func (_Bridge *BridgeCallerSession) UserNonceMinted(arg0 common.Address) (*big.Int, error) {
   294  	return _Bridge.Contract.UserNonceMinted(&_Bridge.CallOpts, arg0)
   295  }
   296  
   297  // Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
   298  //
   299  // Solidity: function burn(uint256 amount_, bytes clientId_) returns()
   300  func (_Bridge *BridgeTransactor) Burn(opts *bind.TransactOpts, amount_ *big.Int, clientId_ []byte) (*types.Transaction, error) {
   301  	return _Bridge.contract.Transact(opts, "burn", amount_, clientId_)
   302  }
   303  
   304  // Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
   305  //
   306  // Solidity: function burn(uint256 amount_, bytes clientId_) returns()
   307  func (_Bridge *BridgeSession) Burn(amount_ *big.Int, clientId_ []byte) (*types.Transaction, error) {
   308  	return _Bridge.Contract.Burn(&_Bridge.TransactOpts, amount_, clientId_)
   309  }
   310  
   311  // Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
   312  //
   313  // Solidity: function burn(uint256 amount_, bytes clientId_) returns()
   314  func (_Bridge *BridgeTransactorSession) Burn(amount_ *big.Int, clientId_ []byte) (*types.Transaction, error) {
   315  	return _Bridge.Contract.Burn(&_Bridge.TransactOpts, amount_, clientId_)
   316  }
   317  
   318  // Mint is a paid mutator transaction binding the contract method 0x56f6dd62.
   319  //
   320  // Solidity: function mint(address to_, uint256 amount_, bytes txid_, uint256 nonce_, bytes[] signatures_) returns()
   321  func (_Bridge *BridgeTransactor) Mint(opts *bind.TransactOpts, to_ common.Address, amount_ *big.Int, txid_ []byte, nonce_ *big.Int, signatures_ [][]byte) (*types.Transaction, error) {
   322  	return _Bridge.contract.Transact(opts, "mint", to_, amount_, txid_, nonce_, signatures_)
   323  }
   324  
   325  // Mint is a paid mutator transaction binding the contract method 0x56f6dd62.
   326  //
   327  // Solidity: function mint(address to_, uint256 amount_, bytes txid_, uint256 nonce_, bytes[] signatures_) returns()
   328  func (_Bridge *BridgeSession) Mint(to_ common.Address, amount_ *big.Int, txid_ []byte, nonce_ *big.Int, signatures_ [][]byte) (*types.Transaction, error) {
   329  	return _Bridge.Contract.Mint(&_Bridge.TransactOpts, to_, amount_, txid_, nonce_, signatures_)
   330  }
   331  
   332  // Mint is a paid mutator transaction binding the contract method 0x56f6dd62.
   333  //
   334  // Solidity: function mint(address to_, uint256 amount_, bytes txid_, uint256 nonce_, bytes[] signatures_) returns()
   335  func (_Bridge *BridgeTransactorSession) Mint(to_ common.Address, amount_ *big.Int, txid_ []byte, nonce_ *big.Int, signatures_ [][]byte) (*types.Transaction, error) {
   336  	return _Bridge.Contract.Mint(&_Bridge.TransactOpts, to_, amount_, txid_, nonce_, signatures_)
   337  }
   338  
   339  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   340  //
   341  // Solidity: function renounceOwnership() returns()
   342  func (_Bridge *BridgeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
   343  	return _Bridge.contract.Transact(opts, "renounceOwnership")
   344  }
   345  
   346  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   347  //
   348  // Solidity: function renounceOwnership() returns()
   349  func (_Bridge *BridgeSession) RenounceOwnership() (*types.Transaction, error) {
   350  	return _Bridge.Contract.RenounceOwnership(&_Bridge.TransactOpts)
   351  }
   352  
   353  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   354  //
   355  // Solidity: function renounceOwnership() returns()
   356  func (_Bridge *BridgeTransactorSession) RenounceOwnership() (*types.Transaction, error) {
   357  	return _Bridge.Contract.RenounceOwnership(&_Bridge.TransactOpts)
   358  }
   359  
   360  // ResetUserNonceMinted is a paid mutator transaction binding the contract method 0x9e2aa15c.
   361  //
   362  // Solidity: function resetUserNonceMinted() returns()
   363  func (_Bridge *BridgeTransactor) ResetUserNonceMinted(opts *bind.TransactOpts) (*types.Transaction, error) {
   364  	return _Bridge.contract.Transact(opts, "resetUserNonceMinted")
   365  }
   366  
   367  // ResetUserNonceMinted is a paid mutator transaction binding the contract method 0x9e2aa15c.
   368  //
   369  // Solidity: function resetUserNonceMinted() returns()
   370  func (_Bridge *BridgeSession) ResetUserNonceMinted() (*types.Transaction, error) {
   371  	return _Bridge.Contract.ResetUserNonceMinted(&_Bridge.TransactOpts)
   372  }
   373  
   374  // ResetUserNonceMinted is a paid mutator transaction binding the contract method 0x9e2aa15c.
   375  //
   376  // Solidity: function resetUserNonceMinted() returns()
   377  func (_Bridge *BridgeTransactorSession) ResetUserNonceMinted() (*types.Transaction, error) {
   378  	return _Bridge.Contract.ResetUserNonceMinted(&_Bridge.TransactOpts)
   379  }
   380  
   381  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   382  //
   383  // Solidity: function transferOwnership(address newOwner) returns()
   384  func (_Bridge *BridgeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
   385  	return _Bridge.contract.Transact(opts, "transferOwnership", newOwner)
   386  }
   387  
   388  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   389  //
   390  // Solidity: function transferOwnership(address newOwner) returns()
   391  func (_Bridge *BridgeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
   392  	return _Bridge.Contract.TransferOwnership(&_Bridge.TransactOpts, newOwner)
   393  }
   394  
   395  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   396  //
   397  // Solidity: function transferOwnership(address newOwner) returns()
   398  func (_Bridge *BridgeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
   399  	return _Bridge.Contract.TransferOwnership(&_Bridge.TransactOpts, newOwner)
   400  }
   401  
   402  // BridgeBurnedIterator is returned from FilterBurned and is used to iterate over the raw logs and unpacked data for Burned events raised by the Bridge contract.
   403  type BridgeBurnedIterator struct {
   404  	Event *BridgeBurned // Event containing the contract specifics and raw log
   405  
   406  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   407  	event    string              // Event name to use for unpacking event data
   408  
   409  	logs chan types.Log        // Log channel receiving the found contract events
   410  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   411  	done bool                  // Whether the subscription completed delivering logs
   412  	fail error                 // Occurred error to stop iteration
   413  }
   414  
   415  // Next advances the iterator to the subsequent event, returning whether there
   416  // are any more events found. In case of a retrieval or parsing error, false is
   417  // returned and Error() can be queried for the exact failure.
   418  func (it *BridgeBurnedIterator) Next() bool {
   419  	// If the iterator failed, stop iterating
   420  	if it.fail != nil {
   421  		return false
   422  	}
   423  	// If the iterator completed, deliver directly whatever's available
   424  	if it.done {
   425  		select {
   426  		case log := <-it.logs:
   427  			it.Event = new(BridgeBurned)
   428  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   429  				it.fail = err
   430  				return false
   431  			}
   432  			it.Event.Raw = log
   433  			return true
   434  
   435  		default:
   436  			return false
   437  		}
   438  	}
   439  	// Iterator still in progress, wait for either a data or an error event
   440  	select {
   441  	case log := <-it.logs:
   442  		it.Event = new(BridgeBurned)
   443  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   444  			it.fail = err
   445  			return false
   446  		}
   447  		it.Event.Raw = log
   448  		return true
   449  
   450  	case err := <-it.sub.Err():
   451  		it.done = true
   452  		it.fail = err
   453  		return it.Next()
   454  	}
   455  }
   456  
   457  // Error returns any retrieval or parsing error occurred during filtering.
   458  func (it *BridgeBurnedIterator) Error() error {
   459  	return it.fail
   460  }
   461  
   462  // Close terminates the iteration process, releasing any pending underlying
   463  // resources.
   464  func (it *BridgeBurnedIterator) Close() error {
   465  	it.sub.Unsubscribe()
   466  	return nil
   467  }
   468  
   469  // BridgeBurned represents a Burned event raised by the Bridge contract.
   470  type BridgeBurned struct {
   471  	From     common.Address
   472  	Amount   *big.Int
   473  	ClientId []byte
   474  	Nonce    *big.Int
   475  	Raw      types.Log // Blockchain specific contextual infos
   476  }
   477  
   478  // FilterBurned is a free log retrieval operation binding the contract event 0x2b1155a5de2441854f3781130b980daa499b3412053ee40fcde076774bb12df2.
   479  //
   480  // Solidity: event Burned(address indexed from, uint256 amount, bytes clientId, uint256 indexed nonce)
   481  func (_Bridge *BridgeFilterer) FilterBurned(opts *bind.FilterOpts, from []common.Address, nonce []*big.Int) (*BridgeBurnedIterator, error) {
   482  
   483  	var fromRule []interface{}
   484  	for _, fromItem := range from {
   485  		fromRule = append(fromRule, fromItem)
   486  	}
   487  
   488  	var nonceRule []interface{}
   489  	for _, nonceItem := range nonce {
   490  		nonceRule = append(nonceRule, nonceItem)
   491  	}
   492  
   493  	logs, sub, err := _Bridge.contract.FilterLogs(opts, "Burned", fromRule, nonceRule)
   494  	if err != nil {
   495  		return nil, err
   496  	}
   497  	return &BridgeBurnedIterator{contract: _Bridge.contract, event: "Burned", logs: logs, sub: sub}, nil
   498  }
   499  
   500  // WatchBurned is a free log subscription operation binding the contract event 0x2b1155a5de2441854f3781130b980daa499b3412053ee40fcde076774bb12df2.
   501  //
   502  // Solidity: event Burned(address indexed from, uint256 amount, bytes clientId, uint256 indexed nonce)
   503  func (_Bridge *BridgeFilterer) WatchBurned(opts *bind.WatchOpts, sink chan<- *BridgeBurned, from []common.Address, nonce []*big.Int) (event.Subscription, error) {
   504  
   505  	var fromRule []interface{}
   506  	for _, fromItem := range from {
   507  		fromRule = append(fromRule, fromItem)
   508  	}
   509  
   510  	var nonceRule []interface{}
   511  	for _, nonceItem := range nonce {
   512  		nonceRule = append(nonceRule, nonceItem)
   513  	}
   514  
   515  	logs, sub, err := _Bridge.contract.WatchLogs(opts, "Burned", fromRule, nonceRule)
   516  	if err != nil {
   517  		return nil, err
   518  	}
   519  	return event.NewSubscription(func(quit <-chan struct{}) error {
   520  		defer sub.Unsubscribe()
   521  		for {
   522  			select {
   523  			case log := <-logs:
   524  				// New log arrived, parse the event and forward to the user
   525  				event := new(BridgeBurned)
   526  				if err := _Bridge.contract.UnpackLog(event, "Burned", log); err != nil {
   527  					return err
   528  				}
   529  				event.Raw = log
   530  
   531  				select {
   532  				case sink <- event:
   533  				case err := <-sub.Err():
   534  					return err
   535  				case <-quit:
   536  					return nil
   537  				}
   538  			case err := <-sub.Err():
   539  				return err
   540  			case <-quit:
   541  				return nil
   542  			}
   543  		}
   544  	}), nil
   545  }
   546  
   547  // ParseBurned is a log parse operation binding the contract event 0x2b1155a5de2441854f3781130b980daa499b3412053ee40fcde076774bb12df2.
   548  //
   549  // Solidity: event Burned(address indexed from, uint256 amount, bytes clientId, uint256 indexed nonce)
   550  func (_Bridge *BridgeFilterer) ParseBurned(log types.Log) (*BridgeBurned, error) {
   551  	event := new(BridgeBurned)
   552  	if err := _Bridge.contract.UnpackLog(event, "Burned", log); err != nil {
   553  		return nil, err
   554  	}
   555  	event.Raw = log
   556  	return event, nil
   557  }
   558  
   559  // BridgeBurnedFullIndexIterator is returned from FilterBurnedFullIndex and is used to iterate over the raw logs and unpacked data for BurnedFullIndex events raised by the Bridge contract.
   560  type BridgeBurnedFullIndexIterator struct {
   561  	Event *BridgeBurnedFullIndex // Event containing the contract specifics and raw log
   562  
   563  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   564  	event    string              // Event name to use for unpacking event data
   565  
   566  	logs chan types.Log        // Log channel receiving the found contract events
   567  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   568  	done bool                  // Whether the subscription completed delivering logs
   569  	fail error                 // Occurred error to stop iteration
   570  }
   571  
   572  // Next advances the iterator to the subsequent event, returning whether there
   573  // are any more events found. In case of a retrieval or parsing error, false is
   574  // returned and Error() can be queried for the exact failure.
   575  func (it *BridgeBurnedFullIndexIterator) Next() bool {
   576  	// If the iterator failed, stop iterating
   577  	if it.fail != nil {
   578  		return false
   579  	}
   580  	// If the iterator completed, deliver directly whatever's available
   581  	if it.done {
   582  		select {
   583  		case log := <-it.logs:
   584  			it.Event = new(BridgeBurnedFullIndex)
   585  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   586  				it.fail = err
   587  				return false
   588  			}
   589  			it.Event.Raw = log
   590  			return true
   591  
   592  		default:
   593  			return false
   594  		}
   595  	}
   596  	// Iterator still in progress, wait for either a data or an error event
   597  	select {
   598  	case log := <-it.logs:
   599  		it.Event = new(BridgeBurnedFullIndex)
   600  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   601  			it.fail = err
   602  			return false
   603  		}
   604  		it.Event.Raw = log
   605  		return true
   606  
   607  	case err := <-it.sub.Err():
   608  		it.done = true
   609  		it.fail = err
   610  		return it.Next()
   611  	}
   612  }
   613  
   614  // Error returns any retrieval or parsing error occurred during filtering.
   615  func (it *BridgeBurnedFullIndexIterator) Error() error {
   616  	return it.fail
   617  }
   618  
   619  // Close terminates the iteration process, releasing any pending underlying
   620  // resources.
   621  func (it *BridgeBurnedFullIndexIterator) Close() error {
   622  	it.sub.Unsubscribe()
   623  	return nil
   624  }
   625  
   626  // BridgeBurnedFullIndex represents a BurnedFullIndex event raised by the Bridge contract.
   627  type BridgeBurnedFullIndex struct {
   628  	From     common.Address
   629  	Amount   *big.Int
   630  	ClientId common.Hash
   631  	Nonce    *big.Int
   632  	Raw      types.Log // Blockchain specific contextual infos
   633  }
   634  
   635  // FilterBurnedFullIndex is a free log retrieval operation binding the contract event 0xf92c63d6a65a604ac5f7ddd105b1934f80b49d81059edec60935b8f0b3ea29f3.
   636  //
   637  // Solidity: event BurnedFullIndex(address indexed from, uint256 amount, bytes indexed clientId, uint256 indexed nonce)
   638  func (_Bridge *BridgeFilterer) FilterBurnedFullIndex(opts *bind.FilterOpts, from []common.Address, clientId [][]byte, nonce []*big.Int) (*BridgeBurnedFullIndexIterator, error) {
   639  
   640  	var fromRule []interface{}
   641  	for _, fromItem := range from {
   642  		fromRule = append(fromRule, fromItem)
   643  	}
   644  
   645  	var clientIdRule []interface{}
   646  	for _, clientIdItem := range clientId {
   647  		clientIdRule = append(clientIdRule, clientIdItem)
   648  	}
   649  	var nonceRule []interface{}
   650  	for _, nonceItem := range nonce {
   651  		nonceRule = append(nonceRule, nonceItem)
   652  	}
   653  
   654  	logs, sub, err := _Bridge.contract.FilterLogs(opts, "BurnedFullIndex", fromRule, clientIdRule, nonceRule)
   655  	if err != nil {
   656  		return nil, err
   657  	}
   658  	return &BridgeBurnedFullIndexIterator{contract: _Bridge.contract, event: "BurnedFullIndex", logs: logs, sub: sub}, nil
   659  }
   660  
   661  // WatchBurnedFullIndex is a free log subscription operation binding the contract event 0xf92c63d6a65a604ac5f7ddd105b1934f80b49d81059edec60935b8f0b3ea29f3.
   662  //
   663  // Solidity: event BurnedFullIndex(address indexed from, uint256 amount, bytes indexed clientId, uint256 indexed nonce)
   664  func (_Bridge *BridgeFilterer) WatchBurnedFullIndex(opts *bind.WatchOpts, sink chan<- *BridgeBurnedFullIndex, from []common.Address, clientId [][]byte, nonce []*big.Int) (event.Subscription, error) {
   665  
   666  	var fromRule []interface{}
   667  	for _, fromItem := range from {
   668  		fromRule = append(fromRule, fromItem)
   669  	}
   670  
   671  	var clientIdRule []interface{}
   672  	for _, clientIdItem := range clientId {
   673  		clientIdRule = append(clientIdRule, clientIdItem)
   674  	}
   675  	var nonceRule []interface{}
   676  	for _, nonceItem := range nonce {
   677  		nonceRule = append(nonceRule, nonceItem)
   678  	}
   679  
   680  	logs, sub, err := _Bridge.contract.WatchLogs(opts, "BurnedFullIndex", fromRule, clientIdRule, nonceRule)
   681  	if err != nil {
   682  		return nil, err
   683  	}
   684  	return event.NewSubscription(func(quit <-chan struct{}) error {
   685  		defer sub.Unsubscribe()
   686  		for {
   687  			select {
   688  			case log := <-logs:
   689  				// New log arrived, parse the event and forward to the user
   690  				event := new(BridgeBurnedFullIndex)
   691  				if err := _Bridge.contract.UnpackLog(event, "BurnedFullIndex", log); err != nil {
   692  					return err
   693  				}
   694  				event.Raw = log
   695  
   696  				select {
   697  				case sink <- event:
   698  				case err := <-sub.Err():
   699  					return err
   700  				case <-quit:
   701  					return nil
   702  				}
   703  			case err := <-sub.Err():
   704  				return err
   705  			case <-quit:
   706  				return nil
   707  			}
   708  		}
   709  	}), nil
   710  }
   711  
   712  // ParseBurnedFullIndex is a log parse operation binding the contract event 0xf92c63d6a65a604ac5f7ddd105b1934f80b49d81059edec60935b8f0b3ea29f3.
   713  //
   714  // Solidity: event BurnedFullIndex(address indexed from, uint256 amount, bytes indexed clientId, uint256 indexed nonce)
   715  func (_Bridge *BridgeFilterer) ParseBurnedFullIndex(log types.Log) (*BridgeBurnedFullIndex, error) {
   716  	event := new(BridgeBurnedFullIndex)
   717  	if err := _Bridge.contract.UnpackLog(event, "BurnedFullIndex", log); err != nil {
   718  		return nil, err
   719  	}
   720  	event.Raw = log
   721  	return event, nil
   722  }
   723  
   724  // BridgeMintedIterator is returned from FilterMinted and is used to iterate over the raw logs and unpacked data for Minted events raised by the Bridge contract.
   725  type BridgeMintedIterator struct {
   726  	Event *BridgeMinted // Event containing the contract specifics and raw log
   727  
   728  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   729  	event    string              // Event name to use for unpacking event data
   730  
   731  	logs chan types.Log        // Log channel receiving the found contract events
   732  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   733  	done bool                  // Whether the subscription completed delivering logs
   734  	fail error                 // Occurred error to stop iteration
   735  }
   736  
   737  // Next advances the iterator to the subsequent event, returning whether there
   738  // are any more events found. In case of a retrieval or parsing error, false is
   739  // returned and Error() can be queried for the exact failure.
   740  func (it *BridgeMintedIterator) Next() bool {
   741  	// If the iterator failed, stop iterating
   742  	if it.fail != nil {
   743  		return false
   744  	}
   745  	// If the iterator completed, deliver directly whatever's available
   746  	if it.done {
   747  		select {
   748  		case log := <-it.logs:
   749  			it.Event = new(BridgeMinted)
   750  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   751  				it.fail = err
   752  				return false
   753  			}
   754  			it.Event.Raw = log
   755  			return true
   756  
   757  		default:
   758  			return false
   759  		}
   760  	}
   761  	// Iterator still in progress, wait for either a data or an error event
   762  	select {
   763  	case log := <-it.logs:
   764  		it.Event = new(BridgeMinted)
   765  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   766  			it.fail = err
   767  			return false
   768  		}
   769  		it.Event.Raw = log
   770  		return true
   771  
   772  	case err := <-it.sub.Err():
   773  		it.done = true
   774  		it.fail = err
   775  		return it.Next()
   776  	}
   777  }
   778  
   779  // Error returns any retrieval or parsing error occurred during filtering.
   780  func (it *BridgeMintedIterator) Error() error {
   781  	return it.fail
   782  }
   783  
   784  // Close terminates the iteration process, releasing any pending underlying
   785  // resources.
   786  func (it *BridgeMintedIterator) Close() error {
   787  	it.sub.Unsubscribe()
   788  	return nil
   789  }
   790  
   791  // BridgeMinted represents a Minted event raised by the Bridge contract.
   792  type BridgeMinted struct {
   793  	To     common.Address
   794  	Amount *big.Int
   795  	Txid   []byte
   796  	Nonce  *big.Int
   797  	Raw    types.Log // Blockchain specific contextual infos
   798  }
   799  
   800  // FilterMinted is a free log retrieval operation binding the contract event 0xe04478a4154dc31a079fa36b9ee1af057f492a47c1524ac67f2ea4c214c3de92.
   801  //
   802  // Solidity: event Minted(address indexed to, uint256 amount, bytes txid, uint256 indexed nonce)
   803  func (_Bridge *BridgeFilterer) FilterMinted(opts *bind.FilterOpts, to []common.Address, nonce []*big.Int) (*BridgeMintedIterator, error) {
   804  
   805  	var toRule []interface{}
   806  	for _, toItem := range to {
   807  		toRule = append(toRule, toItem)
   808  	}
   809  
   810  	var nonceRule []interface{}
   811  	for _, nonceItem := range nonce {
   812  		nonceRule = append(nonceRule, nonceItem)
   813  	}
   814  
   815  	logs, sub, err := _Bridge.contract.FilterLogs(opts, "Minted", toRule, nonceRule)
   816  	if err != nil {
   817  		return nil, err
   818  	}
   819  	return &BridgeMintedIterator{contract: _Bridge.contract, event: "Minted", logs: logs, sub: sub}, nil
   820  }
   821  
   822  // WatchMinted is a free log subscription operation binding the contract event 0xe04478a4154dc31a079fa36b9ee1af057f492a47c1524ac67f2ea4c214c3de92.
   823  //
   824  // Solidity: event Minted(address indexed to, uint256 amount, bytes txid, uint256 indexed nonce)
   825  func (_Bridge *BridgeFilterer) WatchMinted(opts *bind.WatchOpts, sink chan<- *BridgeMinted, to []common.Address, nonce []*big.Int) (event.Subscription, error) {
   826  
   827  	var toRule []interface{}
   828  	for _, toItem := range to {
   829  		toRule = append(toRule, toItem)
   830  	}
   831  
   832  	var nonceRule []interface{}
   833  	for _, nonceItem := range nonce {
   834  		nonceRule = append(nonceRule, nonceItem)
   835  	}
   836  
   837  	logs, sub, err := _Bridge.contract.WatchLogs(opts, "Minted", toRule, nonceRule)
   838  	if err != nil {
   839  		return nil, err
   840  	}
   841  	return event.NewSubscription(func(quit <-chan struct{}) error {
   842  		defer sub.Unsubscribe()
   843  		for {
   844  			select {
   845  			case log := <-logs:
   846  				// New log arrived, parse the event and forward to the user
   847  				event := new(BridgeMinted)
   848  				if err := _Bridge.contract.UnpackLog(event, "Minted", log); err != nil {
   849  					return err
   850  				}
   851  				event.Raw = log
   852  
   853  				select {
   854  				case sink <- event:
   855  				case err := <-sub.Err():
   856  					return err
   857  				case <-quit:
   858  					return nil
   859  				}
   860  			case err := <-sub.Err():
   861  				return err
   862  			case <-quit:
   863  				return nil
   864  			}
   865  		}
   866  	}), nil
   867  }
   868  
   869  // ParseMinted is a log parse operation binding the contract event 0xe04478a4154dc31a079fa36b9ee1af057f492a47c1524ac67f2ea4c214c3de92.
   870  //
   871  // Solidity: event Minted(address indexed to, uint256 amount, bytes txid, uint256 indexed nonce)
   872  func (_Bridge *BridgeFilterer) ParseMinted(log types.Log) (*BridgeMinted, error) {
   873  	event := new(BridgeMinted)
   874  	if err := _Bridge.contract.UnpackLog(event, "Minted", log); err != nil {
   875  		return nil, err
   876  	}
   877  	event.Raw = log
   878  	return event, nil
   879  }
   880  
   881  // BridgeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Bridge contract.
   882  type BridgeOwnershipTransferredIterator struct {
   883  	Event *BridgeOwnershipTransferred // Event containing the contract specifics and raw log
   884  
   885  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   886  	event    string              // Event name to use for unpacking event data
   887  
   888  	logs chan types.Log        // Log channel receiving the found contract events
   889  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   890  	done bool                  // Whether the subscription completed delivering logs
   891  	fail error                 // Occurred error to stop iteration
   892  }
   893  
   894  // Next advances the iterator to the subsequent event, returning whether there
   895  // are any more events found. In case of a retrieval or parsing error, false is
   896  // returned and Error() can be queried for the exact failure.
   897  func (it *BridgeOwnershipTransferredIterator) Next() bool {
   898  	// If the iterator failed, stop iterating
   899  	if it.fail != nil {
   900  		return false
   901  	}
   902  	// If the iterator completed, deliver directly whatever's available
   903  	if it.done {
   904  		select {
   905  		case log := <-it.logs:
   906  			it.Event = new(BridgeOwnershipTransferred)
   907  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   908  				it.fail = err
   909  				return false
   910  			}
   911  			it.Event.Raw = log
   912  			return true
   913  
   914  		default:
   915  			return false
   916  		}
   917  	}
   918  	// Iterator still in progress, wait for either a data or an error event
   919  	select {
   920  	case log := <-it.logs:
   921  		it.Event = new(BridgeOwnershipTransferred)
   922  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   923  			it.fail = err
   924  			return false
   925  		}
   926  		it.Event.Raw = log
   927  		return true
   928  
   929  	case err := <-it.sub.Err():
   930  		it.done = true
   931  		it.fail = err
   932  		return it.Next()
   933  	}
   934  }
   935  
   936  // Error returns any retrieval or parsing error occurred during filtering.
   937  func (it *BridgeOwnershipTransferredIterator) Error() error {
   938  	return it.fail
   939  }
   940  
   941  // Close terminates the iteration process, releasing any pending underlying
   942  // resources.
   943  func (it *BridgeOwnershipTransferredIterator) Close() error {
   944  	it.sub.Unsubscribe()
   945  	return nil
   946  }
   947  
   948  // BridgeOwnershipTransferred represents a OwnershipTransferred event raised by the Bridge contract.
   949  type BridgeOwnershipTransferred struct {
   950  	PreviousOwner common.Address
   951  	NewOwner      common.Address
   952  	Raw           types.Log // Blockchain specific contextual infos
   953  }
   954  
   955  // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   956  //
   957  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   958  func (_Bridge *BridgeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BridgeOwnershipTransferredIterator, error) {
   959  
   960  	var previousOwnerRule []interface{}
   961  	for _, previousOwnerItem := range previousOwner {
   962  		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
   963  	}
   964  	var newOwnerRule []interface{}
   965  	for _, newOwnerItem := range newOwner {
   966  		newOwnerRule = append(newOwnerRule, newOwnerItem)
   967  	}
   968  
   969  	logs, sub, err := _Bridge.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
   970  	if err != nil {
   971  		return nil, err
   972  	}
   973  	return &BridgeOwnershipTransferredIterator{contract: _Bridge.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
   974  }
   975  
   976  // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   977  //
   978  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   979  func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BridgeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
   980  
   981  	var previousOwnerRule []interface{}
   982  	for _, previousOwnerItem := range previousOwner {
   983  		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
   984  	}
   985  	var newOwnerRule []interface{}
   986  	for _, newOwnerItem := range newOwner {
   987  		newOwnerRule = append(newOwnerRule, newOwnerItem)
   988  	}
   989  
   990  	logs, sub, err := _Bridge.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
   991  	if err != nil {
   992  		return nil, err
   993  	}
   994  	return event.NewSubscription(func(quit <-chan struct{}) error {
   995  		defer sub.Unsubscribe()
   996  		for {
   997  			select {
   998  			case log := <-logs:
   999  				// New log arrived, parse the event and forward to the user
  1000  				event := new(BridgeOwnershipTransferred)
  1001  				if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
  1002  					return err
  1003  				}
  1004  				event.Raw = log
  1005  
  1006  				select {
  1007  				case sink <- event:
  1008  				case err := <-sub.Err():
  1009  					return err
  1010  				case <-quit:
  1011  					return nil
  1012  				}
  1013  			case err := <-sub.Err():
  1014  				return err
  1015  			case <-quit:
  1016  				return nil
  1017  			}
  1018  		}
  1019  	}), nil
  1020  }
  1021  
  1022  // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  1023  //
  1024  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  1025  func (_Bridge *BridgeFilterer) ParseOwnershipTransferred(log types.Log) (*BridgeOwnershipTransferred, error) {
  1026  	event := new(BridgeOwnershipTransferred)
  1027  	if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
  1028  		return nil, err
  1029  	}
  1030  	event.Raw = log
  1031  	return event, nil
  1032  }