// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package contracts import ( "errors" "math/big" "strings" ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription _ = abi.ConvertType ) // ERC721MetaData contains all meta data concerning the ERC721 contract. var ERC721MetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_approved\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // ERC721ABI is the input ABI used to generate the binding from. // Deprecated: Use ERC721MetaData.ABI instead. var ERC721ABI = ERC721MetaData.ABI // ERC721 is an auto generated Go binding around an Ethereum contract. type ERC721 struct { ERC721Caller // Read-only binding to the contract ERC721Transactor // Write-only binding to the contract ERC721Filterer // Log filterer for contract events } // ERC721Caller is an auto generated read-only Go binding around an Ethereum contract. type ERC721Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ERC721Transactor is an auto generated write-only Go binding around an Ethereum contract. type ERC721Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ERC721Filterer is an auto generated log filtering Go binding around an Ethereum contract events. type ERC721Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ERC721Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type ERC721Session struct { Contract *ERC721 // 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 } // ERC721CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type ERC721CallerSession struct { Contract *ERC721Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // ERC721TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type ERC721TransactorSession struct { Contract *ERC721Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // ERC721Raw is an auto generated low-level Go binding around an Ethereum contract. type ERC721Raw struct { Contract *ERC721 // Generic contract binding to access the raw methods on } // ERC721CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type ERC721CallerRaw struct { Contract *ERC721Caller // Generic read-only contract binding to access the raw methods on } // ERC721TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type ERC721TransactorRaw struct { Contract *ERC721Transactor // Generic write-only contract binding to access the raw methods on } // NewERC721 creates a new instance of ERC721, bound to a specific deployed contract. func NewERC721(address common.Address, backend bind.ContractBackend) (*ERC721, error) { contract, err := bindERC721(address, backend, backend, backend) if err != nil { return nil, err } return &ERC721{ERC721Caller: ERC721Caller{contract: contract}, ERC721Transactor: ERC721Transactor{contract: contract}, ERC721Filterer: ERC721Filterer{contract: contract}}, nil } // NewERC721Caller creates a new read-only instance of ERC721, bound to a specific deployed contract. func NewERC721Caller(address common.Address, caller bind.ContractCaller) (*ERC721Caller, error) { contract, err := bindERC721(address, caller, nil, nil) if err != nil { return nil, err } return &ERC721Caller{contract: contract}, nil } // NewERC721Transactor creates a new write-only instance of ERC721, bound to a specific deployed contract. func NewERC721Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC721Transactor, error) { contract, err := bindERC721(address, nil, transactor, nil) if err != nil { return nil, err } return &ERC721Transactor{contract: contract}, nil } // NewERC721Filterer creates a new log filterer instance of ERC721, bound to a specific deployed contract. func NewERC721Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC721Filterer, error) { contract, err := bindERC721(address, nil, nil, filterer) if err != nil { return nil, err } return &ERC721Filterer{contract: contract}, nil } // bindERC721 binds a generic wrapper to an already deployed contract. func bindERC721(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := ERC721MetaData.GetAbi() if err != nil { return nil, err } return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_ERC721 *ERC721Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ERC721.Contract.ERC721Caller.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 (_ERC721 *ERC721Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _ERC721.Contract.ERC721Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_ERC721 *ERC721Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ERC721.Contract.ERC721Transactor.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 (_ERC721 *ERC721CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ERC721.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 (_ERC721 *ERC721TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _ERC721.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_ERC721 *ERC721TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ERC721.Contract.contract.Transact(opts, method, params...) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address _owner) view returns(uint256) func (_ERC721 *ERC721Caller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { var out []interface{} err := _ERC721.contract.Call(opts, &out, "balanceOf", _owner) 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 _owner) view returns(uint256) func (_ERC721 *ERC721Session) BalanceOf(_owner common.Address) (*big.Int, error) { return _ERC721.Contract.BalanceOf(&_ERC721.CallOpts, _owner) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address _owner) view returns(uint256) func (_ERC721 *ERC721CallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { return _ERC721.Contract.BalanceOf(&_ERC721.CallOpts, _owner) } // GetApproved is a free data retrieval call binding the contract method 0x081812fc. // // Solidity: function getApproved(uint256 _tokenId) view returns(address) func (_ERC721 *ERC721Caller) GetApproved(opts *bind.CallOpts, _tokenId *big.Int) (common.Address, error) { var out []interface{} err := _ERC721.contract.Call(opts, &out, "getApproved", _tokenId) if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // GetApproved is a free data retrieval call binding the contract method 0x081812fc. // // Solidity: function getApproved(uint256 _tokenId) view returns(address) func (_ERC721 *ERC721Session) GetApproved(_tokenId *big.Int) (common.Address, error) { return _ERC721.Contract.GetApproved(&_ERC721.CallOpts, _tokenId) } // GetApproved is a free data retrieval call binding the contract method 0x081812fc. // // Solidity: function getApproved(uint256 _tokenId) view returns(address) func (_ERC721 *ERC721CallerSession) GetApproved(_tokenId *big.Int) (common.Address, error) { return _ERC721.Contract.GetApproved(&_ERC721.CallOpts, _tokenId) } // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. // // Solidity: function isApprovedForAll(address _owner, address _operator) view returns(bool) func (_ERC721 *ERC721Caller) IsApprovedForAll(opts *bind.CallOpts, _owner common.Address, _operator common.Address) (bool, error) { var out []interface{} err := _ERC721.contract.Call(opts, &out, "isApprovedForAll", _owner, _operator) if err != nil { return *new(bool), err } out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. // // Solidity: function isApprovedForAll(address _owner, address _operator) view returns(bool) func (_ERC721 *ERC721Session) IsApprovedForAll(_owner common.Address, _operator common.Address) (bool, error) { return _ERC721.Contract.IsApprovedForAll(&_ERC721.CallOpts, _owner, _operator) } // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. // // Solidity: function isApprovedForAll(address _owner, address _operator) view returns(bool) func (_ERC721 *ERC721CallerSession) IsApprovedForAll(_owner common.Address, _operator common.Address) (bool, error) { return _ERC721.Contract.IsApprovedForAll(&_ERC721.CallOpts, _owner, _operator) } // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. // // Solidity: function ownerOf(uint256 _tokenId) view returns(address) func (_ERC721 *ERC721Caller) OwnerOf(opts *bind.CallOpts, _tokenId *big.Int) (common.Address, error) { var out []interface{} err := _ERC721.contract.Call(opts, &out, "ownerOf", _tokenId) if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. // // Solidity: function ownerOf(uint256 _tokenId) view returns(address) func (_ERC721 *ERC721Session) OwnerOf(_tokenId *big.Int) (common.Address, error) { return _ERC721.Contract.OwnerOf(&_ERC721.CallOpts, _tokenId) } // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. // // Solidity: function ownerOf(uint256 _tokenId) view returns(address) func (_ERC721 *ERC721CallerSession) OwnerOf(_tokenId *big.Int) (common.Address, error) { return _ERC721.Contract.OwnerOf(&_ERC721.CallOpts, _tokenId) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address _approved, uint256 _tokenId) returns() func (_ERC721 *ERC721Transactor) Approve(opts *bind.TransactOpts, _approved common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.contract.Transact(opts, "approve", _approved, _tokenId) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address _approved, uint256 _tokenId) returns() func (_ERC721 *ERC721Session) Approve(_approved common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.Contract.Approve(&_ERC721.TransactOpts, _approved, _tokenId) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address _approved, uint256 _tokenId) returns() func (_ERC721 *ERC721TransactorSession) Approve(_approved common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.Contract.Approve(&_ERC721.TransactOpts, _approved, _tokenId) } // SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. // // Solidity: function safeTransferFrom(address _from, address _to, uint256 _tokenId) returns() func (_ERC721 *ERC721Transactor) SafeTransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.contract.Transact(opts, "safeTransferFrom", _from, _to, _tokenId) } // SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. // // Solidity: function safeTransferFrom(address _from, address _to, uint256 _tokenId) returns() func (_ERC721 *ERC721Session) SafeTransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.Contract.SafeTransferFrom(&_ERC721.TransactOpts, _from, _to, _tokenId) } // SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. // // Solidity: function safeTransferFrom(address _from, address _to, uint256 _tokenId) returns() func (_ERC721 *ERC721TransactorSession) SafeTransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.Contract.SafeTransferFrom(&_ERC721.TransactOpts, _from, _to, _tokenId) } // SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. // // Solidity: function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes _data) returns() func (_ERC721 *ERC721Transactor) SafeTransferFrom0(opts *bind.TransactOpts, _from common.Address, _to common.Address, _tokenId *big.Int, _data []byte) (*types.Transaction, error) { return _ERC721.contract.Transact(opts, "safeTransferFrom0", _from, _to, _tokenId, _data) } // SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. // // Solidity: function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes _data) returns() func (_ERC721 *ERC721Session) SafeTransferFrom0(_from common.Address, _to common.Address, _tokenId *big.Int, _data []byte) (*types.Transaction, error) { return _ERC721.Contract.SafeTransferFrom0(&_ERC721.TransactOpts, _from, _to, _tokenId, _data) } // SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. // // Solidity: function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes _data) returns() func (_ERC721 *ERC721TransactorSession) SafeTransferFrom0(_from common.Address, _to common.Address, _tokenId *big.Int, _data []byte) (*types.Transaction, error) { return _ERC721.Contract.SafeTransferFrom0(&_ERC721.TransactOpts, _from, _to, _tokenId, _data) } // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. // // Solidity: function setApprovalForAll(address _operator, bool _approved) returns() func (_ERC721 *ERC721Transactor) SetApprovalForAll(opts *bind.TransactOpts, _operator common.Address, _approved bool) (*types.Transaction, error) { return _ERC721.contract.Transact(opts, "setApprovalForAll", _operator, _approved) } // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. // // Solidity: function setApprovalForAll(address _operator, bool _approved) returns() func (_ERC721 *ERC721Session) SetApprovalForAll(_operator common.Address, _approved bool) (*types.Transaction, error) { return _ERC721.Contract.SetApprovalForAll(&_ERC721.TransactOpts, _operator, _approved) } // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. // // Solidity: function setApprovalForAll(address _operator, bool _approved) returns() func (_ERC721 *ERC721TransactorSession) SetApprovalForAll(_operator common.Address, _approved bool) (*types.Transaction, error) { return _ERC721.Contract.SetApprovalForAll(&_ERC721.TransactOpts, _operator, _approved) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address _from, address _to, uint256 _tokenId) returns() func (_ERC721 *ERC721Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.contract.Transact(opts, "transferFrom", _from, _to, _tokenId) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address _from, address _to, uint256 _tokenId) returns() func (_ERC721 *ERC721Session) TransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.Contract.TransferFrom(&_ERC721.TransactOpts, _from, _to, _tokenId) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address _from, address _to, uint256 _tokenId) returns() func (_ERC721 *ERC721TransactorSession) TransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error) { return _ERC721.Contract.TransferFrom(&_ERC721.TransactOpts, _from, _to, _tokenId) } // ERC721ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC721 contract. type ERC721ApprovalIterator struct { Event *ERC721Approval // 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 *ERC721ApprovalIterator) 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(ERC721Approval) 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(ERC721Approval) 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 *ERC721ApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *ERC721ApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // ERC721Approval represents a Approval event raised by the ERC721 contract. type ERC721Approval struct { Owner common.Address Approved common.Address TokenId *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 _approved, uint256 indexed _tokenId) func (_ERC721 *ERC721Filterer) FilterApproval(opts *bind.FilterOpts, _owner []common.Address, _approved []common.Address, _tokenId []*big.Int) (*ERC721ApprovalIterator, error) { var _ownerRule []interface{} for _, _ownerItem := range _owner { _ownerRule = append(_ownerRule, _ownerItem) } var _approvedRule []interface{} for _, _approvedItem := range _approved { _approvedRule = append(_approvedRule, _approvedItem) } var _tokenIdRule []interface{} for _, _tokenIdItem := range _tokenId { _tokenIdRule = append(_tokenIdRule, _tokenIdItem) } logs, sub, err := _ERC721.contract.FilterLogs(opts, "Approval", _ownerRule, _approvedRule, _tokenIdRule) if err != nil { return nil, err } return &ERC721ApprovalIterator{contract: _ERC721.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 _approved, uint256 indexed _tokenId) func (_ERC721 *ERC721Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC721Approval, _owner []common.Address, _approved []common.Address, _tokenId []*big.Int) (event.Subscription, error) { var _ownerRule []interface{} for _, _ownerItem := range _owner { _ownerRule = append(_ownerRule, _ownerItem) } var _approvedRule []interface{} for _, _approvedItem := range _approved { _approvedRule = append(_approvedRule, _approvedItem) } var _tokenIdRule []interface{} for _, _tokenIdItem := range _tokenId { _tokenIdRule = append(_tokenIdRule, _tokenIdItem) } logs, sub, err := _ERC721.contract.WatchLogs(opts, "Approval", _ownerRule, _approvedRule, _tokenIdRule) 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(ERC721Approval) if err := _ERC721.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 _approved, uint256 indexed _tokenId) func (_ERC721 *ERC721Filterer) ParseApproval(log types.Log) (*ERC721Approval, error) { event := new(ERC721Approval) if err := _ERC721.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // ERC721ApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the ERC721 contract. type ERC721ApprovalForAllIterator struct { Event *ERC721ApprovalForAll // 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 *ERC721ApprovalForAllIterator) 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(ERC721ApprovalForAll) 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(ERC721ApprovalForAll) 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 *ERC721ApprovalForAllIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *ERC721ApprovalForAllIterator) Close() error { it.sub.Unsubscribe() return nil } // ERC721ApprovalForAll represents a ApprovalForAll event raised by the ERC721 contract. type ERC721ApprovalForAll struct { Owner common.Address Operator common.Address Approved bool Raw types.Log // Blockchain specific contextual infos } // FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. // // Solidity: event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved) func (_ERC721 *ERC721Filterer) FilterApprovalForAll(opts *bind.FilterOpts, _owner []common.Address, _operator []common.Address) (*ERC721ApprovalForAllIterator, error) { var _ownerRule []interface{} for _, _ownerItem := range _owner { _ownerRule = append(_ownerRule, _ownerItem) } var _operatorRule []interface{} for _, _operatorItem := range _operator { _operatorRule = append(_operatorRule, _operatorItem) } logs, sub, err := _ERC721.contract.FilterLogs(opts, "ApprovalForAll", _ownerRule, _operatorRule) if err != nil { return nil, err } return &ERC721ApprovalForAllIterator{contract: _ERC721.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil } // WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. // // Solidity: event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved) func (_ERC721 *ERC721Filterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *ERC721ApprovalForAll, _owner []common.Address, _operator []common.Address) (event.Subscription, error) { var _ownerRule []interface{} for _, _ownerItem := range _owner { _ownerRule = append(_ownerRule, _ownerItem) } var _operatorRule []interface{} for _, _operatorItem := range _operator { _operatorRule = append(_operatorRule, _operatorItem) } logs, sub, err := _ERC721.contract.WatchLogs(opts, "ApprovalForAll", _ownerRule, _operatorRule) 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(ERC721ApprovalForAll) if err := _ERC721.contract.UnpackLog(event, "ApprovalForAll", 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 } // ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. // // Solidity: event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved) func (_ERC721 *ERC721Filterer) ParseApprovalForAll(log types.Log) (*ERC721ApprovalForAll, error) { event := new(ERC721ApprovalForAll) if err := _ERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { return nil, err } event.Raw = log return event, nil } // ERC721TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC721 contract. type ERC721TransferIterator struct { Event *ERC721Transfer // 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 *ERC721TransferIterator) 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(ERC721Transfer) 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(ERC721Transfer) 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 *ERC721TransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *ERC721TransferIterator) Close() error { it.sub.Unsubscribe() return nil } // ERC721Transfer represents a Transfer event raised by the ERC721 contract. type ERC721Transfer struct { From common.Address To common.Address TokenId *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 indexed _tokenId) func (_ERC721 *ERC721Filterer) FilterTransfer(opts *bind.FilterOpts, _from []common.Address, _to []common.Address, _tokenId []*big.Int) (*ERC721TransferIterator, error) { var _fromRule []interface{} for _, _fromItem := range _from { _fromRule = append(_fromRule, _fromItem) } var _toRule []interface{} for _, _toItem := range _to { _toRule = append(_toRule, _toItem) } var _tokenIdRule []interface{} for _, _tokenIdItem := range _tokenId { _tokenIdRule = append(_tokenIdRule, _tokenIdItem) } logs, sub, err := _ERC721.contract.FilterLogs(opts, "Transfer", _fromRule, _toRule, _tokenIdRule) if err != nil { return nil, err } return &ERC721TransferIterator{contract: _ERC721.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 indexed _tokenId) func (_ERC721 *ERC721Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC721Transfer, _from []common.Address, _to []common.Address, _tokenId []*big.Int) (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) } var _tokenIdRule []interface{} for _, _tokenIdItem := range _tokenId { _tokenIdRule = append(_tokenIdRule, _tokenIdItem) } logs, sub, err := _ERC721.contract.WatchLogs(opts, "Transfer", _fromRule, _toRule, _tokenIdRule) 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(ERC721Transfer) if err := _ERC721.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 indexed _tokenId) func (_ERC721 *ERC721Filterer) ParseTransfer(log types.Log) (*ERC721Transfer, error) { event := new(ERC721Transfer) if err := _ERC721.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil }