// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package mockerc20 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 _ = abi.ConvertType ) // ContextMetaData contains all meta data concerning the Context contract. var ContextMetaData = &bind.MetaData{ ABI: "[]", } // ContextABI is the input ABI used to generate the binding from. // Deprecated: Use ContextMetaData.ABI instead. var ContextABI = ContextMetaData.ABI // Context is an auto generated Go binding around an Ethereum contract. type Context struct { ContextCaller // Read-only binding to the contract ContextTransactor // Write-only binding to the contract ContextFilterer // Log filterer for contract events } // ContextCaller is an auto generated read-only Go binding around an Ethereum contract. type ContextCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. type ContextTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type ContextFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ContextSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type ContextSession struct { Contract *Context // 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 } // ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type ContextCallerSession struct { Contract *ContextCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type ContextTransactorSession struct { Contract *ContextTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // ContextRaw is an auto generated low-level Go binding around an Ethereum contract. type ContextRaw struct { Contract *Context // Generic contract binding to access the raw methods on } // ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type ContextCallerRaw struct { Contract *ContextCaller // Generic read-only contract binding to access the raw methods on } // ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type ContextTransactorRaw struct { Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on } // NewContext creates a new instance of Context, bound to a specific deployed contract. func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { contract, err := bindContext(address, backend, backend, backend) if err != nil { return nil, err } return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil } // NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { contract, err := bindContext(address, caller, nil, nil) if err != nil { return nil, err } return &ContextCaller{contract: contract}, nil } // NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { contract, err := bindContext(address, nil, transactor, nil) if err != nil { return nil, err } return &ContextTransactor{contract: contract}, nil } // NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { contract, err := bindContext(address, nil, nil, filterer) if err != nil { return nil, err } return &ContextFilterer{contract: contract}, nil } // bindContext binds a generic wrapper to an already deployed contract. func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := ContextMetaData.GetAbi() 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Context.Contract.ContextTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Context.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _Context.Contract.contract.Transact(opts, method, params...) } // ERC20MetaData contains all meta data concerning the ERC20 contract. var ERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "313ce567": "decimals()", "06fdde03": "name()", "95d89b41": "symbol()", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, } // ERC20ABI is the input ABI used to generate the binding from. // Deprecated: Use ERC20MetaData.ABI instead. var ERC20ABI = ERC20MetaData.ABI // Deprecated: Use ERC20MetaData.Sigs instead. // ERC20FuncSigs maps the 4-byte function signature to its string representation. var ERC20FuncSigs = ERC20MetaData.Sigs // ERC20 is an auto generated Go binding around an Ethereum contract. type ERC20 struct { ERC20Caller // Read-only binding to the contract ERC20Transactor // Write-only binding to the contract ERC20Filterer // Log filterer for contract events } // ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. type ERC20Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. type ERC20Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. type ERC20Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ERC20Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type ERC20Session struct { Contract *ERC20 // 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 } // ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type ERC20CallerSession struct { Contract *ERC20Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type ERC20TransactorSession struct { Contract *ERC20Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. type ERC20Raw struct { Contract *ERC20 // Generic contract binding to access the raw methods on } // ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type ERC20CallerRaw struct { Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on } // ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type ERC20TransactorRaw struct { Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on } // NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { contract, err := bindERC20(address, backend, backend, backend) if err != nil { return nil, err } return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil } // NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { contract, err := bindERC20(address, caller, nil, nil) if err != nil { return nil, err } return &ERC20Caller{contract: contract}, nil } // NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { contract, err := bindERC20(address, nil, transactor, nil) if err != nil { return nil, err } return &ERC20Transactor{contract: contract}, nil } // NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { contract, err := bindERC20(address, nil, nil, filterer) if err != nil { return nil, err } return &ERC20Filterer{contract: contract}, nil } // bindERC20 binds a generic wrapper to an already deployed contract. func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := ERC20MetaData.GetAbi() 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _ERC20.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ERC20.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _ERC20.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _ERC20.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _ERC20.contract.Call(opts, &out, "decimals") if err != nil { return *new(uint8), err } out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_ERC20 *ERC20Session) Decimals() (uint8, error) { return _ERC20.Contract.Decimals(&_ERC20.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error) { return _ERC20.Contract.Decimals(&_ERC20.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} err := _ERC20.contract.Call(opts, &out, "name") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_ERC20 *ERC20Session) Name() (string, error) { return _ERC20.Contract.Name(&_ERC20.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_ERC20 *ERC20CallerSession) Name() (string, error) { return _ERC20.Contract.Name(&_ERC20.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} err := _ERC20.contract.Call(opts, &out, "symbol") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_ERC20 *ERC20Session) Symbol() (string, error) { return _ERC20.Contract.Symbol(&_ERC20.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_ERC20 *ERC20CallerSession) Symbol() (string, error) { return _ERC20.Contract.Symbol(&_ERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _ERC20.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "approve", spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_ERC20 *ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "transfer", to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_ERC20 *ERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_ERC20 *ERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "transferFrom", from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_ERC20 *ERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_ERC20 *ERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, from, to, value) } // ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. type ERC20ApprovalIterator struct { Event *ERC20Approval // 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 *ERC20ApprovalIterator) 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(ERC20Approval) 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(ERC20Approval) 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 *ERC20ApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *ERC20ApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // ERC20Approval represents a Approval event raised by the ERC20 contract. type ERC20Approval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 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(ERC20Approval) if err := _ERC20.contract.UnpackLog(event, "Approval", 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 } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { event := new(ERC20Approval) if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. type ERC20TransferIterator struct { Event *ERC20Transfer // 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 *ERC20TransferIterator) 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(ERC20Transfer) 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(ERC20Transfer) 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 *ERC20TransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *ERC20TransferIterator) Close() error { it.sub.Unsubscribe() return nil } // ERC20Transfer represents a Transfer event raised by the ERC20 contract. type ERC20Transfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 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(ERC20Transfer) if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { event := new(ERC20Transfer) if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // IERC1155ErrorsMetaData contains all meta data concerning the IERC1155Errors contract. var IERC1155ErrorsMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}]", } // IERC1155ErrorsABI is the input ABI used to generate the binding from. // Deprecated: Use IERC1155ErrorsMetaData.ABI instead. var IERC1155ErrorsABI = IERC1155ErrorsMetaData.ABI // IERC1155Errors is an auto generated Go binding around an Ethereum contract. type IERC1155Errors struct { IERC1155ErrorsCaller // Read-only binding to the contract IERC1155ErrorsTransactor // Write-only binding to the contract IERC1155ErrorsFilterer // Log filterer for contract events } // IERC1155ErrorsCaller is an auto generated read-only Go binding around an Ethereum contract. type IERC1155ErrorsCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC1155ErrorsTransactor is an auto generated write-only Go binding around an Ethereum contract. type IERC1155ErrorsTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC1155ErrorsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type IERC1155ErrorsFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC1155ErrorsSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IERC1155ErrorsSession struct { Contract *IERC1155Errors // 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 } // IERC1155ErrorsCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IERC1155ErrorsCallerSession struct { Contract *IERC1155ErrorsCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IERC1155ErrorsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IERC1155ErrorsTransactorSession struct { Contract *IERC1155ErrorsTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC1155ErrorsRaw is an auto generated low-level Go binding around an Ethereum contract. type IERC1155ErrorsRaw struct { Contract *IERC1155Errors // Generic contract binding to access the raw methods on } // IERC1155ErrorsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IERC1155ErrorsCallerRaw struct { Contract *IERC1155ErrorsCaller // Generic read-only contract binding to access the raw methods on } // IERC1155ErrorsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IERC1155ErrorsTransactorRaw struct { Contract *IERC1155ErrorsTransactor // Generic write-only contract binding to access the raw methods on } // NewIERC1155Errors creates a new instance of IERC1155Errors, bound to a specific deployed contract. func NewIERC1155Errors(address common.Address, backend bind.ContractBackend) (*IERC1155Errors, error) { contract, err := bindIERC1155Errors(address, backend, backend, backend) if err != nil { return nil, err } return &IERC1155Errors{IERC1155ErrorsCaller: IERC1155ErrorsCaller{contract: contract}, IERC1155ErrorsTransactor: IERC1155ErrorsTransactor{contract: contract}, IERC1155ErrorsFilterer: IERC1155ErrorsFilterer{contract: contract}}, nil } // NewIERC1155ErrorsCaller creates a new read-only instance of IERC1155Errors, bound to a specific deployed contract. func NewIERC1155ErrorsCaller(address common.Address, caller bind.ContractCaller) (*IERC1155ErrorsCaller, error) { contract, err := bindIERC1155Errors(address, caller, nil, nil) if err != nil { return nil, err } return &IERC1155ErrorsCaller{contract: contract}, nil } // NewIERC1155ErrorsTransactor creates a new write-only instance of IERC1155Errors, bound to a specific deployed contract. func NewIERC1155ErrorsTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC1155ErrorsTransactor, error) { contract, err := bindIERC1155Errors(address, nil, transactor, nil) if err != nil { return nil, err } return &IERC1155ErrorsTransactor{contract: contract}, nil } // NewIERC1155ErrorsFilterer creates a new log filterer instance of IERC1155Errors, bound to a specific deployed contract. func NewIERC1155ErrorsFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC1155ErrorsFilterer, error) { contract, err := bindIERC1155Errors(address, nil, nil, filterer) if err != nil { return nil, err } return &IERC1155ErrorsFilterer{contract: contract}, nil } // bindIERC1155Errors binds a generic wrapper to an already deployed contract. func bindIERC1155Errors(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := IERC1155ErrorsMetaData.GetAbi() 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 (_IERC1155Errors *IERC1155ErrorsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC1155Errors.Contract.IERC1155ErrorsCaller.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 (_IERC1155Errors *IERC1155ErrorsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC1155Errors.Contract.IERC1155ErrorsTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC1155Errors *IERC1155ErrorsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC1155Errors.Contract.IERC1155ErrorsTransactor.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 (_IERC1155Errors *IERC1155ErrorsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC1155Errors.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 (_IERC1155Errors *IERC1155ErrorsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC1155Errors.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC1155Errors *IERC1155ErrorsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC1155Errors.Contract.contract.Transact(opts, method, params...) } // IERC20MetaData contains all meta data concerning the IERC20 contract. var IERC20MetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, } // IERC20ABI is the input ABI used to generate the binding from. // Deprecated: Use IERC20MetaData.ABI instead. var IERC20ABI = IERC20MetaData.ABI // Deprecated: Use IERC20MetaData.Sigs instead. // IERC20FuncSigs maps the 4-byte function signature to its string representation. var IERC20FuncSigs = IERC20MetaData.Sigs // IERC20 is an auto generated Go binding around an Ethereum contract. type IERC20 struct { IERC20Caller // Read-only binding to the contract IERC20Transactor // Write-only binding to the contract IERC20Filterer // Log filterer for contract events } // IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. type IERC20Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. type IERC20Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. type IERC20Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IERC20Session struct { Contract *IERC20 // 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 } // IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IERC20CallerSession struct { Contract *IERC20Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IERC20TransactorSession struct { Contract *IERC20Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. type IERC20Raw struct { Contract *IERC20 // Generic contract binding to access the raw methods on } // IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IERC20CallerRaw struct { Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on } // IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IERC20TransactorRaw struct { Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on } // NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { contract, err := bindIERC20(address, backend, backend, backend) if err != nil { return nil, err } return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil } // NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { contract, err := bindIERC20(address, caller, nil, nil) if err != nil { return nil, err } return &IERC20Caller{contract: contract}, nil } // NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { contract, err := bindIERC20(address, nil, transactor, nil) if err != nil { return nil, err } return &IERC20Transactor{contract: contract}, nil } // NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { contract, err := bindIERC20(address, nil, nil, filterer) if err != nil { return nil, err } return &IERC20Filterer{contract: contract}, nil } // bindIERC20 binds a generic wrapper to an already deployed contract. func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := IERC20MetaData.GetAbi() 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _IERC20.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _IERC20.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "approve", spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_IERC20 *IERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "transfer", to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_IERC20 *IERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_IERC20 *IERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "transferFrom", from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_IERC20 *IERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_IERC20 *IERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) } // IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. type IERC20ApprovalIterator struct { Event *IERC20Approval // 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 *IERC20ApprovalIterator) 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(IERC20Approval) 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(IERC20Approval) 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 *IERC20ApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IERC20ApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // IERC20Approval represents a Approval event raised by the IERC20 contract. type IERC20Approval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 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(IERC20Approval) if err := _IERC20.contract.UnpackLog(event, "Approval", 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 } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { event := new(IERC20Approval) if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. type IERC20TransferIterator struct { Event *IERC20Transfer // 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 *IERC20TransferIterator) 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(IERC20Transfer) 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(IERC20Transfer) 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 *IERC20TransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IERC20TransferIterator) Close() error { it.sub.Unsubscribe() return nil } // IERC20Transfer represents a Transfer event raised by the IERC20 contract. type IERC20Transfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 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(IERC20Transfer) if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { event := new(IERC20Transfer) if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // IERC20ErrorsMetaData contains all meta data concerning the IERC20Errors contract. var IERC20ErrorsMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}]", } // IERC20ErrorsABI is the input ABI used to generate the binding from. // Deprecated: Use IERC20ErrorsMetaData.ABI instead. var IERC20ErrorsABI = IERC20ErrorsMetaData.ABI // IERC20Errors is an auto generated Go binding around an Ethereum contract. type IERC20Errors struct { IERC20ErrorsCaller // Read-only binding to the contract IERC20ErrorsTransactor // Write-only binding to the contract IERC20ErrorsFilterer // Log filterer for contract events } // IERC20ErrorsCaller is an auto generated read-only Go binding around an Ethereum contract. type IERC20ErrorsCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20ErrorsTransactor is an auto generated write-only Go binding around an Ethereum contract. type IERC20ErrorsTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20ErrorsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type IERC20ErrorsFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20ErrorsSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IERC20ErrorsSession struct { Contract *IERC20Errors // 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 } // IERC20ErrorsCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IERC20ErrorsCallerSession struct { Contract *IERC20ErrorsCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IERC20ErrorsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IERC20ErrorsTransactorSession struct { Contract *IERC20ErrorsTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC20ErrorsRaw is an auto generated low-level Go binding around an Ethereum contract. type IERC20ErrorsRaw struct { Contract *IERC20Errors // Generic contract binding to access the raw methods on } // IERC20ErrorsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IERC20ErrorsCallerRaw struct { Contract *IERC20ErrorsCaller // Generic read-only contract binding to access the raw methods on } // IERC20ErrorsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IERC20ErrorsTransactorRaw struct { Contract *IERC20ErrorsTransactor // Generic write-only contract binding to access the raw methods on } // NewIERC20Errors creates a new instance of IERC20Errors, bound to a specific deployed contract. func NewIERC20Errors(address common.Address, backend bind.ContractBackend) (*IERC20Errors, error) { contract, err := bindIERC20Errors(address, backend, backend, backend) if err != nil { return nil, err } return &IERC20Errors{IERC20ErrorsCaller: IERC20ErrorsCaller{contract: contract}, IERC20ErrorsTransactor: IERC20ErrorsTransactor{contract: contract}, IERC20ErrorsFilterer: IERC20ErrorsFilterer{contract: contract}}, nil } // NewIERC20ErrorsCaller creates a new read-only instance of IERC20Errors, bound to a specific deployed contract. func NewIERC20ErrorsCaller(address common.Address, caller bind.ContractCaller) (*IERC20ErrorsCaller, error) { contract, err := bindIERC20Errors(address, caller, nil, nil) if err != nil { return nil, err } return &IERC20ErrorsCaller{contract: contract}, nil } // NewIERC20ErrorsTransactor creates a new write-only instance of IERC20Errors, bound to a specific deployed contract. func NewIERC20ErrorsTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC20ErrorsTransactor, error) { contract, err := bindIERC20Errors(address, nil, transactor, nil) if err != nil { return nil, err } return &IERC20ErrorsTransactor{contract: contract}, nil } // NewIERC20ErrorsFilterer creates a new log filterer instance of IERC20Errors, bound to a specific deployed contract. func NewIERC20ErrorsFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC20ErrorsFilterer, error) { contract, err := bindIERC20Errors(address, nil, nil, filterer) if err != nil { return nil, err } return &IERC20ErrorsFilterer{contract: contract}, nil } // bindIERC20Errors binds a generic wrapper to an already deployed contract. func bindIERC20Errors(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := IERC20ErrorsMetaData.GetAbi() 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 (_IERC20Errors *IERC20ErrorsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20Errors.Contract.IERC20ErrorsCaller.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 (_IERC20Errors *IERC20ErrorsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20Errors.Contract.IERC20ErrorsTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20Errors *IERC20ErrorsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20Errors.Contract.IERC20ErrorsTransactor.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 (_IERC20Errors *IERC20ErrorsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20Errors.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 (_IERC20Errors *IERC20ErrorsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20Errors.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20Errors *IERC20ErrorsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20Errors.Contract.contract.Transact(opts, method, params...) } // IERC20MetadataMetaData contains all meta data concerning the IERC20Metadata contract. var IERC20MetadataMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "313ce567": "decimals()", "06fdde03": "name()", "95d89b41": "symbol()", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, } // IERC20MetadataABI is the input ABI used to generate the binding from. // Deprecated: Use IERC20MetadataMetaData.ABI instead. var IERC20MetadataABI = IERC20MetadataMetaData.ABI // Deprecated: Use IERC20MetadataMetaData.Sigs instead. // IERC20MetadataFuncSigs maps the 4-byte function signature to its string representation. var IERC20MetadataFuncSigs = IERC20MetadataMetaData.Sigs // IERC20Metadata is an auto generated Go binding around an Ethereum contract. type IERC20Metadata struct { IERC20MetadataCaller // Read-only binding to the contract IERC20MetadataTransactor // Write-only binding to the contract IERC20MetadataFilterer // Log filterer for contract events } // IERC20MetadataCaller is an auto generated read-only Go binding around an Ethereum contract. type IERC20MetadataCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20MetadataTransactor is an auto generated write-only Go binding around an Ethereum contract. type IERC20MetadataTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20MetadataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type IERC20MetadataFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20MetadataSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IERC20MetadataSession struct { Contract *IERC20Metadata // 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 } // IERC20MetadataCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IERC20MetadataCallerSession struct { Contract *IERC20MetadataCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IERC20MetadataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IERC20MetadataTransactorSession struct { Contract *IERC20MetadataTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC20MetadataRaw is an auto generated low-level Go binding around an Ethereum contract. type IERC20MetadataRaw struct { Contract *IERC20Metadata // Generic contract binding to access the raw methods on } // IERC20MetadataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IERC20MetadataCallerRaw struct { Contract *IERC20MetadataCaller // Generic read-only contract binding to access the raw methods on } // IERC20MetadataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IERC20MetadataTransactorRaw struct { Contract *IERC20MetadataTransactor // Generic write-only contract binding to access the raw methods on } // NewIERC20Metadata creates a new instance of IERC20Metadata, bound to a specific deployed contract. func NewIERC20Metadata(address common.Address, backend bind.ContractBackend) (*IERC20Metadata, error) { contract, err := bindIERC20Metadata(address, backend, backend, backend) if err != nil { return nil, err } return &IERC20Metadata{IERC20MetadataCaller: IERC20MetadataCaller{contract: contract}, IERC20MetadataTransactor: IERC20MetadataTransactor{contract: contract}, IERC20MetadataFilterer: IERC20MetadataFilterer{contract: contract}}, nil } // NewIERC20MetadataCaller creates a new read-only instance of IERC20Metadata, bound to a specific deployed contract. func NewIERC20MetadataCaller(address common.Address, caller bind.ContractCaller) (*IERC20MetadataCaller, error) { contract, err := bindIERC20Metadata(address, caller, nil, nil) if err != nil { return nil, err } return &IERC20MetadataCaller{contract: contract}, nil } // NewIERC20MetadataTransactor creates a new write-only instance of IERC20Metadata, bound to a specific deployed contract. func NewIERC20MetadataTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC20MetadataTransactor, error) { contract, err := bindIERC20Metadata(address, nil, transactor, nil) if err != nil { return nil, err } return &IERC20MetadataTransactor{contract: contract}, nil } // NewIERC20MetadataFilterer creates a new log filterer instance of IERC20Metadata, bound to a specific deployed contract. func NewIERC20MetadataFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC20MetadataFilterer, error) { contract, err := bindIERC20Metadata(address, nil, nil, filterer) if err != nil { return nil, err } return &IERC20MetadataFilterer{contract: contract}, nil } // bindIERC20Metadata binds a generic wrapper to an already deployed contract. func bindIERC20Metadata(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := IERC20MetadataMetaData.GetAbi() 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 (_IERC20Metadata *IERC20MetadataRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20Metadata.Contract.IERC20MetadataCaller.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 (_IERC20Metadata *IERC20MetadataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20Metadata.Contract.IERC20MetadataTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20Metadata *IERC20MetadataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20Metadata.Contract.IERC20MetadataTransactor.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 (_IERC20Metadata *IERC20MetadataCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20Metadata.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 (_IERC20Metadata *IERC20MetadataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20Metadata.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20Metadata *IERC20MetadataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20Metadata.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20Metadata *IERC20MetadataCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _IERC20Metadata.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20Metadata *IERC20MetadataSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IERC20Metadata.Contract.Allowance(&_IERC20Metadata.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20Metadata *IERC20MetadataCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IERC20Metadata.Contract.Allowance(&_IERC20Metadata.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20Metadata *IERC20MetadataCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _IERC20Metadata.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20Metadata *IERC20MetadataSession) BalanceOf(account common.Address) (*big.Int, error) { return _IERC20Metadata.Contract.BalanceOf(&_IERC20Metadata.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20Metadata *IERC20MetadataCallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _IERC20Metadata.Contract.BalanceOf(&_IERC20Metadata.CallOpts, account) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_IERC20Metadata *IERC20MetadataCaller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _IERC20Metadata.contract.Call(opts, &out, "decimals") if err != nil { return *new(uint8), err } out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_IERC20Metadata *IERC20MetadataSession) Decimals() (uint8, error) { return _IERC20Metadata.Contract.Decimals(&_IERC20Metadata.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_IERC20Metadata *IERC20MetadataCallerSession) Decimals() (uint8, error) { return _IERC20Metadata.Contract.Decimals(&_IERC20Metadata.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_IERC20Metadata *IERC20MetadataCaller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} err := _IERC20Metadata.contract.Call(opts, &out, "name") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_IERC20Metadata *IERC20MetadataSession) Name() (string, error) { return _IERC20Metadata.Contract.Name(&_IERC20Metadata.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_IERC20Metadata *IERC20MetadataCallerSession) Name() (string, error) { return _IERC20Metadata.Contract.Name(&_IERC20Metadata.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_IERC20Metadata *IERC20MetadataCaller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} err := _IERC20Metadata.contract.Call(opts, &out, "symbol") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_IERC20Metadata *IERC20MetadataSession) Symbol() (string, error) { return _IERC20Metadata.Contract.Symbol(&_IERC20Metadata.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_IERC20Metadata *IERC20MetadataCallerSession) Symbol() (string, error) { return _IERC20Metadata.Contract.Symbol(&_IERC20Metadata.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20Metadata *IERC20MetadataCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _IERC20Metadata.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20Metadata *IERC20MetadataSession) TotalSupply() (*big.Int, error) { return _IERC20Metadata.Contract.TotalSupply(&_IERC20Metadata.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20Metadata *IERC20MetadataCallerSession) TotalSupply() (*big.Int, error) { return _IERC20Metadata.Contract.TotalSupply(&_IERC20Metadata.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.contract.Transact(opts, "approve", spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.Contract.Approve(&_IERC20Metadata.TransactOpts, spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.Contract.Approve(&_IERC20Metadata.TransactOpts, spender, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.contract.Transact(opts, "transfer", to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.Contract.Transfer(&_IERC20Metadata.TransactOpts, to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.Contract.Transfer(&_IERC20Metadata.TransactOpts, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.contract.Transact(opts, "transferFrom", from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.Contract.TransferFrom(&_IERC20Metadata.TransactOpts, from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_IERC20Metadata *IERC20MetadataTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _IERC20Metadata.Contract.TransferFrom(&_IERC20Metadata.TransactOpts, from, to, value) } // IERC20MetadataApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20Metadata contract. type IERC20MetadataApprovalIterator struct { Event *IERC20MetadataApproval // 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 *IERC20MetadataApprovalIterator) 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(IERC20MetadataApproval) 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(IERC20MetadataApproval) 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 *IERC20MetadataApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IERC20MetadataApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // IERC20MetadataApproval represents a Approval event raised by the IERC20Metadata contract. type IERC20MetadataApproval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20Metadata *IERC20MetadataFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20MetadataApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IERC20Metadata.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &IERC20MetadataApprovalIterator{contract: _IERC20Metadata.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20Metadata *IERC20MetadataFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20MetadataApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IERC20Metadata.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 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(IERC20MetadataApproval) if err := _IERC20Metadata.contract.UnpackLog(event, "Approval", 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 } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20Metadata *IERC20MetadataFilterer) ParseApproval(log types.Log) (*IERC20MetadataApproval, error) { event := new(IERC20MetadataApproval) if err := _IERC20Metadata.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // IERC20MetadataTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20Metadata contract. type IERC20MetadataTransferIterator struct { Event *IERC20MetadataTransfer // 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 *IERC20MetadataTransferIterator) 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(IERC20MetadataTransfer) 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(IERC20MetadataTransfer) 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 *IERC20MetadataTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IERC20MetadataTransferIterator) Close() error { it.sub.Unsubscribe() return nil } // IERC20MetadataTransfer represents a Transfer event raised by the IERC20Metadata contract. type IERC20MetadataTransfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20Metadata *IERC20MetadataFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20MetadataTransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IERC20Metadata.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &IERC20MetadataTransferIterator{contract: _IERC20Metadata.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20Metadata *IERC20MetadataFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20MetadataTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IERC20Metadata.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 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(IERC20MetadataTransfer) if err := _IERC20Metadata.contract.UnpackLog(event, "Transfer", 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 } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20Metadata *IERC20MetadataFilterer) ParseTransfer(log types.Log) (*IERC20MetadataTransfer, error) { event := new(IERC20MetadataTransfer) if err := _IERC20Metadata.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // IERC721ErrorsMetaData contains all meta data concerning the IERC721Errors contract. var IERC721ErrorsMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}]", } // IERC721ErrorsABI is the input ABI used to generate the binding from. // Deprecated: Use IERC721ErrorsMetaData.ABI instead. var IERC721ErrorsABI = IERC721ErrorsMetaData.ABI // IERC721Errors is an auto generated Go binding around an Ethereum contract. type IERC721Errors struct { IERC721ErrorsCaller // Read-only binding to the contract IERC721ErrorsTransactor // Write-only binding to the contract IERC721ErrorsFilterer // Log filterer for contract events } // IERC721ErrorsCaller is an auto generated read-only Go binding around an Ethereum contract. type IERC721ErrorsCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC721ErrorsTransactor is an auto generated write-only Go binding around an Ethereum contract. type IERC721ErrorsTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC721ErrorsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type IERC721ErrorsFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC721ErrorsSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IERC721ErrorsSession struct { Contract *IERC721Errors // 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 } // IERC721ErrorsCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IERC721ErrorsCallerSession struct { Contract *IERC721ErrorsCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IERC721ErrorsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IERC721ErrorsTransactorSession struct { Contract *IERC721ErrorsTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC721ErrorsRaw is an auto generated low-level Go binding around an Ethereum contract. type IERC721ErrorsRaw struct { Contract *IERC721Errors // Generic contract binding to access the raw methods on } // IERC721ErrorsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IERC721ErrorsCallerRaw struct { Contract *IERC721ErrorsCaller // Generic read-only contract binding to access the raw methods on } // IERC721ErrorsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IERC721ErrorsTransactorRaw struct { Contract *IERC721ErrorsTransactor // Generic write-only contract binding to access the raw methods on } // NewIERC721Errors creates a new instance of IERC721Errors, bound to a specific deployed contract. func NewIERC721Errors(address common.Address, backend bind.ContractBackend) (*IERC721Errors, error) { contract, err := bindIERC721Errors(address, backend, backend, backend) if err != nil { return nil, err } return &IERC721Errors{IERC721ErrorsCaller: IERC721ErrorsCaller{contract: contract}, IERC721ErrorsTransactor: IERC721ErrorsTransactor{contract: contract}, IERC721ErrorsFilterer: IERC721ErrorsFilterer{contract: contract}}, nil } // NewIERC721ErrorsCaller creates a new read-only instance of IERC721Errors, bound to a specific deployed contract. func NewIERC721ErrorsCaller(address common.Address, caller bind.ContractCaller) (*IERC721ErrorsCaller, error) { contract, err := bindIERC721Errors(address, caller, nil, nil) if err != nil { return nil, err } return &IERC721ErrorsCaller{contract: contract}, nil } // NewIERC721ErrorsTransactor creates a new write-only instance of IERC721Errors, bound to a specific deployed contract. func NewIERC721ErrorsTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721ErrorsTransactor, error) { contract, err := bindIERC721Errors(address, nil, transactor, nil) if err != nil { return nil, err } return &IERC721ErrorsTransactor{contract: contract}, nil } // NewIERC721ErrorsFilterer creates a new log filterer instance of IERC721Errors, bound to a specific deployed contract. func NewIERC721ErrorsFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721ErrorsFilterer, error) { contract, err := bindIERC721Errors(address, nil, nil, filterer) if err != nil { return nil, err } return &IERC721ErrorsFilterer{contract: contract}, nil } // bindIERC721Errors binds a generic wrapper to an already deployed contract. func bindIERC721Errors(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := IERC721ErrorsMetaData.GetAbi() 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 (_IERC721Errors *IERC721ErrorsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC721Errors.Contract.IERC721ErrorsCaller.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 (_IERC721Errors *IERC721ErrorsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC721Errors.Contract.IERC721ErrorsTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC721Errors *IERC721ErrorsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC721Errors.Contract.IERC721ErrorsTransactor.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 (_IERC721Errors *IERC721ErrorsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC721Errors.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 (_IERC721Errors *IERC721ErrorsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC721Errors.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC721Errors *IERC721ErrorsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC721Errors.Contract.contract.Transact(opts, method, params...) } // MockERC20MetaData contains all meta data concerning the MockERC20 contract. var MockERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testMockERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "9dc29fac": "burn(address,uint256)", "313ce567": "decimals()", "40c10f19": "mint(address,uint256)", "06fdde03": "name()", "95d89b41": "symbol()", "ad72af51": "testMockERC20()", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, Bin: "0x60806040523480156200001157600080fd5b5060405162000d5a38038062000d5a8339810160408190526200003491620000a0565b8180600362000044828262000217565b50600462000053828262000217565b50506005805460ff191660ff939093169290921790915550620002e39050565b634e487b7160e01b600052604160045260246000fd5b805160ff811681146200009b57600080fd5b919050565b60008060408385031215620000b457600080fd5b82516001600160401b0380821115620000cc57600080fd5b818501915085601f830112620000e157600080fd5b815181811115620000f657620000f662000073565b604051601f8201601f19908116603f0116810190838211818310171562000121576200012162000073565b816040528281526020935088848487010111156200013e57600080fd5b600091505b8282101562000162578482018401518183018501529083019062000143565b60008484830101528096505050506200017d81860162000089565b925050509250929050565b600181811c908216806200019d57607f821691505b602082108103620001be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021257600081815260208120601f850160051c81016020861015620001ed5750805b601f850160051c820191505b818110156200020e57828155600101620001f9565b5050505b505050565b81516001600160401b0381111562000233576200023362000073565b6200024b8162000244845462000188565b84620001c4565b602080601f8311600181146200028357600084156200026a5750858301515b600019600386901b1c1916600185901b1785556200020e565b600085815260208120601f198616915b82811015620002b45788860151825594840194600190910190840162000293565b5085821015620002d35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610a6780620002f36000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c806370a0823111610081578063a9059cbb1161005b578063a9059cbb146101ba578063ad72af5114610167578063dd62ed3e146101cd57600080fd5b806370a082311461016957806395d89b411461019f5780639dc29fac146101a757600080fd5b806323b872dd116100b257806323b872dd1461012c578063313ce5671461013f57806340c10f191461015457600080fd5b806306fdde03146100d9578063095ea7b3146100f757806318160ddd1461011a575b600080fd5b6100e1610213565b6040516100ee9190610854565b60405180910390f35b61010a6101053660046108e9565b6102a5565b60405190151581526020016100ee565b6002545b6040519081526020016100ee565b61010a61013a366004610913565b6102bf565b60055460405160ff90911681526020016100ee565b6101676101623660046108e9565b6102e3565b005b61011e61017736600461094f565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100e16102f1565b6101676101b53660046108e9565b610300565b61010a6101c83660046108e9565b61030a565b61011e6101db366004610971565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b606060038054610222906109a4565b80601f016020809104026020016040519081016040528092919081815260200182805461024e906109a4565b801561029b5780601f106102705761010080835404028352916020019161029b565b820191906000526020600020905b81548152906001019060200180831161027e57829003601f168201915b5050505050905090565b6000336102b3818585610318565b60019150505b92915050565b6000336102cd85828561032a565b6102d88585856103fe565b506001949350505050565b6102ed82826104a9565b5050565b606060048054610222906109a4565b6102ed8282610505565b6000336102b38185856103fe565b6103258383836001610561565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146103f857818110156103e9576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101829052604481018390526064015b60405180910390fd5b6103f884848484036000610561565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661044e576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016103e0565b73ffffffffffffffffffffffffffffffffffffffff821661049e576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103e0565b6103258383836106a9565b73ffffffffffffffffffffffffffffffffffffffff82166104f9576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103e0565b6102ed600083836106a9565b73ffffffffffffffffffffffffffffffffffffffff8216610555576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016103e0565b6102ed826000836106a9565b73ffffffffffffffffffffffffffffffffffffffff84166105b1576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016103e0565b73ffffffffffffffffffffffffffffffffffffffff8316610601576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016103e0565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020908152604080832093871683529290522082905580156103f8578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161069b91815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff83166106e15780600260008282546106d691906109f7565b909155506107939050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610767576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260248101829052604481018390526064016103e0565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166107bc576002805482900390556107e8565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161084791815260200190565b60405180910390a3505050565b600060208083528351808285015260005b8181101561088157858101830151858201604001528201610865565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146108e457600080fd5b919050565b600080604083850312156108fc57600080fd5b610905836108c0565b946020939093013593505050565b60008060006060848603121561092857600080fd5b610931846108c0565b925061093f602085016108c0565b9150604084013590509250925092565b60006020828403121561096157600080fd5b61096a826108c0565b9392505050565b6000806040838503121561098457600080fd5b61098d836108c0565b915061099b602084016108c0565b90509250929050565b600181811c908216806109b857607f821691505b6020821081036109f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b808201808211156102b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220fe0a17a08fadc3e7b741cef0bd1b3efca7123f957fae2df9dce30ea0f4061a2064736f6c63430008140033", } // MockERC20ABI is the input ABI used to generate the binding from. // Deprecated: Use MockERC20MetaData.ABI instead. var MockERC20ABI = MockERC20MetaData.ABI // Deprecated: Use MockERC20MetaData.Sigs instead. // MockERC20FuncSigs maps the 4-byte function signature to its string representation. var MockERC20FuncSigs = MockERC20MetaData.Sigs // MockERC20Bin is the compiled bytecode used for deploying new contracts. // Deprecated: Use MockERC20MetaData.Bin instead. var MockERC20Bin = MockERC20MetaData.Bin // DeployMockERC20 deploys a new Ethereum contract, binding an instance of MockERC20 to it. func DeployMockERC20(auth *bind.TransactOpts, backend bind.ContractBackend, name_ string, decimals_ uint8) (common.Address, *types.Transaction, *MockERC20, error) { parsed, err := MockERC20MetaData.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(MockERC20Bin), backend, name_, decimals_) if err != nil { return common.Address{}, nil, nil, err } return address, tx, &MockERC20{MockERC20Caller: MockERC20Caller{contract: contract}, MockERC20Transactor: MockERC20Transactor{contract: contract}, MockERC20Filterer: MockERC20Filterer{contract: contract}}, nil } // MockERC20 is an auto generated Go binding around an Ethereum contract. type MockERC20 struct { MockERC20Caller // Read-only binding to the contract MockERC20Transactor // Write-only binding to the contract MockERC20Filterer // Log filterer for contract events } // MockERC20Caller is an auto generated read-only Go binding around an Ethereum contract. type MockERC20Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MockERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. type MockERC20Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MockERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. type MockERC20Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MockERC20Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type MockERC20Session struct { Contract *MockERC20 // 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 } // MockERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type MockERC20CallerSession struct { Contract *MockERC20Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // MockERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type MockERC20TransactorSession struct { Contract *MockERC20Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // MockERC20Raw is an auto generated low-level Go binding around an Ethereum contract. type MockERC20Raw struct { Contract *MockERC20 // Generic contract binding to access the raw methods on } // MockERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type MockERC20CallerRaw struct { Contract *MockERC20Caller // Generic read-only contract binding to access the raw methods on } // MockERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type MockERC20TransactorRaw struct { Contract *MockERC20Transactor // Generic write-only contract binding to access the raw methods on } // NewMockERC20 creates a new instance of MockERC20, bound to a specific deployed contract. func NewMockERC20(address common.Address, backend bind.ContractBackend) (*MockERC20, error) { contract, err := bindMockERC20(address, backend, backend, backend) if err != nil { return nil, err } return &MockERC20{MockERC20Caller: MockERC20Caller{contract: contract}, MockERC20Transactor: MockERC20Transactor{contract: contract}, MockERC20Filterer: MockERC20Filterer{contract: contract}}, nil } // NewMockERC20Caller creates a new read-only instance of MockERC20, bound to a specific deployed contract. func NewMockERC20Caller(address common.Address, caller bind.ContractCaller) (*MockERC20Caller, error) { contract, err := bindMockERC20(address, caller, nil, nil) if err != nil { return nil, err } return &MockERC20Caller{contract: contract}, nil } // NewMockERC20Transactor creates a new write-only instance of MockERC20, bound to a specific deployed contract. func NewMockERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*MockERC20Transactor, error) { contract, err := bindMockERC20(address, nil, transactor, nil) if err != nil { return nil, err } return &MockERC20Transactor{contract: contract}, nil } // NewMockERC20Filterer creates a new log filterer instance of MockERC20, bound to a specific deployed contract. func NewMockERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*MockERC20Filterer, error) { contract, err := bindMockERC20(address, nil, nil, filterer) if err != nil { return nil, err } return &MockERC20Filterer{contract: contract}, nil } // bindMockERC20 binds a generic wrapper to an already deployed contract. func bindMockERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := MockERC20MetaData.GetAbi() 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 (_MockERC20 *MockERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _MockERC20.Contract.MockERC20Caller.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 (_MockERC20 *MockERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _MockERC20.Contract.MockERC20Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_MockERC20 *MockERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _MockERC20.Contract.MockERC20Transactor.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 (_MockERC20 *MockERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _MockERC20.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 (_MockERC20 *MockERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _MockERC20.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_MockERC20 *MockERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _MockERC20.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_MockERC20 *MockERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _MockERC20.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_MockERC20 *MockERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _MockERC20.Contract.Allowance(&_MockERC20.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_MockERC20 *MockERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _MockERC20.Contract.Allowance(&_MockERC20.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_MockERC20 *MockERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _MockERC20.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_MockERC20 *MockERC20Session) BalanceOf(account common.Address) (*big.Int, error) { return _MockERC20.Contract.BalanceOf(&_MockERC20.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_MockERC20 *MockERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _MockERC20.Contract.BalanceOf(&_MockERC20.CallOpts, account) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_MockERC20 *MockERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _MockERC20.contract.Call(opts, &out, "decimals") if err != nil { return *new(uint8), err } out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_MockERC20 *MockERC20Session) Decimals() (uint8, error) { return _MockERC20.Contract.Decimals(&_MockERC20.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_MockERC20 *MockERC20CallerSession) Decimals() (uint8, error) { return _MockERC20.Contract.Decimals(&_MockERC20.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_MockERC20 *MockERC20Caller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} err := _MockERC20.contract.Call(opts, &out, "name") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_MockERC20 *MockERC20Session) Name() (string, error) { return _MockERC20.Contract.Name(&_MockERC20.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_MockERC20 *MockERC20CallerSession) Name() (string, error) { return _MockERC20.Contract.Name(&_MockERC20.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_MockERC20 *MockERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} err := _MockERC20.contract.Call(opts, &out, "symbol") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_MockERC20 *MockERC20Session) Symbol() (string, error) { return _MockERC20.Contract.Symbol(&_MockERC20.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_MockERC20 *MockERC20CallerSession) Symbol() (string, error) { return _MockERC20.Contract.Symbol(&_MockERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_MockERC20 *MockERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _MockERC20.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_MockERC20 *MockERC20Session) TotalSupply() (*big.Int, error) { return _MockERC20.Contract.TotalSupply(&_MockERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_MockERC20 *MockERC20CallerSession) TotalSupply() (*big.Int, error) { return _MockERC20.Contract.TotalSupply(&_MockERC20.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_MockERC20 *MockERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.contract.Transact(opts, "approve", spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_MockERC20 *MockERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Approve(&_MockERC20.TransactOpts, spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_MockERC20 *MockERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Approve(&_MockERC20.TransactOpts, spender, value) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address account, uint256 amount) returns() func (_MockERC20 *MockERC20Transactor) Burn(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { return _MockERC20.contract.Transact(opts, "burn", account, amount) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address account, uint256 amount) returns() func (_MockERC20 *MockERC20Session) Burn(account common.Address, amount *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Burn(&_MockERC20.TransactOpts, account, amount) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address account, uint256 amount) returns() func (_MockERC20 *MockERC20TransactorSession) Burn(account common.Address, amount *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Burn(&_MockERC20.TransactOpts, account, amount) } // Mint is a paid mutator transaction binding the contract method 0x40c10f19. // // Solidity: function mint(address account, uint256 amount) returns() func (_MockERC20 *MockERC20Transactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { return _MockERC20.contract.Transact(opts, "mint", account, amount) } // Mint is a paid mutator transaction binding the contract method 0x40c10f19. // // Solidity: function mint(address account, uint256 amount) returns() func (_MockERC20 *MockERC20Session) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Mint(&_MockERC20.TransactOpts, account, amount) } // Mint is a paid mutator transaction binding the contract method 0x40c10f19. // // Solidity: function mint(address account, uint256 amount) returns() func (_MockERC20 *MockERC20TransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Mint(&_MockERC20.TransactOpts, account, amount) } // TestMockERC20 is a paid mutator transaction binding the contract method 0xad72af51. // // Solidity: function testMockERC20() returns() func (_MockERC20 *MockERC20Transactor) TestMockERC20(opts *bind.TransactOpts) (*types.Transaction, error) { return _MockERC20.contract.Transact(opts, "testMockERC20") } // TestMockERC20 is a paid mutator transaction binding the contract method 0xad72af51. // // Solidity: function testMockERC20() returns() func (_MockERC20 *MockERC20Session) TestMockERC20() (*types.Transaction, error) { return _MockERC20.Contract.TestMockERC20(&_MockERC20.TransactOpts) } // TestMockERC20 is a paid mutator transaction binding the contract method 0xad72af51. // // Solidity: function testMockERC20() returns() func (_MockERC20 *MockERC20TransactorSession) TestMockERC20() (*types.Transaction, error) { return _MockERC20.Contract.TestMockERC20(&_MockERC20.TransactOpts) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_MockERC20 *MockERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.contract.Transact(opts, "transfer", to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_MockERC20 *MockERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Transfer(&_MockERC20.TransactOpts, to, value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 value) returns(bool) func (_MockERC20 *MockERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.Transfer(&_MockERC20.TransactOpts, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_MockERC20 *MockERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.contract.Transact(opts, "transferFrom", from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_MockERC20 *MockERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.TransferFrom(&_MockERC20.TransactOpts, from, to, value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) func (_MockERC20 *MockERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { return _MockERC20.Contract.TransferFrom(&_MockERC20.TransactOpts, from, to, value) } // MockERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the MockERC20 contract. type MockERC20ApprovalIterator struct { Event *MockERC20Approval // 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 *MockERC20ApprovalIterator) 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(MockERC20Approval) 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(MockERC20Approval) 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 *MockERC20ApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MockERC20ApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // MockERC20Approval represents a Approval event raised by the MockERC20 contract. type MockERC20Approval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_MockERC20 *MockERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*MockERC20ApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _MockERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &MockERC20ApprovalIterator{contract: _MockERC20.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_MockERC20 *MockERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *MockERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _MockERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 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(MockERC20Approval) if err := _MockERC20.contract.UnpackLog(event, "Approval", 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 } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_MockERC20 *MockERC20Filterer) ParseApproval(log types.Log) (*MockERC20Approval, error) { event := new(MockERC20Approval) if err := _MockERC20.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // MockERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the MockERC20 contract. type MockERC20TransferIterator struct { Event *MockERC20Transfer // 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 *MockERC20TransferIterator) 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(MockERC20Transfer) 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(MockERC20Transfer) 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 *MockERC20TransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MockERC20TransferIterator) Close() error { it.sub.Unsubscribe() return nil } // MockERC20Transfer represents a Transfer event raised by the MockERC20 contract. type MockERC20Transfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_MockERC20 *MockERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MockERC20TransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _MockERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &MockERC20TransferIterator{contract: _MockERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_MockERC20 *MockERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *MockERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _MockERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 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(MockERC20Transfer) if err := _MockERC20.contract.UnpackLog(event, "Transfer", 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 } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_MockERC20 *MockERC20Filterer) ParseTransfer(log types.Log) (*MockERC20Transfer, error) { event := new(MockERC20Transfer) if err := _MockERC20.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil }