github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/operations/token.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  package operations
     4  
     5  import (
     6  	"math/big"
     7  	"strings"
     8  
     9  	ethereum "github.com/ethereum/go-ethereum"
    10  	"github.com/ethereum/go-ethereum/accounts/abi"
    11  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    12  	"github.com/ethereum/go-ethereum/common"
    13  	"github.com/ethereum/go-ethereum/core/types"
    14  	"github.com/ethereum/go-ethereum/event"
    15  )
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var (
    19  	_ = big.NewInt
    20  	_ = strings.NewReader
    21  	_ = ethereum.NotFound
    22  	_ = bind.Bind
    23  	_ = common.Big1
    24  	_ = types.BloomLookup
    25  	_ = event.NewSubscription
    26  )
    27  
    28  // TokenABI is the input ABI used to generate the binding from.
    29  const TokenABI = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"tokenOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenOwner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"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\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
    30  
    31  // TokenFuncSigs maps the 4-byte function signature to its string representation.
    32  var TokenFuncSigs = map[string]string{
    33  	"dd62ed3e": "allowance(address,address)",
    34  	"095ea7b3": "approve(address,uint256)",
    35  	"70a08231": "balanceOf(address)",
    36  	"313ce567": "decimals()",
    37  	"06fdde03": "name()",
    38  	"8da5cb5b": "owner()",
    39  	"95d89b41": "symbol()",
    40  	"18160ddd": "totalSupply()",
    41  	"a9059cbb": "transfer(address,uint256)",
    42  	"23b872dd": "transferFrom(address,address,uint256)",
    43  }
    44  
    45  // TokenBin is the compiled bytecode used for deploying new contracts.
    46  var TokenBin = "0x608060405234801561001057600080fd5b506040805180820190915260088082526723a3902a37b5b2b760c11b602090920191825261004091600091610099565b5060408051808201909152600280825261474760f01b602090920191825261006a91600191610099565b506002805460ff191660041790556509184e72a000600355600680546001600160a01b0319163317905561016d565b8280546100a590610132565b90600052602060002090601f0160209004810192826100c7576000855561010d565b82601f106100e057805160ff191683800117855561010d565b8280016001018555821561010d579182015b8281111561010d5782518255916020019190600101906100f2565b5061011992915061011d565b5090565b5b80821115610119576000815560010161011e565b600181811c9082168061014657607f821691505b6020821081141561016757634e487b7160e01b600052602260045260246000fd5b50919050565b6106ce8061017c6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a082311461011e5780638da5cb5b1461013157806395d89b411461015c578063a9059cbb14610164578063dd62ed3e146101775761009e565b806306fdde03146100a3578063095ea7b3146100c157806318160ddd146100e457806323b872dd146100f6578063313ce56714610109575b600080fd5b6100ab6101b0565b6040516100b891906105c5565b60405180910390f35b6100d46100cf36600461059c565b610242565b60405190151581526020016100b8565b6003545b6040519081526020016100b8565b6100d4610104366004610561565b6102bc565b60025460405160ff90911681526020016100b8565b6100e861012c366004610515565b6103ba565b600654610144906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100ab6103d9565b6100d461017236600461059c565b6103e8565b6100e861018536600461052f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6060600080546101bf90610647565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb90610647565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b60006001600160a01b03831661025757600080fd5b3360008181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a350600192915050565b6001600160a01b0383166000908152600460205260408120546102df9083610494565b6001600160a01b03851660009081526004602090815260408083209390935560058152828220338352905220546103169083610494565b6001600160a01b03808616600090815260056020908152604080832033845282528083209490945591861681526004909152205461035490836104c5565b6001600160a01b0380851660008181526004602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103a89086815260200190565b60405180910390a35060019392505050565b6001600160a01b0381166000908152600460205260409020545b919050565b6060600180546101bf90610647565b60006001600160a01b0383166103fd57600080fd5b336000908152600460205260409020546104179083610494565b33600090815260046020526040808220929092556001600160a01b0385168152205461044390836104c5565b6001600160a01b0384166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906102ab9086815260200190565b6000828211156104b457634e487b7160e01b600052600160045260246000fd5b6104be8284610630565b9392505050565b6000806104d28385610618565b90508381101580156104e45750828110155b6104be57634e487b7160e01b600052600160045260246000fd5b80356001600160a01b03811681146103d457600080fd5b600060208284031215610526578081fd5b6104be826104fe565b60008060408385031215610541578081fd5b61054a836104fe565b9150610558602084016104fe565b90509250929050565b600080600060608486031215610575578081fd5b61057e846104fe565b925061058c602085016104fe565b9150604084013590509250925092565b600080604083850312156105ae578182fd5b6105b7836104fe565b946020939093013593505050565b6000602080835283518082850152825b818110156105f1578581018301518582016040015282016105d5565b818111156106025783604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561062b5761062b610682565b500190565b60008282101561064257610642610682565b500390565b600181811c9082168061065b57607f821691505b6020821081141561067c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220ff69242f787e1347db384790ace3139e056e947b2ff1b360282e654fbdbc9f0464736f6c63430008030033"
    47  
    48  // DeployToken deploys a new Ethereum contract, binding an instance of Token to it.
    49  func DeployToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Token, error) {
    50  	parsed, err := abi.JSON(strings.NewReader(TokenABI))
    51  	if err != nil {
    52  		return common.Address{}, nil, nil, err
    53  	}
    54  
    55  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(TokenBin), backend)
    56  	if err != nil {
    57  		return common.Address{}, nil, nil, err
    58  	}
    59  	return address, tx, &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil
    60  }
    61  
    62  // Token is an auto generated Go binding around an Ethereum contract.
    63  type Token struct {
    64  	TokenCaller     // Read-only binding to the contract
    65  	TokenTransactor // Write-only binding to the contract
    66  	TokenFilterer   // Log filterer for contract events
    67  }
    68  
    69  // TokenCaller is an auto generated read-only Go binding around an Ethereum contract.
    70  type TokenCaller struct {
    71  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    72  }
    73  
    74  // TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.
    75  type TokenTransactor struct {
    76  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    77  }
    78  
    79  // TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    80  type TokenFilterer struct {
    81  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    82  }
    83  
    84  // TokenSession is an auto generated Go binding around an Ethereum contract,
    85  // with pre-set call and transact options.
    86  type TokenSession struct {
    87  	Contract     *Token          // Generic contract binding to set the session for
    88  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    89  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    90  }
    91  
    92  // TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    93  // with pre-set call options.
    94  type TokenCallerSession struct {
    95  	Contract *TokenCaller // Generic contract caller binding to set the session for
    96  	CallOpts bind.CallOpts  // Call options to use throughout this session
    97  }
    98  
    99  // TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   100  // with pre-set transact options.
   101  type TokenTransactorSession struct {
   102  	Contract     *TokenTransactor // Generic contract transactor binding to set the session for
   103  	TransactOpts bind.TransactOpts  // Transaction auth options to use throughout this session
   104  }
   105  
   106  // TokenRaw is an auto generated low-level Go binding around an Ethereum contract.
   107  type TokenRaw struct {
   108  	Contract *Token // Generic contract binding to access the raw methods on
   109  }
   110  
   111  // TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   112  type TokenCallerRaw struct {
   113  	Contract *TokenCaller // Generic read-only contract binding to access the raw methods on
   114  }
   115  
   116  // TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   117  type TokenTransactorRaw struct {
   118  	Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on
   119  }
   120  
   121  // NewToken creates a new instance of Token, bound to a specific deployed contract.
   122  func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error) {
   123  	contract, err := bindToken(address, backend, backend, backend)
   124  	if err != nil {
   125  		return nil, err
   126  	}
   127  	return &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil
   128  }
   129  
   130  // NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract.
   131  func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error) {
   132  	contract, err := bindToken(address, caller, nil, nil)
   133  	if err != nil {
   134  		return nil, err
   135  	}
   136  	return &TokenCaller{contract: contract}, nil
   137  }
   138  
   139  // NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract.
   140  func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error) {
   141  	contract, err := bindToken(address, nil, transactor, nil)
   142  	if err != nil {
   143  		return nil, err
   144  	}
   145  	return &TokenTransactor{contract: contract}, nil
   146  }
   147  
   148  // NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract.
   149  func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error) {
   150  	contract, err := bindToken(address, nil, nil, filterer)
   151  	if err != nil {
   152  		return nil, err
   153  	}
   154  	return &TokenFilterer{contract: contract}, nil
   155  }
   156  
   157  // bindToken binds a generic wrapper to an already deployed contract.
   158  func bindToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   159  	parsed, err := abi.JSON(strings.NewReader(TokenABI))
   160  	if err != nil {
   161  		return nil, err
   162  	}
   163  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   164  }
   165  
   166  // Call invokes the (constant) contract method with params as input values and
   167  // sets the output to result. The result type might be a single field for simple
   168  // returns, a slice of interfaces for anonymous returns and a struct for named
   169  // returns.
   170  func (_Token *TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   171  	return _Token.Contract.TokenCaller.contract.Call(opts, result, method, params...)
   172  }
   173  
   174  // Transfer initiates a plain transaction to move funds to the contract, calling
   175  // its default method if one is available.
   176  func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   177  	return _Token.Contract.TokenTransactor.contract.Transfer(opts)
   178  }
   179  
   180  // Transact invokes the (paid) contract method with params as input values.
   181  func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   182  	return _Token.Contract.TokenTransactor.contract.Transact(opts, method, params...)
   183  }
   184  
   185  // Call invokes the (constant) contract method with params as input values and
   186  // sets the output to result. The result type might be a single field for simple
   187  // returns, a slice of interfaces for anonymous returns and a struct for named
   188  // returns.
   189  func (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   190  	return _Token.Contract.contract.Call(opts, result, method, params...)
   191  }
   192  
   193  // Transfer initiates a plain transaction to move funds to the contract, calling
   194  // its default method if one is available.
   195  func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   196  	return _Token.Contract.contract.Transfer(opts)
   197  }
   198  
   199  // Transact invokes the (paid) contract method with params as input values.
   200  func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   201  	return _Token.Contract.contract.Transact(opts, method, params...)
   202  }
   203  
   204  // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
   205  //
   206  // Solidity: function allowance(address tokenOwner, address spender) view returns(uint256 remaining)
   207  func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, tokenOwner common.Address, spender common.Address) (*big.Int, error) {
   208  	var out []interface{}
   209  	err := _Token.contract.Call(opts, &out, "allowance", tokenOwner, spender)
   210  
   211  	if err != nil {
   212  		return *new(*big.Int), err
   213  	}
   214  
   215  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   216  
   217  	return out0, err
   218  
   219  }
   220  
   221  // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
   222  //
   223  // Solidity: function allowance(address tokenOwner, address spender) view returns(uint256 remaining)
   224  func (_Token *TokenSession) Allowance(tokenOwner common.Address, spender common.Address) (*big.Int, error) {
   225  	return _Token.Contract.Allowance(&_Token.CallOpts, tokenOwner, spender)
   226  }
   227  
   228  // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
   229  //
   230  // Solidity: function allowance(address tokenOwner, address spender) view returns(uint256 remaining)
   231  func (_Token *TokenCallerSession) Allowance(tokenOwner common.Address, spender common.Address) (*big.Int, error) {
   232  	return _Token.Contract.Allowance(&_Token.CallOpts, tokenOwner, spender)
   233  }
   234  
   235  // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
   236  //
   237  // Solidity: function balanceOf(address tokenOwner) view returns(uint256 balance)
   238  func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, tokenOwner common.Address) (*big.Int, error) {
   239  	var out []interface{}
   240  	err := _Token.contract.Call(opts, &out, "balanceOf", tokenOwner)
   241  
   242  	if err != nil {
   243  		return *new(*big.Int), err
   244  	}
   245  
   246  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   247  
   248  	return out0, err
   249  
   250  }
   251  
   252  // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
   253  //
   254  // Solidity: function balanceOf(address tokenOwner) view returns(uint256 balance)
   255  func (_Token *TokenSession) BalanceOf(tokenOwner common.Address) (*big.Int, error) {
   256  	return _Token.Contract.BalanceOf(&_Token.CallOpts, tokenOwner)
   257  }
   258  
   259  // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
   260  //
   261  // Solidity: function balanceOf(address tokenOwner) view returns(uint256 balance)
   262  func (_Token *TokenCallerSession) BalanceOf(tokenOwner common.Address) (*big.Int, error) {
   263  	return _Token.Contract.BalanceOf(&_Token.CallOpts, tokenOwner)
   264  }
   265  
   266  // Decimals is a free data retrieval call binding the contract method 0x313ce567.
   267  //
   268  // Solidity: function decimals() view returns(uint8)
   269  func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
   270  	var out []interface{}
   271  	err := _Token.contract.Call(opts, &out, "decimals")
   272  
   273  	if err != nil {
   274  		return *new(uint8), err
   275  	}
   276  
   277  	out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
   278  
   279  	return out0, err
   280  
   281  }
   282  
   283  // Decimals is a free data retrieval call binding the contract method 0x313ce567.
   284  //
   285  // Solidity: function decimals() view returns(uint8)
   286  func (_Token *TokenSession) Decimals() (uint8, error) {
   287  	return _Token.Contract.Decimals(&_Token.CallOpts)
   288  }
   289  
   290  // Decimals is a free data retrieval call binding the contract method 0x313ce567.
   291  //
   292  // Solidity: function decimals() view returns(uint8)
   293  func (_Token *TokenCallerSession) Decimals() (uint8, error) {
   294  	return _Token.Contract.Decimals(&_Token.CallOpts)
   295  }
   296  
   297  // Name is a free data retrieval call binding the contract method 0x06fdde03.
   298  //
   299  // Solidity: function name() view returns(string)
   300  func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error) {
   301  	var out []interface{}
   302  	err := _Token.contract.Call(opts, &out, "name")
   303  
   304  	if err != nil {
   305  		return *new(string), err
   306  	}
   307  
   308  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
   309  
   310  	return out0, err
   311  
   312  }
   313  
   314  // Name is a free data retrieval call binding the contract method 0x06fdde03.
   315  //
   316  // Solidity: function name() view returns(string)
   317  func (_Token *TokenSession) Name() (string, error) {
   318  	return _Token.Contract.Name(&_Token.CallOpts)
   319  }
   320  
   321  // Name is a free data retrieval call binding the contract method 0x06fdde03.
   322  //
   323  // Solidity: function name() view returns(string)
   324  func (_Token *TokenCallerSession) Name() (string, error) {
   325  	return _Token.Contract.Name(&_Token.CallOpts)
   326  }
   327  
   328  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   329  //
   330  // Solidity: function owner() view returns(address)
   331  func (_Token *TokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
   332  	var out []interface{}
   333  	err := _Token.contract.Call(opts, &out, "owner")
   334  
   335  	if err != nil {
   336  		return *new(common.Address), err
   337  	}
   338  
   339  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   340  
   341  	return out0, err
   342  
   343  }
   344  
   345  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   346  //
   347  // Solidity: function owner() view returns(address)
   348  func (_Token *TokenSession) Owner() (common.Address, error) {
   349  	return _Token.Contract.Owner(&_Token.CallOpts)
   350  }
   351  
   352  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   353  //
   354  // Solidity: function owner() view returns(address)
   355  func (_Token *TokenCallerSession) Owner() (common.Address, error) {
   356  	return _Token.Contract.Owner(&_Token.CallOpts)
   357  }
   358  
   359  // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
   360  //
   361  // Solidity: function symbol() view returns(string)
   362  func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error) {
   363  	var out []interface{}
   364  	err := _Token.contract.Call(opts, &out, "symbol")
   365  
   366  	if err != nil {
   367  		return *new(string), err
   368  	}
   369  
   370  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
   371  
   372  	return out0, err
   373  
   374  }
   375  
   376  // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
   377  //
   378  // Solidity: function symbol() view returns(string)
   379  func (_Token *TokenSession) Symbol() (string, error) {
   380  	return _Token.Contract.Symbol(&_Token.CallOpts)
   381  }
   382  
   383  // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
   384  //
   385  // Solidity: function symbol() view returns(string)
   386  func (_Token *TokenCallerSession) Symbol() (string, error) {
   387  	return _Token.Contract.Symbol(&_Token.CallOpts)
   388  }
   389  
   390  // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
   391  //
   392  // Solidity: function totalSupply() view returns(uint256)
   393  func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
   394  	var out []interface{}
   395  	err := _Token.contract.Call(opts, &out, "totalSupply")
   396  
   397  	if err != nil {
   398  		return *new(*big.Int), err
   399  	}
   400  
   401  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   402  
   403  	return out0, err
   404  
   405  }
   406  
   407  // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
   408  //
   409  // Solidity: function totalSupply() view returns(uint256)
   410  func (_Token *TokenSession) TotalSupply() (*big.Int, error) {
   411  	return _Token.Contract.TotalSupply(&_Token.CallOpts)
   412  }
   413  
   414  // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
   415  //
   416  // Solidity: function totalSupply() view returns(uint256)
   417  func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error) {
   418  	return _Token.Contract.TotalSupply(&_Token.CallOpts)
   419  }
   420  
   421  // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
   422  //
   423  // Solidity: function approve(address spender, uint256 tokens) returns(bool success)
   424  func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, tokens *big.Int) (*types.Transaction, error) {
   425  	return _Token.contract.Transact(opts, "approve", spender, tokens)
   426  }
   427  
   428  // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
   429  //
   430  // Solidity: function approve(address spender, uint256 tokens) returns(bool success)
   431  func (_Token *TokenSession) Approve(spender common.Address, tokens *big.Int) (*types.Transaction, error) {
   432  	return _Token.Contract.Approve(&_Token.TransactOpts, spender, tokens)
   433  }
   434  
   435  // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
   436  //
   437  // Solidity: function approve(address spender, uint256 tokens) returns(bool success)
   438  func (_Token *TokenTransactorSession) Approve(spender common.Address, tokens *big.Int) (*types.Transaction, error) {
   439  	return _Token.Contract.Approve(&_Token.TransactOpts, spender, tokens)
   440  }
   441  
   442  // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
   443  //
   444  // Solidity: function transfer(address to, uint256 tokens) returns(bool success)
   445  func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, tokens *big.Int) (*types.Transaction, error) {
   446  	return _Token.contract.Transact(opts, "transfer", to, tokens)
   447  }
   448  
   449  // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
   450  //
   451  // Solidity: function transfer(address to, uint256 tokens) returns(bool success)
   452  func (_Token *TokenSession) Transfer(to common.Address, tokens *big.Int) (*types.Transaction, error) {
   453  	return _Token.Contract.Transfer(&_Token.TransactOpts, to, tokens)
   454  }
   455  
   456  // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
   457  //
   458  // Solidity: function transfer(address to, uint256 tokens) returns(bool success)
   459  func (_Token *TokenTransactorSession) Transfer(to common.Address, tokens *big.Int) (*types.Transaction, error) {
   460  	return _Token.Contract.Transfer(&_Token.TransactOpts, to, tokens)
   461  }
   462  
   463  // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
   464  //
   465  // Solidity: function transferFrom(address from, address to, uint256 tokens) returns(bool success)
   466  func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokens *big.Int) (*types.Transaction, error) {
   467  	return _Token.contract.Transact(opts, "transferFrom", from, to, tokens)
   468  }
   469  
   470  // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
   471  //
   472  // Solidity: function transferFrom(address from, address to, uint256 tokens) returns(bool success)
   473  func (_Token *TokenSession) TransferFrom(from common.Address, to common.Address, tokens *big.Int) (*types.Transaction, error) {
   474  	return _Token.Contract.TransferFrom(&_Token.TransactOpts, from, to, tokens)
   475  }
   476  
   477  // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
   478  //
   479  // Solidity: function transferFrom(address from, address to, uint256 tokens) returns(bool success)
   480  func (_Token *TokenTransactorSession) TransferFrom(from common.Address, to common.Address, tokens *big.Int) (*types.Transaction, error) {
   481  	return _Token.Contract.TransferFrom(&_Token.TransactOpts, from, to, tokens)
   482  }
   483  
   484  // TokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Token contract.
   485  type TokenApprovalIterator struct {
   486  	Event *TokenApproval // Event containing the contract specifics and raw log
   487  
   488  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   489  	event    string              // Event name to use for unpacking event data
   490  
   491  	logs chan types.Log        // Log channel receiving the found contract events
   492  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   493  	done bool                  // Whether the subscription completed delivering logs
   494  	fail error                 // Occurred error to stop iteration
   495  }
   496  
   497  // Next advances the iterator to the subsequent event, returning whether there
   498  // are any more events found. In case of a retrieval or parsing error, false is
   499  // returned and Error() can be queried for the exact failure.
   500  func (it *TokenApprovalIterator) Next() bool {
   501  	// If the iterator failed, stop iterating
   502  	if it.fail != nil {
   503  		return false
   504  	}
   505  	// If the iterator completed, deliver directly whatever's available
   506  	if it.done {
   507  		select {
   508  		case log := <-it.logs:
   509  			it.Event = new(TokenApproval)
   510  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   511  				it.fail = err
   512  				return false
   513  			}
   514  			it.Event.Raw = log
   515  			return true
   516  
   517  		default:
   518  			return false
   519  		}
   520  	}
   521  	// Iterator still in progress, wait for either a data or an error event
   522  	select {
   523  	case log := <-it.logs:
   524  		it.Event = new(TokenApproval)
   525  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   526  			it.fail = err
   527  			return false
   528  		}
   529  		it.Event.Raw = log
   530  		return true
   531  
   532  	case err := <-it.sub.Err():
   533  		it.done = true
   534  		it.fail = err
   535  		return it.Next()
   536  	}
   537  }
   538  
   539  // Error returns any retrieval or parsing error occurred during filtering.
   540  func (it *TokenApprovalIterator) Error() error {
   541  	return it.fail
   542  }
   543  
   544  // Close terminates the iteration process, releasing any pending underlying
   545  // resources.
   546  func (it *TokenApprovalIterator) Close() error {
   547  	it.sub.Unsubscribe()
   548  	return nil
   549  }
   550  
   551  // TokenApproval represents a Approval event raised by the Token contract.
   552  type TokenApproval struct {
   553  	Owner   common.Address
   554  	Spender common.Address
   555  	Value   *big.Int
   556  	Raw     types.Log // Blockchain specific contextual infos
   557  }
   558  
   559  // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
   560  //
   561  // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
   562  func (_Token *TokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TokenApprovalIterator, error) {
   563  
   564  	var ownerRule []interface{}
   565  	for _, ownerItem := range owner {
   566  		ownerRule = append(ownerRule, ownerItem)
   567  	}
   568  	var spenderRule []interface{}
   569  	for _, spenderItem := range spender {
   570  		spenderRule = append(spenderRule, spenderItem)
   571  	}
   572  
   573  	logs, sub, err := _Token.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
   574  	if err != nil {
   575  		return nil, err
   576  	}
   577  	return &TokenApprovalIterator{contract: _Token.contract, event: "Approval", logs: logs, sub: sub}, nil
   578  }
   579  
   580  // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
   581  //
   582  // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
   583  func (_Token *TokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
   584  
   585  	var ownerRule []interface{}
   586  	for _, ownerItem := range owner {
   587  		ownerRule = append(ownerRule, ownerItem)
   588  	}
   589  	var spenderRule []interface{}
   590  	for _, spenderItem := range spender {
   591  		spenderRule = append(spenderRule, spenderItem)
   592  	}
   593  
   594  	logs, sub, err := _Token.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
   595  	if err != nil {
   596  		return nil, err
   597  	}
   598  	return event.NewSubscription(func(quit <-chan struct{}) error {
   599  		defer sub.Unsubscribe()
   600  		for {
   601  			select {
   602  			case log := <-logs:
   603  				// New log arrived, parse the event and forward to the user
   604  				event := new(TokenApproval)
   605  				if err := _Token.contract.UnpackLog(event, "Approval", log); err != nil {
   606  					return err
   607  				}
   608  				event.Raw = log
   609  
   610  				select {
   611  				case sink <- event:
   612  				case err := <-sub.Err():
   613  					return err
   614  				case <-quit:
   615  					return nil
   616  				}
   617  			case err := <-sub.Err():
   618  				return err
   619  			case <-quit:
   620  				return nil
   621  			}
   622  		}
   623  	}), nil
   624  }
   625  
   626  // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
   627  //
   628  // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
   629  func (_Token *TokenFilterer) ParseApproval(log types.Log) (*TokenApproval, error) {
   630  	event := new(TokenApproval)
   631  	if err := _Token.contract.UnpackLog(event, "Approval", log); err != nil {
   632  		return nil, err
   633  	}
   634  	event.Raw = log
   635  	return event, nil
   636  }
   637  
   638  // TokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Token contract.
   639  type TokenTransferIterator struct {
   640  	Event *TokenTransfer // Event containing the contract specifics and raw log
   641  
   642  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   643  	event    string              // Event name to use for unpacking event data
   644  
   645  	logs chan types.Log        // Log channel receiving the found contract events
   646  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   647  	done bool                  // Whether the subscription completed delivering logs
   648  	fail error                 // Occurred error to stop iteration
   649  }
   650  
   651  // Next advances the iterator to the subsequent event, returning whether there
   652  // are any more events found. In case of a retrieval or parsing error, false is
   653  // returned and Error() can be queried for the exact failure.
   654  func (it *TokenTransferIterator) Next() bool {
   655  	// If the iterator failed, stop iterating
   656  	if it.fail != nil {
   657  		return false
   658  	}
   659  	// If the iterator completed, deliver directly whatever's available
   660  	if it.done {
   661  		select {
   662  		case log := <-it.logs:
   663  			it.Event = new(TokenTransfer)
   664  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   665  				it.fail = err
   666  				return false
   667  			}
   668  			it.Event.Raw = log
   669  			return true
   670  
   671  		default:
   672  			return false
   673  		}
   674  	}
   675  	// Iterator still in progress, wait for either a data or an error event
   676  	select {
   677  	case log := <-it.logs:
   678  		it.Event = new(TokenTransfer)
   679  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   680  			it.fail = err
   681  			return false
   682  		}
   683  		it.Event.Raw = log
   684  		return true
   685  
   686  	case err := <-it.sub.Err():
   687  		it.done = true
   688  		it.fail = err
   689  		return it.Next()
   690  	}
   691  }
   692  
   693  // Error returns any retrieval or parsing error occurred during filtering.
   694  func (it *TokenTransferIterator) Error() error {
   695  	return it.fail
   696  }
   697  
   698  // Close terminates the iteration process, releasing any pending underlying
   699  // resources.
   700  func (it *TokenTransferIterator) Close() error {
   701  	it.sub.Unsubscribe()
   702  	return nil
   703  }
   704  
   705  // TokenTransfer represents a Transfer event raised by the Token contract.
   706  type TokenTransfer struct {
   707  	From  common.Address
   708  	To    common.Address
   709  	Value *big.Int
   710  	Raw   types.Log // Blockchain specific contextual infos
   711  }
   712  
   713  // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
   714  //
   715  // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
   716  func (_Token *TokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TokenTransferIterator, error) {
   717  
   718  	var fromRule []interface{}
   719  	for _, fromItem := range from {
   720  		fromRule = append(fromRule, fromItem)
   721  	}
   722  	var toRule []interface{}
   723  	for _, toItem := range to {
   724  		toRule = append(toRule, toItem)
   725  	}
   726  
   727  	logs, sub, err := _Token.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
   728  	if err != nil {
   729  		return nil, err
   730  	}
   731  	return &TokenTransferIterator{contract: _Token.contract, event: "Transfer", logs: logs, sub: sub}, nil
   732  }
   733  
   734  // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
   735  //
   736  // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
   737  func (_Token *TokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) {
   738  
   739  	var fromRule []interface{}
   740  	for _, fromItem := range from {
   741  		fromRule = append(fromRule, fromItem)
   742  	}
   743  	var toRule []interface{}
   744  	for _, toItem := range to {
   745  		toRule = append(toRule, toItem)
   746  	}
   747  
   748  	logs, sub, err := _Token.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
   749  	if err != nil {
   750  		return nil, err
   751  	}
   752  	return event.NewSubscription(func(quit <-chan struct{}) error {
   753  		defer sub.Unsubscribe()
   754  		for {
   755  			select {
   756  			case log := <-logs:
   757  				// New log arrived, parse the event and forward to the user
   758  				event := new(TokenTransfer)
   759  				if err := _Token.contract.UnpackLog(event, "Transfer", log); err != nil {
   760  					return err
   761  				}
   762  				event.Raw = log
   763  
   764  				select {
   765  				case sink <- event:
   766  				case err := <-sub.Err():
   767  					return err
   768  				case <-quit:
   769  					return nil
   770  				}
   771  			case err := <-sub.Err():
   772  				return err
   773  			case <-quit:
   774  				return nil
   775  			}
   776  		}
   777  	}), nil
   778  }
   779  
   780  // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
   781  //
   782  // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
   783  func (_Token *TokenFilterer) ParseTransfer(log types.Log) (*TokenTransfer, error) {
   784  	event := new(TokenTransfer)
   785  	if err := _Token.contract.UnpackLog(event, "Transfer", log); err != nil {
   786  		return nil, err
   787  	}
   788  	event.Raw = log
   789  	return event, nil
   790  }
   791  
   792  // IERC20ABI is the input ABI used to generate the binding from.
   793  const IERC20ABI = "[{\"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\":\"amount\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
   794  
   795  // IERC20FuncSigs maps the 4-byte function signature to its string representation.
   796  var IERC20FuncSigs = map[string]string{
   797  	"dd62ed3e": "allowance(address,address)",
   798  	"095ea7b3": "approve(address,uint256)",
   799  	"70a08231": "balanceOf(address)",
   800  	"18160ddd": "totalSupply()",
   801  	"a9059cbb": "transfer(address,uint256)",
   802  	"23b872dd": "transferFrom(address,address,uint256)",
   803  }
   804  
   805  // IERC20 is an auto generated Go binding around an Ethereum contract.
   806  type IERC20 struct {
   807  	IERC20Caller     // Read-only binding to the contract
   808  	IERC20Transactor // Write-only binding to the contract
   809  	IERC20Filterer   // Log filterer for contract events
   810  }
   811  
   812  // IERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
   813  type IERC20Caller struct {
   814  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   815  }
   816  
   817  // IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
   818  type IERC20Transactor struct {
   819  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   820  }
   821  
   822  // IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
   823  type IERC20Filterer struct {
   824  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   825  }
   826  
   827  // IERC20Session is an auto generated Go binding around an Ethereum contract,
   828  // with pre-set call and transact options.
   829  type IERC20Session struct {
   830  	Contract     *IERC20           // Generic contract binding to set the session for
   831  	CallOpts     bind.CallOpts     // Call options to use throughout this session
   832  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   833  }
   834  
   835  // IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract,
   836  // with pre-set call options.
   837  type IERC20CallerSession struct {
   838  	Contract *IERC20Caller // Generic contract caller binding to set the session for
   839  	CallOpts bind.CallOpts // Call options to use throughout this session
   840  }
   841  
   842  // IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   843  // with pre-set transact options.
   844  type IERC20TransactorSession struct {
   845  	Contract     *IERC20Transactor // Generic contract transactor binding to set the session for
   846  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   847  }
   848  
   849  // IERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
   850  type IERC20Raw struct {
   851  	Contract *IERC20 // Generic contract binding to access the raw methods on
   852  }
   853  
   854  // IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   855  type IERC20CallerRaw struct {
   856  	Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on
   857  }
   858  
   859  // IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   860  type IERC20TransactorRaw struct {
   861  	Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on
   862  }
   863  
   864  // NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract.
   865  func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) {
   866  	contract, err := bindIERC20(address, backend, backend, backend)
   867  	if err != nil {
   868  		return nil, err
   869  	}
   870  	return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil
   871  }
   872  
   873  // NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract.
   874  func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) {
   875  	contract, err := bindIERC20(address, caller, nil, nil)
   876  	if err != nil {
   877  		return nil, err
   878  	}
   879  	return &IERC20Caller{contract: contract}, nil
   880  }
   881  
   882  // NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract.
   883  func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) {
   884  	contract, err := bindIERC20(address, nil, transactor, nil)
   885  	if err != nil {
   886  		return nil, err
   887  	}
   888  	return &IERC20Transactor{contract: contract}, nil
   889  }
   890  
   891  // NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract.
   892  func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) {
   893  	contract, err := bindIERC20(address, nil, nil, filterer)
   894  	if err != nil {
   895  		return nil, err
   896  	}
   897  	return &IERC20Filterer{contract: contract}, nil
   898  }
   899  
   900  // bindIERC20 binds a generic wrapper to an already deployed contract.
   901  func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   902  	parsed, err := abi.JSON(strings.NewReader(IERC20ABI))
   903  	if err != nil {
   904  		return nil, err
   905  	}
   906  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   907  }
   908  
   909  // Call invokes the (constant) contract method with params as input values and
   910  // sets the output to result. The result type might be a single field for simple
   911  // returns, a slice of interfaces for anonymous returns and a struct for named
   912  // returns.
   913  func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   914  	return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...)
   915  }
   916  
   917  // Transfer initiates a plain transaction to move funds to the contract, calling
   918  // its default method if one is available.
   919  func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   920  	return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts)
   921  }
   922  
   923  // Transact invokes the (paid) contract method with params as input values.
   924  func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   925  	return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...)
   926  }
   927  
   928  // Call invokes the (constant) contract method with params as input values and
   929  // sets the output to result. The result type might be a single field for simple
   930  // returns, a slice of interfaces for anonymous returns and a struct for named
   931  // returns.
   932  func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   933  	return _IERC20.Contract.contract.Call(opts, result, method, params...)
   934  }
   935  
   936  // Transfer initiates a plain transaction to move funds to the contract, calling
   937  // its default method if one is available.
   938  func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   939  	return _IERC20.Contract.contract.Transfer(opts)
   940  }
   941  
   942  // Transact invokes the (paid) contract method with params as input values.
   943  func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   944  	return _IERC20.Contract.contract.Transact(opts, method, params...)
   945  }
   946  
   947  // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
   948  //
   949  // Solidity: function allowance(address owner, address spender) view returns(uint256)
   950  func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
   951  	var out []interface{}
   952  	err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender)
   953  
   954  	if err != nil {
   955  		return *new(*big.Int), err
   956  	}
   957  
   958  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   959  
   960  	return out0, err
   961  
   962  }
   963  
   964  // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
   965  //
   966  // Solidity: function allowance(address owner, address spender) view returns(uint256)
   967  func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
   968  	return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender)
   969  }
   970  
   971  // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
   972  //
   973  // Solidity: function allowance(address owner, address spender) view returns(uint256)
   974  func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
   975  	return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender)
   976  }
   977  
   978  // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
   979  //
   980  // Solidity: function balanceOf(address account) view returns(uint256)
   981  func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) {
   982  	var out []interface{}
   983  	err := _IERC20.contract.Call(opts, &out, "balanceOf", account)
   984  
   985  	if err != nil {
   986  		return *new(*big.Int), err
   987  	}
   988  
   989  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   990  
   991  	return out0, err
   992  
   993  }
   994  
   995  // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
   996  //
   997  // Solidity: function balanceOf(address account) view returns(uint256)
   998  func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) {
   999  	return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account)
  1000  }
  1001  
  1002  // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  1003  //
  1004  // Solidity: function balanceOf(address account) view returns(uint256)
  1005  func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) {
  1006  	return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account)
  1007  }
  1008  
  1009  // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  1010  //
  1011  // Solidity: function totalSupply() view returns(uint256)
  1012  func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
  1013  	var out []interface{}
  1014  	err := _IERC20.contract.Call(opts, &out, "totalSupply")
  1015  
  1016  	if err != nil {
  1017  		return *new(*big.Int), err
  1018  	}
  1019  
  1020  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1021  
  1022  	return out0, err
  1023  
  1024  }
  1025  
  1026  // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  1027  //
  1028  // Solidity: function totalSupply() view returns(uint256)
  1029  func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) {
  1030  	return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts)
  1031  }
  1032  
  1033  // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  1034  //
  1035  // Solidity: function totalSupply() view returns(uint256)
  1036  func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) {
  1037  	return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts)
  1038  }
  1039  
  1040  // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  1041  //
  1042  // Solidity: function approve(address spender, uint256 amount) returns(bool)
  1043  func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) {
  1044  	return _IERC20.contract.Transact(opts, "approve", spender, amount)
  1045  }
  1046  
  1047  // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  1048  //
  1049  // Solidity: function approve(address spender, uint256 amount) returns(bool)
  1050  func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
  1051  	return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount)
  1052  }
  1053  
  1054  // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  1055  //
  1056  // Solidity: function approve(address spender, uint256 amount) returns(bool)
  1057  func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
  1058  	return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount)
  1059  }
  1060  
  1061  // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  1062  //
  1063  // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  1064  func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  1065  	return _IERC20.contract.Transact(opts, "transfer", recipient, amount)
  1066  }
  1067  
  1068  // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  1069  //
  1070  // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  1071  func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  1072  	return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount)
  1073  }
  1074  
  1075  // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  1076  //
  1077  // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  1078  func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  1079  	return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount)
  1080  }
  1081  
  1082  // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  1083  //
  1084  // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  1085  func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  1086  	return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount)
  1087  }
  1088  
  1089  // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  1090  //
  1091  // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  1092  func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  1093  	return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount)
  1094  }
  1095  
  1096  // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  1097  //
  1098  // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  1099  func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  1100  	return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount)
  1101  }
  1102  
  1103  // 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.
  1104  type IERC20ApprovalIterator struct {
  1105  	Event *IERC20Approval // Event containing the contract specifics and raw log
  1106  
  1107  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1108  	event    string              // Event name to use for unpacking event data
  1109  
  1110  	logs chan types.Log        // Log channel receiving the found contract events
  1111  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1112  	done bool                  // Whether the subscription completed delivering logs
  1113  	fail error                 // Occurred error to stop iteration
  1114  }
  1115  
  1116  // Next advances the iterator to the subsequent event, returning whether there
  1117  // are any more events found. In case of a retrieval or parsing error, false is
  1118  // returned and Error() can be queried for the exact failure.
  1119  func (it *IERC20ApprovalIterator) Next() bool {
  1120  	// If the iterator failed, stop iterating
  1121  	if it.fail != nil {
  1122  		return false
  1123  	}
  1124  	// If the iterator completed, deliver directly whatever's available
  1125  	if it.done {
  1126  		select {
  1127  		case log := <-it.logs:
  1128  			it.Event = new(IERC20Approval)
  1129  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1130  				it.fail = err
  1131  				return false
  1132  			}
  1133  			it.Event.Raw = log
  1134  			return true
  1135  
  1136  		default:
  1137  			return false
  1138  		}
  1139  	}
  1140  	// Iterator still in progress, wait for either a data or an error event
  1141  	select {
  1142  	case log := <-it.logs:
  1143  		it.Event = new(IERC20Approval)
  1144  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1145  			it.fail = err
  1146  			return false
  1147  		}
  1148  		it.Event.Raw = log
  1149  		return true
  1150  
  1151  	case err := <-it.sub.Err():
  1152  		it.done = true
  1153  		it.fail = err
  1154  		return it.Next()
  1155  	}
  1156  }
  1157  
  1158  // Error returns any retrieval or parsing error occurred during filtering.
  1159  func (it *IERC20ApprovalIterator) Error() error {
  1160  	return it.fail
  1161  }
  1162  
  1163  // Close terminates the iteration process, releasing any pending underlying
  1164  // resources.
  1165  func (it *IERC20ApprovalIterator) Close() error {
  1166  	it.sub.Unsubscribe()
  1167  	return nil
  1168  }
  1169  
  1170  // IERC20Approval represents a Approval event raised by the IERC20 contract.
  1171  type IERC20Approval struct {
  1172  	Owner   common.Address
  1173  	Spender common.Address
  1174  	Value   *big.Int
  1175  	Raw     types.Log // Blockchain specific contextual infos
  1176  }
  1177  
  1178  // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1179  //
  1180  // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1181  func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) {
  1182  
  1183  	var ownerRule []interface{}
  1184  	for _, ownerItem := range owner {
  1185  		ownerRule = append(ownerRule, ownerItem)
  1186  	}
  1187  	var spenderRule []interface{}
  1188  	for _, spenderItem := range spender {
  1189  		spenderRule = append(spenderRule, spenderItem)
  1190  	}
  1191  
  1192  	logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
  1193  	if err != nil {
  1194  		return nil, err
  1195  	}
  1196  	return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil
  1197  }
  1198  
  1199  // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1200  //
  1201  // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1202  func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
  1203  
  1204  	var ownerRule []interface{}
  1205  	for _, ownerItem := range owner {
  1206  		ownerRule = append(ownerRule, ownerItem)
  1207  	}
  1208  	var spenderRule []interface{}
  1209  	for _, spenderItem := range spender {
  1210  		spenderRule = append(spenderRule, spenderItem)
  1211  	}
  1212  
  1213  	logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
  1214  	if err != nil {
  1215  		return nil, err
  1216  	}
  1217  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1218  		defer sub.Unsubscribe()
  1219  		for {
  1220  			select {
  1221  			case log := <-logs:
  1222  				// New log arrived, parse the event and forward to the user
  1223  				event := new(IERC20Approval)
  1224  				if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil {
  1225  					return err
  1226  				}
  1227  				event.Raw = log
  1228  
  1229  				select {
  1230  				case sink <- event:
  1231  				case err := <-sub.Err():
  1232  					return err
  1233  				case <-quit:
  1234  					return nil
  1235  				}
  1236  			case err := <-sub.Err():
  1237  				return err
  1238  			case <-quit:
  1239  				return nil
  1240  			}
  1241  		}
  1242  	}), nil
  1243  }
  1244  
  1245  // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1246  //
  1247  // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1248  func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) {
  1249  	event := new(IERC20Approval)
  1250  	if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil {
  1251  		return nil, err
  1252  	}
  1253  	event.Raw = log
  1254  	return event, nil
  1255  }
  1256  
  1257  // 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.
  1258  type IERC20TransferIterator struct {
  1259  	Event *IERC20Transfer // Event containing the contract specifics and raw log
  1260  
  1261  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1262  	event    string              // Event name to use for unpacking event data
  1263  
  1264  	logs chan types.Log        // Log channel receiving the found contract events
  1265  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1266  	done bool                  // Whether the subscription completed delivering logs
  1267  	fail error                 // Occurred error to stop iteration
  1268  }
  1269  
  1270  // Next advances the iterator to the subsequent event, returning whether there
  1271  // are any more events found. In case of a retrieval or parsing error, false is
  1272  // returned and Error() can be queried for the exact failure.
  1273  func (it *IERC20TransferIterator) Next() bool {
  1274  	// If the iterator failed, stop iterating
  1275  	if it.fail != nil {
  1276  		return false
  1277  	}
  1278  	// If the iterator completed, deliver directly whatever's available
  1279  	if it.done {
  1280  		select {
  1281  		case log := <-it.logs:
  1282  			it.Event = new(IERC20Transfer)
  1283  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1284  				it.fail = err
  1285  				return false
  1286  			}
  1287  			it.Event.Raw = log
  1288  			return true
  1289  
  1290  		default:
  1291  			return false
  1292  		}
  1293  	}
  1294  	// Iterator still in progress, wait for either a data or an error event
  1295  	select {
  1296  	case log := <-it.logs:
  1297  		it.Event = new(IERC20Transfer)
  1298  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1299  			it.fail = err
  1300  			return false
  1301  		}
  1302  		it.Event.Raw = log
  1303  		return true
  1304  
  1305  	case err := <-it.sub.Err():
  1306  		it.done = true
  1307  		it.fail = err
  1308  		return it.Next()
  1309  	}
  1310  }
  1311  
  1312  // Error returns any retrieval or parsing error occurred during filtering.
  1313  func (it *IERC20TransferIterator) Error() error {
  1314  	return it.fail
  1315  }
  1316  
  1317  // Close terminates the iteration process, releasing any pending underlying
  1318  // resources.
  1319  func (it *IERC20TransferIterator) Close() error {
  1320  	it.sub.Unsubscribe()
  1321  	return nil
  1322  }
  1323  
  1324  // IERC20Transfer represents a Transfer event raised by the IERC20 contract.
  1325  type IERC20Transfer struct {
  1326  	From  common.Address
  1327  	To    common.Address
  1328  	Value *big.Int
  1329  	Raw   types.Log // Blockchain specific contextual infos
  1330  }
  1331  
  1332  // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1333  //
  1334  // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1335  func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) {
  1336  
  1337  	var fromRule []interface{}
  1338  	for _, fromItem := range from {
  1339  		fromRule = append(fromRule, fromItem)
  1340  	}
  1341  	var toRule []interface{}
  1342  	for _, toItem := range to {
  1343  		toRule = append(toRule, toItem)
  1344  	}
  1345  
  1346  	logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  1347  	if err != nil {
  1348  		return nil, err
  1349  	}
  1350  	return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil
  1351  }
  1352  
  1353  // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1354  //
  1355  // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1356  func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  1357  
  1358  	var fromRule []interface{}
  1359  	for _, fromItem := range from {
  1360  		fromRule = append(fromRule, fromItem)
  1361  	}
  1362  	var toRule []interface{}
  1363  	for _, toItem := range to {
  1364  		toRule = append(toRule, toItem)
  1365  	}
  1366  
  1367  	logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  1368  	if err != nil {
  1369  		return nil, err
  1370  	}
  1371  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1372  		defer sub.Unsubscribe()
  1373  		for {
  1374  			select {
  1375  			case log := <-logs:
  1376  				// New log arrived, parse the event and forward to the user
  1377  				event := new(IERC20Transfer)
  1378  				if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
  1379  					return err
  1380  				}
  1381  				event.Raw = log
  1382  
  1383  				select {
  1384  				case sink <- event:
  1385  				case err := <-sub.Err():
  1386  					return err
  1387  				case <-quit:
  1388  					return nil
  1389  				}
  1390  			case err := <-sub.Err():
  1391  				return err
  1392  			case <-quit:
  1393  				return nil
  1394  			}
  1395  		}
  1396  	}), nil
  1397  }
  1398  
  1399  // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1400  //
  1401  // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1402  func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) {
  1403  	event := new(IERC20Transfer)
  1404  	if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
  1405  		return nil, err
  1406  	}
  1407  	event.Raw = log
  1408  	return event, nil
  1409  }
  1410  
  1411  // SafeMathABI is the input ABI used to generate the binding from.
  1412  const SafeMathABI = "[]"
  1413  
  1414  // SafeMathBin is the compiled bytecode used for deploying new contracts.
  1415  var SafeMathBin = "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212201282718f570db149dfb48d08e0555fe1d3355b171753b48e6ba5d4a8c6e2d80e64736f6c63430008030033"
  1416  
  1417  // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it.
  1418  func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) {
  1419  	parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  1420  	if err != nil {
  1421  		return common.Address{}, nil, nil, err
  1422  	}
  1423  
  1424  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend)
  1425  	if err != nil {
  1426  		return common.Address{}, nil, nil, err
  1427  	}
  1428  	return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  1429  }
  1430  
  1431  // SafeMath is an auto generated Go binding around an Ethereum contract.
  1432  type SafeMath struct {
  1433  	SafeMathCaller     // Read-only binding to the contract
  1434  	SafeMathTransactor // Write-only binding to the contract
  1435  	SafeMathFilterer   // Log filterer for contract events
  1436  }
  1437  
  1438  // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract.
  1439  type SafeMathCaller struct {
  1440  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1441  }
  1442  
  1443  // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract.
  1444  type SafeMathTransactor struct {
  1445  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1446  }
  1447  
  1448  // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  1449  type SafeMathFilterer struct {
  1450  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1451  }
  1452  
  1453  // SafeMathSession is an auto generated Go binding around an Ethereum contract,
  1454  // with pre-set call and transact options.
  1455  type SafeMathSession struct {
  1456  	Contract     *SafeMath         // Generic contract binding to set the session for
  1457  	CallOpts     bind.CallOpts     // Call options to use throughout this session
  1458  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  1459  }
  1460  
  1461  // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  1462  // with pre-set call options.
  1463  type SafeMathCallerSession struct {
  1464  	Contract *SafeMathCaller // Generic contract caller binding to set the session for
  1465  	CallOpts bind.CallOpts   // Call options to use throughout this session
  1466  }
  1467  
  1468  // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  1469  // with pre-set transact options.
  1470  type SafeMathTransactorSession struct {
  1471  	Contract     *SafeMathTransactor // Generic contract transactor binding to set the session for
  1472  	TransactOpts bind.TransactOpts   // Transaction auth options to use throughout this session
  1473  }
  1474  
  1475  // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract.
  1476  type SafeMathRaw struct {
  1477  	Contract *SafeMath // Generic contract binding to access the raw methods on
  1478  }
  1479  
  1480  // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  1481  type SafeMathCallerRaw struct {
  1482  	Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on
  1483  }
  1484  
  1485  // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  1486  type SafeMathTransactorRaw struct {
  1487  	Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on
  1488  }
  1489  
  1490  // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract.
  1491  func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) {
  1492  	contract, err := bindSafeMath(address, backend, backend, backend)
  1493  	if err != nil {
  1494  		return nil, err
  1495  	}
  1496  	return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  1497  }
  1498  
  1499  // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract.
  1500  func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) {
  1501  	contract, err := bindSafeMath(address, caller, nil, nil)
  1502  	if err != nil {
  1503  		return nil, err
  1504  	}
  1505  	return &SafeMathCaller{contract: contract}, nil
  1506  }
  1507  
  1508  // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract.
  1509  func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) {
  1510  	contract, err := bindSafeMath(address, nil, transactor, nil)
  1511  	if err != nil {
  1512  		return nil, err
  1513  	}
  1514  	return &SafeMathTransactor{contract: contract}, nil
  1515  }
  1516  
  1517  // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract.
  1518  func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) {
  1519  	contract, err := bindSafeMath(address, nil, nil, filterer)
  1520  	if err != nil {
  1521  		return nil, err
  1522  	}
  1523  	return &SafeMathFilterer{contract: contract}, nil
  1524  }
  1525  
  1526  // bindSafeMath binds a generic wrapper to an already deployed contract.
  1527  func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  1528  	parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  1529  	if err != nil {
  1530  		return nil, err
  1531  	}
  1532  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  1533  }
  1534  
  1535  // Call invokes the (constant) contract method with params as input values and
  1536  // sets the output to result. The result type might be a single field for simple
  1537  // returns, a slice of interfaces for anonymous returns and a struct for named
  1538  // returns.
  1539  func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  1540  	return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...)
  1541  }
  1542  
  1543  // Transfer initiates a plain transaction to move funds to the contract, calling
  1544  // its default method if one is available.
  1545  func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  1546  	return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts)
  1547  }
  1548  
  1549  // Transact invokes the (paid) contract method with params as input values.
  1550  func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  1551  	return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...)
  1552  }
  1553  
  1554  // Call invokes the (constant) contract method with params as input values and
  1555  // sets the output to result. The result type might be a single field for simple
  1556  // returns, a slice of interfaces for anonymous returns and a struct for named
  1557  // returns.
  1558  func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  1559  	return _SafeMath.Contract.contract.Call(opts, result, method, params...)
  1560  }
  1561  
  1562  // Transfer initiates a plain transaction to move funds to the contract, calling
  1563  // its default method if one is available.
  1564  func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  1565  	return _SafeMath.Contract.contract.Transfer(opts)
  1566  }
  1567  
  1568  // Transact invokes the (paid) contract method with params as input values.
  1569  func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  1570  	return _SafeMath.Contract.contract.Transact(opts, method, params...)
  1571  }