github.com/0chain/gosdk@v1.17.11/zcnbridge/ethereum/authorizers/authorizers.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 authorizers
     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  // AuthorizersMetaData contains all meta data concerning the Authorizers contract.
    32  var AuthorizersMetaData = &bind.MetaData{
    33  	ABI: "[{\"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\":\"authorizerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"authorizers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isAuthorizer\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"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\":[],\"name\":\"minThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"message_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures_\",\"type\":\"bytes[]\"}],\"name\":\"authorize\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"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\"}],\"name\":\"messageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authorizer_\",\"type\":\"address\"}],\"name\":\"addAuthorizers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authorizer_\",\"type\":\"address\"}],\"name\":\"removeAuthorizers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
    34  	Bin: "0x6080604052600060025534801561001557600080fd5b5061001f33610024565b610074565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610f33806100836000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461012e578063c85501bb14610149578063e304688f14610151578063f2fde38b14610174578063f36bf4011461018757600080fd5b806309c7a20f146100a35780630b249ae4146100e757806343ab2c9e14610108578063715018a61461011d5780637ac3d68d14610125575b600080fd5b6100cd6100b1366004610c17565b6001602081905260009182526040909120805491015460ff1682565b604080519283529015156020830152015b60405180910390f35b6100fa6100f5366004610c39565b61019a565b6040519081526020016100de565b61011b610116366004610c17565b6101dd565b005b61011b6103bd565b6100fa60025481565b6000546040516001600160a01b0390911681526020016100de565b6100fa6103d1565b61016461015f366004610cc8565b61040a565b60405190151581526020016100de565b61011b610182366004610c17565b6106f6565b61011b610195366004610c17565b61076c565b60006101d386868686866040516020016101b8959493929190610d47565b60405160208183030381529060405280519060200120610887565b9695505050505050565b6101e56108da565b6001600160a01b0381166102145760405162461bcd60e51b815260040161020b90610d7b565b60405180910390fd5b6001600160a01b0381166000908152600160208190526040909120015460ff161561029a5760405162461bcd60e51b815260206004820152603060248201527f417574686f72697a657220776974682074686520676976656e2061646472657360448201526f7320616c72656164792065786973747360801b606482015260840161020b565b6003541561035b576040518060400160405280600360016003805490506102c19190610dd5565b815481106102d1576102d1610dec565b600091825260208083209190910154835260019281018390526001600160a01b03851682528281526040909120835181559201519101805460ff1916911515919091179055600380548061032757610327610e02565b600190038181906000526020600020016000905590556001600260008282546103509190610e18565b909155506103ba9050565b604080518082018252600280548252600160208084018281526001600160a01b038716600090815291839052948120935184559351928101805460ff1916931515939093179092558054919290916103b4908490610e18565b90915550505b50565b6103c56108da565b6103cf6000610934565b565b60006003600160025460026103e69190610e30565b6103f09190610dd5565b6103fa9190610e4f565b610405906001610e18565b905090565b6000806002541161046b5760405162461bcd60e51b815260206004820152602560248201527f4e6f20617574686f72697a657220686173206265656e2072656769737465726560448201526419081e595d60da1b606482015260840161020b565b6104736103d1565b8210156104cd5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e74206f66207369676e617475726573206973206e6f7420656e6f756044820152610ced60f31b606482015260840161020b565b600060025467ffffffffffffffff8111156104ea576104ea610e71565b604051908082528060200260200182016040528015610513578160200160208202803683370190505b50905060005b838110156106ea57600061059086868481811061053857610538610dec565b905060200281019061054a9190610e87565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061058a92508b91506108879050565b90610984565b6001600160a01b0381166000908152600160208190526040909120015490915060ff166105ff5760405162461bcd60e51b815260206004820152601f60248201527f476976656e206d657373616765206973206e6f7420617574686f72697a656400604482015260640161020b565b6001600160a01b0381166000908152600160205260409020548351849190811061062b5761062b610dec565b6020026020010151156106985760405162461bcd60e51b815260206004820152602f60248201527f476976656e207369676e61747572657320636f6e7461696e206475706c69636160448201526e74656420617574686f72697a65727360881b606482015260840161020b565b6001600160a01b038116600090815260016020819052604090912054845185919081106106c7576106c7610dec565b9115156020928302919091019091015250806106e281610ece565b915050610519565b50600195945050505050565b6106fe6108da565b6001600160a01b0381166107635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161020b565b6103ba81610934565b6107746108da565b6001600160a01b03811661079a5760405162461bcd60e51b815260040161020b90610d7b565b6001600160a01b0381166000908152600160208190526040909120015460ff1661081f5760405162461bcd60e51b815260206004820152603060248201527f417574686f72697a657220776974682074686520676976656e2061646472657360448201526f1cc8191bd95cc81b9bdd08195e1a5cdd60821b606482015260840161020b565b6001600160a01b03811660009081526001602081905260408220808201805460ff19169055546003805480840182559084527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b015560028054919290916103b4908490610dd5565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000546001600160a01b031633146103cf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161020b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600061099385856109a8565b915091506109a0816109ed565b509392505050565b60008082516041036109de5760208301516040840151606085015160001a6109d287828585610b37565b945094505050506109e6565b506000905060025b9250929050565b6000816004811115610a0157610a01610ee7565b03610a095750565b6001816004811115610a1d57610a1d610ee7565b03610a6a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161020b565b6002816004811115610a7e57610a7e610ee7565b03610acb5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161020b565b6003816004811115610adf57610adf610ee7565b036103ba5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161020b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610b6e5750600090506003610bf2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610bc2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610beb57600060019250925050610bf2565b9150600090505b94509492505050565b80356001600160a01b0381168114610c1257600080fd5b919050565b600060208284031215610c2957600080fd5b610c3282610bfb565b9392505050565b600080600080600060808688031215610c5157600080fd5b610c5a86610bfb565b945060208601359350604086013567ffffffffffffffff80821115610c7e57600080fd5b818801915088601f830112610c9257600080fd5b813581811115610ca157600080fd5b896020828501011115610cb357600080fd5b96999598505060200195606001359392505050565b600080600060408486031215610cdd57600080fd5b83359250602084013567ffffffffffffffff80821115610cfc57600080fd5b818601915086601f830112610d1057600080fd5b813581811115610d1f57600080fd5b8760208260051b8501011115610d3457600080fd5b6020830194508093505050509250925092565b6bffffffffffffffffffffffff198660601b1681528460148201528284603483013760349201918201526054019392505050565b60208082526024908201527f496e76616c696420617574686f72697a6572206164647265737320776173206760408201526334bb32b760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015610de757610de7610dbf565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60008219821115610e2b57610e2b610dbf565b500190565b6000816000190483118215151615610e4a57610e4a610dbf565b500290565b600082610e6c57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b6000808335601e19843603018112610e9e57600080fd5b83018035915067ffffffffffffffff821115610eb957600080fd5b6020019150368190038213156109e657600080fd5b600060018201610ee057610ee0610dbf565b5060010190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220d36512e87ac563a1b5880c9eb0c665cc8b3875c8c66d26ea6aa50ec191d4719364736f6c634300080f0033",
    35  }
    36  
    37  // AuthorizersABI is the input ABI used to generate the binding from.
    38  // Deprecated: Use AuthorizersMetaData.ABI instead.
    39  var AuthorizersABI = AuthorizersMetaData.ABI
    40  
    41  // AuthorizersBin is the compiled bytecode used for deploying new contracts.
    42  // Deprecated: Use AuthorizersMetaData.Bin instead.
    43  var AuthorizersBin = AuthorizersMetaData.Bin
    44  
    45  // DeployAuthorizers deploys a new Ethereum contract, binding an instance of Authorizers to it.
    46  func DeployAuthorizers(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Authorizers, error) {
    47  	parsed, err := AuthorizersMetaData.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(AuthorizersBin), backend)
    56  	if err != nil {
    57  		return common.Address{}, nil, nil, err
    58  	}
    59  	return address, tx, &Authorizers{AuthorizersCaller: AuthorizersCaller{contract: contract}, AuthorizersTransactor: AuthorizersTransactor{contract: contract}, AuthorizersFilterer: AuthorizersFilterer{contract: contract}}, nil
    60  }
    61  
    62  // Authorizers is an auto generated Go binding around an Ethereum contract.
    63  type Authorizers struct {
    64  	AuthorizersCaller     // Read-only binding to the contract
    65  	AuthorizersTransactor // Write-only binding to the contract
    66  	AuthorizersFilterer   // Log filterer for contract events
    67  }
    68  
    69  // AuthorizersCaller is an auto generated read-only Go binding around an Ethereum contract.
    70  type AuthorizersCaller struct {
    71  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    72  }
    73  
    74  // AuthorizersTransactor is an auto generated write-only Go binding around an Ethereum contract.
    75  type AuthorizersTransactor struct {
    76  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    77  }
    78  
    79  // AuthorizersFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    80  type AuthorizersFilterer struct {
    81  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    82  }
    83  
    84  // AuthorizersSession is an auto generated Go binding around an Ethereum contract,
    85  // with pre-set call and transact options.
    86  type AuthorizersSession struct {
    87  	Contract     *Authorizers      // 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  // AuthorizersCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    93  // with pre-set call options.
    94  type AuthorizersCallerSession struct {
    95  	Contract *AuthorizersCaller // Generic contract caller binding to set the session for
    96  	CallOpts bind.CallOpts      // Call options to use throughout this session
    97  }
    98  
    99  // AuthorizersTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   100  // with pre-set transact options.
   101  type AuthorizersTransactorSession struct {
   102  	Contract     *AuthorizersTransactor // Generic contract transactor binding to set the session for
   103  	TransactOpts bind.TransactOpts      // Transaction auth options to use throughout this session
   104  }
   105  
   106  // AuthorizersRaw is an auto generated low-level Go binding around an Ethereum contract.
   107  type AuthorizersRaw struct {
   108  	Contract *Authorizers // Generic contract binding to access the raw methods on
   109  }
   110  
   111  // AuthorizersCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   112  type AuthorizersCallerRaw struct {
   113  	Contract *AuthorizersCaller // Generic read-only contract binding to access the raw methods on
   114  }
   115  
   116  // AuthorizersTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   117  type AuthorizersTransactorRaw struct {
   118  	Contract *AuthorizersTransactor // Generic write-only contract binding to access the raw methods on
   119  }
   120  
   121  // NewAuthorizers creates a new instance of Authorizers, bound to a specific deployed contract.
   122  func NewAuthorizers(address common.Address, backend bind.ContractBackend) (*Authorizers, error) {
   123  	contract, err := bindAuthorizers(address, backend, backend, backend)
   124  	if err != nil {
   125  		return nil, err
   126  	}
   127  	return &Authorizers{AuthorizersCaller: AuthorizersCaller{contract: contract}, AuthorizersTransactor: AuthorizersTransactor{contract: contract}, AuthorizersFilterer: AuthorizersFilterer{contract: contract}}, nil
   128  }
   129  
   130  // NewAuthorizersCaller creates a new read-only instance of Authorizers, bound to a specific deployed contract.
   131  func NewAuthorizersCaller(address common.Address, caller bind.ContractCaller) (*AuthorizersCaller, error) {
   132  	contract, err := bindAuthorizers(address, caller, nil, nil)
   133  	if err != nil {
   134  		return nil, err
   135  	}
   136  	return &AuthorizersCaller{contract: contract}, nil
   137  }
   138  
   139  // NewAuthorizersTransactor creates a new write-only instance of Authorizers, bound to a specific deployed contract.
   140  func NewAuthorizersTransactor(address common.Address, transactor bind.ContractTransactor) (*AuthorizersTransactor, error) {
   141  	contract, err := bindAuthorizers(address, nil, transactor, nil)
   142  	if err != nil {
   143  		return nil, err
   144  	}
   145  	return &AuthorizersTransactor{contract: contract}, nil
   146  }
   147  
   148  // NewAuthorizersFilterer creates a new log filterer instance of Authorizers, bound to a specific deployed contract.
   149  func NewAuthorizersFilterer(address common.Address, filterer bind.ContractFilterer) (*AuthorizersFilterer, error) {
   150  	contract, err := bindAuthorizers(address, nil, nil, filterer)
   151  	if err != nil {
   152  		return nil, err
   153  	}
   154  	return &AuthorizersFilterer{contract: contract}, nil
   155  }
   156  
   157  // bindAuthorizers binds a generic wrapper to an already deployed contract.
   158  func bindAuthorizers(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   159  	parsed, err := abi.JSON(strings.NewReader(AuthorizersABI))
   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 (_Authorizers *AuthorizersRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   171  	return _Authorizers.Contract.AuthorizersCaller.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 (_Authorizers *AuthorizersRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   177  	return _Authorizers.Contract.AuthorizersTransactor.contract.Transfer(opts)
   178  }
   179  
   180  // Transact invokes the (paid) contract method with params as input values.
   181  func (_Authorizers *AuthorizersRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   182  	return _Authorizers.Contract.AuthorizersTransactor.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 (_Authorizers *AuthorizersCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   190  	return _Authorizers.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 (_Authorizers *AuthorizersTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   196  	return _Authorizers.Contract.contract.Transfer(opts)
   197  }
   198  
   199  // Transact invokes the (paid) contract method with params as input values.
   200  func (_Authorizers *AuthorizersTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   201  	return _Authorizers.Contract.contract.Transact(opts, method, params...)
   202  }
   203  
   204  // Authorize is a free data retrieval call binding the contract method 0xe304688f.
   205  //
   206  // Solidity: function authorize(bytes32 message_, bytes[] signatures_) view returns(bool)
   207  func (_Authorizers *AuthorizersCaller) Authorize(opts *bind.CallOpts, message_ [32]byte, signatures_ [][]byte) (bool, error) {
   208  	var out []interface{}
   209  	err := _Authorizers.contract.Call(opts, &out, "authorize", message_, signatures_)
   210  
   211  	if err != nil {
   212  		return *new(bool), err
   213  	}
   214  
   215  	out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
   216  
   217  	return out0, err
   218  
   219  }
   220  
   221  // Authorize is a free data retrieval call binding the contract method 0xe304688f.
   222  //
   223  // Solidity: function authorize(bytes32 message_, bytes[] signatures_) view returns(bool)
   224  func (_Authorizers *AuthorizersSession) Authorize(message_ [32]byte, signatures_ [][]byte) (bool, error) {
   225  	return _Authorizers.Contract.Authorize(&_Authorizers.CallOpts, message_, signatures_)
   226  }
   227  
   228  // Authorize is a free data retrieval call binding the contract method 0xe304688f.
   229  //
   230  // Solidity: function authorize(bytes32 message_, bytes[] signatures_) view returns(bool)
   231  func (_Authorizers *AuthorizersCallerSession) Authorize(message_ [32]byte, signatures_ [][]byte) (bool, error) {
   232  	return _Authorizers.Contract.Authorize(&_Authorizers.CallOpts, message_, signatures_)
   233  }
   234  
   235  // AuthorizerCount is a free data retrieval call binding the contract method 0x7ac3d68d.
   236  //
   237  // Solidity: function authorizerCount() view returns(uint256)
   238  func (_Authorizers *AuthorizersCaller) AuthorizerCount(opts *bind.CallOpts) (*big.Int, error) {
   239  	var out []interface{}
   240  	err := _Authorizers.contract.Call(opts, &out, "authorizerCount")
   241  
   242  	if err != nil {
   243  		return *new(*big.Int), err
   244  	}
   245  
   246  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   247  
   248  	return out0, err
   249  
   250  }
   251  
   252  // AuthorizerCount is a free data retrieval call binding the contract method 0x7ac3d68d.
   253  //
   254  // Solidity: function authorizerCount() view returns(uint256)
   255  func (_Authorizers *AuthorizersSession) AuthorizerCount() (*big.Int, error) {
   256  	return _Authorizers.Contract.AuthorizerCount(&_Authorizers.CallOpts)
   257  }
   258  
   259  // AuthorizerCount is a free data retrieval call binding the contract method 0x7ac3d68d.
   260  //
   261  // Solidity: function authorizerCount() view returns(uint256)
   262  func (_Authorizers *AuthorizersCallerSession) AuthorizerCount() (*big.Int, error) {
   263  	return _Authorizers.Contract.AuthorizerCount(&_Authorizers.CallOpts)
   264  }
   265  
   266  // Authorizers is a free data retrieval call binding the contract method 0x09c7a20f.
   267  //
   268  // Solidity: function authorizers(address ) view returns(uint256 index, bool isAuthorizer)
   269  func (_Authorizers *AuthorizersCaller) Authorizers(opts *bind.CallOpts, arg0 common.Address) (struct {
   270  	Index        *big.Int
   271  	IsAuthorizer bool
   272  }, error) {
   273  	var out []interface{}
   274  	err := _Authorizers.contract.Call(opts, &out, "authorizers", arg0)
   275  
   276  	outstruct := new(struct {
   277  		Index        *big.Int
   278  		IsAuthorizer bool
   279  	})
   280  	if err != nil {
   281  		return *outstruct, err
   282  	}
   283  
   284  	outstruct.Index = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   285  	outstruct.IsAuthorizer = *abi.ConvertType(out[1], new(bool)).(*bool)
   286  
   287  	return *outstruct, err
   288  
   289  }
   290  
   291  // Authorizers is a free data retrieval call binding the contract method 0x09c7a20f.
   292  //
   293  // Solidity: function authorizers(address ) view returns(uint256 index, bool isAuthorizer)
   294  func (_Authorizers *AuthorizersSession) Authorizers(arg0 common.Address) (struct {
   295  	Index        *big.Int
   296  	IsAuthorizer bool
   297  }, error) {
   298  	return _Authorizers.Contract.Authorizers(&_Authorizers.CallOpts, arg0)
   299  }
   300  
   301  // Authorizers is a free data retrieval call binding the contract method 0x09c7a20f.
   302  //
   303  // Solidity: function authorizers(address ) view returns(uint256 index, bool isAuthorizer)
   304  func (_Authorizers *AuthorizersCallerSession) Authorizers(arg0 common.Address) (struct {
   305  	Index        *big.Int
   306  	IsAuthorizer bool
   307  }, error) {
   308  	return _Authorizers.Contract.Authorizers(&_Authorizers.CallOpts, arg0)
   309  }
   310  
   311  // MessageHash is a free data retrieval call binding the contract method 0x0b249ae4.
   312  //
   313  // Solidity: function messageHash(address to_, uint256 amount_, bytes txid_, uint256 nonce_) pure returns(bytes32)
   314  func (_Authorizers *AuthorizersCaller) MessageHash(opts *bind.CallOpts, to_ common.Address, amount_ *big.Int, txid_ []byte, nonce_ *big.Int) ([32]byte, error) {
   315  	var out []interface{}
   316  	err := _Authorizers.contract.Call(opts, &out, "messageHash", to_, amount_, txid_, nonce_)
   317  
   318  	if err != nil {
   319  		return *new([32]byte), err
   320  	}
   321  
   322  	out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
   323  
   324  	return out0, err
   325  
   326  }
   327  
   328  // MessageHash is a free data retrieval call binding the contract method 0x0b249ae4.
   329  //
   330  // Solidity: function messageHash(address to_, uint256 amount_, bytes txid_, uint256 nonce_) pure returns(bytes32)
   331  func (_Authorizers *AuthorizersSession) MessageHash(to_ common.Address, amount_ *big.Int, txid_ []byte, nonce_ *big.Int) ([32]byte, error) {
   332  	return _Authorizers.Contract.MessageHash(&_Authorizers.CallOpts, to_, amount_, txid_, nonce_)
   333  }
   334  
   335  // MessageHash is a free data retrieval call binding the contract method 0x0b249ae4.
   336  //
   337  // Solidity: function messageHash(address to_, uint256 amount_, bytes txid_, uint256 nonce_) pure returns(bytes32)
   338  func (_Authorizers *AuthorizersCallerSession) MessageHash(to_ common.Address, amount_ *big.Int, txid_ []byte, nonce_ *big.Int) ([32]byte, error) {
   339  	return _Authorizers.Contract.MessageHash(&_Authorizers.CallOpts, to_, amount_, txid_, nonce_)
   340  }
   341  
   342  // MinThreshold is a free data retrieval call binding the contract method 0xc85501bb.
   343  //
   344  // Solidity: function minThreshold() view returns(uint256)
   345  func (_Authorizers *AuthorizersCaller) MinThreshold(opts *bind.CallOpts) (*big.Int, error) {
   346  	var out []interface{}
   347  	err := _Authorizers.contract.Call(opts, &out, "minThreshold")
   348  
   349  	if err != nil {
   350  		return *new(*big.Int), err
   351  	}
   352  
   353  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   354  
   355  	return out0, err
   356  
   357  }
   358  
   359  // MinThreshold is a free data retrieval call binding the contract method 0xc85501bb.
   360  //
   361  // Solidity: function minThreshold() view returns(uint256)
   362  func (_Authorizers *AuthorizersSession) MinThreshold() (*big.Int, error) {
   363  	return _Authorizers.Contract.MinThreshold(&_Authorizers.CallOpts)
   364  }
   365  
   366  // MinThreshold is a free data retrieval call binding the contract method 0xc85501bb.
   367  //
   368  // Solidity: function minThreshold() view returns(uint256)
   369  func (_Authorizers *AuthorizersCallerSession) MinThreshold() (*big.Int, error) {
   370  	return _Authorizers.Contract.MinThreshold(&_Authorizers.CallOpts)
   371  }
   372  
   373  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   374  //
   375  // Solidity: function owner() view returns(address)
   376  func (_Authorizers *AuthorizersCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
   377  	var out []interface{}
   378  	err := _Authorizers.contract.Call(opts, &out, "owner")
   379  
   380  	if err != nil {
   381  		return *new(common.Address), err
   382  	}
   383  
   384  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   385  
   386  	return out0, err
   387  
   388  }
   389  
   390  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   391  //
   392  // Solidity: function owner() view returns(address)
   393  func (_Authorizers *AuthorizersSession) Owner() (common.Address, error) {
   394  	return _Authorizers.Contract.Owner(&_Authorizers.CallOpts)
   395  }
   396  
   397  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   398  //
   399  // Solidity: function owner() view returns(address)
   400  func (_Authorizers *AuthorizersCallerSession) Owner() (common.Address, error) {
   401  	return _Authorizers.Contract.Owner(&_Authorizers.CallOpts)
   402  }
   403  
   404  // AddAuthorizers is a paid mutator transaction binding the contract method 0x43ab2c9e.
   405  //
   406  // Solidity: function addAuthorizers(address authorizer_) returns()
   407  func (_Authorizers *AuthorizersTransactor) AddAuthorizers(opts *bind.TransactOpts, authorizer_ common.Address) (*types.Transaction, error) {
   408  	return _Authorizers.contract.Transact(opts, "addAuthorizers", authorizer_)
   409  }
   410  
   411  // AddAuthorizers is a paid mutator transaction binding the contract method 0x43ab2c9e.
   412  //
   413  // Solidity: function addAuthorizers(address authorizer_) returns()
   414  func (_Authorizers *AuthorizersSession) AddAuthorizers(authorizer_ common.Address) (*types.Transaction, error) {
   415  	return _Authorizers.Contract.AddAuthorizers(&_Authorizers.TransactOpts, authorizer_)
   416  }
   417  
   418  // AddAuthorizers is a paid mutator transaction binding the contract method 0x43ab2c9e.
   419  //
   420  // Solidity: function addAuthorizers(address authorizer_) returns()
   421  func (_Authorizers *AuthorizersTransactorSession) AddAuthorizers(authorizer_ common.Address) (*types.Transaction, error) {
   422  	return _Authorizers.Contract.AddAuthorizers(&_Authorizers.TransactOpts, authorizer_)
   423  }
   424  
   425  // RemoveAuthorizers is a paid mutator transaction binding the contract method 0xf36bf401.
   426  //
   427  // Solidity: function removeAuthorizers(address authorizer_) returns()
   428  func (_Authorizers *AuthorizersTransactor) RemoveAuthorizers(opts *bind.TransactOpts, authorizer_ common.Address) (*types.Transaction, error) {
   429  	return _Authorizers.contract.Transact(opts, "removeAuthorizers", authorizer_)
   430  }
   431  
   432  // RemoveAuthorizers is a paid mutator transaction binding the contract method 0xf36bf401.
   433  //
   434  // Solidity: function removeAuthorizers(address authorizer_) returns()
   435  func (_Authorizers *AuthorizersSession) RemoveAuthorizers(authorizer_ common.Address) (*types.Transaction, error) {
   436  	return _Authorizers.Contract.RemoveAuthorizers(&_Authorizers.TransactOpts, authorizer_)
   437  }
   438  
   439  // RemoveAuthorizers is a paid mutator transaction binding the contract method 0xf36bf401.
   440  //
   441  // Solidity: function removeAuthorizers(address authorizer_) returns()
   442  func (_Authorizers *AuthorizersTransactorSession) RemoveAuthorizers(authorizer_ common.Address) (*types.Transaction, error) {
   443  	return _Authorizers.Contract.RemoveAuthorizers(&_Authorizers.TransactOpts, authorizer_)
   444  }
   445  
   446  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   447  //
   448  // Solidity: function renounceOwnership() returns()
   449  func (_Authorizers *AuthorizersTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
   450  	return _Authorizers.contract.Transact(opts, "renounceOwnership")
   451  }
   452  
   453  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   454  //
   455  // Solidity: function renounceOwnership() returns()
   456  func (_Authorizers *AuthorizersSession) RenounceOwnership() (*types.Transaction, error) {
   457  	return _Authorizers.Contract.RenounceOwnership(&_Authorizers.TransactOpts)
   458  }
   459  
   460  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   461  //
   462  // Solidity: function renounceOwnership() returns()
   463  func (_Authorizers *AuthorizersTransactorSession) RenounceOwnership() (*types.Transaction, error) {
   464  	return _Authorizers.Contract.RenounceOwnership(&_Authorizers.TransactOpts)
   465  }
   466  
   467  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   468  //
   469  // Solidity: function transferOwnership(address newOwner) returns()
   470  func (_Authorizers *AuthorizersTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
   471  	return _Authorizers.contract.Transact(opts, "transferOwnership", newOwner)
   472  }
   473  
   474  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   475  //
   476  // Solidity: function transferOwnership(address newOwner) returns()
   477  func (_Authorizers *AuthorizersSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
   478  	return _Authorizers.Contract.TransferOwnership(&_Authorizers.TransactOpts, newOwner)
   479  }
   480  
   481  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   482  //
   483  // Solidity: function transferOwnership(address newOwner) returns()
   484  func (_Authorizers *AuthorizersTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
   485  	return _Authorizers.Contract.TransferOwnership(&_Authorizers.TransactOpts, newOwner)
   486  }
   487  
   488  // AuthorizersOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Authorizers contract.
   489  type AuthorizersOwnershipTransferredIterator struct {
   490  	Event *AuthorizersOwnershipTransferred // Event containing the contract specifics and raw log
   491  
   492  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   493  	event    string              // Event name to use for unpacking event data
   494  
   495  	logs chan types.Log        // Log channel receiving the found contract events
   496  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   497  	done bool                  // Whether the subscription completed delivering logs
   498  	fail error                 // Occurred error to stop iteration
   499  }
   500  
   501  // Next advances the iterator to the subsequent event, returning whether there
   502  // are any more events found. In case of a retrieval or parsing error, false is
   503  // returned and Error() can be queried for the exact failure.
   504  func (it *AuthorizersOwnershipTransferredIterator) Next() bool {
   505  	// If the iterator failed, stop iterating
   506  	if it.fail != nil {
   507  		return false
   508  	}
   509  	// If the iterator completed, deliver directly whatever's available
   510  	if it.done {
   511  		select {
   512  		case log := <-it.logs:
   513  			it.Event = new(AuthorizersOwnershipTransferred)
   514  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   515  				it.fail = err
   516  				return false
   517  			}
   518  			it.Event.Raw = log
   519  			return true
   520  
   521  		default:
   522  			return false
   523  		}
   524  	}
   525  	// Iterator still in progress, wait for either a data or an error event
   526  	select {
   527  	case log := <-it.logs:
   528  		it.Event = new(AuthorizersOwnershipTransferred)
   529  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   530  			it.fail = err
   531  			return false
   532  		}
   533  		it.Event.Raw = log
   534  		return true
   535  
   536  	case err := <-it.sub.Err():
   537  		it.done = true
   538  		it.fail = err
   539  		return it.Next()
   540  	}
   541  }
   542  
   543  // Error returns any retrieval or parsing error occurred during filtering.
   544  func (it *AuthorizersOwnershipTransferredIterator) Error() error {
   545  	return it.fail
   546  }
   547  
   548  // Close terminates the iteration process, releasing any pending underlying
   549  // resources.
   550  func (it *AuthorizersOwnershipTransferredIterator) Close() error {
   551  	it.sub.Unsubscribe()
   552  	return nil
   553  }
   554  
   555  // AuthorizersOwnershipTransferred represents a OwnershipTransferred event raised by the Authorizers contract.
   556  type AuthorizersOwnershipTransferred struct {
   557  	PreviousOwner common.Address
   558  	NewOwner      common.Address
   559  	Raw           types.Log // Blockchain specific contextual infos
   560  }
   561  
   562  // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   563  //
   564  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   565  func (_Authorizers *AuthorizersFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*AuthorizersOwnershipTransferredIterator, error) {
   566  
   567  	var previousOwnerRule []interface{}
   568  	for _, previousOwnerItem := range previousOwner {
   569  		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
   570  	}
   571  	var newOwnerRule []interface{}
   572  	for _, newOwnerItem := range newOwner {
   573  		newOwnerRule = append(newOwnerRule, newOwnerItem)
   574  	}
   575  
   576  	logs, sub, err := _Authorizers.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
   577  	if err != nil {
   578  		return nil, err
   579  	}
   580  	return &AuthorizersOwnershipTransferredIterator{contract: _Authorizers.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
   581  }
   582  
   583  // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   584  //
   585  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   586  func (_Authorizers *AuthorizersFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AuthorizersOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
   587  
   588  	var previousOwnerRule []interface{}
   589  	for _, previousOwnerItem := range previousOwner {
   590  		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
   591  	}
   592  	var newOwnerRule []interface{}
   593  	for _, newOwnerItem := range newOwner {
   594  		newOwnerRule = append(newOwnerRule, newOwnerItem)
   595  	}
   596  
   597  	logs, sub, err := _Authorizers.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
   598  	if err != nil {
   599  		return nil, err
   600  	}
   601  	return event.NewSubscription(func(quit <-chan struct{}) error {
   602  		defer sub.Unsubscribe()
   603  		for {
   604  			select {
   605  			case log := <-logs:
   606  				// New log arrived, parse the event and forward to the user
   607  				event := new(AuthorizersOwnershipTransferred)
   608  				if err := _Authorizers.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
   609  					return err
   610  				}
   611  				event.Raw = log
   612  
   613  				select {
   614  				case sink <- event:
   615  				case err := <-sub.Err():
   616  					return err
   617  				case <-quit:
   618  					return nil
   619  				}
   620  			case err := <-sub.Err():
   621  				return err
   622  			case <-quit:
   623  				return nil
   624  			}
   625  		}
   626  	}), nil
   627  }
   628  
   629  // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   630  //
   631  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   632  func (_Authorizers *AuthorizersFilterer) ParseOwnershipTransferred(log types.Log) (*AuthorizersOwnershipTransferred, error) {
   633  	event := new(AuthorizersOwnershipTransferred)
   634  	if err := _Authorizers.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
   635  		return nil, err
   636  	}
   637  	event.Raw = log
   638  	return event, nil
   639  }