123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742 |
- // Code generated - DO NOT EDIT.
- // This file is a generated binding and any manual changes will be lost.
- package validator
- import (
- "errors"
- "math/big"
- "strings"
- ethereum "github.com/ethereum/go-ethereum"
- "github.com/ethereum/go-ethereum/accounts/abi"
- "github.com/ethereum/go-ethereum/accounts/abi/bind"
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/event"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var (
- _ = errors.New
- _ = big.NewInt
- _ = strings.NewReader
- _ = ethereum.NotFound
- _ = bind.Bind
- _ = common.Big1
- _ = types.BloomLookup
- _ = event.NewSubscription
- )
- // ECDSAMetaData contains all meta data concerning the ECDSA contract.
- var ECDSAMetaData = &bind.MetaData{
- ABI: "[]",
- Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207399d7bed8861595eae1922da30eaff01349050487eb3c339a8f061492540c2364736f6c63430008000033",
- }
- // ECDSAABI is the input ABI used to generate the binding from.
- // Deprecated: Use ECDSAMetaData.ABI instead.
- var ECDSAABI = ECDSAMetaData.ABI
- // ECDSABin is the compiled bytecode used for deploying new contracts.
- // Deprecated: Use ECDSAMetaData.Bin instead.
- var ECDSABin = ECDSAMetaData.Bin
- // DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it.
- func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) {
- parsed, err := ECDSAMetaData.GetAbi()
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- if parsed == nil {
- return common.Address{}, nil, nil, errors.New("GetABI returned nil")
- }
- address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ECDSABin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil
- }
- // ECDSA is an auto generated Go binding around an Ethereum contract.
- type ECDSA struct {
- ECDSACaller // Read-only binding to the contract
- ECDSATransactor // Write-only binding to the contract
- ECDSAFilterer // Log filterer for contract events
- }
- // ECDSACaller is an auto generated read-only Go binding around an Ethereum contract.
- type ECDSACaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract.
- type ECDSATransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type ECDSAFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ECDSASession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type ECDSASession struct {
- Contract *ECDSA // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type ECDSACallerSession struct {
- Contract *ECDSACaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type ECDSATransactorSession struct {
- Contract *ECDSATransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // ECDSARaw is an auto generated low-level Go binding around an Ethereum contract.
- type ECDSARaw struct {
- Contract *ECDSA // Generic contract binding to access the raw methods on
- }
- // ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type ECDSACallerRaw struct {
- Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on
- }
- // ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type ECDSATransactorRaw struct {
- Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract.
- func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) {
- contract, err := bindECDSA(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil
- }
- // NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract.
- func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) {
- contract, err := bindECDSA(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &ECDSACaller{contract: contract}, nil
- }
- // NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract.
- func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) {
- contract, err := bindECDSA(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &ECDSATransactor{contract: contract}, nil
- }
- // NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract.
- func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) {
- contract, err := bindECDSA(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &ECDSAFilterer{contract: contract}, nil
- }
- // bindECDSA binds a generic wrapper to an already deployed contract.
- func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(ECDSAABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
- return _ECDSA.Contract.ECDSACaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _ECDSA.Contract.ECDSATransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
- return _ECDSA.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _ECDSA.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _ECDSA.Contract.contract.Transact(opts, method, params...)
- }
- // StringsMetaData contains all meta data concerning the Strings contract.
- var StringsMetaData = &bind.MetaData{
- ABI: "[]",
- Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207edb8077e74c13cedbc2fb5fd5736eee7e0684a72011c3cf1afca22ef41419e364736f6c63430008000033",
- }
- // StringsABI is the input ABI used to generate the binding from.
- // Deprecated: Use StringsMetaData.ABI instead.
- var StringsABI = StringsMetaData.ABI
- // StringsBin is the compiled bytecode used for deploying new contracts.
- // Deprecated: Use StringsMetaData.Bin instead.
- var StringsBin = StringsMetaData.Bin
- // DeployStrings deploys a new Ethereum contract, binding an instance of Strings to it.
- func DeployStrings(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Strings, error) {
- parsed, err := StringsMetaData.GetAbi()
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- if parsed == nil {
- return common.Address{}, nil, nil, errors.New("GetABI returned nil")
- }
- address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(StringsBin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &Strings{StringsCaller: StringsCaller{contract: contract}, StringsTransactor: StringsTransactor{contract: contract}, StringsFilterer: StringsFilterer{contract: contract}}, nil
- }
- // Strings is an auto generated Go binding around an Ethereum contract.
- type Strings struct {
- StringsCaller // Read-only binding to the contract
- StringsTransactor // Write-only binding to the contract
- StringsFilterer // Log filterer for contract events
- }
- // StringsCaller is an auto generated read-only Go binding around an Ethereum contract.
- type StringsCaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // StringsTransactor is an auto generated write-only Go binding around an Ethereum contract.
- type StringsTransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // StringsFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type StringsFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // StringsSession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type StringsSession struct {
- Contract *Strings // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // StringsCallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type StringsCallerSession struct {
- Contract *StringsCaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // StringsTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type StringsTransactorSession struct {
- Contract *StringsTransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // StringsRaw is an auto generated low-level Go binding around an Ethereum contract.
- type StringsRaw struct {
- Contract *Strings // Generic contract binding to access the raw methods on
- }
- // StringsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type StringsCallerRaw struct {
- Contract *StringsCaller // Generic read-only contract binding to access the raw methods on
- }
- // StringsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type StringsTransactorRaw struct {
- Contract *StringsTransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewStrings creates a new instance of Strings, bound to a specific deployed contract.
- func NewStrings(address common.Address, backend bind.ContractBackend) (*Strings, error) {
- contract, err := bindStrings(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &Strings{StringsCaller: StringsCaller{contract: contract}, StringsTransactor: StringsTransactor{contract: contract}, StringsFilterer: StringsFilterer{contract: contract}}, nil
- }
- // NewStringsCaller creates a new read-only instance of Strings, bound to a specific deployed contract.
- func NewStringsCaller(address common.Address, caller bind.ContractCaller) (*StringsCaller, error) {
- contract, err := bindStrings(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &StringsCaller{contract: contract}, nil
- }
- // NewStringsTransactor creates a new write-only instance of Strings, bound to a specific deployed contract.
- func NewStringsTransactor(address common.Address, transactor bind.ContractTransactor) (*StringsTransactor, error) {
- contract, err := bindStrings(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &StringsTransactor{contract: contract}, nil
- }
- // NewStringsFilterer creates a new log filterer instance of Strings, bound to a specific deployed contract.
- func NewStringsFilterer(address common.Address, filterer bind.ContractFilterer) (*StringsFilterer, error) {
- contract, err := bindStrings(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &StringsFilterer{contract: contract}, nil
- }
- // bindStrings binds a generic wrapper to an already deployed contract.
- func bindStrings(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(StringsABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_Strings *StringsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
- return _Strings.Contract.StringsCaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_Strings *StringsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _Strings.Contract.StringsTransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_Strings *StringsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _Strings.Contract.StringsTransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_Strings *StringsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
- return _Strings.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_Strings *StringsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _Strings.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_Strings *StringsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _Strings.Contract.contract.Transact(opts, method, params...)
- }
- // ValidatorMetaData contains all meta data concerning the Validator contract.
- var ValidatorMetaData = &bind.MetaData{
- ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"LogSigner\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"recoverAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Sigs: map[string]string{
- "8428cf83": "recoverAddress(bytes32,uint8,bytes32,bytes32)",
- "5ade6633": "verify(address,bytes,bytes)",
- },
- Bin: "0x608060405234801561001057600080fd5b506107e7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635ade66331461003b5780638428cf8314610064575b600080fd5b61004e610049366004610527565b610084565b60405161005b9190610617565b60405180910390f35b6100776100723660046105b2565b61013e565b60405161005b9190610603565b60008085856040516100979291906105f3565b6040518091039020905060006100e38286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061020192505050565b90507f543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a816040516101149190610603565b60405180910390a1876001600160a01b0316816001600160a01b0316149250505095945050505050565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161018e929190610640565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516101c99493929190610622565b6020604051602081039080840390855afa1580156101eb573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b60008060006102108585610225565b9150915061021d81610295565b509392505050565b60008082516041141561025c5760208301516040840151606085015160001a610250878285856103ce565b9450945050505061028e565b825160401415610286576020830151604084015161027b8683836104ae565b93509350505061028e565b506000905060025b9250929050565b60008160048111156102b757634e487b7160e01b600052602160045260246000fd5b14156102c2576103cb565b60018160048111156102e457634e487b7160e01b600052602160045260246000fd5b141561030b5760405162461bcd60e51b81526004016103029061069b565b60405180910390fd5b600281600481111561032d57634e487b7160e01b600052602160045260246000fd5b141561034b5760405162461bcd60e51b8152600401610302906106d2565b600381600481111561036d57634e487b7160e01b600052602160045260246000fd5b141561038b5760405162461bcd60e51b815260040161030290610709565b60048160048111156103ad57634e487b7160e01b600052602160045260246000fd5b14156103cb5760405162461bcd60e51b81526004016103029061074b565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561040557506000905060036104a5565b8460ff16601b1415801561041d57508460ff16601c14155b1561042e57506000905060046104a5565b6000600187878787604051600081526020016040526040516104539493929190610622565b6020604051602081039080840390855afa158015610475573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661049e576000600192509250506104a5565b9150600090505b94509492505050565b6000806001600160ff1b038316816104cb60ff86901c601b61078d565b90506104d9878288856103ce565b935093505050935093915050565b60008083601f8401126104f8578182fd5b50813567ffffffffffffffff81111561050f578182fd5b60208301915083602082850101111561028e57600080fd5b60008060008060006060868803121561053e578081fd5b85356001600160a01b0381168114610554578182fd5b9450602086013567ffffffffffffffff80821115610570578283fd5b61057c89838a016104e7565b90965094506040880135915080821115610594578283fd5b506105a1888289016104e7565b969995985093965092949392505050565b600080600080608085870312156105c7578384fd5b84359350602085013560ff811681146105de578384fd5b93969395505050506040820135916060013590565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000604082528351806040840152815b8181101561066d5760208187018101516060868401015201610650565b8181111561067e5782606083860101525b50602083019390935250601f91909101601f191601606001919050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b600082198211156107ac57634e487b7160e01b81526011600452602481fd5b50019056fea26469706673582212207cd369a35af431e26ff43e26dd995ca5d03bdbd65a8ae4ca6774c69719d6886c64736f6c63430008000033",
- }
- // ValidatorABI is the input ABI used to generate the binding from.
- // Deprecated: Use ValidatorMetaData.ABI instead.
- var ValidatorABI = ValidatorMetaData.ABI
- // Deprecated: Use ValidatorMetaData.Sigs instead.
- // ValidatorFuncSigs maps the 4-byte function signature to its string representation.
- var ValidatorFuncSigs = ValidatorMetaData.Sigs
- // ValidatorBin is the compiled bytecode used for deploying new contracts.
- // Deprecated: Use ValidatorMetaData.Bin instead.
- var ValidatorBin = ValidatorMetaData.Bin
- // DeployValidator deploys a new Ethereum contract, binding an instance of Validator to it.
- func DeployValidator(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Validator, error) {
- parsed, err := ValidatorMetaData.GetAbi()
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- if parsed == nil {
- return common.Address{}, nil, nil, errors.New("GetABI returned nil")
- }
- address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ValidatorBin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &Validator{ValidatorCaller: ValidatorCaller{contract: contract}, ValidatorTransactor: ValidatorTransactor{contract: contract}, ValidatorFilterer: ValidatorFilterer{contract: contract}}, nil
- }
- // Validator is an auto generated Go binding around an Ethereum contract.
- type Validator struct {
- ValidatorCaller // Read-only binding to the contract
- ValidatorTransactor // Write-only binding to the contract
- ValidatorFilterer // Log filterer for contract events
- }
- // ValidatorCaller is an auto generated read-only Go binding around an Ethereum contract.
- type ValidatorCaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ValidatorTransactor is an auto generated write-only Go binding around an Ethereum contract.
- type ValidatorTransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ValidatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type ValidatorFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ValidatorSession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type ValidatorSession struct {
- Contract *Validator // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // ValidatorCallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type ValidatorCallerSession struct {
- Contract *ValidatorCaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // ValidatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type ValidatorTransactorSession struct {
- Contract *ValidatorTransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // ValidatorRaw is an auto generated low-level Go binding around an Ethereum contract.
- type ValidatorRaw struct {
- Contract *Validator // Generic contract binding to access the raw methods on
- }
- // ValidatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type ValidatorCallerRaw struct {
- Contract *ValidatorCaller // Generic read-only contract binding to access the raw methods on
- }
- // ValidatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type ValidatorTransactorRaw struct {
- Contract *ValidatorTransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewValidator creates a new instance of Validator, bound to a specific deployed contract.
- func NewValidator(address common.Address, backend bind.ContractBackend) (*Validator, error) {
- contract, err := bindValidator(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &Validator{ValidatorCaller: ValidatorCaller{contract: contract}, ValidatorTransactor: ValidatorTransactor{contract: contract}, ValidatorFilterer: ValidatorFilterer{contract: contract}}, nil
- }
- // NewValidatorCaller creates a new read-only instance of Validator, bound to a specific deployed contract.
- func NewValidatorCaller(address common.Address, caller bind.ContractCaller) (*ValidatorCaller, error) {
- contract, err := bindValidator(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &ValidatorCaller{contract: contract}, nil
- }
- // NewValidatorTransactor creates a new write-only instance of Validator, bound to a specific deployed contract.
- func NewValidatorTransactor(address common.Address, transactor bind.ContractTransactor) (*ValidatorTransactor, error) {
- contract, err := bindValidator(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &ValidatorTransactor{contract: contract}, nil
- }
- // NewValidatorFilterer creates a new log filterer instance of Validator, bound to a specific deployed contract.
- func NewValidatorFilterer(address common.Address, filterer bind.ContractFilterer) (*ValidatorFilterer, error) {
- contract, err := bindValidator(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &ValidatorFilterer{contract: contract}, nil
- }
- // bindValidator binds a generic wrapper to an already deployed contract.
- func bindValidator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(ValidatorABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_Validator *ValidatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
- return _Validator.Contract.ValidatorCaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_Validator *ValidatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _Validator.Contract.ValidatorTransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_Validator *ValidatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _Validator.Contract.ValidatorTransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_Validator *ValidatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
- return _Validator.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_Validator *ValidatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _Validator.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_Validator *ValidatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _Validator.Contract.contract.Transact(opts, method, params...)
- }
- // RecoverAddress is a free data retrieval call binding the contract method 0x8428cf83.
- //
- // Solidity: function recoverAddress(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) pure returns(address)
- func (_Validator *ValidatorCaller) RecoverAddress(opts *bind.CallOpts, msgHash [32]byte, v uint8, r [32]byte, s [32]byte) (common.Address, error) {
- var out []interface{}
- err := _Validator.contract.Call(opts, &out, "recoverAddress", msgHash, v, r, s)
- if err != nil {
- return *new(common.Address), err
- }
- out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
- return out0, err
- }
- // RecoverAddress is a free data retrieval call binding the contract method 0x8428cf83.
- //
- // Solidity: function recoverAddress(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) pure returns(address)
- func (_Validator *ValidatorSession) RecoverAddress(msgHash [32]byte, v uint8, r [32]byte, s [32]byte) (common.Address, error) {
- return _Validator.Contract.RecoverAddress(&_Validator.CallOpts, msgHash, v, r, s)
- }
- // RecoverAddress is a free data retrieval call binding the contract method 0x8428cf83.
- //
- // Solidity: function recoverAddress(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) pure returns(address)
- func (_Validator *ValidatorCallerSession) RecoverAddress(msgHash [32]byte, v uint8, r [32]byte, s [32]byte) (common.Address, error) {
- return _Validator.Contract.RecoverAddress(&_Validator.CallOpts, msgHash, v, r, s)
- }
- // Verify is a paid mutator transaction binding the contract method 0x5ade6633.
- //
- // Solidity: function verify(address claimer, bytes data, bytes signature) returns(bool)
- func (_Validator *ValidatorTransactor) Verify(opts *bind.TransactOpts, claimer common.Address, data []byte, signature []byte) (*types.Transaction, error) {
- return _Validator.contract.Transact(opts, "verify", claimer, data, signature)
- }
- // Verify is a paid mutator transaction binding the contract method 0x5ade6633.
- //
- // Solidity: function verify(address claimer, bytes data, bytes signature) returns(bool)
- func (_Validator *ValidatorSession) Verify(claimer common.Address, data []byte, signature []byte) (*types.Transaction, error) {
- return _Validator.Contract.Verify(&_Validator.TransactOpts, claimer, data, signature)
- }
- // Verify is a paid mutator transaction binding the contract method 0x5ade6633.
- //
- // Solidity: function verify(address claimer, bytes data, bytes signature) returns(bool)
- func (_Validator *ValidatorTransactorSession) Verify(claimer common.Address, data []byte, signature []byte) (*types.Transaction, error) {
- return _Validator.Contract.Verify(&_Validator.TransactOpts, claimer, data, signature)
- }
- // ValidatorLogSignerIterator is returned from FilterLogSigner and is used to iterate over the raw logs and unpacked data for LogSigner events raised by the Validator contract.
- type ValidatorLogSignerIterator struct {
- Event *ValidatorLogSigner // Event containing the contract specifics and raw log
- contract *bind.BoundContract // Generic contract to use for unpacking event data
- event string // Event name to use for unpacking event data
- logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
- done bool // Whether the subscription completed delivering logs
- fail error // Occurred error to stop iteration
- }
- // Next advances the iterator to the subsequent event, returning whether there
- // are any more events found. In case of a retrieval or parsing error, false is
- // returned and Error() can be queried for the exact failure.
- func (it *ValidatorLogSignerIterator) Next() bool {
- // If the iterator failed, stop iterating
- if it.fail != nil {
- return false
- }
- // If the iterator completed, deliver directly whatever's available
- if it.done {
- select {
- case log := <-it.logs:
- it.Event = new(ValidatorLogSigner)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- default:
- return false
- }
- }
- // Iterator still in progress, wait for either a data or an error event
- select {
- case log := <-it.logs:
- it.Event = new(ValidatorLogSigner)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- case err := <-it.sub.Err():
- it.done = true
- it.fail = err
- return it.Next()
- }
- }
- // Error returns any retrieval or parsing error occurred during filtering.
- func (it *ValidatorLogSignerIterator) Error() error {
- return it.fail
- }
- // Close terminates the iteration process, releasing any pending underlying
- // resources.
- func (it *ValidatorLogSignerIterator) Close() error {
- it.sub.Unsubscribe()
- return nil
- }
- // ValidatorLogSigner represents a LogSigner event raised by the Validator contract.
- type ValidatorLogSigner struct {
- Signer common.Address
- Raw types.Log // Blockchain specific contextual infos
- }
- // FilterLogSigner is a free log retrieval operation binding the contract event 0x543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a.
- //
- // Solidity: event LogSigner(address signer)
- func (_Validator *ValidatorFilterer) FilterLogSigner(opts *bind.FilterOpts) (*ValidatorLogSignerIterator, error) {
- logs, sub, err := _Validator.contract.FilterLogs(opts, "LogSigner")
- if err != nil {
- return nil, err
- }
- return &ValidatorLogSignerIterator{contract: _Validator.contract, event: "LogSigner", logs: logs, sub: sub}, nil
- }
- // WatchLogSigner is a free log subscription operation binding the contract event 0x543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a.
- //
- // Solidity: event LogSigner(address signer)
- func (_Validator *ValidatorFilterer) WatchLogSigner(opts *bind.WatchOpts, sink chan<- *ValidatorLogSigner) (event.Subscription, error) {
- logs, sub, err := _Validator.contract.WatchLogs(opts, "LogSigner")
- if err != nil {
- return nil, err
- }
- return event.NewSubscription(func(quit <-chan struct{}) error {
- defer sub.Unsubscribe()
- for {
- select {
- case log := <-logs:
- // New log arrived, parse the event and forward to the user
- event := new(ValidatorLogSigner)
- if err := _Validator.contract.UnpackLog(event, "LogSigner", log); err != nil {
- return err
- }
- event.Raw = log
- select {
- case sink <- event:
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- }
- }), nil
- }
- // ParseLogSigner is a log parse operation binding the contract event 0x543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a.
- //
- // Solidity: event LogSigner(address signer)
- func (_Validator *ValidatorFilterer) ParseLogSigner(log types.Log) (*ValidatorLogSigner, error) {
- event := new(ValidatorLogSigner)
- if err := _Validator.contract.UnpackLog(event, "LogSigner", log); err != nil {
- return nil, err
- }
- event.Raw = log
- return event, nil
- }
|