// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package metarare 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 ) // ERC20MetaData contains all meta data concerning the ERC20 contract. var ERC20MetaData = &bind.MetaData{ ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "a457c2d7": "decreaseAllowance(address,uint256)", "39509351": "increaseAllowance(address,uint256)", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, Bin: "0x608060405234801561001057600080fd5b506106eb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d561020b565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610211565b6100b96004803603604081101561013357600080fd5b506001600160a01b038135169060200135610268565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102a4565b6100b96004803603604081101561018557600080fd5b506001600160a01b0381351690602001356102bf565b6100b9600480360360408110156101b157600080fd5b506001600160a01b0381351690602001356102fb565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610308565b6000610202338484610333565b50600192915050565b60025490565b600061021e848484610425565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461025e918691610259908663ffffffff61056d16565b610333565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff6105cd16565b6001600160a01b031660009081526020819052604090205490565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61056d16565b6000610202338484610425565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661037b57604051600160e51b62461bcd02815260040180806020018281038252602481526020018061069c6024913960400191505060405180910390fd5b6001600160a01b0382166103c357604051600160e51b62461bcd0281526004018080602001828103825260228152602001806106556022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661046d57604051600160e51b62461bcd0281526004018080602001828103825260258152602001806106776025913960400191505060405180910390fd5b6001600160a01b0382166104b557604051600160e51b62461bcd0281526004018080602001828103825260238152602001806106326023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546104de908263ffffffff61056d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610513908263ffffffff6105cd16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105c75760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561062a5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820406df5370657763ac7b0cefe657437434e0f88da8ad01bff715e96a44ccea4f90029", } // 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 // ERC20Bin is the compiled bytecode used for deploying new contracts. // Deprecated: Use ERC20MetaData.Bin instead. var ERC20Bin = ERC20MetaData.Bin // DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { parsed, err := ERC20MetaData.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(ERC20Bin), backend) if err != nil { return common.Address{}, nil, nil, err } return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil } // 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 := abi.JSON(strings.NewReader(ERC20ABI)) 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) } // 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) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "transfer", recipient, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) } // 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 } // IERC20MetaData contains all meta data concerning the IERC20 contract. var IERC20MetaData = &bind.MetaData{ ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]", 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 := abi.JSON(strings.NewReader(IERC20ABI)) 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 amount) returns(bool) func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "approve", spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "transfer", recipient, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) } // 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 } // MetaRareMetaData contains all meta data concerning the MetaRare contract. var MetaRareMetaData = &bind.MetaData{ ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"},{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"lockState\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"},{\"name\":\"i\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_releaseTime\",\"type\":\"uint256\"}],\"name\":\"transferWithLock\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"}],\"name\":\"lockCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_releaseTime\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"holder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"releaseTime\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"holder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "42966c68": "burn(uint256)", "313ce567": "decimals()", "a457c2d7": "decreaseAllowance(address,uint256)", "39509351": "increaseAllowance(address,uint256)", "378dc3dc": "initialSupply()", "e2ab691d": "lock(address,uint256,uint256)", "df034586": "lockCount(address)", "46cf1bb5": "lockState(address,uint256)", "06fdde03": "name()", "8da5cb5b": "owner()", "95d89b41": "symbol()", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", "f2fde38b": "transferOwnership(address)", "de6baccb": "transferWithLock(address,uint256,uint256)", "7eee288d": "unlock(address,uint256)", }, Bin: "0x60806040523480156200001157600080fd5b5062000035336af8277896582678ac0000006200004d602090811b620016bc17901c565b600380546001600160a01b03191633179055620001e4565b6001600160a01b038216620000c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620000df816002546200016860201b620012d51790919060201c565b6002556001600160a01b0382166000908152602081815260409091205462000112918390620012d562000168821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015620001dd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6118ca80620001f46000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80637eee288d116100ad578063dd62ed3e11610071578063dd62ed3e146103ca578063de6baccb146103f8578063df0345861461042a578063e2ab691d14610450578063f2fde38b146104825761012c565b80637eee288d1461031a5780638da5cb5b1461034657806395d89b411461036a578063a457c2d714610372578063a9059cbb1461039e5761012c565b8063378dc3dc116100f4578063378dc3dc1461025c578063395093511461026457806342966c681461029057806346cf1bb5146102af57806370a08231146102f45761012c565b806306fdde0314610131578063095ea7b3146101ae57806318160ddd146101ee57806323b872dd14610208578063313ce5671461023e575b600080fd5b6101396104a8565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b0381351690602001356104cf565b604080519115158252519081900360200190f35b6101f66104e5565b60408051918252519081900360200190f35b6101da6004803603606081101561021e57600080fd5b506001600160a01b038135811691602081013590911690604001356104ec565b61024661050a565b6040805160ff9092168252519081900360200190f35b6101f661050f565b6101da6004803603604081101561027a57600080fd5b506001600160a01b03813516906020013561051e565b6102ad600480360360208110156102a657600080fd5b503561055f565b005b6102db600480360360408110156102c557600080fd5b506001600160a01b038135169060200135610677565b6040805192835260208301919091528051918290030190f35b6101f66004803603602081101561030a57600080fd5b50356001600160a01b03166106f0565b6102ad6004803603604081101561033057600080fd5b506001600160a01b03813516906020013561078a565b61034e610a38565b604080516001600160a01b039092168252519081900360200190f35b610139610a47565b6101da6004803603604081101561038857600080fd5b506001600160a01b038135169060200135610a6a565b6101da600480360360408110156103b457600080fd5b506001600160a01b038135169060200135610aa6565b6101f6600480360360408110156103e057600080fd5b506001600160a01b0381358116916020013516610abb565b6101da6004803603606081101561040e57600080fd5b506001600160a01b038135169060208101359060400135610ae6565b6101f66004803603602081101561044057600080fd5b50356001600160a01b0316610d45565b6102ad6004803603606081101561046657600080fd5b506001600160a01b038135169060208101359060400135610d60565b6102ad6004803603602081101561049857600080fd5b50356001600160a01b0316610f11565b604051806040016040528060088152602001600160c01b674d657461526172650281525081565b60006104dc338484610f6e565b50600192915050565b6002545b90565b60006104f784611060565b610502848484611283565b949350505050565b601281565b6af8277896582678ac00000081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104dc91859061055a908663ffffffff6112d516565b610f6e565b6003546001600160a01b031633146105b05760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6003546105c5906001600160a01b0316611332565b81111561061c5760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b600354610632906001600160a01b03168261134d565b6003546040805183815290516001600160a01b03909216917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59181900360200190a250565b6001600160a01b038216600090815260046020526040812080548291908490811061069e57fe5b600091825260208083206002909202909101546001600160a01b0387168352600490915260409091208054859081106106d357fe5b906000526020600020906002020160010154915091509250929050565b600080805b6001600160a01b038416600090815260046020526040902054811015610769576001600160a01b0384166000908152600460205260409020805461075f91908390811061073e57fe5b906000526020600020906002020160010154836112d590919063ffffffff16565b91506001016106f5565b506107838161077785611332565b9063ffffffff6112d516565b9392505050565b6003546001600160a01b031633146107db5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038216600090815260046020526040902054811061084a5760408051600160e51b62461bcd02815260206004820152601460248201527f4e6f206c6f636b20696e666f726d6174696f6e2e000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260046020526040902080546108ac91908390811061087357fe5b60009182526020808320600160029093020191909101546001600160a01b0386168352908290526040909120549063ffffffff6112d516565b6001600160a01b03831660008181526020818152604080832094909455600490529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f191908490811061090057fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b038216600090815260046020526040812080548390811061094b57fe5b60009182526020808320600160029093020191909101929092556001600160a01b038416815260049091526040902054600019018114610a0a576001600160a01b0382166000908152600460205260409020805460001981019081106109ad57fe5b906000526020600020906002020160046000846001600160a01b03166001600160a01b0316815260200190815260200160002082815481106109eb57fe5b6000918252602090912082546002909202019081556001918201549101555b6001600160a01b0382166000908152600460205260409020805490610a33906000198301611674565b505050565b6003546001600160a01b031681565b604051806040016040528060048152602001600160e01b634d5452410281525081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104dc91859061055a908663ffffffff61141716565b6000610ab133611060565b6107838383611477565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6003546000906001600160a01b03163314610b3a5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038416610b985760408051600160e51b62461bcd02815260206004820152600d60248201527f77726f6e67206164647265737300000000000000000000000000000000000000604482015290519081900360640190fd5b600354610bad906001600160a01b0316611332565b831115610c045760408051600160e51b62461bcd02815260206004820152601260248201527f4e6f7420656e6f7567682062616c616e63650000000000000000000000000000604482015290519081900360640190fd5b81421115610c4657604051600160e51b62461bcd02815260040180806020018281038252603281526020018061186d6032913960400191505060405180910390fd5b6003546001600160a01b0316600090815260208190526040902054610c71908463ffffffff61141716565b600380546001600160a01b039081166000908152602081815260408083209590955588831680835260048252858320865180880188528981528084018b815282546001818101855593875295859020915160029096029091019485555193019290925592548451888152945191949216926000805160206117e3833981519152928290030190a3604080518481526020810184905281516001600160a01b038716927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b928290030190a25060019392505050565b6001600160a01b031660009081526004602052604090205490565b6003546001600160a01b03163314610db15760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b81610dbb84611332565b1015610e115760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b80421115610e5357604051600160e51b62461bcd02815260040180806020018281038252603281526020018061186d6032913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610e7c908363ffffffff61141716565b6001600160a01b0384166000818152602081815260408083209490945560048152838220845180860186528681528083018881528254600181810185559386529484902091516002909502909101938455519201919091558251858152908101849052825191927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b92918290030190a2505050565b6003546001600160a01b03163314610f625760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b610f6b81611484565b50565b6001600160a01b038316610fb657604051600160e51b62461bcd0281526004018080602001828103825260248152602001806118496024913960400191505060405180910390fd5b6001600160a01b038216610ffe57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806117c16022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60005b6001600160a01b03821660009081526004602052604090205481101561127f576001600160a01b03821660009081526004602052604090208054429190839081106110aa57fe5b90600052602060002090600202016000015411611277576001600160a01b038216600090815260046020526040902080546110ea91908390811061087357fe5b6001600160a01b03831660008181526020818152604080832094909455600490529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f191908490811061113e57fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b038216600090815260046020526040812080548390811061118957fe5b60009182526020808320600160029093020191909101929092556001600160a01b03841681526004909152604090205460001901811461124c576001600160a01b0382166000908152600460205260409020805460001981019081106111eb57fe5b906000526020600020906002020160046000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061122957fe5b600091825260209091208254600290920201908155600191820154910155600019015b6001600160a01b0382166000908152600460205260409020805490611275906000198301611674565b505b600101611063565b5050565b600061129084848461153e565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546112cb91869161055a908663ffffffff61141716565b5060019392505050565b6000828201838110156107835760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b031660009081526020819052604090205490565b6001600160a01b03821661139557604051600160e51b62461bcd0281526004018080602001828103825260218152602001806118036021913960400191505060405180910390fd5b6002546113a8908263ffffffff61141716565b6002556001600160a01b0382166000908152602081905260409020546113d4908263ffffffff61141716565b6001600160a01b038316600081815260208181526040808320949094558351858152935191936000805160206117e3833981519152929081900390910190a35050565b6000828211156114715760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006104dc33848461153e565b6001600160a01b0381166114e25760408051600160e51b62461bcd02815260206004820152600d60248201527f416c7265616479204f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661158657604051600160e51b62461bcd0281526004018080602001828103825260258152602001806118246025913960400191505060405180910390fd5b6001600160a01b0382166115ce57604051600160e51b62461bcd02815260040180806020018281038252602381526020018061179e6023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546115f7908263ffffffff61141716565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461162c908263ffffffff6112d516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716926000805160206117e383398151915292918290030190a3505050565b815481835581811115610a3357600083815260209020610a33916104e99160029182028101918502015b808211156116b8576000808255600182015560020161169e565b5090565b6001600160a01b03821661171a5760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b60025461172d908263ffffffff6112d516565b6002556001600160a01b038216600090815260208190526040902054611759908263ffffffff6112d516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391926000805160206117e38339815191529281900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206265666f72652063757272656e742074696d65a165627a7a72305820c8bc32807c2b9933c0cd47be312926c1952ad13246d5cdb9f4fa96e8935d64c80029", } // MetaRareABI is the input ABI used to generate the binding from. // Deprecated: Use MetaRareMetaData.ABI instead. var MetaRareABI = MetaRareMetaData.ABI // Deprecated: Use MetaRareMetaData.Sigs instead. // MetaRareFuncSigs maps the 4-byte function signature to its string representation. var MetaRareFuncSigs = MetaRareMetaData.Sigs // MetaRareBin is the compiled bytecode used for deploying new contracts. // Deprecated: Use MetaRareMetaData.Bin instead. var MetaRareBin = MetaRareMetaData.Bin // DeployMetaRare deploys a new Ethereum contract, binding an instance of MetaRare to it. func DeployMetaRare(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MetaRare, error) { parsed, err := MetaRareMetaData.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(MetaRareBin), backend) if err != nil { return common.Address{}, nil, nil, err } return address, tx, &MetaRare{MetaRareCaller: MetaRareCaller{contract: contract}, MetaRareTransactor: MetaRareTransactor{contract: contract}, MetaRareFilterer: MetaRareFilterer{contract: contract}}, nil } // MetaRare is an auto generated Go binding around an Ethereum contract. type MetaRare struct { MetaRareCaller // Read-only binding to the contract MetaRareTransactor // Write-only binding to the contract MetaRareFilterer // Log filterer for contract events } // MetaRareCaller is an auto generated read-only Go binding around an Ethereum contract. type MetaRareCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MetaRareTransactor is an auto generated write-only Go binding around an Ethereum contract. type MetaRareTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MetaRareFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type MetaRareFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MetaRareSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type MetaRareSession struct { Contract *MetaRare // 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 } // MetaRareCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type MetaRareCallerSession struct { Contract *MetaRareCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // MetaRareTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type MetaRareTransactorSession struct { Contract *MetaRareTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // MetaRareRaw is an auto generated low-level Go binding around an Ethereum contract. type MetaRareRaw struct { Contract *MetaRare // Generic contract binding to access the raw methods on } // MetaRareCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type MetaRareCallerRaw struct { Contract *MetaRareCaller // Generic read-only contract binding to access the raw methods on } // MetaRareTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type MetaRareTransactorRaw struct { Contract *MetaRareTransactor // Generic write-only contract binding to access the raw methods on } // NewMetaRare creates a new instance of MetaRare, bound to a specific deployed contract. func NewMetaRare(address common.Address, backend bind.ContractBackend) (*MetaRare, error) { contract, err := bindMetaRare(address, backend, backend, backend) if err != nil { return nil, err } return &MetaRare{MetaRareCaller: MetaRareCaller{contract: contract}, MetaRareTransactor: MetaRareTransactor{contract: contract}, MetaRareFilterer: MetaRareFilterer{contract: contract}}, nil } // NewMetaRareCaller creates a new read-only instance of MetaRare, bound to a specific deployed contract. func NewMetaRareCaller(address common.Address, caller bind.ContractCaller) (*MetaRareCaller, error) { contract, err := bindMetaRare(address, caller, nil, nil) if err != nil { return nil, err } return &MetaRareCaller{contract: contract}, nil } // NewMetaRareTransactor creates a new write-only instance of MetaRare, bound to a specific deployed contract. func NewMetaRareTransactor(address common.Address, transactor bind.ContractTransactor) (*MetaRareTransactor, error) { contract, err := bindMetaRare(address, nil, transactor, nil) if err != nil { return nil, err } return &MetaRareTransactor{contract: contract}, nil } // NewMetaRareFilterer creates a new log filterer instance of MetaRare, bound to a specific deployed contract. func NewMetaRareFilterer(address common.Address, filterer bind.ContractFilterer) (*MetaRareFilterer, error) { contract, err := bindMetaRare(address, nil, nil, filterer) if err != nil { return nil, err } return &MetaRareFilterer{contract: contract}, nil } // bindMetaRare binds a generic wrapper to an already deployed contract. func bindMetaRare(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(MetaRareABI)) 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 (_MetaRare *MetaRareRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _MetaRare.Contract.MetaRareCaller.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 (_MetaRare *MetaRareRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _MetaRare.Contract.MetaRareTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_MetaRare *MetaRareRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _MetaRare.Contract.MetaRareTransactor.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 (_MetaRare *MetaRareCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _MetaRare.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 (_MetaRare *MetaRareTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _MetaRare.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_MetaRare *MetaRareTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _MetaRare.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 (_MetaRare *MetaRareCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _MetaRare.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 (_MetaRare *MetaRareSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _MetaRare.Contract.Allowance(&_MetaRare.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 (_MetaRare *MetaRareCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _MetaRare.Contract.Allowance(&_MetaRare.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address _holder) view returns(uint256 balance) func (_MetaRare *MetaRareCaller) BalanceOf(opts *bind.CallOpts, _holder common.Address) (*big.Int, error) { var out []interface{} err := _MetaRare.contract.Call(opts, &out, "balanceOf", _holder) 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 _holder) view returns(uint256 balance) func (_MetaRare *MetaRareSession) BalanceOf(_holder common.Address) (*big.Int, error) { return _MetaRare.Contract.BalanceOf(&_MetaRare.CallOpts, _holder) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address _holder) view returns(uint256 balance) func (_MetaRare *MetaRareCallerSession) BalanceOf(_holder common.Address) (*big.Int, error) { return _MetaRare.Contract.BalanceOf(&_MetaRare.CallOpts, _holder) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_MetaRare *MetaRareCaller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _MetaRare.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 (_MetaRare *MetaRareSession) Decimals() (uint8, error) { return _MetaRare.Contract.Decimals(&_MetaRare.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_MetaRare *MetaRareCallerSession) Decimals() (uint8, error) { return _MetaRare.Contract.Decimals(&_MetaRare.CallOpts) } // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc. // // Solidity: function initialSupply() view returns(uint256) func (_MetaRare *MetaRareCaller) InitialSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _MetaRare.contract.Call(opts, &out, "initialSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc. // // Solidity: function initialSupply() view returns(uint256) func (_MetaRare *MetaRareSession) InitialSupply() (*big.Int, error) { return _MetaRare.Contract.InitialSupply(&_MetaRare.CallOpts) } // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc. // // Solidity: function initialSupply() view returns(uint256) func (_MetaRare *MetaRareCallerSession) InitialSupply() (*big.Int, error) { return _MetaRare.Contract.InitialSupply(&_MetaRare.CallOpts) } // LockCount is a free data retrieval call binding the contract method 0xdf034586. // // Solidity: function lockCount(address _holder) view returns(uint256) func (_MetaRare *MetaRareCaller) LockCount(opts *bind.CallOpts, _holder common.Address) (*big.Int, error) { var out []interface{} err := _MetaRare.contract.Call(opts, &out, "lockCount", _holder) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // LockCount is a free data retrieval call binding the contract method 0xdf034586. // // Solidity: function lockCount(address _holder) view returns(uint256) func (_MetaRare *MetaRareSession) LockCount(_holder common.Address) (*big.Int, error) { return _MetaRare.Contract.LockCount(&_MetaRare.CallOpts, _holder) } // LockCount is a free data retrieval call binding the contract method 0xdf034586. // // Solidity: function lockCount(address _holder) view returns(uint256) func (_MetaRare *MetaRareCallerSession) LockCount(_holder common.Address) (*big.Int, error) { return _MetaRare.Contract.LockCount(&_MetaRare.CallOpts, _holder) } // LockState is a free data retrieval call binding the contract method 0x46cf1bb5. // // Solidity: function lockState(address _holder, uint256 _idx) view returns(uint256, uint256) func (_MetaRare *MetaRareCaller) LockState(opts *bind.CallOpts, _holder common.Address, _idx *big.Int) (*big.Int, *big.Int, error) { var out []interface{} err := _MetaRare.contract.Call(opts, &out, "lockState", _holder, _idx) if err != nil { return *new(*big.Int), *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) return out0, out1, err } // LockState is a free data retrieval call binding the contract method 0x46cf1bb5. // // Solidity: function lockState(address _holder, uint256 _idx) view returns(uint256, uint256) func (_MetaRare *MetaRareSession) LockState(_holder common.Address, _idx *big.Int) (*big.Int, *big.Int, error) { return _MetaRare.Contract.LockState(&_MetaRare.CallOpts, _holder, _idx) } // LockState is a free data retrieval call binding the contract method 0x46cf1bb5. // // Solidity: function lockState(address _holder, uint256 _idx) view returns(uint256, uint256) func (_MetaRare *MetaRareCallerSession) LockState(_holder common.Address, _idx *big.Int) (*big.Int, *big.Int, error) { return _MetaRare.Contract.LockState(&_MetaRare.CallOpts, _holder, _idx) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_MetaRare *MetaRareCaller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} err := _MetaRare.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 (_MetaRare *MetaRareSession) Name() (string, error) { return _MetaRare.Contract.Name(&_MetaRare.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_MetaRare *MetaRareCallerSession) Name() (string, error) { return _MetaRare.Contract.Name(&_MetaRare.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) func (_MetaRare *MetaRareCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _MetaRare.contract.Call(opts, &out, "owner") if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) func (_MetaRare *MetaRareSession) Owner() (common.Address, error) { return _MetaRare.Contract.Owner(&_MetaRare.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) func (_MetaRare *MetaRareCallerSession) Owner() (common.Address, error) { return _MetaRare.Contract.Owner(&_MetaRare.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_MetaRare *MetaRareCaller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} err := _MetaRare.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 (_MetaRare *MetaRareSession) Symbol() (string, error) { return _MetaRare.Contract.Symbol(&_MetaRare.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_MetaRare *MetaRareCallerSession) Symbol() (string, error) { return _MetaRare.Contract.Symbol(&_MetaRare.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_MetaRare *MetaRareCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _MetaRare.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 (_MetaRare *MetaRareSession) TotalSupply() (*big.Int, error) { return _MetaRare.Contract.TotalSupply(&_MetaRare.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_MetaRare *MetaRareCallerSession) TotalSupply() (*big.Int, error) { return _MetaRare.Contract.TotalSupply(&_MetaRare.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_MetaRare *MetaRareTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { return _MetaRare.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 (_MetaRare *MetaRareSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Approve(&_MetaRare.TransactOpts, spender, value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 value) returns(bool) func (_MetaRare *MetaRareTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Approve(&_MetaRare.TransactOpts, spender, value) } // Burn is a paid mutator transaction binding the contract method 0x42966c68. // // Solidity: function burn(uint256 _value) returns() func (_MetaRare *MetaRareTransactor) Burn(opts *bind.TransactOpts, _value *big.Int) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "burn", _value) } // Burn is a paid mutator transaction binding the contract method 0x42966c68. // // Solidity: function burn(uint256 _value) returns() func (_MetaRare *MetaRareSession) Burn(_value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Burn(&_MetaRare.TransactOpts, _value) } // Burn is a paid mutator transaction binding the contract method 0x42966c68. // // Solidity: function burn(uint256 _value) returns() func (_MetaRare *MetaRareTransactorSession) Burn(_value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Burn(&_MetaRare.TransactOpts, _value) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_MetaRare *MetaRareTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_MetaRare *MetaRareSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.DecreaseAllowance(&_MetaRare.TransactOpts, spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_MetaRare *MetaRareTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.DecreaseAllowance(&_MetaRare.TransactOpts, spender, subtractedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_MetaRare *MetaRareTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "increaseAllowance", spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_MetaRare *MetaRareSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.IncreaseAllowance(&_MetaRare.TransactOpts, spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_MetaRare *MetaRareTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.IncreaseAllowance(&_MetaRare.TransactOpts, spender, addedValue) } // Lock is a paid mutator transaction binding the contract method 0xe2ab691d. // // Solidity: function lock(address _holder, uint256 _amount, uint256 _releaseTime) returns() func (_MetaRare *MetaRareTransactor) Lock(opts *bind.TransactOpts, _holder common.Address, _amount *big.Int, _releaseTime *big.Int) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "lock", _holder, _amount, _releaseTime) } // Lock is a paid mutator transaction binding the contract method 0xe2ab691d. // // Solidity: function lock(address _holder, uint256 _amount, uint256 _releaseTime) returns() func (_MetaRare *MetaRareSession) Lock(_holder common.Address, _amount *big.Int, _releaseTime *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Lock(&_MetaRare.TransactOpts, _holder, _amount, _releaseTime) } // Lock is a paid mutator transaction binding the contract method 0xe2ab691d. // // Solidity: function lock(address _holder, uint256 _amount, uint256 _releaseTime) returns() func (_MetaRare *MetaRareTransactorSession) Lock(_holder common.Address, _amount *big.Int, _releaseTime *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Lock(&_MetaRare.TransactOpts, _holder, _amount, _releaseTime) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address _to, uint256 _value) returns(bool) func (_MetaRare *MetaRareTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _MetaRare.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 (_MetaRare *MetaRareSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Transfer(&_MetaRare.TransactOpts, _to, _value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address _to, uint256 _value) returns(bool) func (_MetaRare *MetaRareTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Transfer(&_MetaRare.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 (_MetaRare *MetaRareTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _MetaRare.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 (_MetaRare *MetaRareSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.TransferFrom(&_MetaRare.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 (_MetaRare *MetaRareTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.TransferFrom(&_MetaRare.TransactOpts, _from, _to, _value) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address _newOwner) returns() func (_MetaRare *MetaRareTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "transferOwnership", _newOwner) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address _newOwner) returns() func (_MetaRare *MetaRareSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { return _MetaRare.Contract.TransferOwnership(&_MetaRare.TransactOpts, _newOwner) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address _newOwner) returns() func (_MetaRare *MetaRareTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { return _MetaRare.Contract.TransferOwnership(&_MetaRare.TransactOpts, _newOwner) } // TransferWithLock is a paid mutator transaction binding the contract method 0xde6baccb. // // Solidity: function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) returns(bool) func (_MetaRare *MetaRareTransactor) TransferWithLock(opts *bind.TransactOpts, _to common.Address, _value *big.Int, _releaseTime *big.Int) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "transferWithLock", _to, _value, _releaseTime) } // TransferWithLock is a paid mutator transaction binding the contract method 0xde6baccb. // // Solidity: function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) returns(bool) func (_MetaRare *MetaRareSession) TransferWithLock(_to common.Address, _value *big.Int, _releaseTime *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.TransferWithLock(&_MetaRare.TransactOpts, _to, _value, _releaseTime) } // TransferWithLock is a paid mutator transaction binding the contract method 0xde6baccb. // // Solidity: function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) returns(bool) func (_MetaRare *MetaRareTransactorSession) TransferWithLock(_to common.Address, _value *big.Int, _releaseTime *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.TransferWithLock(&_MetaRare.TransactOpts, _to, _value, _releaseTime) } // Unlock is a paid mutator transaction binding the contract method 0x7eee288d. // // Solidity: function unlock(address _holder, uint256 i) returns() func (_MetaRare *MetaRareTransactor) Unlock(opts *bind.TransactOpts, _holder common.Address, i *big.Int) (*types.Transaction, error) { return _MetaRare.contract.Transact(opts, "unlock", _holder, i) } // Unlock is a paid mutator transaction binding the contract method 0x7eee288d. // // Solidity: function unlock(address _holder, uint256 i) returns() func (_MetaRare *MetaRareSession) Unlock(_holder common.Address, i *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Unlock(&_MetaRare.TransactOpts, _holder, i) } // Unlock is a paid mutator transaction binding the contract method 0x7eee288d. // // Solidity: function unlock(address _holder, uint256 i) returns() func (_MetaRare *MetaRareTransactorSession) Unlock(_holder common.Address, i *big.Int) (*types.Transaction, error) { return _MetaRare.Contract.Unlock(&_MetaRare.TransactOpts, _holder, i) } // MetaRareApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the MetaRare contract. type MetaRareApprovalIterator struct { Event *MetaRareApproval // 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 *MetaRareApprovalIterator) 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(MetaRareApproval) 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(MetaRareApproval) 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 *MetaRareApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareApproval represents a Approval event raised by the MetaRare contract. type MetaRareApproval 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 (_MetaRare *MetaRareFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*MetaRareApprovalIterator, 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 := _MetaRare.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &MetaRareApprovalIterator{contract: _MetaRare.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 (_MetaRare *MetaRareFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *MetaRareApproval, 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 := _MetaRare.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(MetaRareApproval) if err := _MetaRare.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 (_MetaRare *MetaRareFilterer) ParseApproval(log types.Log) (*MetaRareApproval, error) { event := new(MetaRareApproval) if err := _MetaRare.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // MetaRareBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the MetaRare contract. type MetaRareBurnIterator struct { Event *MetaRareBurn // 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 *MetaRareBurnIterator) 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(MetaRareBurn) 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(MetaRareBurn) 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 *MetaRareBurnIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareBurnIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareBurn represents a Burn event raised by the MetaRare contract. type MetaRareBurn struct { Burner common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterBurn is a free log retrieval operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. // // Solidity: event Burn(address indexed burner, uint256 value) func (_MetaRare *MetaRareFilterer) FilterBurn(opts *bind.FilterOpts, burner []common.Address) (*MetaRareBurnIterator, error) { var burnerRule []interface{} for _, burnerItem := range burner { burnerRule = append(burnerRule, burnerItem) } logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Burn", burnerRule) if err != nil { return nil, err } return &MetaRareBurnIterator{contract: _MetaRare.contract, event: "Burn", logs: logs, sub: sub}, nil } // WatchBurn is a free log subscription operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. // // Solidity: event Burn(address indexed burner, uint256 value) func (_MetaRare *MetaRareFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *MetaRareBurn, burner []common.Address) (event.Subscription, error) { var burnerRule []interface{} for _, burnerItem := range burner { burnerRule = append(burnerRule, burnerItem) } logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Burn", burnerRule) 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(MetaRareBurn) if err := _MetaRare.contract.UnpackLog(event, "Burn", 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 } // ParseBurn is a log parse operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. // // Solidity: event Burn(address indexed burner, uint256 value) func (_MetaRare *MetaRareFilterer) ParseBurn(log types.Log) (*MetaRareBurn, error) { event := new(MetaRareBurn) if err := _MetaRare.contract.UnpackLog(event, "Burn", log); err != nil { return nil, err } event.Raw = log return event, nil } // MetaRareLockIterator is returned from FilterLock and is used to iterate over the raw logs and unpacked data for Lock events raised by the MetaRare contract. type MetaRareLockIterator struct { Event *MetaRareLock // 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 *MetaRareLockIterator) 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(MetaRareLock) 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(MetaRareLock) 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 *MetaRareLockIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareLockIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareLock represents a Lock event raised by the MetaRare contract. type MetaRareLock struct { Holder common.Address Value *big.Int ReleaseTime *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterLock is a free log retrieval operation binding the contract event 0x49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b. // // Solidity: event Lock(address indexed holder, uint256 value, uint256 releaseTime) func (_MetaRare *MetaRareFilterer) FilterLock(opts *bind.FilterOpts, holder []common.Address) (*MetaRareLockIterator, error) { var holderRule []interface{} for _, holderItem := range holder { holderRule = append(holderRule, holderItem) } logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Lock", holderRule) if err != nil { return nil, err } return &MetaRareLockIterator{contract: _MetaRare.contract, event: "Lock", logs: logs, sub: sub}, nil } // WatchLock is a free log subscription operation binding the contract event 0x49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b. // // Solidity: event Lock(address indexed holder, uint256 value, uint256 releaseTime) func (_MetaRare *MetaRareFilterer) WatchLock(opts *bind.WatchOpts, sink chan<- *MetaRareLock, holder []common.Address) (event.Subscription, error) { var holderRule []interface{} for _, holderItem := range holder { holderRule = append(holderRule, holderItem) } logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Lock", holderRule) 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(MetaRareLock) if err := _MetaRare.contract.UnpackLog(event, "Lock", 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 } // ParseLock is a log parse operation binding the contract event 0x49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b. // // Solidity: event Lock(address indexed holder, uint256 value, uint256 releaseTime) func (_MetaRare *MetaRareFilterer) ParseLock(log types.Log) (*MetaRareLock, error) { event := new(MetaRareLock) if err := _MetaRare.contract.UnpackLog(event, "Lock", log); err != nil { return nil, err } event.Raw = log return event, nil } // MetaRareOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the MetaRare contract. type MetaRareOwnershipRenouncedIterator struct { Event *MetaRareOwnershipRenounced // 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 *MetaRareOwnershipRenouncedIterator) 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(MetaRareOwnershipRenounced) 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(MetaRareOwnershipRenounced) 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 *MetaRareOwnershipRenouncedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareOwnershipRenouncedIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareOwnershipRenounced represents a OwnershipRenounced event raised by the MetaRare contract. type MetaRareOwnershipRenounced struct { PreviousOwner common.Address Raw types.Log // Blockchain specific contextual infos } // FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. // // Solidity: event OwnershipRenounced(address indexed previousOwner) func (_MetaRare *MetaRareFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*MetaRareOwnershipRenouncedIterator, error) { var previousOwnerRule []interface{} for _, previousOwnerItem := range previousOwner { previousOwnerRule = append(previousOwnerRule, previousOwnerItem) } logs, sub, err := _MetaRare.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) if err != nil { return nil, err } return &MetaRareOwnershipRenouncedIterator{contract: _MetaRare.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil } // WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. // // Solidity: event OwnershipRenounced(address indexed previousOwner) func (_MetaRare *MetaRareFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *MetaRareOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { var previousOwnerRule []interface{} for _, previousOwnerItem := range previousOwner { previousOwnerRule = append(previousOwnerRule, previousOwnerItem) } logs, sub, err := _MetaRare.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) 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(MetaRareOwnershipRenounced) if err := _MetaRare.contract.UnpackLog(event, "OwnershipRenounced", 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 } // ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. // // Solidity: event OwnershipRenounced(address indexed previousOwner) func (_MetaRare *MetaRareFilterer) ParseOwnershipRenounced(log types.Log) (*MetaRareOwnershipRenounced, error) { event := new(MetaRareOwnershipRenounced) if err := _MetaRare.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { return nil, err } event.Raw = log return event, nil } // MetaRareOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MetaRare contract. type MetaRareOwnershipTransferredIterator struct { Event *MetaRareOwnershipTransferred // 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 *MetaRareOwnershipTransferredIterator) 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(MetaRareOwnershipTransferred) 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(MetaRareOwnershipTransferred) 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 *MetaRareOwnershipTransferredIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareOwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareOwnershipTransferred represents a OwnershipTransferred event raised by the MetaRare contract. type MetaRareOwnershipTransferred struct { PreviousOwner common.Address NewOwner common.Address Raw types.Log // Blockchain specific contextual infos } // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) func (_MetaRare *MetaRareFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MetaRareOwnershipTransferredIterator, error) { var previousOwnerRule []interface{} for _, previousOwnerItem := range previousOwner { previousOwnerRule = append(previousOwnerRule, previousOwnerItem) } var newOwnerRule []interface{} for _, newOwnerItem := range newOwner { newOwnerRule = append(newOwnerRule, newOwnerItem) } logs, sub, err := _MetaRare.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } return &MetaRareOwnershipTransferredIterator{contract: _MetaRare.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) func (_MetaRare *MetaRareFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MetaRareOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { var previousOwnerRule []interface{} for _, previousOwnerItem := range previousOwner { previousOwnerRule = append(previousOwnerRule, previousOwnerItem) } var newOwnerRule []interface{} for _, newOwnerItem := range newOwner { newOwnerRule = append(newOwnerRule, newOwnerItem) } logs, sub, err := _MetaRare.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 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(MetaRareOwnershipTransferred) if err := _MetaRare.contract.UnpackLog(event, "OwnershipTransferred", 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 } // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) func (_MetaRare *MetaRareFilterer) ParseOwnershipTransferred(log types.Log) (*MetaRareOwnershipTransferred, error) { event := new(MetaRareOwnershipTransferred) if err := _MetaRare.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log return event, nil } // MetaRareTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the MetaRare contract. type MetaRareTransferIterator struct { Event *MetaRareTransfer // 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 *MetaRareTransferIterator) 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(MetaRareTransfer) 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(MetaRareTransfer) 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 *MetaRareTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareTransferIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareTransfer represents a Transfer event raised by the MetaRare contract. type MetaRareTransfer 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 (_MetaRare *MetaRareFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MetaRareTransferIterator, 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 := _MetaRare.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &MetaRareTransferIterator{contract: _MetaRare.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 (_MetaRare *MetaRareFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *MetaRareTransfer, 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 := _MetaRare.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(MetaRareTransfer) if err := _MetaRare.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 (_MetaRare *MetaRareFilterer) ParseTransfer(log types.Log) (*MetaRareTransfer, error) { event := new(MetaRareTransfer) if err := _MetaRare.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // MetaRareUnlockIterator is returned from FilterUnlock and is used to iterate over the raw logs and unpacked data for Unlock events raised by the MetaRare contract. type MetaRareUnlockIterator struct { Event *MetaRareUnlock // 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 *MetaRareUnlockIterator) 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(MetaRareUnlock) 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(MetaRareUnlock) 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 *MetaRareUnlockIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *MetaRareUnlockIterator) Close() error { it.sub.Unsubscribe() return nil } // MetaRareUnlock represents a Unlock event raised by the MetaRare contract. type MetaRareUnlock struct { Holder common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterUnlock is a free log retrieval operation binding the contract event 0x6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1. // // Solidity: event Unlock(address indexed holder, uint256 value) func (_MetaRare *MetaRareFilterer) FilterUnlock(opts *bind.FilterOpts, holder []common.Address) (*MetaRareUnlockIterator, error) { var holderRule []interface{} for _, holderItem := range holder { holderRule = append(holderRule, holderItem) } logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Unlock", holderRule) if err != nil { return nil, err } return &MetaRareUnlockIterator{contract: _MetaRare.contract, event: "Unlock", logs: logs, sub: sub}, nil } // WatchUnlock is a free log subscription operation binding the contract event 0x6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1. // // Solidity: event Unlock(address indexed holder, uint256 value) func (_MetaRare *MetaRareFilterer) WatchUnlock(opts *bind.WatchOpts, sink chan<- *MetaRareUnlock, holder []common.Address) (event.Subscription, error) { var holderRule []interface{} for _, holderItem := range holder { holderRule = append(holderRule, holderItem) } logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Unlock", holderRule) 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(MetaRareUnlock) if err := _MetaRare.contract.UnpackLog(event, "Unlock", 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 } // ParseUnlock is a log parse operation binding the contract event 0x6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1. // // Solidity: event Unlock(address indexed holder, uint256 value) func (_MetaRare *MetaRareFilterer) ParseUnlock(log types.Log) (*MetaRareUnlock, error) { event := new(MetaRareUnlock) if err := _MetaRare.contract.UnpackLog(event, "Unlock", log); err != nil { return nil, err } event.Raw = log return event, nil } // SafeMathMetaData contains all meta data concerning the SafeMath contract. var SafeMathMetaData = &bind.MetaData{ ABI: "[]", Bin: "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820d8bf1103fb5589e40b369ec015db597357add90895c46b5572164bbd74a8cfcb0029", } // SafeMathABI is the input ABI used to generate the binding from. // Deprecated: Use SafeMathMetaData.ABI instead. var SafeMathABI = SafeMathMetaData.ABI // SafeMathBin is the compiled bytecode used for deploying new contracts. // Deprecated: Use SafeMathMetaData.Bin instead. var SafeMathBin = SafeMathMetaData.Bin // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { parsed, err := SafeMathMetaData.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(SafeMathBin), backend) if err != nil { return common.Address{}, nil, nil, err } return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil } // SafeMath is an auto generated Go binding around an Ethereum contract. type SafeMath struct { SafeMathCaller // Read-only binding to the contract SafeMathTransactor // Write-only binding to the contract SafeMathFilterer // Log filterer for contract events } // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. type SafeMathCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. type SafeMathTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type SafeMathFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // SafeMathSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type SafeMathSession struct { Contract *SafeMath // 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 } // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type SafeMathCallerSession struct { Contract *SafeMathCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type SafeMathTransactorSession struct { Contract *SafeMathTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. type SafeMathRaw struct { Contract *SafeMath // Generic contract binding to access the raw methods on } // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type SafeMathCallerRaw struct { Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on } // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type SafeMathTransactorRaw struct { Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on } // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { contract, err := bindSafeMath(address, backend, backend, backend) if err != nil { return nil, err } return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil } // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { contract, err := bindSafeMath(address, caller, nil, nil) if err != nil { return nil, err } return &SafeMathCaller{contract: contract}, nil } // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { contract, err := bindSafeMath(address, nil, transactor, nil) if err != nil { return nil, err } return &SafeMathTransactor{contract: contract}, nil } // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { contract, err := bindSafeMath(address, nil, nil, filterer) if err != nil { return nil, err } return &SafeMathFilterer{contract: contract}, nil } // bindSafeMath binds a generic wrapper to an already deployed contract. func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _SafeMath.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _SafeMath.Contract.contract.Transact(opts, method, params...) }