17296 lines
849 KiB
Go
17296 lines
849 KiB
Go
// Code generated - DO NOT EDIT.
|
|
// This file is a generated binding and any manual changes will be lost.
|
|
|
|
package stickers
|
|
|
|
import (
|
|
"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 (
|
|
_ = big.NewInt
|
|
_ = strings.NewReader
|
|
_ = ethereum.NotFound
|
|
_ = bind.Bind
|
|
_ = common.Big1
|
|
_ = types.BloomLookup
|
|
_ = event.NewSubscription
|
|
)
|
|
|
|
// AddressABI is the input ABI used to generate the binding from.
|
|
const AddressABI = "[]"
|
|
|
|
// AddressBin is the compiled bytecode used for deploying new contracts.
|
|
var AddressBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723058204ac2d1ce23a620d918fd87b6474a14cc1d516f54bd777d9c7c388e2628c8131864736f6c634300050a0032"
|
|
|
|
// DeployAddress deploys a new Ethereum contract, binding an instance of Address to it.
|
|
func DeployAddress(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Address, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(AddressABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AddressBin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// Address is an auto generated Go binding around an Ethereum contract.
|
|
type Address struct {
|
|
AddressCaller // Read-only binding to the contract
|
|
AddressTransactor // Write-only binding to the contract
|
|
AddressFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// AddressCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type AddressCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// AddressTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type AddressTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// AddressFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type AddressFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// AddressSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type AddressSession struct {
|
|
Contract *Address // 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
|
|
}
|
|
|
|
// AddressCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type AddressCallerSession struct {
|
|
Contract *AddressCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// AddressTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type AddressTransactorSession struct {
|
|
Contract *AddressTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// AddressRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type AddressRaw struct {
|
|
Contract *Address // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// AddressCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type AddressCallerRaw struct {
|
|
Contract *AddressCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// AddressTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type AddressTransactorRaw struct {
|
|
Contract *AddressTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewAddress creates a new instance of Address, bound to a specific deployed contract.
|
|
func NewAddress(address common.Address, backend bind.ContractBackend) (*Address, error) {
|
|
contract, err := bindAddress(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewAddressCaller creates a new read-only instance of Address, bound to a specific deployed contract.
|
|
func NewAddressCaller(address common.Address, caller bind.ContractCaller) (*AddressCaller, error) {
|
|
contract, err := bindAddress(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &AddressCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewAddressTransactor creates a new write-only instance of Address, bound to a specific deployed contract.
|
|
func NewAddressTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressTransactor, error) {
|
|
contract, err := bindAddress(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &AddressTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewAddressFilterer creates a new log filterer instance of Address, bound to a specific deployed contract.
|
|
func NewAddressFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressFilterer, error) {
|
|
contract, err := bindAddress(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &AddressFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindAddress binds a generic wrapper to an already deployed contract.
|
|
func bindAddress(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(AddressABI))
|
|
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 (_Address *AddressRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Address.Contract.AddressCaller.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 (_Address *AddressRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Address.Contract.AddressTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Address *AddressRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Address.Contract.AddressTransactor.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 (_Address *AddressCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Address.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 (_Address *AddressTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Address.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Address *AddressTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Address.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// ApproveAndCallFallBackABI is the input ABI used to generate the binding from.
|
|
const ApproveAndCallFallBackABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"receiveApproval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
|
|
|
|
// ApproveAndCallFallBackFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ApproveAndCallFallBackFuncSigs = map[string]string{
|
|
"8f4ffcb1": "receiveApproval(address,uint256,address,bytes)",
|
|
}
|
|
|
|
// ApproveAndCallFallBack is an auto generated Go binding around an Ethereum contract.
|
|
type ApproveAndCallFallBack struct {
|
|
ApproveAndCallFallBackCaller // Read-only binding to the contract
|
|
ApproveAndCallFallBackTransactor // Write-only binding to the contract
|
|
ApproveAndCallFallBackFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ApproveAndCallFallBackCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ApproveAndCallFallBackCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ApproveAndCallFallBackTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ApproveAndCallFallBackTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ApproveAndCallFallBackFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ApproveAndCallFallBackFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ApproveAndCallFallBackSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ApproveAndCallFallBackSession struct {
|
|
Contract *ApproveAndCallFallBack // 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
|
|
}
|
|
|
|
// ApproveAndCallFallBackCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ApproveAndCallFallBackCallerSession struct {
|
|
Contract *ApproveAndCallFallBackCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ApproveAndCallFallBackTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ApproveAndCallFallBackTransactorSession struct {
|
|
Contract *ApproveAndCallFallBackTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ApproveAndCallFallBackRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ApproveAndCallFallBackRaw struct {
|
|
Contract *ApproveAndCallFallBack // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ApproveAndCallFallBackCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ApproveAndCallFallBackCallerRaw struct {
|
|
Contract *ApproveAndCallFallBackCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ApproveAndCallFallBackTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ApproveAndCallFallBackTransactorRaw struct {
|
|
Contract *ApproveAndCallFallBackTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewApproveAndCallFallBack creates a new instance of ApproveAndCallFallBack, bound to a specific deployed contract.
|
|
func NewApproveAndCallFallBack(address common.Address, backend bind.ContractBackend) (*ApproveAndCallFallBack, error) {
|
|
contract, err := bindApproveAndCallFallBack(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ApproveAndCallFallBack{ApproveAndCallFallBackCaller: ApproveAndCallFallBackCaller{contract: contract}, ApproveAndCallFallBackTransactor: ApproveAndCallFallBackTransactor{contract: contract}, ApproveAndCallFallBackFilterer: ApproveAndCallFallBackFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewApproveAndCallFallBackCaller creates a new read-only instance of ApproveAndCallFallBack, bound to a specific deployed contract.
|
|
func NewApproveAndCallFallBackCaller(address common.Address, caller bind.ContractCaller) (*ApproveAndCallFallBackCaller, error) {
|
|
contract, err := bindApproveAndCallFallBack(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ApproveAndCallFallBackCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewApproveAndCallFallBackTransactor creates a new write-only instance of ApproveAndCallFallBack, bound to a specific deployed contract.
|
|
func NewApproveAndCallFallBackTransactor(address common.Address, transactor bind.ContractTransactor) (*ApproveAndCallFallBackTransactor, error) {
|
|
contract, err := bindApproveAndCallFallBack(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ApproveAndCallFallBackTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewApproveAndCallFallBackFilterer creates a new log filterer instance of ApproveAndCallFallBack, bound to a specific deployed contract.
|
|
func NewApproveAndCallFallBackFilterer(address common.Address, filterer bind.ContractFilterer) (*ApproveAndCallFallBackFilterer, error) {
|
|
contract, err := bindApproveAndCallFallBack(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ApproveAndCallFallBackFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindApproveAndCallFallBack binds a generic wrapper to an already deployed contract.
|
|
func bindApproveAndCallFallBack(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ApproveAndCallFallBackABI))
|
|
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 (_ApproveAndCallFallBack *ApproveAndCallFallBackRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ApproveAndCallFallBack.Contract.ApproveAndCallFallBackCaller.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 (_ApproveAndCallFallBack *ApproveAndCallFallBackRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.Contract.ApproveAndCallFallBackTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ApproveAndCallFallBack *ApproveAndCallFallBackRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.Contract.ApproveAndCallFallBackTransactor.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 (_ApproveAndCallFallBack *ApproveAndCallFallBackCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ApproveAndCallFallBack.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 (_ApproveAndCallFallBack *ApproveAndCallFallBackTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ApproveAndCallFallBack *ApproveAndCallFallBackTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// ReceiveApproval is a paid mutator transaction binding the contract method 0x8f4ffcb1.
|
|
//
|
|
// Solidity: function receiveApproval(address from, uint256 _amount, address _token, bytes _data) returns()
|
|
func (_ApproveAndCallFallBack *ApproveAndCallFallBackTransactor) ReceiveApproval(opts *bind.TransactOpts, from common.Address, _amount *big.Int, _token common.Address, _data []byte) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.contract.Transact(opts, "receiveApproval", from, _amount, _token, _data)
|
|
}
|
|
|
|
// ReceiveApproval is a paid mutator transaction binding the contract method 0x8f4ffcb1.
|
|
//
|
|
// Solidity: function receiveApproval(address from, uint256 _amount, address _token, bytes _data) returns()
|
|
func (_ApproveAndCallFallBack *ApproveAndCallFallBackSession) ReceiveApproval(from common.Address, _amount *big.Int, _token common.Address, _data []byte) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.Contract.ReceiveApproval(&_ApproveAndCallFallBack.TransactOpts, from, _amount, _token, _data)
|
|
}
|
|
|
|
// ReceiveApproval is a paid mutator transaction binding the contract method 0x8f4ffcb1.
|
|
//
|
|
// Solidity: function receiveApproval(address from, uint256 _amount, address _token, bytes _data) returns()
|
|
func (_ApproveAndCallFallBack *ApproveAndCallFallBackTransactorSession) ReceiveApproval(from common.Address, _amount *big.Int, _token common.Address, _data []byte) (*types.Transaction, error) {
|
|
return _ApproveAndCallFallBack.Contract.ReceiveApproval(&_ApproveAndCallFallBack.TransactOpts, from, _amount, _token, _data)
|
|
}
|
|
|
|
// ControlledABI is the input ABI used to generate the binding from.
|
|
const ControlledABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_newController\",\"type\":\"address\"}],\"name\":\"changeController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"NewController\",\"type\":\"event\"}]"
|
|
|
|
// ControlledFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ControlledFuncSigs = map[string]string{
|
|
"3cebb823": "changeController(address)",
|
|
"f77c4791": "controller()",
|
|
}
|
|
|
|
// Controlled is an auto generated Go binding around an Ethereum contract.
|
|
type Controlled struct {
|
|
ControlledCaller // Read-only binding to the contract
|
|
ControlledTransactor // Write-only binding to the contract
|
|
ControlledFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ControlledCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ControlledCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ControlledTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ControlledTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ControlledFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ControlledFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ControlledSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ControlledSession struct {
|
|
Contract *Controlled // 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
|
|
}
|
|
|
|
// ControlledCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ControlledCallerSession struct {
|
|
Contract *ControlledCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ControlledTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ControlledTransactorSession struct {
|
|
Contract *ControlledTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ControlledRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ControlledRaw struct {
|
|
Contract *Controlled // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ControlledCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ControlledCallerRaw struct {
|
|
Contract *ControlledCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ControlledTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ControlledTransactorRaw struct {
|
|
Contract *ControlledTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewControlled creates a new instance of Controlled, bound to a specific deployed contract.
|
|
func NewControlled(address common.Address, backend bind.ContractBackend) (*Controlled, error) {
|
|
contract, err := bindControlled(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Controlled{ControlledCaller: ControlledCaller{contract: contract}, ControlledTransactor: ControlledTransactor{contract: contract}, ControlledFilterer: ControlledFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewControlledCaller creates a new read-only instance of Controlled, bound to a specific deployed contract.
|
|
func NewControlledCaller(address common.Address, caller bind.ContractCaller) (*ControlledCaller, error) {
|
|
contract, err := bindControlled(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ControlledCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewControlledTransactor creates a new write-only instance of Controlled, bound to a specific deployed contract.
|
|
func NewControlledTransactor(address common.Address, transactor bind.ContractTransactor) (*ControlledTransactor, error) {
|
|
contract, err := bindControlled(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ControlledTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewControlledFilterer creates a new log filterer instance of Controlled, bound to a specific deployed contract.
|
|
func NewControlledFilterer(address common.Address, filterer bind.ContractFilterer) (*ControlledFilterer, error) {
|
|
contract, err := bindControlled(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ControlledFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindControlled binds a generic wrapper to an already deployed contract.
|
|
func bindControlled(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ControlledABI))
|
|
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 (_Controlled *ControlledRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Controlled.Contract.ControlledCaller.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 (_Controlled *ControlledRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Controlled.Contract.ControlledTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Controlled *ControlledRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Controlled.Contract.ControlledTransactor.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 (_Controlled *ControlledCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Controlled.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 (_Controlled *ControlledTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Controlled.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Controlled *ControlledTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Controlled.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_Controlled *ControlledCaller) Controller(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _Controlled.contract.Call(opts, &out, "controller")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_Controlled *ControlledSession) Controller() (common.Address, error) {
|
|
return _Controlled.Contract.Controller(&_Controlled.CallOpts)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_Controlled *ControlledCallerSession) Controller() (common.Address, error) {
|
|
return _Controlled.Contract.Controller(&_Controlled.CallOpts)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_Controlled *ControlledTransactor) ChangeController(opts *bind.TransactOpts, _newController common.Address) (*types.Transaction, error) {
|
|
return _Controlled.contract.Transact(opts, "changeController", _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_Controlled *ControlledSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _Controlled.Contract.ChangeController(&_Controlled.TransactOpts, _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_Controlled *ControlledTransactorSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _Controlled.Contract.ChangeController(&_Controlled.TransactOpts, _newController)
|
|
}
|
|
|
|
// ControlledNewControllerIterator is returned from FilterNewController and is used to iterate over the raw logs and unpacked data for NewController events raised by the Controlled contract.
|
|
type ControlledNewControllerIterator struct {
|
|
Event *ControlledNewController // 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 *ControlledNewControllerIterator) 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(ControlledNewController)
|
|
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(ControlledNewController)
|
|
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 *ControlledNewControllerIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ControlledNewControllerIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ControlledNewController represents a NewController event raised by the Controlled contract.
|
|
type ControlledNewController struct {
|
|
Controller common.Address
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterNewController is a free log retrieval operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_Controlled *ControlledFilterer) FilterNewController(opts *bind.FilterOpts) (*ControlledNewControllerIterator, error) {
|
|
|
|
logs, sub, err := _Controlled.contract.FilterLogs(opts, "NewController")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ControlledNewControllerIterator{contract: _Controlled.contract, event: "NewController", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchNewController is a free log subscription operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_Controlled *ControlledFilterer) WatchNewController(opts *bind.WatchOpts, sink chan<- *ControlledNewController) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _Controlled.contract.WatchLogs(opts, "NewController")
|
|
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(ControlledNewController)
|
|
if err := _Controlled.contract.UnpackLog(event, "NewController", 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
|
|
}
|
|
|
|
// ParseNewController is a log parse operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_Controlled *ControlledFilterer) ParseNewController(log types.Log) (*ControlledNewController, error) {
|
|
event := new(ControlledNewController)
|
|
if err := _Controlled.contract.UnpackLog(event, "NewController", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// CountersABI is the input ABI used to generate the binding from.
|
|
const CountersABI = "[]"
|
|
|
|
// CountersBin is the compiled bytecode used for deploying new contracts.
|
|
var CountersBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820193672f67d2aa639c8aa98e64b12069d244224f2e0edeffcd9bd358a244322d364736f6c634300050a0032"
|
|
|
|
// DeployCounters deploys a new Ethereum contract, binding an instance of Counters to it.
|
|
func DeployCounters(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Counters, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(CountersABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(CountersBin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &Counters{CountersCaller: CountersCaller{contract: contract}, CountersTransactor: CountersTransactor{contract: contract}, CountersFilterer: CountersFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// Counters is an auto generated Go binding around an Ethereum contract.
|
|
type Counters struct {
|
|
CountersCaller // Read-only binding to the contract
|
|
CountersTransactor // Write-only binding to the contract
|
|
CountersFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// CountersCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type CountersCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// CountersTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type CountersTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// CountersFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type CountersFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// CountersSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type CountersSession struct {
|
|
Contract *Counters // 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
|
|
}
|
|
|
|
// CountersCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type CountersCallerSession struct {
|
|
Contract *CountersCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// CountersTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type CountersTransactorSession struct {
|
|
Contract *CountersTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// CountersRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type CountersRaw struct {
|
|
Contract *Counters // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// CountersCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type CountersCallerRaw struct {
|
|
Contract *CountersCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// CountersTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type CountersTransactorRaw struct {
|
|
Contract *CountersTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewCounters creates a new instance of Counters, bound to a specific deployed contract.
|
|
func NewCounters(address common.Address, backend bind.ContractBackend) (*Counters, error) {
|
|
contract, err := bindCounters(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Counters{CountersCaller: CountersCaller{contract: contract}, CountersTransactor: CountersTransactor{contract: contract}, CountersFilterer: CountersFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewCountersCaller creates a new read-only instance of Counters, bound to a specific deployed contract.
|
|
func NewCountersCaller(address common.Address, caller bind.ContractCaller) (*CountersCaller, error) {
|
|
contract, err := bindCounters(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &CountersCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewCountersTransactor creates a new write-only instance of Counters, bound to a specific deployed contract.
|
|
func NewCountersTransactor(address common.Address, transactor bind.ContractTransactor) (*CountersTransactor, error) {
|
|
contract, err := bindCounters(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &CountersTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewCountersFilterer creates a new log filterer instance of Counters, bound to a specific deployed contract.
|
|
func NewCountersFilterer(address common.Address, filterer bind.ContractFilterer) (*CountersFilterer, error) {
|
|
contract, err := bindCounters(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &CountersFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindCounters binds a generic wrapper to an already deployed contract.
|
|
func bindCounters(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(CountersABI))
|
|
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 (_Counters *CountersRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Counters.Contract.CountersCaller.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 (_Counters *CountersRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Counters.Contract.CountersTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Counters *CountersRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Counters.Contract.CountersTransactor.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 (_Counters *CountersCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Counters.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 (_Counters *CountersTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Counters.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Counters *CountersTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Counters.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// ERC165ABI is the input ABI used to generate the binding from.
|
|
const ERC165ABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]"
|
|
|
|
// ERC165FuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC165FuncSigs = map[string]string{
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
}
|
|
|
|
// ERC165 is an auto generated Go binding around an Ethereum contract.
|
|
type ERC165 struct {
|
|
ERC165Caller // Read-only binding to the contract
|
|
ERC165Transactor // Write-only binding to the contract
|
|
ERC165Filterer // Log filterer for contract events
|
|
}
|
|
|
|
// ERC165Caller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ERC165Caller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC165Transactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ERC165Transactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC165Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ERC165Filterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC165Session is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ERC165Session struct {
|
|
Contract *ERC165 // 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
|
|
}
|
|
|
|
// ERC165CallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ERC165CallerSession struct {
|
|
Contract *ERC165Caller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ERC165TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ERC165TransactorSession struct {
|
|
Contract *ERC165Transactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ERC165Raw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ERC165Raw struct {
|
|
Contract *ERC165 // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC165CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ERC165CallerRaw struct {
|
|
Contract *ERC165Caller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC165TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ERC165TransactorRaw struct {
|
|
Contract *ERC165Transactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewERC165 creates a new instance of ERC165, bound to a specific deployed contract.
|
|
func NewERC165(address common.Address, backend bind.ContractBackend) (*ERC165, error) {
|
|
contract, err := bindERC165(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC165{ERC165Caller: ERC165Caller{contract: contract}, ERC165Transactor: ERC165Transactor{contract: contract}, ERC165Filterer: ERC165Filterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewERC165Caller creates a new read-only instance of ERC165, bound to a specific deployed contract.
|
|
func NewERC165Caller(address common.Address, caller bind.ContractCaller) (*ERC165Caller, error) {
|
|
contract, err := bindERC165(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC165Caller{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC165Transactor creates a new write-only instance of ERC165, bound to a specific deployed contract.
|
|
func NewERC165Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC165Transactor, error) {
|
|
contract, err := bindERC165(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC165Transactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC165Filterer creates a new log filterer instance of ERC165, bound to a specific deployed contract.
|
|
func NewERC165Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC165Filterer, error) {
|
|
contract, err := bindERC165(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC165Filterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindERC165 binds a generic wrapper to an already deployed contract.
|
|
func bindERC165(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC165ABI))
|
|
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 (_ERC165 *ERC165Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC165.Contract.ERC165Caller.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 (_ERC165 *ERC165Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC165.Contract.ERC165Transactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC165 *ERC165Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC165.Contract.ERC165Transactor.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 (_ERC165 *ERC165CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC165.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 (_ERC165 *ERC165TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC165.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC165 *ERC165TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC165.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC165 *ERC165Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC165.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC165 *ERC165Session) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC165.Contract.SupportsInterface(&_ERC165.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC165 *ERC165CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC165.Contract.SupportsInterface(&_ERC165.CallOpts, interfaceId)
|
|
}
|
|
|
|
// ERC20ReceiverABI is the input ABI used to generate the binding from.
|
|
const ERC20ReceiverABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_from\",\"type\":\"address\"}],\"name\":\"tokenBalanceOf\",\"outputs\":[{\"name\":\"fromTokenBalance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"depositToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"depositToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"}]"
|
|
|
|
// ERC20ReceiverFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC20ReceiverFuncSigs = map[string]string{
|
|
"2fd55265": "depositToken(address)",
|
|
"338b5dea": "depositToken(address,uint256)",
|
|
"1bea8006": "tokenBalanceOf(address,address)",
|
|
"9e281a98": "withdrawToken(address,uint256)",
|
|
}
|
|
|
|
// ERC20ReceiverBin is the compiled bytecode used for deploying new contracts.
|
|
var ERC20ReceiverBin = "0x608060405234801561001057600080fd5b506105de806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80631bea8006146100515780632fd5526514610091578063338b5dea146100b95780639e281a98146100e5575b600080fd5b61007f6004803603604081101561006757600080fd5b506001600160a01b0381358116916020013516610111565b60408051918252519081900360200190f35b6100b7600480360360208110156100a757600080fd5b50356001600160a01b031661013a565b005b6100b7600480360360408110156100cf57600080fd5b506001600160a01b0381351690602001356101c3565b6100b7600480360360408110156100fb57600080fd5b506001600160a01b03813516906020013561028f565b6001600160a01b0391821660009081526020818152604080832093909416825291909152205490565b60408051636eb1769f60e11b8152336004820181905230602483015291516101c0929184916001600160a01b0383169163dd62ed3e916044808301926020929190829003018186803b15801561018f57600080fd5b505afa1580156101a3573d6000803e3d6000fd5b505050506040513d60208110156101b957600080fd5b505161029a565b50565b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0385169163dd62ed3e91604480820192602092909190829003018186803b15801561021257600080fd5b505afa158015610226573d6000803e3d6000fd5b505050506040513d602081101561023c57600080fd5b50511015610280576040805162461bcd60e51b815260206004820152600c60248201526b10985908185c99dd5b595b9d60a21b604482015290519081900360640190fd5b61028b33838361029a565b5050565b61028b3383836103cc565b600081116102de576040805162461bcd60e51b815260206004820152600c60248201526b10985908185c99dd5b595b9d60a21b604482015290519081900360640190fd5b604080516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018490529151918416916323b872dd916064808201926020929091908290030181600087803b15801561033757600080fd5b505af115801561034b573d6000803e3d6000fd5b505050506040513d602081101561036157600080fd5b5051156103c7576001600160a01b0380831660008181526020818152604080832094881680845294825291829020805486019055815185815291517ff1444b5cad7ce70cb018d1b8edc8618fe303f3c7f034d8d572a6e27facbf2bef9281900390910190a35b505050565b60008111610410576040805162461bcd60e51b815260206004820152600c60248201526b10985908185c99dd5b595b9d60a21b604482015290519081900360640190fd5b6001600160a01b038083166000908152602081815260408083209387168352929052205481111561047d576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b6001600160a01b0380831660008181526020818152604080832094881680845294825280832080548790039055805163a9059cbb60e01b815260048101959095526024850186905251929363a9059cbb9360448083019491928390030190829087803b1580156104ec57600080fd5b505af1158015610500573d6000803e3d6000fd5b505050506040513d602081101561051657600080fd5b5051610559576040805162461bcd60e51b815260206004820152600d60248201526c151c985b9cd9995c8819985a5b609a1b604482015290519081900360640190fd5b826001600160a01b0316826001600160a01b03167f8210728e7c071f615b840ee026032693858fbcd5e5359e67e438c890f59e5620836040518082815260200191505060405180910390a350505056fea265627a7a7230582093297dcffa75bf23fd3bf05632e53a14144b540f034384b270c02f4609945c2964736f6c634300050a0032"
|
|
|
|
// DeployERC20Receiver deploys a new Ethereum contract, binding an instance of ERC20Receiver to it.
|
|
func DeployERC20Receiver(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Receiver, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC20ReceiverABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20ReceiverBin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &ERC20Receiver{ERC20ReceiverCaller: ERC20ReceiverCaller{contract: contract}, ERC20ReceiverTransactor: ERC20ReceiverTransactor{contract: contract}, ERC20ReceiverFilterer: ERC20ReceiverFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// ERC20Receiver is an auto generated Go binding around an Ethereum contract.
|
|
type ERC20Receiver struct {
|
|
ERC20ReceiverCaller // Read-only binding to the contract
|
|
ERC20ReceiverTransactor // Write-only binding to the contract
|
|
ERC20ReceiverFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ERC20ReceiverCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ERC20ReceiverCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC20ReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ERC20ReceiverTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC20ReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ERC20ReceiverFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC20ReceiverSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ERC20ReceiverSession struct {
|
|
Contract *ERC20Receiver // 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
|
|
}
|
|
|
|
// ERC20ReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ERC20ReceiverCallerSession struct {
|
|
Contract *ERC20ReceiverCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ERC20ReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ERC20ReceiverTransactorSession struct {
|
|
Contract *ERC20ReceiverTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ERC20ReceiverRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ERC20ReceiverRaw struct {
|
|
Contract *ERC20Receiver // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC20ReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ERC20ReceiverCallerRaw struct {
|
|
Contract *ERC20ReceiverCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC20ReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ERC20ReceiverTransactorRaw struct {
|
|
Contract *ERC20ReceiverTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewERC20Receiver creates a new instance of ERC20Receiver, bound to a specific deployed contract.
|
|
func NewERC20Receiver(address common.Address, backend bind.ContractBackend) (*ERC20Receiver, error) {
|
|
contract, err := bindERC20Receiver(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20Receiver{ERC20ReceiverCaller: ERC20ReceiverCaller{contract: contract}, ERC20ReceiverTransactor: ERC20ReceiverTransactor{contract: contract}, ERC20ReceiverFilterer: ERC20ReceiverFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewERC20ReceiverCaller creates a new read-only instance of ERC20Receiver, bound to a specific deployed contract.
|
|
func NewERC20ReceiverCaller(address common.Address, caller bind.ContractCaller) (*ERC20ReceiverCaller, error) {
|
|
contract, err := bindERC20Receiver(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20ReceiverCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC20ReceiverTransactor creates a new write-only instance of ERC20Receiver, bound to a specific deployed contract.
|
|
func NewERC20ReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20ReceiverTransactor, error) {
|
|
contract, err := bindERC20Receiver(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20ReceiverTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC20ReceiverFilterer creates a new log filterer instance of ERC20Receiver, bound to a specific deployed contract.
|
|
func NewERC20ReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20ReceiverFilterer, error) {
|
|
contract, err := bindERC20Receiver(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20ReceiverFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindERC20Receiver binds a generic wrapper to an already deployed contract.
|
|
func bindERC20Receiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC20ReceiverABI))
|
|
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 (_ERC20Receiver *ERC20ReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC20Receiver.Contract.ERC20ReceiverCaller.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 (_ERC20Receiver *ERC20ReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.ERC20ReceiverTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC20Receiver *ERC20ReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.ERC20ReceiverTransactor.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 (_ERC20Receiver *ERC20ReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC20Receiver.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 (_ERC20Receiver *ERC20ReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC20Receiver *ERC20ReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// TokenBalanceOf is a free data retrieval call binding the contract method 0x1bea8006.
|
|
//
|
|
// Solidity: function tokenBalanceOf(address _token, address _from) view returns(uint256 fromTokenBalance)
|
|
func (_ERC20Receiver *ERC20ReceiverCaller) TokenBalanceOf(opts *bind.CallOpts, _token common.Address, _from common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC20Receiver.contract.Call(opts, &out, "tokenBalanceOf", _token, _from)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenBalanceOf is a free data retrieval call binding the contract method 0x1bea8006.
|
|
//
|
|
// Solidity: function tokenBalanceOf(address _token, address _from) view returns(uint256 fromTokenBalance)
|
|
func (_ERC20Receiver *ERC20ReceiverSession) TokenBalanceOf(_token common.Address, _from common.Address) (*big.Int, error) {
|
|
return _ERC20Receiver.Contract.TokenBalanceOf(&_ERC20Receiver.CallOpts, _token, _from)
|
|
}
|
|
|
|
// TokenBalanceOf is a free data retrieval call binding the contract method 0x1bea8006.
|
|
//
|
|
// Solidity: function tokenBalanceOf(address _token, address _from) view returns(uint256 fromTokenBalance)
|
|
func (_ERC20Receiver *ERC20ReceiverCallerSession) TokenBalanceOf(_token common.Address, _from common.Address) (*big.Int, error) {
|
|
return _ERC20Receiver.Contract.TokenBalanceOf(&_ERC20Receiver.CallOpts, _token, _from)
|
|
}
|
|
|
|
// DepositToken is a paid mutator transaction binding the contract method 0x2fd55265.
|
|
//
|
|
// Solidity: function depositToken(address _token) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverTransactor) DepositToken(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) {
|
|
return _ERC20Receiver.contract.Transact(opts, "depositToken", _token)
|
|
}
|
|
|
|
// DepositToken is a paid mutator transaction binding the contract method 0x2fd55265.
|
|
//
|
|
// Solidity: function depositToken(address _token) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverSession) DepositToken(_token common.Address) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.DepositToken(&_ERC20Receiver.TransactOpts, _token)
|
|
}
|
|
|
|
// DepositToken is a paid mutator transaction binding the contract method 0x2fd55265.
|
|
//
|
|
// Solidity: function depositToken(address _token) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverTransactorSession) DepositToken(_token common.Address) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.DepositToken(&_ERC20Receiver.TransactOpts, _token)
|
|
}
|
|
|
|
// DepositToken0 is a paid mutator transaction binding the contract method 0x338b5dea.
|
|
//
|
|
// Solidity: function depositToken(address _token, uint256 _amount) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverTransactor) DepositToken0(opts *bind.TransactOpts, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Receiver.contract.Transact(opts, "depositToken0", _token, _amount)
|
|
}
|
|
|
|
// DepositToken0 is a paid mutator transaction binding the contract method 0x338b5dea.
|
|
//
|
|
// Solidity: function depositToken(address _token, uint256 _amount) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverSession) DepositToken0(_token common.Address, _amount *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.DepositToken0(&_ERC20Receiver.TransactOpts, _token, _amount)
|
|
}
|
|
|
|
// DepositToken0 is a paid mutator transaction binding the contract method 0x338b5dea.
|
|
//
|
|
// Solidity: function depositToken(address _token, uint256 _amount) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverTransactorSession) DepositToken0(_token common.Address, _amount *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.DepositToken0(&_ERC20Receiver.TransactOpts, _token, _amount)
|
|
}
|
|
|
|
// WithdrawToken is a paid mutator transaction binding the contract method 0x9e281a98.
|
|
//
|
|
// Solidity: function withdrawToken(address _token, uint256 _amount) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverTransactor) WithdrawToken(opts *bind.TransactOpts, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Receiver.contract.Transact(opts, "withdrawToken", _token, _amount)
|
|
}
|
|
|
|
// WithdrawToken is a paid mutator transaction binding the contract method 0x9e281a98.
|
|
//
|
|
// Solidity: function withdrawToken(address _token, uint256 _amount) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverSession) WithdrawToken(_token common.Address, _amount *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.WithdrawToken(&_ERC20Receiver.TransactOpts, _token, _amount)
|
|
}
|
|
|
|
// WithdrawToken is a paid mutator transaction binding the contract method 0x9e281a98.
|
|
//
|
|
// Solidity: function withdrawToken(address _token, uint256 _amount) returns()
|
|
func (_ERC20Receiver *ERC20ReceiverTransactorSession) WithdrawToken(_token common.Address, _amount *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Receiver.Contract.WithdrawToken(&_ERC20Receiver.TransactOpts, _token, _amount)
|
|
}
|
|
|
|
// ERC20ReceiverTokenDepositedIterator is returned from FilterTokenDeposited and is used to iterate over the raw logs and unpacked data for TokenDeposited events raised by the ERC20Receiver contract.
|
|
type ERC20ReceiverTokenDepositedIterator struct {
|
|
Event *ERC20ReceiverTokenDeposited // 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 *ERC20ReceiverTokenDepositedIterator) 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(ERC20ReceiverTokenDeposited)
|
|
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(ERC20ReceiverTokenDeposited)
|
|
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 *ERC20ReceiverTokenDepositedIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC20ReceiverTokenDepositedIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC20ReceiverTokenDeposited represents a TokenDeposited event raised by the ERC20Receiver contract.
|
|
type ERC20ReceiverTokenDeposited struct {
|
|
Token common.Address
|
|
Sender common.Address
|
|
Amount *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterTokenDeposited is a free log retrieval operation binding the contract event 0xf1444b5cad7ce70cb018d1b8edc8618fe303f3c7f034d8d572a6e27facbf2bef.
|
|
//
|
|
// Solidity: event TokenDeposited(address indexed token, address indexed sender, uint256 amount)
|
|
func (_ERC20Receiver *ERC20ReceiverFilterer) FilterTokenDeposited(opts *bind.FilterOpts, token []common.Address, sender []common.Address) (*ERC20ReceiverTokenDepositedIterator, error) {
|
|
|
|
var tokenRule []interface{}
|
|
for _, tokenItem := range token {
|
|
tokenRule = append(tokenRule, tokenItem)
|
|
}
|
|
var senderRule []interface{}
|
|
for _, senderItem := range sender {
|
|
senderRule = append(senderRule, senderItem)
|
|
}
|
|
|
|
logs, sub, err := _ERC20Receiver.contract.FilterLogs(opts, "TokenDeposited", tokenRule, senderRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20ReceiverTokenDepositedIterator{contract: _ERC20Receiver.contract, event: "TokenDeposited", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchTokenDeposited is a free log subscription operation binding the contract event 0xf1444b5cad7ce70cb018d1b8edc8618fe303f3c7f034d8d572a6e27facbf2bef.
|
|
//
|
|
// Solidity: event TokenDeposited(address indexed token, address indexed sender, uint256 amount)
|
|
func (_ERC20Receiver *ERC20ReceiverFilterer) WatchTokenDeposited(opts *bind.WatchOpts, sink chan<- *ERC20ReceiverTokenDeposited, token []common.Address, sender []common.Address) (event.Subscription, error) {
|
|
|
|
var tokenRule []interface{}
|
|
for _, tokenItem := range token {
|
|
tokenRule = append(tokenRule, tokenItem)
|
|
}
|
|
var senderRule []interface{}
|
|
for _, senderItem := range sender {
|
|
senderRule = append(senderRule, senderItem)
|
|
}
|
|
|
|
logs, sub, err := _ERC20Receiver.contract.WatchLogs(opts, "TokenDeposited", tokenRule, senderRule)
|
|
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(ERC20ReceiverTokenDeposited)
|
|
if err := _ERC20Receiver.contract.UnpackLog(event, "TokenDeposited", 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
|
|
}
|
|
|
|
// ParseTokenDeposited is a log parse operation binding the contract event 0xf1444b5cad7ce70cb018d1b8edc8618fe303f3c7f034d8d572a6e27facbf2bef.
|
|
//
|
|
// Solidity: event TokenDeposited(address indexed token, address indexed sender, uint256 amount)
|
|
func (_ERC20Receiver *ERC20ReceiverFilterer) ParseTokenDeposited(log types.Log) (*ERC20ReceiverTokenDeposited, error) {
|
|
event := new(ERC20ReceiverTokenDeposited)
|
|
if err := _ERC20Receiver.contract.UnpackLog(event, "TokenDeposited", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC20ReceiverTokenWithdrawnIterator is returned from FilterTokenWithdrawn and is used to iterate over the raw logs and unpacked data for TokenWithdrawn events raised by the ERC20Receiver contract.
|
|
type ERC20ReceiverTokenWithdrawnIterator struct {
|
|
Event *ERC20ReceiverTokenWithdrawn // 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 *ERC20ReceiverTokenWithdrawnIterator) 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(ERC20ReceiverTokenWithdrawn)
|
|
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(ERC20ReceiverTokenWithdrawn)
|
|
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 *ERC20ReceiverTokenWithdrawnIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC20ReceiverTokenWithdrawnIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC20ReceiverTokenWithdrawn represents a TokenWithdrawn event raised by the ERC20Receiver contract.
|
|
type ERC20ReceiverTokenWithdrawn struct {
|
|
Token common.Address
|
|
Sender common.Address
|
|
Amount *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterTokenWithdrawn is a free log retrieval operation binding the contract event 0x8210728e7c071f615b840ee026032693858fbcd5e5359e67e438c890f59e5620.
|
|
//
|
|
// Solidity: event TokenWithdrawn(address indexed token, address indexed sender, uint256 amount)
|
|
func (_ERC20Receiver *ERC20ReceiverFilterer) FilterTokenWithdrawn(opts *bind.FilterOpts, token []common.Address, sender []common.Address) (*ERC20ReceiverTokenWithdrawnIterator, error) {
|
|
|
|
var tokenRule []interface{}
|
|
for _, tokenItem := range token {
|
|
tokenRule = append(tokenRule, tokenItem)
|
|
}
|
|
var senderRule []interface{}
|
|
for _, senderItem := range sender {
|
|
senderRule = append(senderRule, senderItem)
|
|
}
|
|
|
|
logs, sub, err := _ERC20Receiver.contract.FilterLogs(opts, "TokenWithdrawn", tokenRule, senderRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20ReceiverTokenWithdrawnIterator{contract: _ERC20Receiver.contract, event: "TokenWithdrawn", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchTokenWithdrawn is a free log subscription operation binding the contract event 0x8210728e7c071f615b840ee026032693858fbcd5e5359e67e438c890f59e5620.
|
|
//
|
|
// Solidity: event TokenWithdrawn(address indexed token, address indexed sender, uint256 amount)
|
|
func (_ERC20Receiver *ERC20ReceiverFilterer) WatchTokenWithdrawn(opts *bind.WatchOpts, sink chan<- *ERC20ReceiverTokenWithdrawn, token []common.Address, sender []common.Address) (event.Subscription, error) {
|
|
|
|
var tokenRule []interface{}
|
|
for _, tokenItem := range token {
|
|
tokenRule = append(tokenRule, tokenItem)
|
|
}
|
|
var senderRule []interface{}
|
|
for _, senderItem := range sender {
|
|
senderRule = append(senderRule, senderItem)
|
|
}
|
|
|
|
logs, sub, err := _ERC20Receiver.contract.WatchLogs(opts, "TokenWithdrawn", tokenRule, senderRule)
|
|
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(ERC20ReceiverTokenWithdrawn)
|
|
if err := _ERC20Receiver.contract.UnpackLog(event, "TokenWithdrawn", 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
|
|
}
|
|
|
|
// ParseTokenWithdrawn is a log parse operation binding the contract event 0x8210728e7c071f615b840ee026032693858fbcd5e5359e67e438c890f59e5620.
|
|
//
|
|
// Solidity: event TokenWithdrawn(address indexed token, address indexed sender, uint256 amount)
|
|
func (_ERC20Receiver *ERC20ReceiverFilterer) ParseTokenWithdrawn(log types.Log) (*ERC20ReceiverTokenWithdrawn, error) {
|
|
event := new(ERC20ReceiverTokenWithdrawn)
|
|
if err := _ERC20Receiver.contract.UnpackLog(event, "TokenWithdrawn", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC20TokenABI is the input ABI used to generate the binding from.
|
|
const ERC20TokenABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"supply\",\"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\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"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\"}]"
|
|
|
|
// ERC20TokenFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC20TokenFuncSigs = 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)",
|
|
}
|
|
|
|
// ERC20Token is an auto generated Go binding around an Ethereum contract.
|
|
type ERC20Token struct {
|
|
ERC20TokenCaller // Read-only binding to the contract
|
|
ERC20TokenTransactor // Write-only binding to the contract
|
|
ERC20TokenFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ERC20TokenCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ERC20TokenCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC20TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ERC20TokenTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC20TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ERC20TokenFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC20TokenSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ERC20TokenSession struct {
|
|
Contract *ERC20Token // 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
|
|
}
|
|
|
|
// ERC20TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ERC20TokenCallerSession struct {
|
|
Contract *ERC20TokenCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ERC20TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ERC20TokenTransactorSession struct {
|
|
Contract *ERC20TokenTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ERC20TokenRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ERC20TokenRaw struct {
|
|
Contract *ERC20Token // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC20TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ERC20TokenCallerRaw struct {
|
|
Contract *ERC20TokenCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC20TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ERC20TokenTransactorRaw struct {
|
|
Contract *ERC20TokenTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewERC20Token creates a new instance of ERC20Token, bound to a specific deployed contract.
|
|
func NewERC20Token(address common.Address, backend bind.ContractBackend) (*ERC20Token, error) {
|
|
contract, err := bindERC20Token(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20Token{ERC20TokenCaller: ERC20TokenCaller{contract: contract}, ERC20TokenTransactor: ERC20TokenTransactor{contract: contract}, ERC20TokenFilterer: ERC20TokenFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewERC20TokenCaller creates a new read-only instance of ERC20Token, bound to a specific deployed contract.
|
|
func NewERC20TokenCaller(address common.Address, caller bind.ContractCaller) (*ERC20TokenCaller, error) {
|
|
contract, err := bindERC20Token(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20TokenCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC20TokenTransactor creates a new write-only instance of ERC20Token, bound to a specific deployed contract.
|
|
func NewERC20TokenTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20TokenTransactor, error) {
|
|
contract, err := bindERC20Token(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20TokenTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC20TokenFilterer creates a new log filterer instance of ERC20Token, bound to a specific deployed contract.
|
|
func NewERC20TokenFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20TokenFilterer, error) {
|
|
contract, err := bindERC20Token(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20TokenFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindERC20Token binds a generic wrapper to an already deployed contract.
|
|
func bindERC20Token(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC20TokenABI))
|
|
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 (_ERC20Token *ERC20TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC20Token.Contract.ERC20TokenCaller.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 (_ERC20Token *ERC20TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.ERC20TokenTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC20Token *ERC20TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.ERC20TokenTransactor.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 (_ERC20Token *ERC20TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC20Token.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 (_ERC20Token *ERC20TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC20Token *ERC20TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC20Token.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 remaining)
|
|
func (_ERC20Token *ERC20TokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC20Token.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 remaining)
|
|
func (_ERC20Token *ERC20TokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) {
|
|
return _ERC20Token.Contract.Allowance(&_ERC20Token.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 remaining)
|
|
func (_ERC20Token *ERC20TokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) {
|
|
return _ERC20Token.Contract.Allowance(&_ERC20Token.CallOpts, _owner, _spender)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address _owner) view returns(uint256 balance)
|
|
func (_ERC20Token *ERC20TokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC20Token.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 balance)
|
|
func (_ERC20Token *ERC20TokenSession) BalanceOf(_owner common.Address) (*big.Int, error) {
|
|
return _ERC20Token.Contract.BalanceOf(&_ERC20Token.CallOpts, _owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address _owner) view returns(uint256 balance)
|
|
func (_ERC20Token *ERC20TokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) {
|
|
return _ERC20Token.Contract.BalanceOf(&_ERC20Token.CallOpts, _owner)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256 supply)
|
|
func (_ERC20Token *ERC20TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC20Token.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 supply)
|
|
func (_ERC20Token *ERC20TokenSession) TotalSupply() (*big.Int, error) {
|
|
return _ERC20Token.Contract.TotalSupply(&_ERC20Token.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256 supply)
|
|
func (_ERC20Token *ERC20TokenCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _ERC20Token.Contract.TotalSupply(&_ERC20Token.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address _spender, uint256 _value) returns(bool success)
|
|
func (_ERC20Token *ERC20TokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.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 success)
|
|
func (_ERC20Token *ERC20TokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.Approve(&_ERC20Token.TransactOpts, _spender, _value)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address _spender, uint256 _value) returns(bool success)
|
|
func (_ERC20Token *ERC20TokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.Approve(&_ERC20Token.TransactOpts, _spender, _value)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address _to, uint256 _value) returns(bool success)
|
|
func (_ERC20Token *ERC20TokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.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 success)
|
|
func (_ERC20Token *ERC20TokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.Transfer(&_ERC20Token.TransactOpts, _to, _value)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address _to, uint256 _value) returns(bool success)
|
|
func (_ERC20Token *ERC20TokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.Transfer(&_ERC20Token.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 success)
|
|
func (_ERC20Token *ERC20TokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.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 success)
|
|
func (_ERC20Token *ERC20TokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.TransferFrom(&_ERC20Token.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 success)
|
|
func (_ERC20Token *ERC20TokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _ERC20Token.Contract.TransferFrom(&_ERC20Token.TransactOpts, _from, _to, _value)
|
|
}
|
|
|
|
// ERC20TokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Token contract.
|
|
type ERC20TokenApprovalIterator struct {
|
|
Event *ERC20TokenApproval // 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 *ERC20TokenApprovalIterator) 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(ERC20TokenApproval)
|
|
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(ERC20TokenApproval)
|
|
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 *ERC20TokenApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC20TokenApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC20TokenApproval represents a Approval event raised by the ERC20Token contract.
|
|
type ERC20TokenApproval 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 (_ERC20Token *ERC20TokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20TokenApprovalIterator, 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 := _ERC20Token.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20TokenApprovalIterator{contract: _ERC20Token.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 (_ERC20Token *ERC20TokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20TokenApproval, 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 := _ERC20Token.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(ERC20TokenApproval)
|
|
if err := _ERC20Token.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 (_ERC20Token *ERC20TokenFilterer) ParseApproval(log types.Log) (*ERC20TokenApproval, error) {
|
|
event := new(ERC20TokenApproval)
|
|
if err := _ERC20Token.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC20TokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Token contract.
|
|
type ERC20TokenTransferIterator struct {
|
|
Event *ERC20TokenTransfer // 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 *ERC20TokenTransferIterator) 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(ERC20TokenTransfer)
|
|
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(ERC20TokenTransfer)
|
|
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 *ERC20TokenTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC20TokenTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC20TokenTransfer represents a Transfer event raised by the ERC20Token contract.
|
|
type ERC20TokenTransfer 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 (_ERC20Token *ERC20TokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TokenTransferIterator, 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 := _ERC20Token.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC20TokenTransferIterator{contract: _ERC20Token.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 (_ERC20Token *ERC20TokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20TokenTransfer, 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 := _ERC20Token.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(ERC20TokenTransfer)
|
|
if err := _ERC20Token.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 (_ERC20Token *ERC20TokenFilterer) ParseTransfer(log types.Log) (*ERC20TokenTransfer, error) {
|
|
event := new(ERC20TokenTransfer)
|
|
if err := _ERC20Token.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721ABI is the input ABI used to generate the binding from.
|
|
const ERC721ABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// ERC721FuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC721FuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// ERC721Bin is the compiled bytecode used for deploying new contracts.
|
|
var ERC721Bin = "0x608060405234801561001057600080fd5b506100437f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0361007a16565b6100757f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b0361007a16565b610148565b7fffffffff00000000000000000000000000000000000000000000000000000000808216141561010b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b610d23806101576000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80636352211e116100665780636352211e146101b157806370a08231146101ce578063a22cb46514610206578063b88d4fde14610234578063e985e9c5146102fa5761009e565b806301ffc9a7146100a3578063081812fc146100de578063095ea7b31461011757806323b872dd1461014557806342842e0e1461017b575b600080fd5b6100ca600480360360208110156100b957600080fd5b50356001600160e01b031916610328565b604080519115158252519081900360200190f35b6100fb600480360360208110156100f457600080fd5b5035610347565b604080516001600160a01b039092168252519081900360200190f35b6101436004803603604081101561012d57600080fd5b506001600160a01b0381351690602001356103a9565b005b6101436004803603606081101561015b57600080fd5b506001600160a01b038135811691602081013590911690604001356104ba565b6101436004803603606081101561019157600080fd5b506001600160a01b0381358116916020810135909116906040013561050f565b6100fb600480360360208110156101c757600080fd5b503561052a565b6101f4600480360360208110156101e457600080fd5b50356001600160a01b0316610584565b60408051918252519081900360200190f35b6101436004803603604081101561021c57600080fd5b506001600160a01b03813516906020013515156105ec565b6101436004803603608081101561024a57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028557600080fd5b82018360208201111561029757600080fd5b803590602001918460018302840111640100000000831117156102b957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106b8945050505050565b6100ca6004803603604081101561031057600080fd5b506001600160a01b0381358116916020013516610710565b6001600160e01b03191660009081526020819052604090205460ff1690565b60006103528261073e565b61038d5760405162461bcd60e51b815260040180806020018281038252602c815260200180610c48602c913960400191505060405180910390fd5b506000908152600260205260409020546001600160a01b031690565b60006103b48261052a565b9050806001600160a01b0316836001600160a01b031614156104075760405162461bcd60e51b8152600401808060200182810382526021815260200180610c9d6021913960400191505060405180910390fd5b336001600160a01b038216148061042357506104238133610710565b61045e5760405162461bcd60e51b8152600401808060200182810382526038815260200180610bbd6038913960400191505060405180910390fd5b60008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6104c4338261075b565b6104ff5760405162461bcd60e51b8152600401808060200182810382526031815260200180610cbe6031913960400191505060405180910390fd5b61050a8383836107ff565b505050565b61050a838383604051806020016040528060008152506106b8565b6000818152600160205260408120546001600160a01b03168061057e5760405162461bcd60e51b8152600401808060200182810382526029815260200180610c1f6029913960400191505060405180910390fd5b92915050565b60006001600160a01b0382166105cb5760405162461bcd60e51b815260040180806020018281038252602a815260200180610bf5602a913960400191505060405180910390fd5b6001600160a01b038216600090815260036020526040902061057e90610943565b6001600160a01b03821633141561064a576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6106c38484846104ba565b6106cf84848484610947565b61070a5760405162461bcd60e51b8152600401808060200182810382526032815260200180610b3b6032913960400191505060405180910390fd5b50505050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6000908152600160205260409020546001600160a01b0316151590565b60006107668261073e565b6107a15760405162461bcd60e51b815260040180806020018281038252602c815260200180610b91602c913960400191505060405180910390fd5b60006107ac8361052a565b9050806001600160a01b0316846001600160a01b031614806107e75750836001600160a01b03166107dc84610347565b6001600160a01b0316145b806107f757506107f78185610710565b949350505050565b826001600160a01b03166108128261052a565b6001600160a01b0316146108575760405162461bcd60e51b8152600401808060200182810382526029815260200180610c746029913960400191505060405180910390fd5b6001600160a01b03821661089c5760405162461bcd60e51b8152600401808060200182810382526024815260200180610b6d6024913960400191505060405180910390fd5b6108a581610a7a565b6001600160a01b03831660009081526003602052604090206108c690610ab7565b6001600160a01b03821660009081526003602052604090206108e790610ace565b60008181526001602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5490565b600061095b846001600160a01b0316610ad7565b610967575060016107f7565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b838110156109e15781810151838201526020016109c9565b50505050905090810190601f168015610a0e5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610a3057600080fd5b505af1158015610a44573d6000803e3d6000fd5b505050506040513d6020811015610a5a57600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b6000818152600260205260409020546001600160a01b031615610ab457600081815260026020526040902080546001600160a01b03191690555b50565b8054610aca90600163ffffffff610add16565b9055565b80546001019055565b3b151590565b600082821115610b34576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a265627a7a72305820a3ccfb1d8555fb9ba4c4373de30c4607c2a1f2ce6f3cc4608796563d0caedcf764736f6c634300050a0032"
|
|
|
|
// DeployERC721 deploys a new Ethereum contract, binding an instance of ERC721 to it.
|
|
func DeployERC721(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC721, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721ABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC721Bin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &ERC721{ERC721Caller: ERC721Caller{contract: contract}, ERC721Transactor: ERC721Transactor{contract: contract}, ERC721Filterer: ERC721Filterer{contract: contract}}, nil
|
|
}
|
|
|
|
// 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 := abi.JSON(strings.NewReader(ERC721ABI))
|
|
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)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721 *ERC721Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721 *ERC721Session) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721.Contract.SupportsInterface(&_ERC721.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721 *ERC721CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721.Contract.SupportsInterface(&_ERC721.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721 *ERC721Transactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721 *ERC721Session) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721.Contract.Approve(&_ERC721.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721 *ERC721TransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721.Contract.Approve(&_ERC721.TransactOpts, 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 *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 to, bool approved) returns()
|
|
func (_ERC721 *ERC721Transactor) SetApprovalForAll(opts *bind.TransactOpts, to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721.contract.Transact(opts, "setApprovalForAll", to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721 *ERC721Session) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721.Contract.SetApprovalForAll(&_ERC721.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721 *ERC721TransactorSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721.Contract.SetApprovalForAll(&_ERC721.TransactOpts, to, 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
|
|
}
|
|
|
|
// ERC721EnumerableABI is the input ABI used to generate the binding from.
|
|
const ERC721EnumerableABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"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\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// ERC721EnumerableFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC721EnumerableFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"4f6ccce7": "tokenByIndex(uint256)",
|
|
"2f745c59": "tokenOfOwnerByIndex(address,uint256)",
|
|
"18160ddd": "totalSupply()",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// ERC721EnumerableBin is the compiled bytecode used for deploying new contracts.
|
|
var ERC721EnumerableBin = "0x608060405234801561001057600080fd5b506100437f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b036100ac16565b6100757f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b036100ac16565b6100a77f780e9d63000000000000000000000000000000000000000000000000000000006001600160e01b036100ac16565b61017a565b7fffffffff00000000000000000000000000000000000000000000000000000000808216141561013d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b611077806101896000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806342842e0e1161008c57806370a082311161006657806370a0823114610262578063a22cb46514610288578063b88d4fde146102b6578063e985e9c51461037c576100cf565b806342842e0e146101f25780634f6ccce7146102285780636352211e14610245576100cf565b806301ffc9a7146100d4578063081812fc1461010f578063095ea7b31461014857806318160ddd1461017657806323b872dd146101905780632f745c59146101c6575b600080fd5b6100fb600480360360208110156100ea57600080fd5b50356001600160e01b0319166103aa565b604080519115158252519081900360200190f35b61012c6004803603602081101561012557600080fd5b50356103c9565b604080516001600160a01b039092168252519081900360200190f35b6101746004803603604081101561015e57600080fd5b506001600160a01b03813516906020013561042b565b005b61017e61053c565b60408051918252519081900360200190f35b610174600480360360608110156101a657600080fd5b506001600160a01b03813581169160208101359091169060400135610543565b61017e600480360360408110156101dc57600080fd5b506001600160a01b038135169060200135610598565b6101746004803603606081101561020857600080fd5b506001600160a01b03813581169160208101359091169060400135610617565b61017e6004803603602081101561023e57600080fd5b5035610632565b61012c6004803603602081101561025b57600080fd5b5035610698565b61017e6004803603602081101561027857600080fd5b50356001600160a01b03166106f2565b6101746004803603604081101561029e57600080fd5b506001600160a01b038135169060200135151561075a565b610174600480360360808110156102cc57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561030757600080fd5b82018360208201111561031957600080fd5b8035906020019184600183028401116401000000008311171561033b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610826945050505050565b6100fb6004803603604081101561039257600080fd5b506001600160a01b038135811691602001351661087e565b6001600160e01b03191660009081526020819052604090205460ff1690565b60006103d4826108ac565b61040f5760405162461bcd60e51b815260040180806020018281038252602c815260200180610f70602c913960400191505060405180910390fd5b506000908152600260205260409020546001600160a01b031690565b600061043682610698565b9050806001600160a01b0316836001600160a01b031614156104895760405162461bcd60e51b8152600401808060200182810382526021815260200180610fc56021913960400191505060405180910390fd5b336001600160a01b03821614806104a557506104a5813361087e565b6104e05760405162461bcd60e51b8152600401808060200182810382526038815260200180610ee56038913960400191505060405180910390fd5b60008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007545b90565b61054d33826108c9565b6105885760405162461bcd60e51b8152600401808060200182810382526031815260200180610fe66031913960400191505060405180910390fd5b61059383838361096d565b505050565b60006105a3836106f2565b82106105e05760405162461bcd60e51b815260040180806020018281038252602b815260200180610e38602b913960400191505060405180910390fd5b6001600160a01b038316600090815260056020526040902080548390811061060457fe5b9060005260206000200154905092915050565b61059383838360405180602001604052806000815250610826565b600061063c61053c565b82106106795760405162461bcd60e51b815260040180806020018281038252602c815260200180611017602c913960400191505060405180910390fd5b6007828154811061068657fe5b90600052602060002001549050919050565b6000818152600160205260408120546001600160a01b0316806106ec5760405162461bcd60e51b8152600401808060200182810382526029815260200180610f476029913960400191505060405180910390fd5b92915050565b60006001600160a01b0382166107395760405162461bcd60e51b815260040180806020018281038252602a815260200180610f1d602a913960400191505060405180910390fd5b6001600160a01b03821660009081526003602052604090206106ec9061098c565b6001600160a01b0382163314156107b8576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610831848484610543565b61083d84848484610990565b6108785760405162461bcd60e51b8152600401808060200182810382526032815260200180610e636032913960400191505060405180910390fd5b50505050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6000908152600160205260409020546001600160a01b0316151590565b60006108d4826108ac565b61090f5760405162461bcd60e51b815260040180806020018281038252602c815260200180610eb9602c913960400191505060405180910390fd5b600061091a83610698565b9050806001600160a01b0316846001600160a01b031614806109555750836001600160a01b031661094a846103c9565b6001600160a01b0316145b806109655750610965818561087e565b949350505050565b610978838383610ac3565b6109828382610c07565b6105938282610cfc565b5490565b60006109a4846001600160a01b0316610d3a565b6109b057506001610965565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015610a2a578181015183820152602001610a12565b50505050905090810190601f168015610a575780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610a7957600080fd5b505af1158015610a8d573d6000803e3d6000fd5b505050506040513d6020811015610aa357600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b826001600160a01b0316610ad682610698565b6001600160a01b031614610b1b5760405162461bcd60e51b8152600401808060200182810382526029815260200180610f9c6029913960400191505060405180910390fd5b6001600160a01b038216610b605760405162461bcd60e51b8152600401808060200182810382526024815260200180610e956024913960400191505060405180910390fd5b610b6981610d40565b6001600160a01b0383166000908152600360205260409020610b8a90610d7d565b6001600160a01b0382166000908152600360205260409020610bab90610d94565b60008181526001602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216600090815260056020526040812054610c3190600163ffffffff610d9d16565b600083815260066020526040902054909150808214610ccc576001600160a01b0384166000908152600560205260408120805484908110610c6e57fe5b906000526020600020015490508060056000876001600160a01b03166001600160a01b031681526020019081526020016000208381548110610cac57fe5b600091825260208083209091019290925591825260069052604090208190555b6001600160a01b0384166000908152600560205260409020805490610cf5906000198301610dfa565b5050505050565b6001600160a01b0390911660009081526005602081815260408084208054868652600684529185208290559282526001810183559183529091200155565b3b151590565b6000818152600260205260409020546001600160a01b031615610d7a57600081815260026020526040902080546001600160a01b03191690555b50565b8054610d9090600163ffffffff610d9d16565b9055565b80546001019055565b600082821115610df4576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8154818355818111156105935760008381526020902061059391810190830161054091905b80821115610e335760008155600101610e1f565b509056fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e6473a265627a7a72305820d36600a2a84ae264e8b4970e2833b107065e0164dcb1a253f6ddf7d613ed915064736f6c634300050a0032"
|
|
|
|
// DeployERC721Enumerable deploys a new Ethereum contract, binding an instance of ERC721Enumerable to it.
|
|
func DeployERC721Enumerable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC721Enumerable, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721EnumerableABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC721EnumerableBin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &ERC721Enumerable{ERC721EnumerableCaller: ERC721EnumerableCaller{contract: contract}, ERC721EnumerableTransactor: ERC721EnumerableTransactor{contract: contract}, ERC721EnumerableFilterer: ERC721EnumerableFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// ERC721Enumerable is an auto generated Go binding around an Ethereum contract.
|
|
type ERC721Enumerable struct {
|
|
ERC721EnumerableCaller // Read-only binding to the contract
|
|
ERC721EnumerableTransactor // Write-only binding to the contract
|
|
ERC721EnumerableFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ERC721EnumerableCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ERC721EnumerableCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721EnumerableTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ERC721EnumerableTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721EnumerableFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ERC721EnumerableFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721EnumerableSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ERC721EnumerableSession struct {
|
|
Contract *ERC721Enumerable // 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
|
|
}
|
|
|
|
// ERC721EnumerableCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ERC721EnumerableCallerSession struct {
|
|
Contract *ERC721EnumerableCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ERC721EnumerableTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ERC721EnumerableTransactorSession struct {
|
|
Contract *ERC721EnumerableTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ERC721EnumerableRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ERC721EnumerableRaw struct {
|
|
Contract *ERC721Enumerable // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC721EnumerableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ERC721EnumerableCallerRaw struct {
|
|
Contract *ERC721EnumerableCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC721EnumerableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ERC721EnumerableTransactorRaw struct {
|
|
Contract *ERC721EnumerableTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewERC721Enumerable creates a new instance of ERC721Enumerable, bound to a specific deployed contract.
|
|
func NewERC721Enumerable(address common.Address, backend bind.ContractBackend) (*ERC721Enumerable, error) {
|
|
contract, err := bindERC721Enumerable(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721Enumerable{ERC721EnumerableCaller: ERC721EnumerableCaller{contract: contract}, ERC721EnumerableTransactor: ERC721EnumerableTransactor{contract: contract}, ERC721EnumerableFilterer: ERC721EnumerableFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewERC721EnumerableCaller creates a new read-only instance of ERC721Enumerable, bound to a specific deployed contract.
|
|
func NewERC721EnumerableCaller(address common.Address, caller bind.ContractCaller) (*ERC721EnumerableCaller, error) {
|
|
contract, err := bindERC721Enumerable(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721EnumerableCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC721EnumerableTransactor creates a new write-only instance of ERC721Enumerable, bound to a specific deployed contract.
|
|
func NewERC721EnumerableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC721EnumerableTransactor, error) {
|
|
contract, err := bindERC721Enumerable(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721EnumerableTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC721EnumerableFilterer creates a new log filterer instance of ERC721Enumerable, bound to a specific deployed contract.
|
|
func NewERC721EnumerableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC721EnumerableFilterer, error) {
|
|
contract, err := bindERC721Enumerable(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721EnumerableFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindERC721Enumerable binds a generic wrapper to an already deployed contract.
|
|
func bindERC721Enumerable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721EnumerableABI))
|
|
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 (_ERC721Enumerable *ERC721EnumerableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC721Enumerable.Contract.ERC721EnumerableCaller.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 (_ERC721Enumerable *ERC721EnumerableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.ERC721EnumerableTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC721Enumerable *ERC721EnumerableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.ERC721EnumerableTransactor.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 (_ERC721Enumerable *ERC721EnumerableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.BalanceOf(&_ERC721Enumerable.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.BalanceOf(&_ERC721Enumerable.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_ERC721Enumerable *ERC721EnumerableCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Enumerable.Contract.GetApproved(&_ERC721Enumerable.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Enumerable.Contract.GetApproved(&_ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _ERC721Enumerable.Contract.IsApprovedForAll(&_ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _ERC721Enumerable.Contract.IsApprovedForAll(&_ERC721Enumerable.CallOpts, owner, operator)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_ERC721Enumerable *ERC721EnumerableCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Enumerable.Contract.OwnerOf(&_ERC721Enumerable.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Enumerable.Contract.OwnerOf(&_ERC721Enumerable.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Enumerable *ERC721EnumerableCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Enumerable *ERC721EnumerableSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721Enumerable.Contract.SupportsInterface(&_ERC721Enumerable.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721Enumerable.Contract.SupportsInterface(&_ERC721Enumerable.CallOpts, interfaceId)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.contract.Call(opts, &out, "tokenByIndex", index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.TokenByIndex(&_ERC721Enumerable.CallOpts, index)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.TokenByIndex(&_ERC721Enumerable.CallOpts, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.TokenOfOwnerByIndex(&_ERC721Enumerable.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.TokenOfOwnerByIndex(&_ERC721Enumerable.CallOpts, owner, index)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) TotalSupply() (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.TotalSupply(&_ERC721Enumerable.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_ERC721Enumerable *ERC721EnumerableCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _ERC721Enumerable.Contract.TotalSupply(&_ERC721Enumerable.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.Approve(&_ERC721Enumerable.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.Approve(&_ERC721Enumerable.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.SafeTransferFrom(&_ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.SafeTransferFrom(&_ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.SafeTransferFrom0(&_ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.SafeTransferFrom0(&_ERC721Enumerable.TransactOpts, from, to, tokenId, _data)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactor) SetApprovalForAll(opts *bind.TransactOpts, to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.contract.Transact(opts, "setApprovalForAll", to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.SetApprovalForAll(&_ERC721Enumerable.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactorSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.SetApprovalForAll(&_ERC721Enumerable.TransactOpts, to, approved)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_ERC721Enumerable *ERC721EnumerableTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.TransferFrom(&_ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Enumerable.Contract.TransferFrom(&_ERC721Enumerable.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// ERC721EnumerableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC721Enumerable contract.
|
|
type ERC721EnumerableApprovalIterator struct {
|
|
Event *ERC721EnumerableApproval // 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 *ERC721EnumerableApprovalIterator) 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(ERC721EnumerableApproval)
|
|
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(ERC721EnumerableApproval)
|
|
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 *ERC721EnumerableApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721EnumerableApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721EnumerableApproval represents a Approval event raised by the ERC721Enumerable contract.
|
|
type ERC721EnumerableApproval 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 (_ERC721Enumerable *ERC721EnumerableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*ERC721EnumerableApprovalIterator, 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 := _ERC721Enumerable.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721EnumerableApprovalIterator{contract: _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC721EnumerableApproval, 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 := _ERC721Enumerable.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(ERC721EnumerableApproval)
|
|
if err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableFilterer) ParseApproval(log types.Log) (*ERC721EnumerableApproval, error) {
|
|
event := new(ERC721EnumerableApproval)
|
|
if err := _ERC721Enumerable.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721EnumerableApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the ERC721Enumerable contract.
|
|
type ERC721EnumerableApprovalForAllIterator struct {
|
|
Event *ERC721EnumerableApprovalForAll // 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 *ERC721EnumerableApprovalForAllIterator) 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(ERC721EnumerableApprovalForAll)
|
|
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(ERC721EnumerableApprovalForAll)
|
|
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 *ERC721EnumerableApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721EnumerableApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721EnumerableApprovalForAll represents a ApprovalForAll event raised by the ERC721Enumerable contract.
|
|
type ERC721EnumerableApprovalForAll 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 (_ERC721Enumerable *ERC721EnumerableFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*ERC721EnumerableApprovalForAllIterator, 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 := _ERC721Enumerable.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721EnumerableApprovalForAllIterator{contract: _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *ERC721EnumerableApprovalForAll, 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 := _ERC721Enumerable.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(ERC721EnumerableApprovalForAll)
|
|
if err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableFilterer) ParseApprovalForAll(log types.Log) (*ERC721EnumerableApprovalForAll, error) {
|
|
event := new(ERC721EnumerableApprovalForAll)
|
|
if err := _ERC721Enumerable.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721EnumerableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC721Enumerable contract.
|
|
type ERC721EnumerableTransferIterator struct {
|
|
Event *ERC721EnumerableTransfer // 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 *ERC721EnumerableTransferIterator) 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(ERC721EnumerableTransfer)
|
|
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(ERC721EnumerableTransfer)
|
|
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 *ERC721EnumerableTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721EnumerableTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721EnumerableTransfer represents a Transfer event raised by the ERC721Enumerable contract.
|
|
type ERC721EnumerableTransfer 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 (_ERC721Enumerable *ERC721EnumerableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*ERC721EnumerableTransferIterator, 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 := _ERC721Enumerable.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721EnumerableTransferIterator{contract: _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC721EnumerableTransfer, 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 := _ERC721Enumerable.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(ERC721EnumerableTransfer)
|
|
if err := _ERC721Enumerable.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 (_ERC721Enumerable *ERC721EnumerableFilterer) ParseTransfer(log types.Log) (*ERC721EnumerableTransfer, error) {
|
|
event := new(ERC721EnumerableTransfer)
|
|
if err := _ERC721Enumerable.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721FullABI is the input ABI used to generate the binding from.
|
|
const ERC721FullABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"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\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"to\",\"type\":\"address\"},{\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// ERC721FullFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC721FullFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"06fdde03": "name()",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"95d89b41": "symbol()",
|
|
"4f6ccce7": "tokenByIndex(uint256)",
|
|
"2f745c59": "tokenOfOwnerByIndex(address,uint256)",
|
|
"c87b56dd": "tokenURI(uint256)",
|
|
"18160ddd": "totalSupply()",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// ERC721FullBin is the compiled bytecode used for deploying new contracts.
|
|
var ERC721FullBin = "0x60806040523480156200001157600080fd5b50604051620016b6380380620016b6833981810160405260408110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b509093508492508391506200010b90507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03620001dd16565b6200013f7f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03620001dd16565b620001737f780e9d63000000000000000000000000000000000000000000000000000000006001600160e01b03620001dd16565b815162000188906009906020850190620002ac565b5080516200019e90600a906020840190620002ac565b50620001d37f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03620001dd16565b5050505062000351565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200026f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002ef57805160ff19168380011785556200031f565b828001600101855582156200031f579182015b828111156200031f57825182559160200191906001019062000302565b506200032d92915062000331565b5090565b6200034e91905b808211156200032d576000815560010162000338565b90565b61135580620003616000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80634f6ccce711610097578063a22cb46511610066578063a22cb4651461033e578063b88d4fde1461036c578063c87b56dd14610432578063e985e9c51461044f57610100565b80634f6ccce7146102d65780636352211e146102f357806370a082311461031057806395d89b411461033657610100565b806318160ddd116100d357806318160ddd1461022457806323b872dd1461023e5780632f745c591461027457806342842e0e146102a057610100565b806301ffc9a71461010557806306fdde0314610140578063081812fc146101bd578063095ea7b3146101f6575b600080fd5b61012c6004803603602081101561011b57600080fd5b50356001600160e01b03191661047d565b604080519115158252519081900360200190f35b61014861049c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561018257818101518382015260200161016a565b50505050905090810190601f1680156101af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360208110156101d357600080fd5b5035610533565b604080516001600160a01b039092168252519081900360200190f35b6102226004803603604081101561020c57600080fd5b506001600160a01b038135169060200135610595565b005b61022c6106a6565b60408051918252519081900360200190f35b6102226004803603606081101561025457600080fd5b506001600160a01b038135811691602081013590911690604001356106ac565b61022c6004803603604081101561028a57600080fd5b506001600160a01b038135169060200135610701565b610222600480360360608110156102b657600080fd5b506001600160a01b03813581169160208101359091169060400135610780565b61022c600480360360208110156102ec57600080fd5b503561079b565b6101da6004803603602081101561030957600080fd5b5035610801565b61022c6004803603602081101561032657600080fd5b50356001600160a01b031661085b565b6101486108c3565b6102226004803603604081101561035457600080fd5b506001600160a01b0381351690602001351515610924565b6102226004803603608081101561038257600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156103bd57600080fd5b8201836020820111156103cf57600080fd5b803590602001918460018302840111640100000000831117156103f157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109f0945050505050565b6101486004803603602081101561044857600080fd5b5035610a48565b61012c6004803603604081101561046557600080fd5b506001600160a01b0381358116916020013516610b2d565b6001600160e01b03191660009081526020819052604090205460ff1690565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105285780601f106104fd57610100808354040283529160200191610528565b820191906000526020600020905b81548152906001019060200180831161050b57829003601f168201915b505050505090505b90565b600061053e82610b5b565b6105795760405162461bcd60e51b815260040180806020018281038252602c81526020018061121f602c913960400191505060405180910390fd5b506000908152600260205260409020546001600160a01b031690565b60006105a082610801565b9050806001600160a01b0316836001600160a01b031614156105f35760405162461bcd60e51b81526004018080602001828103825260218152602001806112a36021913960400191505060405180910390fd5b336001600160a01b038216148061060f575061060f8133610b2d565b61064a5760405162461bcd60e51b81526004018080602001828103825260388152602001806111946038913960400191505060405180910390fd5b60008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60075490565b6106b63382610b78565b6106f15760405162461bcd60e51b81526004018080602001828103825260318152602001806112c46031913960400191505060405180910390fd5b6106fc838383610c1c565b505050565b600061070c8361085b565b82106107495760405162461bcd60e51b815260040180806020018281038252602b8152602001806110e7602b913960400191505060405180910390fd5b6001600160a01b038316600090815260056020526040902080548390811061076d57fe5b9060005260206000200154905092915050565b6106fc838383604051806020016040528060008152506109f0565b60006107a56106a6565b82106107e25760405162461bcd60e51b815260040180806020018281038252602c8152602001806112f5602c913960400191505060405180910390fd5b600782815481106107ef57fe5b90600052602060002001549050919050565b6000818152600160205260408120546001600160a01b0316806108555760405162461bcd60e51b81526004018080602001828103825260298152602001806111f66029913960400191505060405180910390fd5b92915050565b60006001600160a01b0382166108a25760405162461bcd60e51b815260040180806020018281038252602a8152602001806111cc602a913960400191505060405180910390fd5b6001600160a01b038216600090815260036020526040902061085590610c3b565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105285780601f106104fd57610100808354040283529160200191610528565b6001600160a01b038216331415610982576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6109fb8484846106ac565b610a0784848484610c3f565b610a425760405162461bcd60e51b81526004018080602001828103825260328152602001806111126032913960400191505060405180910390fd5b50505050565b6060610a5382610b5b565b610a8e5760405162461bcd60e51b815260040180806020018281038252602f815260200180611274602f913960400191505060405180910390fd5b6000828152600b602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610b215780601f10610af657610100808354040283529160200191610b21565b820191906000526020600020905b815481529060010190602001808311610b0457829003601f168201915b50505050509050919050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6000908152600160205260409020546001600160a01b0316151590565b6000610b8382610b5b565b610bbe5760405162461bcd60e51b815260040180806020018281038252602c815260200180611168602c913960400191505060405180910390fd5b6000610bc983610801565b9050806001600160a01b0316846001600160a01b03161480610c045750836001600160a01b0316610bf984610533565b6001600160a01b0316145b80610c145750610c148185610b2d565b949350505050565b610c27838383610d72565b610c318382610eb6565b6106fc8282610fab565b5490565b6000610c53846001600160a01b0316610fe9565b610c5f57506001610c14565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015610cd9578181015183820152602001610cc1565b50505050905090810190601f168015610d065780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610d2857600080fd5b505af1158015610d3c573d6000803e3d6000fd5b505050506040513d6020811015610d5257600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b826001600160a01b0316610d8582610801565b6001600160a01b031614610dca5760405162461bcd60e51b815260040180806020018281038252602981526020018061124b6029913960400191505060405180910390fd5b6001600160a01b038216610e0f5760405162461bcd60e51b81526004018080602001828103825260248152602001806111446024913960400191505060405180910390fd5b610e1881610fef565b6001600160a01b0383166000908152600360205260409020610e399061102c565b6001600160a01b0382166000908152600360205260409020610e5a90611043565b60008181526001602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216600090815260056020526040812054610ee090600163ffffffff61104c16565b600083815260066020526040902054909150808214610f7b576001600160a01b0384166000908152600560205260408120805484908110610f1d57fe5b906000526020600020015490508060056000876001600160a01b03166001600160a01b031681526020019081526020016000208381548110610f5b57fe5b600091825260208083209091019290925591825260069052604090208190555b6001600160a01b0384166000908152600560205260409020805490610fa49060001983016110a9565b5050505050565b6001600160a01b0390911660009081526005602081815260408084208054868652600684529185208290559282526001810183559183529091200155565b3b151590565b6000818152600260205260409020546001600160a01b03161561102957600081815260026020526040902080546001600160a01b03191690555b50565b805461103f90600163ffffffff61104c16565b9055565b80546001019055565b6000828211156110a3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8154818355818111156106fc576000838152602090206106fc91810190830161053091905b808211156110e257600081556001016110ce565b509056fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e6473a265627a7a723058200eac125700729013e70be2508bd9d5dfb4ac28a351b3b80ed8843f1781b5e7ae64736f6c634300050a0032"
|
|
|
|
// DeployERC721Full deploys a new Ethereum contract, binding an instance of ERC721Full to it.
|
|
func DeployERC721Full(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string) (common.Address, *types.Transaction, *ERC721Full, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721FullABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC721FullBin), backend, name, symbol)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &ERC721Full{ERC721FullCaller: ERC721FullCaller{contract: contract}, ERC721FullTransactor: ERC721FullTransactor{contract: contract}, ERC721FullFilterer: ERC721FullFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// ERC721Full is an auto generated Go binding around an Ethereum contract.
|
|
type ERC721Full struct {
|
|
ERC721FullCaller // Read-only binding to the contract
|
|
ERC721FullTransactor // Write-only binding to the contract
|
|
ERC721FullFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ERC721FullCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ERC721FullCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721FullTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ERC721FullTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721FullFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ERC721FullFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721FullSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ERC721FullSession struct {
|
|
Contract *ERC721Full // 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
|
|
}
|
|
|
|
// ERC721FullCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ERC721FullCallerSession struct {
|
|
Contract *ERC721FullCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ERC721FullTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ERC721FullTransactorSession struct {
|
|
Contract *ERC721FullTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ERC721FullRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ERC721FullRaw struct {
|
|
Contract *ERC721Full // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC721FullCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ERC721FullCallerRaw struct {
|
|
Contract *ERC721FullCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC721FullTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ERC721FullTransactorRaw struct {
|
|
Contract *ERC721FullTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewERC721Full creates a new instance of ERC721Full, bound to a specific deployed contract.
|
|
func NewERC721Full(address common.Address, backend bind.ContractBackend) (*ERC721Full, error) {
|
|
contract, err := bindERC721Full(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721Full{ERC721FullCaller: ERC721FullCaller{contract: contract}, ERC721FullTransactor: ERC721FullTransactor{contract: contract}, ERC721FullFilterer: ERC721FullFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewERC721FullCaller creates a new read-only instance of ERC721Full, bound to a specific deployed contract.
|
|
func NewERC721FullCaller(address common.Address, caller bind.ContractCaller) (*ERC721FullCaller, error) {
|
|
contract, err := bindERC721Full(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721FullCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC721FullTransactor creates a new write-only instance of ERC721Full, bound to a specific deployed contract.
|
|
func NewERC721FullTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC721FullTransactor, error) {
|
|
contract, err := bindERC721Full(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721FullTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC721FullFilterer creates a new log filterer instance of ERC721Full, bound to a specific deployed contract.
|
|
func NewERC721FullFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC721FullFilterer, error) {
|
|
contract, err := bindERC721Full(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721FullFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindERC721Full binds a generic wrapper to an already deployed contract.
|
|
func bindERC721Full(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721FullABI))
|
|
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 (_ERC721Full *ERC721FullRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC721Full.Contract.ERC721FullCaller.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 (_ERC721Full *ERC721FullRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.ERC721FullTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC721Full *ERC721FullRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.ERC721FullTransactor.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 (_ERC721Full *ERC721FullCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC721Full.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 (_ERC721Full *ERC721FullTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC721Full *ERC721FullTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC721Full.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 (_ERC721Full *ERC721FullCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _ERC721Full.Contract.BalanceOf(&_ERC721Full.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _ERC721Full.Contract.BalanceOf(&_ERC721Full.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_ERC721Full *ERC721FullCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Full.Contract.GetApproved(&_ERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_ERC721Full *ERC721FullCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Full.Contract.GetApproved(&_ERC721Full.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 (_ERC721Full *ERC721FullCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _ERC721Full.Contract.IsApprovedForAll(&_ERC721Full.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 (_ERC721Full *ERC721FullCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _ERC721Full.Contract.IsApprovedForAll(&_ERC721Full.CallOpts, owner, operator)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_ERC721Full *ERC721FullCaller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) Name() (string, error) {
|
|
return _ERC721Full.Contract.Name(&_ERC721Full.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_ERC721Full *ERC721FullCallerSession) Name() (string, error) {
|
|
return _ERC721Full.Contract.Name(&_ERC721Full.CallOpts)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_ERC721Full *ERC721FullCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Full.Contract.OwnerOf(&_ERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_ERC721Full *ERC721FullCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Full.Contract.OwnerOf(&_ERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Full *ERC721FullCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Full *ERC721FullSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721Full.Contract.SupportsInterface(&_ERC721Full.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Full *ERC721FullCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721Full.Contract.SupportsInterface(&_ERC721Full.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_ERC721Full *ERC721FullCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) Symbol() (string, error) {
|
|
return _ERC721Full.Contract.Symbol(&_ERC721Full.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_ERC721Full *ERC721FullCallerSession) Symbol() (string, error) {
|
|
return _ERC721Full.Contract.Symbol(&_ERC721Full.CallOpts)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.contract.Call(opts, &out, "tokenByIndex", index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _ERC721Full.Contract.TokenByIndex(&_ERC721Full.CallOpts, index)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _ERC721Full.Contract.TokenByIndex(&_ERC721Full.CallOpts, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _ERC721Full.Contract.TokenOfOwnerByIndex(&_ERC721Full.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _ERC721Full.Contract.TokenOfOwnerByIndex(&_ERC721Full.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_ERC721Full *ERC721FullCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.contract.Call(opts, &out, "tokenURI", tokenId)
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_ERC721Full *ERC721FullSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _ERC721Full.Contract.TokenURI(&_ERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_ERC721Full *ERC721FullCallerSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _ERC721Full.Contract.TokenURI(&_ERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Full.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 (_ERC721Full *ERC721FullSession) TotalSupply() (*big.Int, error) {
|
|
return _ERC721Full.Contract.TotalSupply(&_ERC721Full.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_ERC721Full *ERC721FullCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _ERC721Full.Contract.TotalSupply(&_ERC721Full.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Full *ERC721FullTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Full *ERC721FullSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.Approve(&_ERC721Full.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Full *ERC721FullTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.Approve(&_ERC721Full.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_ERC721Full *ERC721FullTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.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 (_ERC721Full *ERC721FullSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.SafeTransferFrom(&_ERC721Full.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 (_ERC721Full *ERC721FullTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.SafeTransferFrom(&_ERC721Full.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 (_ERC721Full *ERC721FullTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Full.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 (_ERC721Full *ERC721FullSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.SafeTransferFrom0(&_ERC721Full.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 (_ERC721Full *ERC721FullTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.SafeTransferFrom0(&_ERC721Full.TransactOpts, from, to, tokenId, _data)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Full *ERC721FullTransactor) SetApprovalForAll(opts *bind.TransactOpts, to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Full.contract.Transact(opts, "setApprovalForAll", to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Full *ERC721FullSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.SetApprovalForAll(&_ERC721Full.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Full *ERC721FullTransactorSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.SetApprovalForAll(&_ERC721Full.TransactOpts, to, approved)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_ERC721Full *ERC721FullTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.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 (_ERC721Full *ERC721FullSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.TransferFrom(&_ERC721Full.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 (_ERC721Full *ERC721FullTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Full.Contract.TransferFrom(&_ERC721Full.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// ERC721FullApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC721Full contract.
|
|
type ERC721FullApprovalIterator struct {
|
|
Event *ERC721FullApproval // 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 *ERC721FullApprovalIterator) 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(ERC721FullApproval)
|
|
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(ERC721FullApproval)
|
|
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 *ERC721FullApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721FullApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721FullApproval represents a Approval event raised by the ERC721Full contract.
|
|
type ERC721FullApproval 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 (_ERC721Full *ERC721FullFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*ERC721FullApprovalIterator, 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 := _ERC721Full.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721FullApprovalIterator{contract: _ERC721Full.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 (_ERC721Full *ERC721FullFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC721FullApproval, 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 := _ERC721Full.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(ERC721FullApproval)
|
|
if err := _ERC721Full.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 (_ERC721Full *ERC721FullFilterer) ParseApproval(log types.Log) (*ERC721FullApproval, error) {
|
|
event := new(ERC721FullApproval)
|
|
if err := _ERC721Full.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721FullApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the ERC721Full contract.
|
|
type ERC721FullApprovalForAllIterator struct {
|
|
Event *ERC721FullApprovalForAll // 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 *ERC721FullApprovalForAllIterator) 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(ERC721FullApprovalForAll)
|
|
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(ERC721FullApprovalForAll)
|
|
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 *ERC721FullApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721FullApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721FullApprovalForAll represents a ApprovalForAll event raised by the ERC721Full contract.
|
|
type ERC721FullApprovalForAll 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 (_ERC721Full *ERC721FullFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*ERC721FullApprovalForAllIterator, 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 := _ERC721Full.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721FullApprovalForAllIterator{contract: _ERC721Full.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 (_ERC721Full *ERC721FullFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *ERC721FullApprovalForAll, 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 := _ERC721Full.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(ERC721FullApprovalForAll)
|
|
if err := _ERC721Full.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 (_ERC721Full *ERC721FullFilterer) ParseApprovalForAll(log types.Log) (*ERC721FullApprovalForAll, error) {
|
|
event := new(ERC721FullApprovalForAll)
|
|
if err := _ERC721Full.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721FullTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC721Full contract.
|
|
type ERC721FullTransferIterator struct {
|
|
Event *ERC721FullTransfer // 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 *ERC721FullTransferIterator) 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(ERC721FullTransfer)
|
|
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(ERC721FullTransfer)
|
|
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 *ERC721FullTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721FullTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721FullTransfer represents a Transfer event raised by the ERC721Full contract.
|
|
type ERC721FullTransfer 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 (_ERC721Full *ERC721FullFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*ERC721FullTransferIterator, 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 := _ERC721Full.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721FullTransferIterator{contract: _ERC721Full.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 (_ERC721Full *ERC721FullFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC721FullTransfer, 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 := _ERC721Full.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(ERC721FullTransfer)
|
|
if err := _ERC721Full.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 (_ERC721Full *ERC721FullFilterer) ParseTransfer(log types.Log) (*ERC721FullTransfer, error) {
|
|
event := new(ERC721FullTransfer)
|
|
if err := _ERC721Full.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721MetadataABI is the input ABI used to generate the binding from.
|
|
const ERC721MetadataABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"to\",\"type\":\"address\"},{\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// ERC721MetadataFuncSigs maps the 4-byte function signature to its string representation.
|
|
var ERC721MetadataFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"06fdde03": "name()",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"95d89b41": "symbol()",
|
|
"c87b56dd": "tokenURI(uint256)",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// ERC721MetadataBin is the compiled bytecode used for deploying new contracts.
|
|
var ERC721MetadataBin = "0x60806040523480156200001157600080fd5b506040516200132938038062001329833981810160405260408110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b509093506200010892507f01ffc9a7000000000000000000000000000000000000000000000000000000009150506001600160e01b03620001a416565b6200013c7f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03620001a416565b81516200015190600590602085019062000273565b5080516200016790600690602084019062000273565b506200019c7f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03620001a416565b505062000318565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200023657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002b657805160ff1916838001178555620002e6565b82800160010185558215620002e6579182015b82811115620002e6578251825591602001919060010190620002c9565b50620002f4929150620002f8565b5090565b6200031591905b80821115620002f45760008155600101620002ff565b90565b61100180620003286000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146102bc578063b88d4fde146102ea578063c87b56dd146103b0578063e985e9c5146103cd576100cf565b80636352211e1461025f57806370a082311461027c57806395d89b41146102b4576100cf565b806301ffc9a7146100d457806306fdde031461010f578063081812fc1461018c578063095ea7b3146101c557806323b872dd146101f357806342842e0e14610229575b600080fd5b6100fb600480360360208110156100ea57600080fd5b50356001600160e01b0319166103fb565b604080519115158252519081900360200190f35b61011761041a565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610151578181015183820152602001610139565b50505050905090810190601f16801561017e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a9600480360360208110156101a257600080fd5b50356104b0565b604080516001600160a01b039092168252519081900360200190f35b6101f1600480360360408110156101db57600080fd5b506001600160a01b038135169060200135610512565b005b6101f16004803603606081101561020957600080fd5b506001600160a01b03813581169160208101359091169060400135610623565b6101f16004803603606081101561023f57600080fd5b506001600160a01b03813581169160208101359091169060400135610678565b6101a96004803603602081101561027557600080fd5b5035610693565b6102a26004803603602081101561029257600080fd5b50356001600160a01b03166106ed565b60408051918252519081900360200190f35b610117610755565b6101f1600480360360408110156102d257600080fd5b506001600160a01b03813516906020013515156107b6565b6101f16004803603608081101561030057600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561033b57600080fd5b82018360208201111561034d57600080fd5b8035906020019184600183028401116401000000008311171561036f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610882945050505050565b610117600480360360208110156103c657600080fd5b50356108da565b6100fb600480360360408110156103e357600080fd5b506001600160a01b03813581169160200135166109bf565b6001600160e01b03191660009081526020819052604090205460ff1690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104a65780601f1061047b576101008083540402835291602001916104a6565b820191906000526020600020905b81548152906001019060200180831161048957829003601f168201915b5050505050905090565b60006104bb826109ed565b6104f65760405162461bcd60e51b815260040180806020018281038252602c815260200180610ef7602c913960400191505060405180910390fd5b506000908152600260205260409020546001600160a01b031690565b600061051d82610693565b9050806001600160a01b0316836001600160a01b031614156105705760405162461bcd60e51b8152600401808060200182810382526021815260200180610f7b6021913960400191505060405180910390fd5b336001600160a01b038216148061058c575061058c81336109bf565b6105c75760405162461bcd60e51b8152600401808060200182810382526038815260200180610e6c6038913960400191505060405180910390fd5b60008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61062d3382610a0a565b6106685760405162461bcd60e51b8152600401808060200182810382526031815260200180610f9c6031913960400191505060405180910390fd5b610673838383610aae565b505050565b61067383838360405180602001604052806000815250610882565b6000818152600160205260408120546001600160a01b0316806106e75760405162461bcd60e51b8152600401808060200182810382526029815260200180610ece6029913960400191505060405180910390fd5b92915050565b60006001600160a01b0382166107345760405162461bcd60e51b815260040180806020018281038252602a815260200180610ea4602a913960400191505060405180910390fd5b6001600160a01b03821660009081526003602052604090206106e790610bf2565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104a65780601f1061047b576101008083540402835291602001916104a6565b6001600160a01b038216331415610814576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b61088d848484610623565b61089984848484610bf6565b6108d45760405162461bcd60e51b8152600401808060200182810382526032815260200180610dea6032913960400191505060405180910390fd5b50505050565b60606108e5826109ed565b6109205760405162461bcd60e51b815260040180806020018281038252602f815260200180610f4c602f913960400191505060405180910390fd5b60008281526007602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156109b35780601f10610988576101008083540402835291602001916109b3565b820191906000526020600020905b81548152906001019060200180831161099657829003601f168201915b50505050509050919050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6000908152600160205260409020546001600160a01b0316151590565b6000610a15826109ed565b610a505760405162461bcd60e51b815260040180806020018281038252602c815260200180610e40602c913960400191505060405180910390fd5b6000610a5b83610693565b9050806001600160a01b0316846001600160a01b03161480610a965750836001600160a01b0316610a8b846104b0565b6001600160a01b0316145b80610aa65750610aa681856109bf565b949350505050565b826001600160a01b0316610ac182610693565b6001600160a01b031614610b065760405162461bcd60e51b8152600401808060200182810382526029815260200180610f236029913960400191505060405180910390fd5b6001600160a01b038216610b4b5760405162461bcd60e51b8152600401808060200182810382526024815260200180610e1c6024913960400191505060405180910390fd5b610b5481610d29565b6001600160a01b0383166000908152600360205260409020610b7590610d66565b6001600160a01b0382166000908152600360205260409020610b9690610d7d565b60008181526001602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5490565b6000610c0a846001600160a01b0316610d86565b610c1657506001610aa6565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015610c90578181015183820152602001610c78565b50505050905090810190601f168015610cbd5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610cdf57600080fd5b505af1158015610cf3573d6000803e3d6000fd5b505050506040513d6020811015610d0957600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b6000818152600260205260409020546001600160a01b031615610d6357600081815260026020526040902080546001600160a01b03191690555b50565b8054610d7990600163ffffffff610d8c16565b9055565b80546001019055565b3b151590565b600082821115610de3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a265627a7a72305820bd2b77d3744be655b2627d14e3d21d805bc03b7c2ee4383fae4d61be2212f04a64736f6c634300050a0032"
|
|
|
|
// DeployERC721Metadata deploys a new Ethereum contract, binding an instance of ERC721Metadata to it.
|
|
func DeployERC721Metadata(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string) (common.Address, *types.Transaction, *ERC721Metadata, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721MetadataABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC721MetadataBin), backend, name, symbol)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &ERC721Metadata{ERC721MetadataCaller: ERC721MetadataCaller{contract: contract}, ERC721MetadataTransactor: ERC721MetadataTransactor{contract: contract}, ERC721MetadataFilterer: ERC721MetadataFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// ERC721Metadata is an auto generated Go binding around an Ethereum contract.
|
|
type ERC721Metadata struct {
|
|
ERC721MetadataCaller // Read-only binding to the contract
|
|
ERC721MetadataTransactor // Write-only binding to the contract
|
|
ERC721MetadataFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// ERC721MetadataCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type ERC721MetadataCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721MetadataTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type ERC721MetadataTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721MetadataFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type ERC721MetadataFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// ERC721MetadataSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type ERC721MetadataSession struct {
|
|
Contract *ERC721Metadata // 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
|
|
}
|
|
|
|
// ERC721MetadataCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type ERC721MetadataCallerSession struct {
|
|
Contract *ERC721MetadataCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// ERC721MetadataTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type ERC721MetadataTransactorSession struct {
|
|
Contract *ERC721MetadataTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// ERC721MetadataRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type ERC721MetadataRaw struct {
|
|
Contract *ERC721Metadata // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC721MetadataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type ERC721MetadataCallerRaw struct {
|
|
Contract *ERC721MetadataCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// ERC721MetadataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type ERC721MetadataTransactorRaw struct {
|
|
Contract *ERC721MetadataTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewERC721Metadata creates a new instance of ERC721Metadata, bound to a specific deployed contract.
|
|
func NewERC721Metadata(address common.Address, backend bind.ContractBackend) (*ERC721Metadata, error) {
|
|
contract, err := bindERC721Metadata(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721Metadata{ERC721MetadataCaller: ERC721MetadataCaller{contract: contract}, ERC721MetadataTransactor: ERC721MetadataTransactor{contract: contract}, ERC721MetadataFilterer: ERC721MetadataFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewERC721MetadataCaller creates a new read-only instance of ERC721Metadata, bound to a specific deployed contract.
|
|
func NewERC721MetadataCaller(address common.Address, caller bind.ContractCaller) (*ERC721MetadataCaller, error) {
|
|
contract, err := bindERC721Metadata(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721MetadataCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC721MetadataTransactor creates a new write-only instance of ERC721Metadata, bound to a specific deployed contract.
|
|
func NewERC721MetadataTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC721MetadataTransactor, error) {
|
|
contract, err := bindERC721Metadata(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721MetadataTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewERC721MetadataFilterer creates a new log filterer instance of ERC721Metadata, bound to a specific deployed contract.
|
|
func NewERC721MetadataFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC721MetadataFilterer, error) {
|
|
contract, err := bindERC721Metadata(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721MetadataFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindERC721Metadata binds a generic wrapper to an already deployed contract.
|
|
func bindERC721Metadata(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(ERC721MetadataABI))
|
|
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 (_ERC721Metadata *ERC721MetadataRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC721Metadata.Contract.ERC721MetadataCaller.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 (_ERC721Metadata *ERC721MetadataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.ERC721MetadataTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC721Metadata *ERC721MetadataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.ERC721MetadataTransactor.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 (_ERC721Metadata *ERC721MetadataCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_ERC721Metadata *ERC721MetadataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _ERC721Metadata.Contract.BalanceOf(&_ERC721Metadata.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _ERC721Metadata.Contract.BalanceOf(&_ERC721Metadata.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_ERC721Metadata *ERC721MetadataCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Metadata.Contract.GetApproved(&_ERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Metadata.Contract.GetApproved(&_ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _ERC721Metadata.Contract.IsApprovedForAll(&_ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _ERC721Metadata.Contract.IsApprovedForAll(&_ERC721Metadata.CallOpts, owner, operator)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataCaller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) Name() (string, error) {
|
|
return _ERC721Metadata.Contract.Name(&_ERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) Name() (string, error) {
|
|
return _ERC721Metadata.Contract.Name(&_ERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_ERC721Metadata *ERC721MetadataCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Metadata.Contract.OwnerOf(&_ERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _ERC721Metadata.Contract.OwnerOf(&_ERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Metadata *ERC721MetadataCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Metadata *ERC721MetadataSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721Metadata.Contract.SupportsInterface(&_ERC721Metadata.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _ERC721Metadata.Contract.SupportsInterface(&_ERC721Metadata.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) Symbol() (string, error) {
|
|
return _ERC721Metadata.Contract.Symbol(&_ERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) Symbol() (string, error) {
|
|
return _ERC721Metadata.Contract.Symbol(&_ERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) {
|
|
var out []interface{}
|
|
err := _ERC721Metadata.contract.Call(opts, &out, "tokenURI", tokenId)
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _ERC721Metadata.Contract.TokenURI(&_ERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_ERC721Metadata *ERC721MetadataCallerSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _ERC721Metadata.Contract.TokenURI(&_ERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Metadata *ERC721MetadataTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Metadata *ERC721MetadataSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.Approve(&_ERC721Metadata.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_ERC721Metadata *ERC721MetadataTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.Approve(&_ERC721Metadata.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_ERC721Metadata *ERC721MetadataTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.SafeTransferFrom(&_ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.SafeTransferFrom(&_ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.SafeTransferFrom0(&_ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.SafeTransferFrom0(&_ERC721Metadata.TransactOpts, from, to, tokenId, _data)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Metadata *ERC721MetadataTransactor) SetApprovalForAll(opts *bind.TransactOpts, to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Metadata.contract.Transact(opts, "setApprovalForAll", to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Metadata *ERC721MetadataSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.SetApprovalForAll(&_ERC721Metadata.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_ERC721Metadata *ERC721MetadataTransactorSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.SetApprovalForAll(&_ERC721Metadata.TransactOpts, to, approved)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_ERC721Metadata *ERC721MetadataTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.TransferFrom(&_ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _ERC721Metadata.Contract.TransferFrom(&_ERC721Metadata.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// ERC721MetadataApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC721Metadata contract.
|
|
type ERC721MetadataApprovalIterator struct {
|
|
Event *ERC721MetadataApproval // 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 *ERC721MetadataApprovalIterator) 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(ERC721MetadataApproval)
|
|
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(ERC721MetadataApproval)
|
|
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 *ERC721MetadataApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721MetadataApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721MetadataApproval represents a Approval event raised by the ERC721Metadata contract.
|
|
type ERC721MetadataApproval 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 (_ERC721Metadata *ERC721MetadataFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*ERC721MetadataApprovalIterator, 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 := _ERC721Metadata.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721MetadataApprovalIterator{contract: _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC721MetadataApproval, 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 := _ERC721Metadata.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(ERC721MetadataApproval)
|
|
if err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataFilterer) ParseApproval(log types.Log) (*ERC721MetadataApproval, error) {
|
|
event := new(ERC721MetadataApproval)
|
|
if err := _ERC721Metadata.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721MetadataApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the ERC721Metadata contract.
|
|
type ERC721MetadataApprovalForAllIterator struct {
|
|
Event *ERC721MetadataApprovalForAll // 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 *ERC721MetadataApprovalForAllIterator) 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(ERC721MetadataApprovalForAll)
|
|
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(ERC721MetadataApprovalForAll)
|
|
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 *ERC721MetadataApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721MetadataApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721MetadataApprovalForAll represents a ApprovalForAll event raised by the ERC721Metadata contract.
|
|
type ERC721MetadataApprovalForAll 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 (_ERC721Metadata *ERC721MetadataFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*ERC721MetadataApprovalForAllIterator, 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 := _ERC721Metadata.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721MetadataApprovalForAllIterator{contract: _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *ERC721MetadataApprovalForAll, 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 := _ERC721Metadata.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(ERC721MetadataApprovalForAll)
|
|
if err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataFilterer) ParseApprovalForAll(log types.Log) (*ERC721MetadataApprovalForAll, error) {
|
|
event := new(ERC721MetadataApprovalForAll)
|
|
if err := _ERC721Metadata.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// ERC721MetadataTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC721Metadata contract.
|
|
type ERC721MetadataTransferIterator struct {
|
|
Event *ERC721MetadataTransfer // 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 *ERC721MetadataTransferIterator) 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(ERC721MetadataTransfer)
|
|
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(ERC721MetadataTransfer)
|
|
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 *ERC721MetadataTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *ERC721MetadataTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// ERC721MetadataTransfer represents a Transfer event raised by the ERC721Metadata contract.
|
|
type ERC721MetadataTransfer 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 (_ERC721Metadata *ERC721MetadataFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*ERC721MetadataTransferIterator, 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 := _ERC721Metadata.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ERC721MetadataTransferIterator{contract: _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC721MetadataTransfer, 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 := _ERC721Metadata.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(ERC721MetadataTransfer)
|
|
if err := _ERC721Metadata.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 (_ERC721Metadata *ERC721MetadataFilterer) ParseTransfer(log types.Log) (*ERC721MetadataTransfer, error) {
|
|
event := new(ERC721MetadataTransfer)
|
|
if err := _ERC721Metadata.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC165ABI is the input ABI used to generate the binding from.
|
|
const IERC165ABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"
|
|
|
|
// IERC165FuncSigs maps the 4-byte function signature to its string representation.
|
|
var IERC165FuncSigs = map[string]string{
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
}
|
|
|
|
// IERC165 is an auto generated Go binding around an Ethereum contract.
|
|
type IERC165 struct {
|
|
IERC165Caller // Read-only binding to the contract
|
|
IERC165Transactor // Write-only binding to the contract
|
|
IERC165Filterer // Log filterer for contract events
|
|
}
|
|
|
|
// IERC165Caller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IERC165Caller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC165Transactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IERC165Transactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC165Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IERC165Filterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC165Session is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IERC165Session struct {
|
|
Contract *IERC165 // 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
|
|
}
|
|
|
|
// IERC165CallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IERC165CallerSession struct {
|
|
Contract *IERC165Caller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IERC165TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IERC165TransactorSession struct {
|
|
Contract *IERC165Transactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IERC165Raw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IERC165Raw struct {
|
|
Contract *IERC165 // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC165CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IERC165CallerRaw struct {
|
|
Contract *IERC165Caller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC165TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IERC165TransactorRaw struct {
|
|
Contract *IERC165Transactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIERC165 creates a new instance of IERC165, bound to a specific deployed contract.
|
|
func NewIERC165(address common.Address, backend bind.ContractBackend) (*IERC165, error) {
|
|
contract, err := bindIERC165(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC165{IERC165Caller: IERC165Caller{contract: contract}, IERC165Transactor: IERC165Transactor{contract: contract}, IERC165Filterer: IERC165Filterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIERC165Caller creates a new read-only instance of IERC165, bound to a specific deployed contract.
|
|
func NewIERC165Caller(address common.Address, caller bind.ContractCaller) (*IERC165Caller, error) {
|
|
contract, err := bindIERC165(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC165Caller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC165Transactor creates a new write-only instance of IERC165, bound to a specific deployed contract.
|
|
func NewIERC165Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC165Transactor, error) {
|
|
contract, err := bindIERC165(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC165Transactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC165Filterer creates a new log filterer instance of IERC165, bound to a specific deployed contract.
|
|
func NewIERC165Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC165Filterer, error) {
|
|
contract, err := bindIERC165(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC165Filterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIERC165 binds a generic wrapper to an already deployed contract.
|
|
func bindIERC165(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(IERC165ABI))
|
|
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 (_IERC165 *IERC165Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC165.Contract.IERC165Caller.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 (_IERC165 *IERC165Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC165.Contract.IERC165Transactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC165 *IERC165Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC165.Contract.IERC165Transactor.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 (_IERC165 *IERC165CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC165.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 (_IERC165 *IERC165TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC165.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC165 *IERC165TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC165.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC165 *IERC165Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC165.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC165 *IERC165Session) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC165.Contract.SupportsInterface(&_IERC165.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC165 *IERC165CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC165.Contract.SupportsInterface(&_IERC165.CallOpts, interfaceId)
|
|
}
|
|
|
|
// IERC721ABI is the input ABI used to generate the binding from.
|
|
const IERC721ABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"operator\",\"type\":\"address\"},{\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// IERC721FuncSigs maps the 4-byte function signature to its string representation.
|
|
var IERC721FuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// IERC721 is an auto generated Go binding around an Ethereum contract.
|
|
type IERC721 struct {
|
|
IERC721Caller // Read-only binding to the contract
|
|
IERC721Transactor // Write-only binding to the contract
|
|
IERC721Filterer // Log filterer for contract events
|
|
}
|
|
|
|
// IERC721Caller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IERC721Caller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721Transactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IERC721Transactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IERC721Filterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721Session is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IERC721Session struct {
|
|
Contract *IERC721 // 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
|
|
}
|
|
|
|
// IERC721CallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IERC721CallerSession struct {
|
|
Contract *IERC721Caller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IERC721TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IERC721TransactorSession struct {
|
|
Contract *IERC721Transactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IERC721Raw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IERC721Raw struct {
|
|
Contract *IERC721 // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IERC721CallerRaw struct {
|
|
Contract *IERC721Caller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IERC721TransactorRaw struct {
|
|
Contract *IERC721Transactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIERC721 creates a new instance of IERC721, bound to a specific deployed contract.
|
|
func NewIERC721(address common.Address, backend bind.ContractBackend) (*IERC721, error) {
|
|
contract, err := bindIERC721(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721{IERC721Caller: IERC721Caller{contract: contract}, IERC721Transactor: IERC721Transactor{contract: contract}, IERC721Filterer: IERC721Filterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIERC721Caller creates a new read-only instance of IERC721, bound to a specific deployed contract.
|
|
func NewIERC721Caller(address common.Address, caller bind.ContractCaller) (*IERC721Caller, error) {
|
|
contract, err := bindIERC721(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Caller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721Transactor creates a new write-only instance of IERC721, bound to a specific deployed contract.
|
|
func NewIERC721Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC721Transactor, error) {
|
|
contract, err := bindIERC721(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Transactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721Filterer creates a new log filterer instance of IERC721, bound to a specific deployed contract.
|
|
func NewIERC721Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC721Filterer, error) {
|
|
contract, err := bindIERC721(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Filterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIERC721 binds a generic wrapper to an already deployed contract.
|
|
func bindIERC721(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(IERC721ABI))
|
|
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 (_IERC721 *IERC721Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721.Contract.IERC721Caller.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 (_IERC721 *IERC721Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721.Contract.IERC721Transactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721 *IERC721Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721.Contract.IERC721Transactor.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 (_IERC721 *IERC721CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721.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 (_IERC721 *IERC721TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721 *IERC721TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721.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 balance)
|
|
func (_IERC721 *IERC721Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721.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 balance)
|
|
func (_IERC721 *IERC721Session) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721.Contract.BalanceOf(&_IERC721.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256 balance)
|
|
func (_IERC721 *IERC721CallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721.Contract.BalanceOf(&_IERC721.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721 *IERC721Caller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721.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 operator)
|
|
func (_IERC721 *IERC721Session) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721.Contract.GetApproved(&_IERC721.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721 *IERC721CallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721.Contract.GetApproved(&_IERC721.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 (_IERC721 *IERC721Caller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721.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 (_IERC721 *IERC721Session) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721.Contract.IsApprovedForAll(&_IERC721.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 (_IERC721 *IERC721CallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721.Contract.IsApprovedForAll(&_IERC721.CallOpts, owner, operator)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721 *IERC721Caller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721.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 owner)
|
|
func (_IERC721 *IERC721Session) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721.Contract.OwnerOf(&_IERC721.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721 *IERC721CallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721.Contract.OwnerOf(&_IERC721.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721 *IERC721Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721 *IERC721Session) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721.Contract.SupportsInterface(&_IERC721.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721 *IERC721CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721.Contract.SupportsInterface(&_IERC721.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721 *IERC721Transactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721 *IERC721Session) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.Contract.Approve(&_IERC721.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721 *IERC721TransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.Contract.Approve(&_IERC721.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_IERC721 *IERC721Transactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.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 (_IERC721 *IERC721Session) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.Contract.SafeTransferFrom(&_IERC721.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 (_IERC721 *IERC721TransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.Contract.SafeTransferFrom(&_IERC721.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 (_IERC721 *IERC721Transactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721.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 (_IERC721 *IERC721Session) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721.Contract.SafeTransferFrom0(&_IERC721.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 (_IERC721 *IERC721TransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721.Contract.SafeTransferFrom0(&_IERC721.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 (_IERC721 *IERC721Transactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721.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 (_IERC721 *IERC721Session) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721.Contract.SetApprovalForAll(&_IERC721.TransactOpts, operator, _approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address operator, bool _approved) returns()
|
|
func (_IERC721 *IERC721TransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721.Contract.SetApprovalForAll(&_IERC721.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 (_IERC721 *IERC721Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.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 (_IERC721 *IERC721Session) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.Contract.TransferFrom(&_IERC721.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 (_IERC721 *IERC721TransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721.Contract.TransferFrom(&_IERC721.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// IERC721ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721 contract.
|
|
type IERC721ApprovalIterator struct {
|
|
Event *IERC721Approval // 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 *IERC721ApprovalIterator) 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(IERC721Approval)
|
|
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(IERC721Approval)
|
|
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 *IERC721ApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721ApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721Approval represents a Approval event raised by the IERC721 contract.
|
|
type IERC721Approval 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 (_IERC721 *IERC721Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721ApprovalIterator, 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 := _IERC721.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721ApprovalIterator{contract: _IERC721.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 (_IERC721 *IERC721Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721Approval, 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 := _IERC721.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(IERC721Approval)
|
|
if err := _IERC721.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 (_IERC721 *IERC721Filterer) ParseApproval(log types.Log) (*IERC721Approval, error) {
|
|
event := new(IERC721Approval)
|
|
if err := _IERC721.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721ApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721 contract.
|
|
type IERC721ApprovalForAllIterator struct {
|
|
Event *IERC721ApprovalForAll // 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 *IERC721ApprovalForAllIterator) 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(IERC721ApprovalForAll)
|
|
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(IERC721ApprovalForAll)
|
|
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 *IERC721ApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721ApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721ApprovalForAll represents a ApprovalForAll event raised by the IERC721 contract.
|
|
type IERC721ApprovalForAll 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 (_IERC721 *IERC721Filterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721ApprovalForAllIterator, 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 := _IERC721.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721ApprovalForAllIterator{contract: _IERC721.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 (_IERC721 *IERC721Filterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721ApprovalForAll, 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 := _IERC721.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(IERC721ApprovalForAll)
|
|
if err := _IERC721.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 (_IERC721 *IERC721Filterer) ParseApprovalForAll(log types.Log) (*IERC721ApprovalForAll, error) {
|
|
event := new(IERC721ApprovalForAll)
|
|
if err := _IERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721 contract.
|
|
type IERC721TransferIterator struct {
|
|
Event *IERC721Transfer // 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 *IERC721TransferIterator) 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(IERC721Transfer)
|
|
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(IERC721Transfer)
|
|
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 *IERC721TransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721TransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721Transfer represents a Transfer event raised by the IERC721 contract.
|
|
type IERC721Transfer 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 (_IERC721 *IERC721Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721TransferIterator, 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 := _IERC721.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721TransferIterator{contract: _IERC721.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 (_IERC721 *IERC721Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721Transfer, 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 := _IERC721.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(IERC721Transfer)
|
|
if err := _IERC721.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 (_IERC721 *IERC721Filterer) ParseTransfer(log types.Log) (*IERC721Transfer, error) {
|
|
event := new(IERC721Transfer)
|
|
if err := _IERC721.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721EnumerableABI is the input ABI used to generate the binding from.
|
|
const IERC721EnumerableABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"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\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"operator\",\"type\":\"address\"},{\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// IERC721EnumerableFuncSigs maps the 4-byte function signature to its string representation.
|
|
var IERC721EnumerableFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"4f6ccce7": "tokenByIndex(uint256)",
|
|
"2f745c59": "tokenOfOwnerByIndex(address,uint256)",
|
|
"18160ddd": "totalSupply()",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// IERC721Enumerable is an auto generated Go binding around an Ethereum contract.
|
|
type IERC721Enumerable struct {
|
|
IERC721EnumerableCaller // Read-only binding to the contract
|
|
IERC721EnumerableTransactor // Write-only binding to the contract
|
|
IERC721EnumerableFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// IERC721EnumerableCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IERC721EnumerableCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721EnumerableTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IERC721EnumerableTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721EnumerableFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IERC721EnumerableFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721EnumerableSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IERC721EnumerableSession struct {
|
|
Contract *IERC721Enumerable // 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
|
|
}
|
|
|
|
// IERC721EnumerableCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IERC721EnumerableCallerSession struct {
|
|
Contract *IERC721EnumerableCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IERC721EnumerableTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IERC721EnumerableTransactorSession struct {
|
|
Contract *IERC721EnumerableTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IERC721EnumerableRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IERC721EnumerableRaw struct {
|
|
Contract *IERC721Enumerable // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721EnumerableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IERC721EnumerableCallerRaw struct {
|
|
Contract *IERC721EnumerableCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721EnumerableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IERC721EnumerableTransactorRaw struct {
|
|
Contract *IERC721EnumerableTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIERC721Enumerable creates a new instance of IERC721Enumerable, bound to a specific deployed contract.
|
|
func NewIERC721Enumerable(address common.Address, backend bind.ContractBackend) (*IERC721Enumerable, error) {
|
|
contract, err := bindIERC721Enumerable(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Enumerable{IERC721EnumerableCaller: IERC721EnumerableCaller{contract: contract}, IERC721EnumerableTransactor: IERC721EnumerableTransactor{contract: contract}, IERC721EnumerableFilterer: IERC721EnumerableFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIERC721EnumerableCaller creates a new read-only instance of IERC721Enumerable, bound to a specific deployed contract.
|
|
func NewIERC721EnumerableCaller(address common.Address, caller bind.ContractCaller) (*IERC721EnumerableCaller, error) {
|
|
contract, err := bindIERC721Enumerable(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721EnumerableCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721EnumerableTransactor creates a new write-only instance of IERC721Enumerable, bound to a specific deployed contract.
|
|
func NewIERC721EnumerableTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721EnumerableTransactor, error) {
|
|
contract, err := bindIERC721Enumerable(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721EnumerableTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721EnumerableFilterer creates a new log filterer instance of IERC721Enumerable, bound to a specific deployed contract.
|
|
func NewIERC721EnumerableFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721EnumerableFilterer, error) {
|
|
contract, err := bindIERC721Enumerable(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721EnumerableFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIERC721Enumerable binds a generic wrapper to an already deployed contract.
|
|
func bindIERC721Enumerable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(IERC721EnumerableABI))
|
|
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 (_IERC721Enumerable *IERC721EnumerableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Enumerable.Contract.IERC721EnumerableCaller.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 (_IERC721Enumerable *IERC721EnumerableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.IERC721EnumerableTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Enumerable *IERC721EnumerableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.IERC721EnumerableTransactor.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 (_IERC721Enumerable *IERC721EnumerableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Enumerable *IERC721EnumerableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.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 balance)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.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 balance)
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.BalanceOf(&_IERC721Enumerable.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256 balance)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.BalanceOf(&_IERC721Enumerable.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.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 operator)
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Enumerable.Contract.GetApproved(&_IERC721Enumerable.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Enumerable.Contract.GetApproved(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721Enumerable.Contract.IsApprovedForAll(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721Enumerable.Contract.IsApprovedForAll(&_IERC721Enumerable.CallOpts, owner, operator)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.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 owner)
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Enumerable.Contract.OwnerOf(&_IERC721Enumerable.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Enumerable.Contract.OwnerOf(&_IERC721Enumerable.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721Enumerable.Contract.SupportsInterface(&_IERC721Enumerable.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721Enumerable.Contract.SupportsInterface(&_IERC721Enumerable.CallOpts, interfaceId)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.contract.Call(opts, &out, "tokenByIndex", index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.TokenByIndex(&_IERC721Enumerable.CallOpts, index)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.TokenByIndex(&_IERC721Enumerable.CallOpts, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId)
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.TokenOfOwnerByIndex(&_IERC721Enumerable.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.TokenOfOwnerByIndex(&_IERC721Enumerable.CallOpts, owner, index)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_IERC721Enumerable *IERC721EnumerableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableSession) TotalSupply() (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.TotalSupply(&_IERC721Enumerable.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_IERC721Enumerable *IERC721EnumerableCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _IERC721Enumerable.Contract.TotalSupply(&_IERC721Enumerable.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Enumerable *IERC721EnumerableTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Enumerable *IERC721EnumerableSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.Approve(&_IERC721Enumerable.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Enumerable *IERC721EnumerableTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.Approve(&_IERC721Enumerable.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_IERC721Enumerable *IERC721EnumerableTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.SafeTransferFrom(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.SafeTransferFrom(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.SafeTransferFrom0(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.SafeTransferFrom0(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.SetApprovalForAll(&_IERC721Enumerable.TransactOpts, operator, _approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address operator, bool _approved) returns()
|
|
func (_IERC721Enumerable *IERC721EnumerableTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.SetApprovalForAll(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.TransferFrom(&_IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Enumerable.Contract.TransferFrom(&_IERC721Enumerable.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// IERC721EnumerableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721Enumerable contract.
|
|
type IERC721EnumerableApprovalIterator struct {
|
|
Event *IERC721EnumerableApproval // 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 *IERC721EnumerableApprovalIterator) 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(IERC721EnumerableApproval)
|
|
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(IERC721EnumerableApproval)
|
|
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 *IERC721EnumerableApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721EnumerableApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721EnumerableApproval represents a Approval event raised by the IERC721Enumerable contract.
|
|
type IERC721EnumerableApproval 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 (_IERC721Enumerable *IERC721EnumerableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721EnumerableApprovalIterator, 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 := _IERC721Enumerable.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721EnumerableApprovalIterator{contract: _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721EnumerableApproval, 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 := _IERC721Enumerable.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(IERC721EnumerableApproval)
|
|
if err := _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableFilterer) ParseApproval(log types.Log) (*IERC721EnumerableApproval, error) {
|
|
event := new(IERC721EnumerableApproval)
|
|
if err := _IERC721Enumerable.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721EnumerableApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721Enumerable contract.
|
|
type IERC721EnumerableApprovalForAllIterator struct {
|
|
Event *IERC721EnumerableApprovalForAll // 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 *IERC721EnumerableApprovalForAllIterator) 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(IERC721EnumerableApprovalForAll)
|
|
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(IERC721EnumerableApprovalForAll)
|
|
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 *IERC721EnumerableApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721EnumerableApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721EnumerableApprovalForAll represents a ApprovalForAll event raised by the IERC721Enumerable contract.
|
|
type IERC721EnumerableApprovalForAll 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 (_IERC721Enumerable *IERC721EnumerableFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721EnumerableApprovalForAllIterator, 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 := _IERC721Enumerable.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721EnumerableApprovalForAllIterator{contract: _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721EnumerableApprovalForAll, 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 := _IERC721Enumerable.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(IERC721EnumerableApprovalForAll)
|
|
if err := _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableFilterer) ParseApprovalForAll(log types.Log) (*IERC721EnumerableApprovalForAll, error) {
|
|
event := new(IERC721EnumerableApprovalForAll)
|
|
if err := _IERC721Enumerable.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721EnumerableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721Enumerable contract.
|
|
type IERC721EnumerableTransferIterator struct {
|
|
Event *IERC721EnumerableTransfer // 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 *IERC721EnumerableTransferIterator) 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(IERC721EnumerableTransfer)
|
|
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(IERC721EnumerableTransfer)
|
|
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 *IERC721EnumerableTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721EnumerableTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721EnumerableTransfer represents a Transfer event raised by the IERC721Enumerable contract.
|
|
type IERC721EnumerableTransfer 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 (_IERC721Enumerable *IERC721EnumerableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721EnumerableTransferIterator, 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 := _IERC721Enumerable.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721EnumerableTransferIterator{contract: _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721EnumerableTransfer, 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 := _IERC721Enumerable.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(IERC721EnumerableTransfer)
|
|
if err := _IERC721Enumerable.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 (_IERC721Enumerable *IERC721EnumerableFilterer) ParseTransfer(log types.Log) (*IERC721EnumerableTransfer, error) {
|
|
event := new(IERC721EnumerableTransfer)
|
|
if err := _IERC721Enumerable.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721FullABI is the input ABI used to generate the binding from.
|
|
const IERC721FullABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"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\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"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\":\"operator\",\"type\":\"address\"},{\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// IERC721FullFuncSigs maps the 4-byte function signature to its string representation.
|
|
var IERC721FullFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"06fdde03": "name()",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"95d89b41": "symbol()",
|
|
"4f6ccce7": "tokenByIndex(uint256)",
|
|
"2f745c59": "tokenOfOwnerByIndex(address,uint256)",
|
|
"c87b56dd": "tokenURI(uint256)",
|
|
"18160ddd": "totalSupply()",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// IERC721Full is an auto generated Go binding around an Ethereum contract.
|
|
type IERC721Full struct {
|
|
IERC721FullCaller // Read-only binding to the contract
|
|
IERC721FullTransactor // Write-only binding to the contract
|
|
IERC721FullFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// IERC721FullCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IERC721FullCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721FullTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IERC721FullTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721FullFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IERC721FullFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721FullSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IERC721FullSession struct {
|
|
Contract *IERC721Full // 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
|
|
}
|
|
|
|
// IERC721FullCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IERC721FullCallerSession struct {
|
|
Contract *IERC721FullCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IERC721FullTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IERC721FullTransactorSession struct {
|
|
Contract *IERC721FullTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IERC721FullRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IERC721FullRaw struct {
|
|
Contract *IERC721Full // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721FullCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IERC721FullCallerRaw struct {
|
|
Contract *IERC721FullCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721FullTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IERC721FullTransactorRaw struct {
|
|
Contract *IERC721FullTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIERC721Full creates a new instance of IERC721Full, bound to a specific deployed contract.
|
|
func NewIERC721Full(address common.Address, backend bind.ContractBackend) (*IERC721Full, error) {
|
|
contract, err := bindIERC721Full(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Full{IERC721FullCaller: IERC721FullCaller{contract: contract}, IERC721FullTransactor: IERC721FullTransactor{contract: contract}, IERC721FullFilterer: IERC721FullFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIERC721FullCaller creates a new read-only instance of IERC721Full, bound to a specific deployed contract.
|
|
func NewIERC721FullCaller(address common.Address, caller bind.ContractCaller) (*IERC721FullCaller, error) {
|
|
contract, err := bindIERC721Full(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721FullCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721FullTransactor creates a new write-only instance of IERC721Full, bound to a specific deployed contract.
|
|
func NewIERC721FullTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721FullTransactor, error) {
|
|
contract, err := bindIERC721Full(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721FullTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721FullFilterer creates a new log filterer instance of IERC721Full, bound to a specific deployed contract.
|
|
func NewIERC721FullFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721FullFilterer, error) {
|
|
contract, err := bindIERC721Full(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721FullFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIERC721Full binds a generic wrapper to an already deployed contract.
|
|
func bindIERC721Full(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(IERC721FullABI))
|
|
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 (_IERC721Full *IERC721FullRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Full.Contract.IERC721FullCaller.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 (_IERC721Full *IERC721FullRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.IERC721FullTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Full *IERC721FullRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.IERC721FullTransactor.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 (_IERC721Full *IERC721FullCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Full.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 (_IERC721Full *IERC721FullTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Full *IERC721FullTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Full.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 balance)
|
|
func (_IERC721Full *IERC721FullCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 balance)
|
|
func (_IERC721Full *IERC721FullSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721Full.Contract.BalanceOf(&_IERC721Full.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256 balance)
|
|
func (_IERC721Full *IERC721FullCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721Full.Contract.BalanceOf(&_IERC721Full.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721Full *IERC721FullCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 operator)
|
|
func (_IERC721Full *IERC721FullSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Full.Contract.GetApproved(&_IERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721Full *IERC721FullCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Full.Contract.GetApproved(&_IERC721Full.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 (_IERC721Full *IERC721FullCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 (_IERC721Full *IERC721FullSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721Full.Contract.IsApprovedForAll(&_IERC721Full.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 (_IERC721Full *IERC721FullCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721Full.Contract.IsApprovedForAll(&_IERC721Full.CallOpts, owner, operator)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_IERC721Full *IERC721FullCaller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 (_IERC721Full *IERC721FullSession) Name() (string, error) {
|
|
return _IERC721Full.Contract.Name(&_IERC721Full.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_IERC721Full *IERC721FullCallerSession) Name() (string, error) {
|
|
return _IERC721Full.Contract.Name(&_IERC721Full.CallOpts)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721Full *IERC721FullCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 owner)
|
|
func (_IERC721Full *IERC721FullSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Full.Contract.OwnerOf(&_IERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721Full *IERC721FullCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Full.Contract.OwnerOf(&_IERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Full *IERC721FullCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Full *IERC721FullSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721Full.Contract.SupportsInterface(&_IERC721Full.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Full *IERC721FullCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721Full.Contract.SupportsInterface(&_IERC721Full.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_IERC721Full *IERC721FullCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 (_IERC721Full *IERC721FullSession) Symbol() (string, error) {
|
|
return _IERC721Full.Contract.Symbol(&_IERC721Full.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_IERC721Full *IERC721FullCallerSession) Symbol() (string, error) {
|
|
return _IERC721Full.Contract.Symbol(&_IERC721Full.CallOpts)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_IERC721Full *IERC721FullCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.contract.Call(opts, &out, "tokenByIndex", index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_IERC721Full *IERC721FullSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _IERC721Full.Contract.TokenByIndex(&_IERC721Full.CallOpts, index)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_IERC721Full *IERC721FullCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _IERC721Full.Contract.TokenByIndex(&_IERC721Full.CallOpts, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId)
|
|
func (_IERC721Full *IERC721FullCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId)
|
|
func (_IERC721Full *IERC721FullSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _IERC721Full.Contract.TokenOfOwnerByIndex(&_IERC721Full.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId)
|
|
func (_IERC721Full *IERC721FullCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _IERC721Full.Contract.TokenOfOwnerByIndex(&_IERC721Full.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_IERC721Full *IERC721FullCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.contract.Call(opts, &out, "tokenURI", tokenId)
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_IERC721Full *IERC721FullSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _IERC721Full.Contract.TokenURI(&_IERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_IERC721Full *IERC721FullCallerSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _IERC721Full.Contract.TokenURI(&_IERC721Full.CallOpts, tokenId)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_IERC721Full *IERC721FullCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Full.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 (_IERC721Full *IERC721FullSession) TotalSupply() (*big.Int, error) {
|
|
return _IERC721Full.Contract.TotalSupply(&_IERC721Full.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_IERC721Full *IERC721FullCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _IERC721Full.Contract.TotalSupply(&_IERC721Full.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Full *IERC721FullTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Full *IERC721FullSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.Approve(&_IERC721Full.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Full *IERC721FullTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.Approve(&_IERC721Full.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_IERC721Full *IERC721FullTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.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 (_IERC721Full *IERC721FullSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.SafeTransferFrom(&_IERC721Full.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 (_IERC721Full *IERC721FullTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.SafeTransferFrom(&_IERC721Full.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 (_IERC721Full *IERC721FullTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Full.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 (_IERC721Full *IERC721FullSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.SafeTransferFrom0(&_IERC721Full.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 (_IERC721Full *IERC721FullTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.SafeTransferFrom0(&_IERC721Full.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 (_IERC721Full *IERC721FullTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Full.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 (_IERC721Full *IERC721FullSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.SetApprovalForAll(&_IERC721Full.TransactOpts, operator, _approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address operator, bool _approved) returns()
|
|
func (_IERC721Full *IERC721FullTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.SetApprovalForAll(&_IERC721Full.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 (_IERC721Full *IERC721FullTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.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 (_IERC721Full *IERC721FullSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.TransferFrom(&_IERC721Full.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 (_IERC721Full *IERC721FullTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Full.Contract.TransferFrom(&_IERC721Full.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// IERC721FullApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721Full contract.
|
|
type IERC721FullApprovalIterator struct {
|
|
Event *IERC721FullApproval // 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 *IERC721FullApprovalIterator) 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(IERC721FullApproval)
|
|
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(IERC721FullApproval)
|
|
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 *IERC721FullApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721FullApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721FullApproval represents a Approval event raised by the IERC721Full contract.
|
|
type IERC721FullApproval 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 (_IERC721Full *IERC721FullFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721FullApprovalIterator, 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 := _IERC721Full.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721FullApprovalIterator{contract: _IERC721Full.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 (_IERC721Full *IERC721FullFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721FullApproval, 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 := _IERC721Full.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(IERC721FullApproval)
|
|
if err := _IERC721Full.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 (_IERC721Full *IERC721FullFilterer) ParseApproval(log types.Log) (*IERC721FullApproval, error) {
|
|
event := new(IERC721FullApproval)
|
|
if err := _IERC721Full.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721FullApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721Full contract.
|
|
type IERC721FullApprovalForAllIterator struct {
|
|
Event *IERC721FullApprovalForAll // 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 *IERC721FullApprovalForAllIterator) 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(IERC721FullApprovalForAll)
|
|
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(IERC721FullApprovalForAll)
|
|
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 *IERC721FullApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721FullApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721FullApprovalForAll represents a ApprovalForAll event raised by the IERC721Full contract.
|
|
type IERC721FullApprovalForAll 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 (_IERC721Full *IERC721FullFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721FullApprovalForAllIterator, 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 := _IERC721Full.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721FullApprovalForAllIterator{contract: _IERC721Full.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 (_IERC721Full *IERC721FullFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721FullApprovalForAll, 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 := _IERC721Full.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(IERC721FullApprovalForAll)
|
|
if err := _IERC721Full.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 (_IERC721Full *IERC721FullFilterer) ParseApprovalForAll(log types.Log) (*IERC721FullApprovalForAll, error) {
|
|
event := new(IERC721FullApprovalForAll)
|
|
if err := _IERC721Full.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721FullTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721Full contract.
|
|
type IERC721FullTransferIterator struct {
|
|
Event *IERC721FullTransfer // 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 *IERC721FullTransferIterator) 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(IERC721FullTransfer)
|
|
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(IERC721FullTransfer)
|
|
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 *IERC721FullTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721FullTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721FullTransfer represents a Transfer event raised by the IERC721Full contract.
|
|
type IERC721FullTransfer 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 (_IERC721Full *IERC721FullFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721FullTransferIterator, 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 := _IERC721Full.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721FullTransferIterator{contract: _IERC721Full.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 (_IERC721Full *IERC721FullFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721FullTransfer, 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 := _IERC721Full.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(IERC721FullTransfer)
|
|
if err := _IERC721Full.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 (_IERC721Full *IERC721FullFilterer) ParseTransfer(log types.Log) (*IERC721FullTransfer, error) {
|
|
event := new(IERC721FullTransfer)
|
|
if err := _IERC721Full.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721MetadataABI is the input ABI used to generate the binding from.
|
|
const IERC721MetadataABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"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\":\"operator\",\"type\":\"address\"},{\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}]"
|
|
|
|
// IERC721MetadataFuncSigs maps the 4-byte function signature to its string representation.
|
|
var IERC721MetadataFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"06fdde03": "name()",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"95d89b41": "symbol()",
|
|
"c87b56dd": "tokenURI(uint256)",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// IERC721Metadata is an auto generated Go binding around an Ethereum contract.
|
|
type IERC721Metadata struct {
|
|
IERC721MetadataCaller // Read-only binding to the contract
|
|
IERC721MetadataTransactor // Write-only binding to the contract
|
|
IERC721MetadataFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// IERC721MetadataCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IERC721MetadataCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721MetadataTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IERC721MetadataTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721MetadataFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IERC721MetadataFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721MetadataSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IERC721MetadataSession struct {
|
|
Contract *IERC721Metadata // 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
|
|
}
|
|
|
|
// IERC721MetadataCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IERC721MetadataCallerSession struct {
|
|
Contract *IERC721MetadataCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IERC721MetadataTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IERC721MetadataTransactorSession struct {
|
|
Contract *IERC721MetadataTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IERC721MetadataRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IERC721MetadataRaw struct {
|
|
Contract *IERC721Metadata // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721MetadataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IERC721MetadataCallerRaw struct {
|
|
Contract *IERC721MetadataCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721MetadataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IERC721MetadataTransactorRaw struct {
|
|
Contract *IERC721MetadataTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIERC721Metadata creates a new instance of IERC721Metadata, bound to a specific deployed contract.
|
|
func NewIERC721Metadata(address common.Address, backend bind.ContractBackend) (*IERC721Metadata, error) {
|
|
contract, err := bindIERC721Metadata(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Metadata{IERC721MetadataCaller: IERC721MetadataCaller{contract: contract}, IERC721MetadataTransactor: IERC721MetadataTransactor{contract: contract}, IERC721MetadataFilterer: IERC721MetadataFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIERC721MetadataCaller creates a new read-only instance of IERC721Metadata, bound to a specific deployed contract.
|
|
func NewIERC721MetadataCaller(address common.Address, caller bind.ContractCaller) (*IERC721MetadataCaller, error) {
|
|
contract, err := bindIERC721Metadata(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721MetadataCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721MetadataTransactor creates a new write-only instance of IERC721Metadata, bound to a specific deployed contract.
|
|
func NewIERC721MetadataTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721MetadataTransactor, error) {
|
|
contract, err := bindIERC721Metadata(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721MetadataTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721MetadataFilterer creates a new log filterer instance of IERC721Metadata, bound to a specific deployed contract.
|
|
func NewIERC721MetadataFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721MetadataFilterer, error) {
|
|
contract, err := bindIERC721Metadata(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721MetadataFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIERC721Metadata binds a generic wrapper to an already deployed contract.
|
|
func bindIERC721Metadata(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(IERC721MetadataABI))
|
|
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 (_IERC721Metadata *IERC721MetadataRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Metadata.Contract.IERC721MetadataCaller.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 (_IERC721Metadata *IERC721MetadataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.IERC721MetadataTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Metadata *IERC721MetadataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.IERC721MetadataTransactor.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 (_IERC721Metadata *IERC721MetadataCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Metadata *IERC721MetadataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Metadata.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 balance)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.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 balance)
|
|
func (_IERC721Metadata *IERC721MetadataSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721Metadata.Contract.BalanceOf(&_IERC721Metadata.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256 balance)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _IERC721Metadata.Contract.BalanceOf(&_IERC721Metadata.CallOpts, owner)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.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 operator)
|
|
func (_IERC721Metadata *IERC721MetadataSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Metadata.Contract.GetApproved(&_IERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address operator)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Metadata.Contract.GetApproved(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721Metadata.Contract.IsApprovedForAll(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _IERC721Metadata.Contract.IsApprovedForAll(&_IERC721Metadata.CallOpts, owner, operator)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) Name() (string, error) {
|
|
return _IERC721Metadata.Contract.Name(&_IERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) Name() (string, error) {
|
|
return _IERC721Metadata.Contract.Name(&_IERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.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 owner)
|
|
func (_IERC721Metadata *IERC721MetadataSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Metadata.Contract.OwnerOf(&_IERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address owner)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _IERC721Metadata.Contract.OwnerOf(&_IERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Metadata *IERC721MetadataSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721Metadata.Contract.SupportsInterface(&_IERC721Metadata.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _IERC721Metadata.Contract.SupportsInterface(&_IERC721Metadata.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) Symbol() (string, error) {
|
|
return _IERC721Metadata.Contract.Symbol(&_IERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) Symbol() (string, error) {
|
|
return _IERC721Metadata.Contract.Symbol(&_IERC721Metadata.CallOpts)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) {
|
|
var out []interface{}
|
|
err := _IERC721Metadata.contract.Call(opts, &out, "tokenURI", tokenId)
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _IERC721Metadata.Contract.TokenURI(&_IERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_IERC721Metadata *IERC721MetadataCallerSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _IERC721Metadata.Contract.TokenURI(&_IERC721Metadata.CallOpts, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Metadata *IERC721MetadataTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Metadata *IERC721MetadataSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.Approve(&_IERC721Metadata.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_IERC721Metadata *IERC721MetadataTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.Approve(&_IERC721Metadata.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_IERC721Metadata *IERC721MetadataTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.SafeTransferFrom(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.SafeTransferFrom(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.SafeTransferFrom0(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.SafeTransferFrom0(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.SetApprovalForAll(&_IERC721Metadata.TransactOpts, operator, _approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address operator, bool _approved) returns()
|
|
func (_IERC721Metadata *IERC721MetadataTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.SetApprovalForAll(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.TransferFrom(&_IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _IERC721Metadata.Contract.TransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// IERC721MetadataApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721Metadata contract.
|
|
type IERC721MetadataApprovalIterator struct {
|
|
Event *IERC721MetadataApproval // 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 *IERC721MetadataApprovalIterator) 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(IERC721MetadataApproval)
|
|
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(IERC721MetadataApproval)
|
|
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 *IERC721MetadataApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721MetadataApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721MetadataApproval represents a Approval event raised by the IERC721Metadata contract.
|
|
type IERC721MetadataApproval 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 (_IERC721Metadata *IERC721MetadataFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721MetadataApprovalIterator, 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 := _IERC721Metadata.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721MetadataApprovalIterator{contract: _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721MetadataApproval, 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 := _IERC721Metadata.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(IERC721MetadataApproval)
|
|
if err := _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataFilterer) ParseApproval(log types.Log) (*IERC721MetadataApproval, error) {
|
|
event := new(IERC721MetadataApproval)
|
|
if err := _IERC721Metadata.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721MetadataApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721Metadata contract.
|
|
type IERC721MetadataApprovalForAllIterator struct {
|
|
Event *IERC721MetadataApprovalForAll // 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 *IERC721MetadataApprovalForAllIterator) 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(IERC721MetadataApprovalForAll)
|
|
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(IERC721MetadataApprovalForAll)
|
|
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 *IERC721MetadataApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721MetadataApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721MetadataApprovalForAll represents a ApprovalForAll event raised by the IERC721Metadata contract.
|
|
type IERC721MetadataApprovalForAll 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 (_IERC721Metadata *IERC721MetadataFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721MetadataApprovalForAllIterator, 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 := _IERC721Metadata.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721MetadataApprovalForAllIterator{contract: _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721MetadataApprovalForAll, 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 := _IERC721Metadata.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(IERC721MetadataApprovalForAll)
|
|
if err := _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataFilterer) ParseApprovalForAll(log types.Log) (*IERC721MetadataApprovalForAll, error) {
|
|
event := new(IERC721MetadataApprovalForAll)
|
|
if err := _IERC721Metadata.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721MetadataTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721Metadata contract.
|
|
type IERC721MetadataTransferIterator struct {
|
|
Event *IERC721MetadataTransfer // 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 *IERC721MetadataTransferIterator) 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(IERC721MetadataTransfer)
|
|
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(IERC721MetadataTransfer)
|
|
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 *IERC721MetadataTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *IERC721MetadataTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// IERC721MetadataTransfer represents a Transfer event raised by the IERC721Metadata contract.
|
|
type IERC721MetadataTransfer 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 (_IERC721Metadata *IERC721MetadataFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721MetadataTransferIterator, 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 := _IERC721Metadata.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721MetadataTransferIterator{contract: _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721MetadataTransfer, 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 := _IERC721Metadata.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(IERC721MetadataTransfer)
|
|
if err := _IERC721Metadata.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 (_IERC721Metadata *IERC721MetadataFilterer) ParseTransfer(log types.Log) (*IERC721MetadataTransfer, error) {
|
|
event := new(IERC721MetadataTransfer)
|
|
if err := _IERC721Metadata.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// IERC721ReceiverABI is the input ABI used to generate the binding from.
|
|
const IERC721ReceiverABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"operator\",\"type\":\"address\"},{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
|
|
|
|
// IERC721ReceiverFuncSigs maps the 4-byte function signature to its string representation.
|
|
var IERC721ReceiverFuncSigs = map[string]string{
|
|
"150b7a02": "onERC721Received(address,address,uint256,bytes)",
|
|
}
|
|
|
|
// IERC721Receiver is an auto generated Go binding around an Ethereum contract.
|
|
type IERC721Receiver struct {
|
|
IERC721ReceiverCaller // Read-only binding to the contract
|
|
IERC721ReceiverTransactor // Write-only binding to the contract
|
|
IERC721ReceiverFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// IERC721ReceiverCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IERC721ReceiverCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721ReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IERC721ReceiverTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721ReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IERC721ReceiverFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IERC721ReceiverSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IERC721ReceiverSession struct {
|
|
Contract *IERC721Receiver // 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
|
|
}
|
|
|
|
// IERC721ReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IERC721ReceiverCallerSession struct {
|
|
Contract *IERC721ReceiverCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IERC721ReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IERC721ReceiverTransactorSession struct {
|
|
Contract *IERC721ReceiverTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IERC721ReceiverRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IERC721ReceiverRaw struct {
|
|
Contract *IERC721Receiver // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721ReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IERC721ReceiverCallerRaw struct {
|
|
Contract *IERC721ReceiverCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IERC721ReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IERC721ReceiverTransactorRaw struct {
|
|
Contract *IERC721ReceiverTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIERC721Receiver creates a new instance of IERC721Receiver, bound to a specific deployed contract.
|
|
func NewIERC721Receiver(address common.Address, backend bind.ContractBackend) (*IERC721Receiver, error) {
|
|
contract, err := bindIERC721Receiver(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721Receiver{IERC721ReceiverCaller: IERC721ReceiverCaller{contract: contract}, IERC721ReceiverTransactor: IERC721ReceiverTransactor{contract: contract}, IERC721ReceiverFilterer: IERC721ReceiverFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIERC721ReceiverCaller creates a new read-only instance of IERC721Receiver, bound to a specific deployed contract.
|
|
func NewIERC721ReceiverCaller(address common.Address, caller bind.ContractCaller) (*IERC721ReceiverCaller, error) {
|
|
contract, err := bindIERC721Receiver(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721ReceiverCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721ReceiverTransactor creates a new write-only instance of IERC721Receiver, bound to a specific deployed contract.
|
|
func NewIERC721ReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721ReceiverTransactor, error) {
|
|
contract, err := bindIERC721Receiver(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721ReceiverTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIERC721ReceiverFilterer creates a new log filterer instance of IERC721Receiver, bound to a specific deployed contract.
|
|
func NewIERC721ReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721ReceiverFilterer, error) {
|
|
contract, err := bindIERC721Receiver(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IERC721ReceiverFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIERC721Receiver binds a generic wrapper to an already deployed contract.
|
|
func bindIERC721Receiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(IERC721ReceiverABI))
|
|
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 (_IERC721Receiver *IERC721ReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Receiver.Contract.IERC721ReceiverCaller.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 (_IERC721Receiver *IERC721ReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Receiver.Contract.IERC721ReceiverTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Receiver *IERC721ReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Receiver.Contract.IERC721ReceiverTransactor.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 (_IERC721Receiver *IERC721ReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IERC721Receiver.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 (_IERC721Receiver *IERC721ReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IERC721Receiver.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IERC721Receiver *IERC721ReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IERC721Receiver.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02.
|
|
//
|
|
// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4)
|
|
func (_IERC721Receiver *IERC721ReceiverTransactor) OnERC721Received(opts *bind.TransactOpts, operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Receiver.contract.Transact(opts, "onERC721Received", operator, from, tokenId, data)
|
|
}
|
|
|
|
// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02.
|
|
//
|
|
// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4)
|
|
func (_IERC721Receiver *IERC721ReceiverSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Receiver.Contract.OnERC721Received(&_IERC721Receiver.TransactOpts, operator, from, tokenId, data)
|
|
}
|
|
|
|
// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02.
|
|
//
|
|
// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4)
|
|
func (_IERC721Receiver *IERC721ReceiverTransactorSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) {
|
|
return _IERC721Receiver.Contract.OnERC721Received(&_IERC721Receiver.TransactOpts, operator, from, tokenId, data)
|
|
}
|
|
|
|
// SafeMathABI is the input ABI used to generate the binding from.
|
|
const SafeMathABI = "[]"
|
|
|
|
// SafeMathBin is the compiled bytecode used for deploying new contracts.
|
|
var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7230582065f8678fbab15838ed684918f948dc69b859a195f9bc3976712965adc70ab9b364736f6c634300050a0032"
|
|
|
|
// 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 := abi.JSON(strings.NewReader(SafeMathABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
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...)
|
|
}
|
|
|
|
// StickerMarketABI is the input ABI used to generate the binding from.
|
|
const StickerMarketABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"purgePack\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"snt\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stickerType\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_packId\",\"type\":\"uint256\"}],\"name\":\"generateToken\",\"outputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"setBurnRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"},{\"name\":\"_donate\",\"type\":\"uint256\"},{\"name\":\"_category\",\"type\":\"bytes4[]\"},{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_contenthash\",\"type\":\"bytes\"},{\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"registerPack\",\"outputs\":[{\"name\":\"packId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newController\",\"type\":\"address\"}],\"name\":\"changeController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stickerPack\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"},{\"name\":\"_donate\",\"type\":\"uint256\"},{\"name\":\"_category\",\"type\":\"bytes4[]\"},{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_contenthash\",\"type\":\"bytes\"}],\"name\":\"generatePack\",\"outputs\":[{\"name\":\"packId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_state\",\"type\":\"uint8\"}],\"name\":\"setMarketState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"receiveApproval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"setRegisterFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getTokenData\",\"outputs\":[{\"name\":\"category\",\"type\":\"bytes4[]\"},{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"contenthash\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newController\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_destination\",\"type\":\"address\"},{\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"buyToken\",\"outputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_snt\",\"type\":\"address\"},{\"name\":\"_stickerPack\",\"type\":\"address\"},{\"name\":\"_stickerType\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_controller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ClaimedTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"state\",\"type\":\"uint8\"}],\"name\":\"MarketState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"RegisterFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"BurnRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"dataPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"contenthash\",\"type\":\"bytes\"}],\"name\":\"Register\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"NewController\",\"type\":\"event\"}]"
|
|
|
|
// StickerMarketFuncSigs maps the 4-byte function signature to its string representation.
|
|
var StickerMarketFuncSigs = map[string]string{
|
|
"f3e62640": "buyToken(uint256,address,uint256)",
|
|
"3cebb823": "changeController(address)",
|
|
"df8de3e7": "claimTokens(address)",
|
|
"f77c4791": "controller()",
|
|
"4c06dc17": "generatePack(uint256,uint256,bytes4[],address,bytes)",
|
|
"188b5372": "generateToken(address,uint256)",
|
|
"b09afec1": "getTokenData(uint256)",
|
|
"ce5494bb": "migrate(address)",
|
|
"00b3c91b": "purgePack(uint256,uint256)",
|
|
"8f4ffcb1": "receiveApproval(address,uint256,address,bytes)",
|
|
"1cf75710": "registerPack(uint256,uint256,bytes4[],address,bytes,uint256)",
|
|
"189d165e": "setBurnRate(uint256)",
|
|
"536b0445": "setMarketState(uint8)",
|
|
"92be2ab8": "setRegisterFee(uint256)",
|
|
"060eb520": "snt()",
|
|
"c19d93fb": "state()",
|
|
"4858b015": "stickerPack()",
|
|
"0ddd4c87": "stickerType()",
|
|
}
|
|
|
|
// StickerMarketBin is the compiled bytecode used for deploying new contracts.
|
|
var StickerMarketBin = "0x60806040526000805460ff60a01b19167401000000000000000000000000000000000000000017905534801561003457600080fd5b506040516123423803806123428339818101604052606081101561005757600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091906001600160a01b0383166100ef57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f426164205f736e7420706172616d657465720000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821661016457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f426164205f737469636b65725061636b20706172616d65746572000000000000604482015290519081900360640190fd5b6001600160a01b0381166101d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f426164205f737469636b65725479706520706172616d65746572000000000000604482015290519081900360640190fd5b600380546001600160a01b039485166001600160a01b03199182161790915560048054938516938216939093179092556005805491909316911617905561211d806102256000396000f3fe608060405234801561001057600080fd5b50600436106101155760003560e01c8063536b0445116100a2578063c19d93fb11610071578063c19d93fb1461054d578063ce5494bb14610579578063df8de3e71461059f578063f3e62640146105c5578063f77c4791146105f757610115565b8063536b0445146103a25780638f4ffcb1146103c257806392be2ab81461044f578063b09afec11461046c57610115565b8063189d165e116100e9578063189d165e146101a95780631cf75710146101c65780633cebb8231461029d5780634858b015146102c35780634c06dc17146102cb57610115565b8062b3c91b1461011a578063060eb5201461013f5780630ddd4c8714610163578063188b53721461016b575b600080fd5b61013d6004803603604081101561013057600080fd5b50803590602001356105ff565b005b6101476106bb565b604080516001600160a01b039092168252519081900360200190f35b6101476106ca565b6101976004803603604081101561018157600080fd5b506001600160a01b0381351690602001356106d9565b60408051918252519081900360200190f35b61013d600480360360208110156101bf57600080fd5b50356107b7565b610197600480360360c08110156101dc57600080fd5b813591602081013591810190606081016040820135600160201b81111561020257600080fd5b82018360208201111561021457600080fd5b803590602001918460208302840111600160201b8311171561023557600080fd5b919390926001600160a01b0383351692604081019060200135600160201b81111561025f57600080fd5b82018360208201111561027157600080fd5b803590602001918460018302840111600160201b8311171561029257600080fd5b919350915035610897565b61013d600480360360208110156102b357600080fd5b50356001600160a01b031661091e565b6101476109c0565b610197600480360360a08110156102e157600080fd5b813591602081013591810190606081016040820135600160201b81111561030757600080fd5b82018360208201111561031957600080fd5b803590602001918460208302840111600160201b8311171561033a57600080fd5b919390926001600160a01b0383351692604081019060200135600160201b81111561036457600080fd5b82018360208201111561037657600080fd5b803590602001918460018302840111600160201b8311171561039757600080fd5b5090925090506109cf565b61013d600480360360208110156103b857600080fd5b503560ff16610b1d565b61013d600480360360808110156103d857600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b81111561041157600080fd5b82018360208201111561042357600080fd5b803590602001918460018302840111600160201b8311171561044457600080fd5b509092509050610bd7565b61013d6004803603602081101561046557600080fd5b5035610fc8565b6104896004803603602081101561048257600080fd5b5035611051565b604051808060200184815260200180602001838103835286818151815260200191508051906020019060200280838360005b838110156104d35781810151838201526020016104bb565b50505050905001838103825284818151815260200191508051906020019080838360005b8381101561050f5781810151838201526020016104f7565b50505050905090810190601f16801561053c5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6105556111fe565b6040518082600481111561056557fe5b60ff16815260200191505060405180910390f35b61013d6004803603602081101561058f57600080fd5b50356001600160a01b031661120e565b61013d600480360360208110156105b557600080fd5b50356001600160a01b031661138a565b610197600480360360608110156105db57600080fd5b508035906001600160a01b0360208201351690604001356113f2565b610147611408565b6000546001600160a01b0316331461064d576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6005546040805162b3c91b60e01b8152600481018590526024810184905290516001600160a01b039092169162b3c91b9160448082019260009290919082900301818387803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050505050565b6003546001600160a01b031681565b6005546001600160a01b031681565b600080546001600160a01b03163314610728576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6004805460408051630c45a9b960e11b81526001600160a01b0387811694820194909452602481018690529051929091169163188b5372916044808201926020929091908290030181600087803b15801561078257600080fd5b505af1158015610796573d6000803e3d6000fd5b505050506040513d60208110156107ac57600080fd5b505190505b92915050565b6000546001600160a01b03163314610805576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6002819055612710811115610861576040805162461bcd60e51b815260206004820152601b60248201527f63616e6e6f74206265206d6f7265207468656e203130302e3030250000000000604482015290519081900360640190fd5b6040805182815290517f59701ed6f46ff3f5c94b1b741d5b3f2968eb7a0ae31d2cf2a3a9f2153d18b5149181900360200190a150565b60006109113388888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020601f8b018190048102820181019092528981528b93508f92508e918b908b90819084018382808284376000920191909152508b9250611417915050565b9998505050505050505050565b6000546001600160a01b0316331461096c576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c69181900360200190a150565b6004546001600160a01b031681565b600080546001600160a01b03163314610a1e576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b600554604051634c06dc1760e01b8152600481018a8152602482018a90526001600160a01b03878116606484015260a06044840190815260a484018a9052931692634c06dc17928c928c928c928c928c928c928c929190608481019060c401886020890280828437600083820152601f01601f191690910184810383528581526020019050858580828437600081840152601f19601f8201169050808301925050509950505050505050505050602060405180830381600087803b158015610ae557600080fd5b505af1158015610af9573d6000803e3d6000fd5b505050506040513d6020811015610b0f57600080fd5b505198975050505050505050565b6000546001600160a01b03163314610b6b576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6000805482919060ff60a01b1916600160a01b836004811115610b8a57fe5b02179055507f9f17f1d96f7bb1d5a573d638f26fdb9fa651427eb2e7b36481cd5e1351581e588160405180826004811115610bc157fe5b60ff16815260200191505060405180910390a150565b6003546001600160a01b03848116911614610c25576040805162461bcd60e51b81526020600482015260096024820152682130b2103a37b5b2b760b91b604482015290519081900360640190fd5b6001600160a01b0383163314610c6d576040805162461bcd60e51b81526020600482015260086024820152671098590818d85b1b60c21b604482015290519081900360640190fd5b6000610cae83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116e192505050565b90506060610cf884848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060049250505060031986016116e8565b90506001600160e01b031982166303cf989960e61b1415610de6578051606014610d5b576040805162461bcd60e51b815260206004820152600f60248201526e084c2c840c8c2e8c240d8cadccee8d608b1b604482015290519081900360640190fd5b6000806000838060200190516060811015610d7557600080fd5b50805160208201516040909201519094509092509050888114610dd1576040805162461bcd60e51b815260206004820152600f60248201526e4261642070726963652076616c756560881b604482015290519081900360640190fd5b610ddd8a848484611768565b50505050610fbf565b6001600160e01b031982166301cf757160e41b1415610f875760bc81511015610e48576040805162461bcd60e51b815260206004820152600f60248201526e084c2c840c8c2e8c240d8cadccee8d608b1b604482015290519081900360640190fd5b60008060606000606060008680602001905160c0811015610e6857600080fd5b8151602083015160408401805192949193820192600160201b811115610e8d57600080fd5b82016020810184811115610ea057600080fd5b81518560208202830111600160201b82111715610ebc57600080fd5b50506020820151604090920180519194929391600160201b811115610ee057600080fd5b82016020810184811115610ef357600080fd5b8151600160201b811182820187101715610f0c57600080fd5b5050602090910151969c50949a5092985090965091945091925050508b8114610f6c576040805162461bcd60e51b815260206004820152600d60248201526c426164206665652076616c756560981b604482015290519081900360640190fd5b610f7b8d858589898787611417565b50505050505050610fbf565b6040805162461bcd60e51b81526020600482015260086024820152671098590818d85b1b60c21b604482015290519081900360640190fd5b50505050505050565b6000546001600160a01b03163314611016576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b60018190556040805182815290517f1d4a2348bf98e0fa847f28a7db9967b1327ac954c312b659b65a860bb69591729181900360200190a150565b6005546004805460408051632951abd360e21b81529283018590525160609360009385936001600160a01b03928316936381ec792d939091169163a546af4c916024808301926020929190829003018186803b1580156110b057600080fd5b505afa1580156110c4573d6000803e3d6000fd5b505050506040513d60208110156110da57600080fd5b5051604080516001600160e01b031960e085901b1681526004810192909252516024808301926000929190829003018186803b15801561111957600080fd5b505afa15801561112d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052606081101561115657600080fd5b810190808051600160201b81111561116d57600080fd5b8201602081018481111561118057600080fd5b81518560208202830111600160201b8211171561119c57600080fd5b50506020820151604090920180519194929391600160201b8111156111c057600080fd5b820160208101848111156111d357600080fd5b8151600160201b8111828201871017156111ec57600080fd5b50959a94995097509295505050505050565b600054600160a01b900460ff1681565b6000546001600160a01b0316331461125c576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166112b7576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f7420756e73657420636f6e74726f6c6c6572000000000000000000604482015290519081900360640190fd5b60055460408051633cebb82360e01b81526001600160a01b03848116600483015291519190921691633cebb82391602480830192600092919082900301818387803b15801561130557600080fd5b505af1158015611319573d6000803e3d6000fd5b50506004805460408051633cebb82360e01b81526001600160a01b03878116948201949094529051929091169350633cebb823925060248082019260009290919082900301818387803b15801561136f57600080fd5b505af1158015611383573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146113d8576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6000546113ef9082906001600160a01b0316611e07565b50565b600061140033858585611768565b949350505050565b6000546001600160a01b031681565b60006001600054600160a01b900460ff16600481111561143357fe5b148061146b57506000546001600160a01b03163314801561146b57506003600054600160a01b900460ff16600481111561146957fe5b145b6114ae576040805162461bcd60e51b815260206004820152600f60248201526e13585c9ad95d08111a5cd8589b1959608a1b604482015290519081900360640190fd5b60015482146114f5576040805162461bcd60e51b815260206004820152600e60248201526d556e65787065637465642066656560901b604482015290519081900360640190fd5b600154156115d05760035460008054600154604080516323b872dd60e01b81526001600160a01b038e81166004830152938416602482015260448101929092525191909316926323b872dd9260648083019360209390929083900390910190829087803b15801561156557600080fd5b505af1158015611579573d6000803e3d6000fd5b505050506040513d602081101561158f57600080fd5b50516115d0576040805162461bcd60e51b815260206004820152600b60248201526a109859081c185e5b595b9d60aa1b604482015290519081900360640190fd5b600554604051634c06dc1760e01b815260048101878152602482018790526001600160a01b03898116606484015260a0604484019081528b5160a48501528b519190941693634c06dc17938a938a938e938e938c9392608482019160c401906020808901910280838360005b8381101561165457818101518382015260200161163c565b50505050905001838103825284818151815260200191508051906020019080838360005b83811015611690578181015183820152602001611678565b50505050905090810190601f1680156116bd5780820380516001836020036101000a031916815260200191505b50975050505050505050602060405180830381600087803b158015610ae557600080fd5b6020015190565b6060818301845110156116fa57600080fd5b6060821580156117155760405191506020820160405261175f565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561174e578051835260209283019201611736565b5050858452601f01601f1916604052505b50949350505050565b60006001600054600160a01b900460ff16600481111561178457fe5b14806117a757506002600054600160a01b900460ff1660048111156117a557fe5b145b806117de57506000546001600160a01b0316331480156117de57506003600054600160a01b900460ff1660048111156117dc57fe5b145b611821576040805162461bcd60e51b815260206004820152600f60248201526e13585c9ad95d08111a5cd8589b1959608a1b604482015290519081900360640190fd5b60055460408051634e1d1cd160e11b81526004810187905290516000928392839283926001600160a01b031691639c3a39a2916024808301926080929190829003018186803b15801561187357600080fd5b505afa158015611887573d6000803e3d6000fd5b505050506040513d608081101561189d57600080fd5b50805160208201516040830151606090930151919650945090925090506001600160a01b038416611900576040805162461bcd60e51b8152602060048201526008602482015267426164207061636b60c01b604482015290519081900360640190fd5b8261193d576040805162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b604482015290519081900360640190fd5b81868114611980576040805162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b604482015290519081900360640190fd5b600081116119c4576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6000811180156119d657506000600254115b15611b54576000611a046127106119f860025485611fa090919063ffffffff16565b9063ffffffff61200016565b9050611a16828263ffffffff61206a16565b6003546040805163f77c479160e01b815290519294506001600160a01b03909116916323b872dd918e91849163f77c4791916004808301926020929190829003018186803b158015611a6757600080fd5b505afa158015611a7b573d6000803e3d6000fd5b505050506040513d6020811015611a9157600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152929091166024830152604482018590525160648083019260209291908290030181600087803b158015611aea57600080fd5b505af1158015611afe573d6000803e3d6000fd5b505050506040513d6020811015611b1457600080fd5b5051611b52576040805162461bcd60e51b81526020600482015260086024820152672130b210313ab93760c11b604482015290519081900360640190fd5b505b600081118015611b645750600082115b15611ca4576000611b816127106119f8848663ffffffff611fa016565b9050611b93828263ffffffff61206a16565b9150600360009054906101000a90046001600160a01b03166001600160a01b03166323b872dd8c6000809054906101000a90046001600160a01b0316846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611c3857600080fd5b505af1158015611c4c573d6000803e3d6000fd5b505050506040513d6020811015611c6257600080fd5b5051611ca2576040805162461bcd60e51b815260206004820152600a60248201526942616420646f6e61746560b01b604482015290519081900360640190fd5b505b8015611d7357600354604080516323b872dd60e01b81526001600160a01b038d81166004830152888116602483015260448201859052915191909216916323b872dd9160648083019260209291908290030181600087803b158015611d0857600080fd5b505af1158015611d1c573d6000803e3d6000fd5b505050506040513d6020811015611d3257600080fd5b5051611d73576040805162461bcd60e51b815260206004820152600b60248201526a109859081c185e5b595b9d60aa1b604482015290519081900360640190fd5b6004805460408051630c45a9b960e11b81526001600160a01b038c811694820194909452602481018d90529051929091169163188b5372916044808201926020929091908290030181600087803b158015611dcd57600080fd5b505af1158015611de1573d6000803e3d6000fd5b505050506040513d6020811015611df757600080fd5b50519a9950505050505050505050565b60006001600160a01b038316611e5757506040513031906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611e51573d6000803e3d6000fd5b50611f50565b604080516370a0823160e01b8152306004820152905184916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015611ea057600080fd5b505afa158015611eb4573d6000803e3d6000fd5b505050506040513d6020811015611eca57600080fd5b50516040805163a9059cbb60e01b81526001600160a01b0386811660048301526024820184905291519294509083169163a9059cbb916044808201926020929091908290030181600087803b158015611f2257600080fd5b505af1158015611f36573d6000803e3d6000fd5b505050506040513d6020811015611f4c57600080fd5b5050505b816001600160a01b0316836001600160a01b03167ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c836040518082815260200191505060405180910390a3505050565b600082611faf575060006107b1565b82820282848281611fbc57fe5b0414611ff95760405162461bcd60e51b81526004018080602001828103825260218152602001806120c86021913960400191505060405180910390fd5b9392505050565b6000808211612056576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161206157fe5b04949350505050565b6000828211156120c1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72305820971710d153ac1b01c0aca1105f094801191b0fb63b51f8e87391df62ddabddb964736f6c634300050a0032"
|
|
|
|
// DeployStickerMarket deploys a new Ethereum contract, binding an instance of StickerMarket to it.
|
|
func DeployStickerMarket(auth *bind.TransactOpts, backend bind.ContractBackend, _snt common.Address, _stickerPack common.Address, _stickerType common.Address) (common.Address, *types.Transaction, *StickerMarket, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(StickerMarketABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StickerMarketBin), backend, _snt, _stickerPack, _stickerType)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &StickerMarket{StickerMarketCaller: StickerMarketCaller{contract: contract}, StickerMarketTransactor: StickerMarketTransactor{contract: contract}, StickerMarketFilterer: StickerMarketFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// StickerMarket is an auto generated Go binding around an Ethereum contract.
|
|
type StickerMarket struct {
|
|
StickerMarketCaller // Read-only binding to the contract
|
|
StickerMarketTransactor // Write-only binding to the contract
|
|
StickerMarketFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// StickerMarketCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type StickerMarketCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerMarketTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type StickerMarketTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerMarketFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type StickerMarketFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerMarketSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type StickerMarketSession struct {
|
|
Contract *StickerMarket // 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
|
|
}
|
|
|
|
// StickerMarketCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type StickerMarketCallerSession struct {
|
|
Contract *StickerMarketCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// StickerMarketTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type StickerMarketTransactorSession struct {
|
|
Contract *StickerMarketTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// StickerMarketRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type StickerMarketRaw struct {
|
|
Contract *StickerMarket // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// StickerMarketCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type StickerMarketCallerRaw struct {
|
|
Contract *StickerMarketCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// StickerMarketTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type StickerMarketTransactorRaw struct {
|
|
Contract *StickerMarketTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewStickerMarket creates a new instance of StickerMarket, bound to a specific deployed contract.
|
|
func NewStickerMarket(address common.Address, backend bind.ContractBackend) (*StickerMarket, error) {
|
|
contract, err := bindStickerMarket(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarket{StickerMarketCaller: StickerMarketCaller{contract: contract}, StickerMarketTransactor: StickerMarketTransactor{contract: contract}, StickerMarketFilterer: StickerMarketFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewStickerMarketCaller creates a new read-only instance of StickerMarket, bound to a specific deployed contract.
|
|
func NewStickerMarketCaller(address common.Address, caller bind.ContractCaller) (*StickerMarketCaller, error) {
|
|
contract, err := bindStickerMarket(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewStickerMarketTransactor creates a new write-only instance of StickerMarket, bound to a specific deployed contract.
|
|
func NewStickerMarketTransactor(address common.Address, transactor bind.ContractTransactor) (*StickerMarketTransactor, error) {
|
|
contract, err := bindStickerMarket(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewStickerMarketFilterer creates a new log filterer instance of StickerMarket, bound to a specific deployed contract.
|
|
func NewStickerMarketFilterer(address common.Address, filterer bind.ContractFilterer) (*StickerMarketFilterer, error) {
|
|
contract, err := bindStickerMarket(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindStickerMarket binds a generic wrapper to an already deployed contract.
|
|
func bindStickerMarket(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(StickerMarketABI))
|
|
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 (_StickerMarket *StickerMarketRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _StickerMarket.Contract.StickerMarketCaller.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 (_StickerMarket *StickerMarketRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.StickerMarketTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_StickerMarket *StickerMarketRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.StickerMarketTransactor.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 (_StickerMarket *StickerMarketCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _StickerMarket.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 (_StickerMarket *StickerMarketTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_StickerMarket *StickerMarketTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerMarket *StickerMarketCaller) Controller(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerMarket.contract.Call(opts, &out, "controller")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerMarket *StickerMarketSession) Controller() (common.Address, error) {
|
|
return _StickerMarket.Contract.Controller(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerMarket *StickerMarketCallerSession) Controller() (common.Address, error) {
|
|
return _StickerMarket.Contract.Controller(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// GetTokenData is a free data retrieval call binding the contract method 0xb09afec1.
|
|
//
|
|
// Solidity: function getTokenData(uint256 _tokenId) view returns(bytes4[] category, uint256 timestamp, bytes contenthash)
|
|
func (_StickerMarket *StickerMarketCaller) GetTokenData(opts *bind.CallOpts, _tokenId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _StickerMarket.contract.Call(opts, &out, "getTokenData", _tokenId)
|
|
|
|
outstruct := new(struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Category = *abi.ConvertType(out[0], new([][4]byte)).(*[][4]byte)
|
|
outstruct.Timestamp = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.Contenthash = *abi.ConvertType(out[2], new([]byte)).(*[]byte)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// GetTokenData is a free data retrieval call binding the contract method 0xb09afec1.
|
|
//
|
|
// Solidity: function getTokenData(uint256 _tokenId) view returns(bytes4[] category, uint256 timestamp, bytes contenthash)
|
|
func (_StickerMarket *StickerMarketSession) GetTokenData(_tokenId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerMarket.Contract.GetTokenData(&_StickerMarket.CallOpts, _tokenId)
|
|
}
|
|
|
|
// GetTokenData is a free data retrieval call binding the contract method 0xb09afec1.
|
|
//
|
|
// Solidity: function getTokenData(uint256 _tokenId) view returns(bytes4[] category, uint256 timestamp, bytes contenthash)
|
|
func (_StickerMarket *StickerMarketCallerSession) GetTokenData(_tokenId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerMarket.Contract.GetTokenData(&_StickerMarket.CallOpts, _tokenId)
|
|
}
|
|
|
|
// Snt is a free data retrieval call binding the contract method 0x060eb520.
|
|
//
|
|
// Solidity: function snt() view returns(address)
|
|
func (_StickerMarket *StickerMarketCaller) Snt(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerMarket.contract.Call(opts, &out, "snt")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Snt is a free data retrieval call binding the contract method 0x060eb520.
|
|
//
|
|
// Solidity: function snt() view returns(address)
|
|
func (_StickerMarket *StickerMarketSession) Snt() (common.Address, error) {
|
|
return _StickerMarket.Contract.Snt(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// Snt is a free data retrieval call binding the contract method 0x060eb520.
|
|
//
|
|
// Solidity: function snt() view returns(address)
|
|
func (_StickerMarket *StickerMarketCallerSession) Snt() (common.Address, error) {
|
|
return _StickerMarket.Contract.Snt(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// State is a free data retrieval call binding the contract method 0xc19d93fb.
|
|
//
|
|
// Solidity: function state() view returns(uint8)
|
|
func (_StickerMarket *StickerMarketCaller) State(opts *bind.CallOpts) (uint8, error) {
|
|
var out []interface{}
|
|
err := _StickerMarket.contract.Call(opts, &out, "state")
|
|
|
|
if err != nil {
|
|
return *new(uint8), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// State is a free data retrieval call binding the contract method 0xc19d93fb.
|
|
//
|
|
// Solidity: function state() view returns(uint8)
|
|
func (_StickerMarket *StickerMarketSession) State() (uint8, error) {
|
|
return _StickerMarket.Contract.State(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// State is a free data retrieval call binding the contract method 0xc19d93fb.
|
|
//
|
|
// Solidity: function state() view returns(uint8)
|
|
func (_StickerMarket *StickerMarketCallerSession) State() (uint8, error) {
|
|
return _StickerMarket.Contract.State(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// StickerPack is a free data retrieval call binding the contract method 0x4858b015.
|
|
//
|
|
// Solidity: function stickerPack() view returns(address)
|
|
func (_StickerMarket *StickerMarketCaller) StickerPack(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerMarket.contract.Call(opts, &out, "stickerPack")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// StickerPack is a free data retrieval call binding the contract method 0x4858b015.
|
|
//
|
|
// Solidity: function stickerPack() view returns(address)
|
|
func (_StickerMarket *StickerMarketSession) StickerPack() (common.Address, error) {
|
|
return _StickerMarket.Contract.StickerPack(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// StickerPack is a free data retrieval call binding the contract method 0x4858b015.
|
|
//
|
|
// Solidity: function stickerPack() view returns(address)
|
|
func (_StickerMarket *StickerMarketCallerSession) StickerPack() (common.Address, error) {
|
|
return _StickerMarket.Contract.StickerPack(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// StickerType is a free data retrieval call binding the contract method 0x0ddd4c87.
|
|
//
|
|
// Solidity: function stickerType() view returns(address)
|
|
func (_StickerMarket *StickerMarketCaller) StickerType(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerMarket.contract.Call(opts, &out, "stickerType")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// StickerType is a free data retrieval call binding the contract method 0x0ddd4c87.
|
|
//
|
|
// Solidity: function stickerType() view returns(address)
|
|
func (_StickerMarket *StickerMarketSession) StickerType() (common.Address, error) {
|
|
return _StickerMarket.Contract.StickerType(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// StickerType is a free data retrieval call binding the contract method 0x0ddd4c87.
|
|
//
|
|
// Solidity: function stickerType() view returns(address)
|
|
func (_StickerMarket *StickerMarketCallerSession) StickerType() (common.Address, error) {
|
|
return _StickerMarket.Contract.StickerType(&_StickerMarket.CallOpts)
|
|
}
|
|
|
|
// BuyToken is a paid mutator transaction binding the contract method 0xf3e62640.
|
|
//
|
|
// Solidity: function buyToken(uint256 _packId, address _destination, uint256 _price) returns(uint256 tokenId)
|
|
func (_StickerMarket *StickerMarketTransactor) BuyToken(opts *bind.TransactOpts, _packId *big.Int, _destination common.Address, _price *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "buyToken", _packId, _destination, _price)
|
|
}
|
|
|
|
// BuyToken is a paid mutator transaction binding the contract method 0xf3e62640.
|
|
//
|
|
// Solidity: function buyToken(uint256 _packId, address _destination, uint256 _price) returns(uint256 tokenId)
|
|
func (_StickerMarket *StickerMarketSession) BuyToken(_packId *big.Int, _destination common.Address, _price *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.BuyToken(&_StickerMarket.TransactOpts, _packId, _destination, _price)
|
|
}
|
|
|
|
// BuyToken is a paid mutator transaction binding the contract method 0xf3e62640.
|
|
//
|
|
// Solidity: function buyToken(uint256 _packId, address _destination, uint256 _price) returns(uint256 tokenId)
|
|
func (_StickerMarket *StickerMarketTransactorSession) BuyToken(_packId *big.Int, _destination common.Address, _price *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.BuyToken(&_StickerMarket.TransactOpts, _packId, _destination, _price)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) ChangeController(opts *bind.TransactOpts, _newController common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "changeController", _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerMarket *StickerMarketSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.ChangeController(&_StickerMarket.TransactOpts, _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.ChangeController(&_StickerMarket.TransactOpts, _newController)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) ClaimTokens(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "claimTokens", _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerMarket *StickerMarketSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.ClaimTokens(&_StickerMarket.TransactOpts, _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.ClaimTokens(&_StickerMarket.TransactOpts, _token)
|
|
}
|
|
|
|
// GeneratePack is a paid mutator transaction binding the contract method 0x4c06dc17.
|
|
//
|
|
// Solidity: function generatePack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash) returns(uint256 packId)
|
|
func (_StickerMarket *StickerMarketTransactor) GeneratePack(opts *bind.TransactOpts, _price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "generatePack", _price, _donate, _category, _owner, _contenthash)
|
|
}
|
|
|
|
// GeneratePack is a paid mutator transaction binding the contract method 0x4c06dc17.
|
|
//
|
|
// Solidity: function generatePack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash) returns(uint256 packId)
|
|
func (_StickerMarket *StickerMarketSession) GeneratePack(_price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.GeneratePack(&_StickerMarket.TransactOpts, _price, _donate, _category, _owner, _contenthash)
|
|
}
|
|
|
|
// GeneratePack is a paid mutator transaction binding the contract method 0x4c06dc17.
|
|
//
|
|
// Solidity: function generatePack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash) returns(uint256 packId)
|
|
func (_StickerMarket *StickerMarketTransactorSession) GeneratePack(_price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.GeneratePack(&_StickerMarket.TransactOpts, _price, _donate, _category, _owner, _contenthash)
|
|
}
|
|
|
|
// GenerateToken is a paid mutator transaction binding the contract method 0x188b5372.
|
|
//
|
|
// Solidity: function generateToken(address _owner, uint256 _packId) returns(uint256 tokenId)
|
|
func (_StickerMarket *StickerMarketTransactor) GenerateToken(opts *bind.TransactOpts, _owner common.Address, _packId *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "generateToken", _owner, _packId)
|
|
}
|
|
|
|
// GenerateToken is a paid mutator transaction binding the contract method 0x188b5372.
|
|
//
|
|
// Solidity: function generateToken(address _owner, uint256 _packId) returns(uint256 tokenId)
|
|
func (_StickerMarket *StickerMarketSession) GenerateToken(_owner common.Address, _packId *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.GenerateToken(&_StickerMarket.TransactOpts, _owner, _packId)
|
|
}
|
|
|
|
// GenerateToken is a paid mutator transaction binding the contract method 0x188b5372.
|
|
//
|
|
// Solidity: function generateToken(address _owner, uint256 _packId) returns(uint256 tokenId)
|
|
func (_StickerMarket *StickerMarketTransactorSession) GenerateToken(_owner common.Address, _packId *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.GenerateToken(&_StickerMarket.TransactOpts, _owner, _packId)
|
|
}
|
|
|
|
// Migrate is a paid mutator transaction binding the contract method 0xce5494bb.
|
|
//
|
|
// Solidity: function migrate(address _newController) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) Migrate(opts *bind.TransactOpts, _newController common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "migrate", _newController)
|
|
}
|
|
|
|
// Migrate is a paid mutator transaction binding the contract method 0xce5494bb.
|
|
//
|
|
// Solidity: function migrate(address _newController) returns()
|
|
func (_StickerMarket *StickerMarketSession) Migrate(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.Migrate(&_StickerMarket.TransactOpts, _newController)
|
|
}
|
|
|
|
// Migrate is a paid mutator transaction binding the contract method 0xce5494bb.
|
|
//
|
|
// Solidity: function migrate(address _newController) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) Migrate(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.Migrate(&_StickerMarket.TransactOpts, _newController)
|
|
}
|
|
|
|
// PurgePack is a paid mutator transaction binding the contract method 0x00b3c91b.
|
|
//
|
|
// Solidity: function purgePack(uint256 _packId, uint256 _limit) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) PurgePack(opts *bind.TransactOpts, _packId *big.Int, _limit *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "purgePack", _packId, _limit)
|
|
}
|
|
|
|
// PurgePack is a paid mutator transaction binding the contract method 0x00b3c91b.
|
|
//
|
|
// Solidity: function purgePack(uint256 _packId, uint256 _limit) returns()
|
|
func (_StickerMarket *StickerMarketSession) PurgePack(_packId *big.Int, _limit *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.PurgePack(&_StickerMarket.TransactOpts, _packId, _limit)
|
|
}
|
|
|
|
// PurgePack is a paid mutator transaction binding the contract method 0x00b3c91b.
|
|
//
|
|
// Solidity: function purgePack(uint256 _packId, uint256 _limit) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) PurgePack(_packId *big.Int, _limit *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.PurgePack(&_StickerMarket.TransactOpts, _packId, _limit)
|
|
}
|
|
|
|
// ReceiveApproval is a paid mutator transaction binding the contract method 0x8f4ffcb1.
|
|
//
|
|
// Solidity: function receiveApproval(address _from, uint256 _value, address _token, bytes _data) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) ReceiveApproval(opts *bind.TransactOpts, _from common.Address, _value *big.Int, _token common.Address, _data []byte) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "receiveApproval", _from, _value, _token, _data)
|
|
}
|
|
|
|
// ReceiveApproval is a paid mutator transaction binding the contract method 0x8f4ffcb1.
|
|
//
|
|
// Solidity: function receiveApproval(address _from, uint256 _value, address _token, bytes _data) returns()
|
|
func (_StickerMarket *StickerMarketSession) ReceiveApproval(_from common.Address, _value *big.Int, _token common.Address, _data []byte) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.ReceiveApproval(&_StickerMarket.TransactOpts, _from, _value, _token, _data)
|
|
}
|
|
|
|
// ReceiveApproval is a paid mutator transaction binding the contract method 0x8f4ffcb1.
|
|
//
|
|
// Solidity: function receiveApproval(address _from, uint256 _value, address _token, bytes _data) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) ReceiveApproval(_from common.Address, _value *big.Int, _token common.Address, _data []byte) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.ReceiveApproval(&_StickerMarket.TransactOpts, _from, _value, _token, _data)
|
|
}
|
|
|
|
// RegisterPack is a paid mutator transaction binding the contract method 0x1cf75710.
|
|
//
|
|
// Solidity: function registerPack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash, uint256 _fee) returns(uint256 packId)
|
|
func (_StickerMarket *StickerMarketTransactor) RegisterPack(opts *bind.TransactOpts, _price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte, _fee *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "registerPack", _price, _donate, _category, _owner, _contenthash, _fee)
|
|
}
|
|
|
|
// RegisterPack is a paid mutator transaction binding the contract method 0x1cf75710.
|
|
//
|
|
// Solidity: function registerPack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash, uint256 _fee) returns(uint256 packId)
|
|
func (_StickerMarket *StickerMarketSession) RegisterPack(_price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte, _fee *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.RegisterPack(&_StickerMarket.TransactOpts, _price, _donate, _category, _owner, _contenthash, _fee)
|
|
}
|
|
|
|
// RegisterPack is a paid mutator transaction binding the contract method 0x1cf75710.
|
|
//
|
|
// Solidity: function registerPack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash, uint256 _fee) returns(uint256 packId)
|
|
func (_StickerMarket *StickerMarketTransactorSession) RegisterPack(_price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte, _fee *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.RegisterPack(&_StickerMarket.TransactOpts, _price, _donate, _category, _owner, _contenthash, _fee)
|
|
}
|
|
|
|
// SetBurnRate is a paid mutator transaction binding the contract method 0x189d165e.
|
|
//
|
|
// Solidity: function setBurnRate(uint256 _value) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) SetBurnRate(opts *bind.TransactOpts, _value *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "setBurnRate", _value)
|
|
}
|
|
|
|
// SetBurnRate is a paid mutator transaction binding the contract method 0x189d165e.
|
|
//
|
|
// Solidity: function setBurnRate(uint256 _value) returns()
|
|
func (_StickerMarket *StickerMarketSession) SetBurnRate(_value *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.SetBurnRate(&_StickerMarket.TransactOpts, _value)
|
|
}
|
|
|
|
// SetBurnRate is a paid mutator transaction binding the contract method 0x189d165e.
|
|
//
|
|
// Solidity: function setBurnRate(uint256 _value) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) SetBurnRate(_value *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.SetBurnRate(&_StickerMarket.TransactOpts, _value)
|
|
}
|
|
|
|
// SetMarketState is a paid mutator transaction binding the contract method 0x536b0445.
|
|
//
|
|
// Solidity: function setMarketState(uint8 _state) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) SetMarketState(opts *bind.TransactOpts, _state uint8) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "setMarketState", _state)
|
|
}
|
|
|
|
// SetMarketState is a paid mutator transaction binding the contract method 0x536b0445.
|
|
//
|
|
// Solidity: function setMarketState(uint8 _state) returns()
|
|
func (_StickerMarket *StickerMarketSession) SetMarketState(_state uint8) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.SetMarketState(&_StickerMarket.TransactOpts, _state)
|
|
}
|
|
|
|
// SetMarketState is a paid mutator transaction binding the contract method 0x536b0445.
|
|
//
|
|
// Solidity: function setMarketState(uint8 _state) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) SetMarketState(_state uint8) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.SetMarketState(&_StickerMarket.TransactOpts, _state)
|
|
}
|
|
|
|
// SetRegisterFee is a paid mutator transaction binding the contract method 0x92be2ab8.
|
|
//
|
|
// Solidity: function setRegisterFee(uint256 _value) returns()
|
|
func (_StickerMarket *StickerMarketTransactor) SetRegisterFee(opts *bind.TransactOpts, _value *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.contract.Transact(opts, "setRegisterFee", _value)
|
|
}
|
|
|
|
// SetRegisterFee is a paid mutator transaction binding the contract method 0x92be2ab8.
|
|
//
|
|
// Solidity: function setRegisterFee(uint256 _value) returns()
|
|
func (_StickerMarket *StickerMarketSession) SetRegisterFee(_value *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.SetRegisterFee(&_StickerMarket.TransactOpts, _value)
|
|
}
|
|
|
|
// SetRegisterFee is a paid mutator transaction binding the contract method 0x92be2ab8.
|
|
//
|
|
// Solidity: function setRegisterFee(uint256 _value) returns()
|
|
func (_StickerMarket *StickerMarketTransactorSession) SetRegisterFee(_value *big.Int) (*types.Transaction, error) {
|
|
return _StickerMarket.Contract.SetRegisterFee(&_StickerMarket.TransactOpts, _value)
|
|
}
|
|
|
|
// StickerMarketBurnRateIterator is returned from FilterBurnRate and is used to iterate over the raw logs and unpacked data for BurnRate events raised by the StickerMarket contract.
|
|
type StickerMarketBurnRateIterator struct {
|
|
Event *StickerMarketBurnRate // 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 *StickerMarketBurnRateIterator) 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(StickerMarketBurnRate)
|
|
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(StickerMarketBurnRate)
|
|
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 *StickerMarketBurnRateIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketBurnRateIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketBurnRate represents a BurnRate event raised by the StickerMarket contract.
|
|
type StickerMarketBurnRate struct {
|
|
Value *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterBurnRate is a free log retrieval operation binding the contract event 0x59701ed6f46ff3f5c94b1b741d5b3f2968eb7a0ae31d2cf2a3a9f2153d18b514.
|
|
//
|
|
// Solidity: event BurnRate(uint256 value)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterBurnRate(opts *bind.FilterOpts) (*StickerMarketBurnRateIterator, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "BurnRate")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketBurnRateIterator{contract: _StickerMarket.contract, event: "BurnRate", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchBurnRate is a free log subscription operation binding the contract event 0x59701ed6f46ff3f5c94b1b741d5b3f2968eb7a0ae31d2cf2a3a9f2153d18b514.
|
|
//
|
|
// Solidity: event BurnRate(uint256 value)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchBurnRate(opts *bind.WatchOpts, sink chan<- *StickerMarketBurnRate) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "BurnRate")
|
|
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(StickerMarketBurnRate)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "BurnRate", 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
|
|
}
|
|
|
|
// ParseBurnRate is a log parse operation binding the contract event 0x59701ed6f46ff3f5c94b1b741d5b3f2968eb7a0ae31d2cf2a3a9f2153d18b514.
|
|
//
|
|
// Solidity: event BurnRate(uint256 value)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseBurnRate(log types.Log) (*StickerMarketBurnRate, error) {
|
|
event := new(StickerMarketBurnRate)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "BurnRate", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerMarketClaimedTokensIterator is returned from FilterClaimedTokens and is used to iterate over the raw logs and unpacked data for ClaimedTokens events raised by the StickerMarket contract.
|
|
type StickerMarketClaimedTokensIterator struct {
|
|
Event *StickerMarketClaimedTokens // 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 *StickerMarketClaimedTokensIterator) 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(StickerMarketClaimedTokens)
|
|
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(StickerMarketClaimedTokens)
|
|
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 *StickerMarketClaimedTokensIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketClaimedTokensIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketClaimedTokens represents a ClaimedTokens event raised by the StickerMarket contract.
|
|
type StickerMarketClaimedTokens struct {
|
|
Token common.Address
|
|
Controller common.Address
|
|
Amount *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterClaimedTokens is a free log retrieval operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterClaimedTokens(opts *bind.FilterOpts, _token []common.Address, _controller []common.Address) (*StickerMarketClaimedTokensIterator, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketClaimedTokensIterator{contract: _StickerMarket.contract, event: "ClaimedTokens", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchClaimedTokens is a free log subscription operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchClaimedTokens(opts *bind.WatchOpts, sink chan<- *StickerMarketClaimedTokens, _token []common.Address, _controller []common.Address) (event.Subscription, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
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(StickerMarketClaimedTokens)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "ClaimedTokens", 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
|
|
}
|
|
|
|
// ParseClaimedTokens is a log parse operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseClaimedTokens(log types.Log) (*StickerMarketClaimedTokens, error) {
|
|
event := new(StickerMarketClaimedTokens)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "ClaimedTokens", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerMarketMarketStateIterator is returned from FilterMarketState and is used to iterate over the raw logs and unpacked data for MarketState events raised by the StickerMarket contract.
|
|
type StickerMarketMarketStateIterator struct {
|
|
Event *StickerMarketMarketState // 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 *StickerMarketMarketStateIterator) 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(StickerMarketMarketState)
|
|
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(StickerMarketMarketState)
|
|
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 *StickerMarketMarketStateIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketMarketStateIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketMarketState represents a MarketState event raised by the StickerMarket contract.
|
|
type StickerMarketMarketState struct {
|
|
State uint8
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterMarketState is a free log retrieval operation binding the contract event 0x9f17f1d96f7bb1d5a573d638f26fdb9fa651427eb2e7b36481cd5e1351581e58.
|
|
//
|
|
// Solidity: event MarketState(uint8 state)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterMarketState(opts *bind.FilterOpts) (*StickerMarketMarketStateIterator, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "MarketState")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketMarketStateIterator{contract: _StickerMarket.contract, event: "MarketState", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchMarketState is a free log subscription operation binding the contract event 0x9f17f1d96f7bb1d5a573d638f26fdb9fa651427eb2e7b36481cd5e1351581e58.
|
|
//
|
|
// Solidity: event MarketState(uint8 state)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchMarketState(opts *bind.WatchOpts, sink chan<- *StickerMarketMarketState) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "MarketState")
|
|
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(StickerMarketMarketState)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "MarketState", 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
|
|
}
|
|
|
|
// ParseMarketState is a log parse operation binding the contract event 0x9f17f1d96f7bb1d5a573d638f26fdb9fa651427eb2e7b36481cd5e1351581e58.
|
|
//
|
|
// Solidity: event MarketState(uint8 state)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseMarketState(log types.Log) (*StickerMarketMarketState, error) {
|
|
event := new(StickerMarketMarketState)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "MarketState", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerMarketNewControllerIterator is returned from FilterNewController and is used to iterate over the raw logs and unpacked data for NewController events raised by the StickerMarket contract.
|
|
type StickerMarketNewControllerIterator struct {
|
|
Event *StickerMarketNewController // 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 *StickerMarketNewControllerIterator) 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(StickerMarketNewController)
|
|
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(StickerMarketNewController)
|
|
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 *StickerMarketNewControllerIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketNewControllerIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketNewController represents a NewController event raised by the StickerMarket contract.
|
|
type StickerMarketNewController struct {
|
|
Controller common.Address
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterNewController is a free log retrieval operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterNewController(opts *bind.FilterOpts) (*StickerMarketNewControllerIterator, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "NewController")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketNewControllerIterator{contract: _StickerMarket.contract, event: "NewController", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchNewController is a free log subscription operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchNewController(opts *bind.WatchOpts, sink chan<- *StickerMarketNewController) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "NewController")
|
|
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(StickerMarketNewController)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "NewController", 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
|
|
}
|
|
|
|
// ParseNewController is a log parse operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseNewController(log types.Log) (*StickerMarketNewController, error) {
|
|
event := new(StickerMarketNewController)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "NewController", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerMarketRegisterIterator is returned from FilterRegister and is used to iterate over the raw logs and unpacked data for Register events raised by the StickerMarket contract.
|
|
type StickerMarketRegisterIterator struct {
|
|
Event *StickerMarketRegister // 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 *StickerMarketRegisterIterator) 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(StickerMarketRegister)
|
|
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(StickerMarketRegister)
|
|
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 *StickerMarketRegisterIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketRegisterIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketRegister represents a Register event raised by the StickerMarket contract.
|
|
type StickerMarketRegister struct {
|
|
PackId *big.Int
|
|
DataPrice *big.Int
|
|
Contenthash []byte
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterRegister is a free log retrieval operation binding the contract event 0x977f348a33aa09ea5592a5999ead89ce5390634d548c226c6a32c8f18b93e082.
|
|
//
|
|
// Solidity: event Register(uint256 indexed packId, uint256 dataPrice, bytes contenthash)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterRegister(opts *bind.FilterOpts, packId []*big.Int) (*StickerMarketRegisterIterator, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "Register", packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketRegisterIterator{contract: _StickerMarket.contract, event: "Register", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchRegister is a free log subscription operation binding the contract event 0x977f348a33aa09ea5592a5999ead89ce5390634d548c226c6a32c8f18b93e082.
|
|
//
|
|
// Solidity: event Register(uint256 indexed packId, uint256 dataPrice, bytes contenthash)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchRegister(opts *bind.WatchOpts, sink chan<- *StickerMarketRegister, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "Register", packIdRule)
|
|
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(StickerMarketRegister)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "Register", 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
|
|
}
|
|
|
|
// ParseRegister is a log parse operation binding the contract event 0x977f348a33aa09ea5592a5999ead89ce5390634d548c226c6a32c8f18b93e082.
|
|
//
|
|
// Solidity: event Register(uint256 indexed packId, uint256 dataPrice, bytes contenthash)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseRegister(log types.Log) (*StickerMarketRegister, error) {
|
|
event := new(StickerMarketRegister)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "Register", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerMarketRegisterFeeIterator is returned from FilterRegisterFee and is used to iterate over the raw logs and unpacked data for RegisterFee events raised by the StickerMarket contract.
|
|
type StickerMarketRegisterFeeIterator struct {
|
|
Event *StickerMarketRegisterFee // 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 *StickerMarketRegisterFeeIterator) 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(StickerMarketRegisterFee)
|
|
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(StickerMarketRegisterFee)
|
|
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 *StickerMarketRegisterFeeIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketRegisterFeeIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketRegisterFee represents a RegisterFee event raised by the StickerMarket contract.
|
|
type StickerMarketRegisterFee struct {
|
|
Value *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterRegisterFee is a free log retrieval operation binding the contract event 0x1d4a2348bf98e0fa847f28a7db9967b1327ac954c312b659b65a860bb6959172.
|
|
//
|
|
// Solidity: event RegisterFee(uint256 value)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterRegisterFee(opts *bind.FilterOpts) (*StickerMarketRegisterFeeIterator, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "RegisterFee")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketRegisterFeeIterator{contract: _StickerMarket.contract, event: "RegisterFee", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchRegisterFee is a free log subscription operation binding the contract event 0x1d4a2348bf98e0fa847f28a7db9967b1327ac954c312b659b65a860bb6959172.
|
|
//
|
|
// Solidity: event RegisterFee(uint256 value)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchRegisterFee(opts *bind.WatchOpts, sink chan<- *StickerMarketRegisterFee) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "RegisterFee")
|
|
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(StickerMarketRegisterFee)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "RegisterFee", 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
|
|
}
|
|
|
|
// ParseRegisterFee is a log parse operation binding the contract event 0x1d4a2348bf98e0fa847f28a7db9967b1327ac954c312b659b65a860bb6959172.
|
|
//
|
|
// Solidity: event RegisterFee(uint256 value)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseRegisterFee(log types.Log) (*StickerMarketRegisterFee, error) {
|
|
event := new(StickerMarketRegisterFee)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "RegisterFee", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerMarketTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the StickerMarket contract.
|
|
type StickerMarketTransferIterator struct {
|
|
Event *StickerMarketTransfer // 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 *StickerMarketTransferIterator) 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(StickerMarketTransfer)
|
|
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(StickerMarketTransfer)
|
|
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 *StickerMarketTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerMarketTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerMarketTransfer represents a Transfer event raised by the StickerMarket contract.
|
|
type StickerMarketTransfer 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 indexed value)
|
|
func (_StickerMarket *StickerMarketFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, value []*big.Int) (*StickerMarketTransferIterator, error) {
|
|
|
|
var fromRule []interface{}
|
|
for _, fromItem := range from {
|
|
fromRule = append(fromRule, fromItem)
|
|
}
|
|
var toRule []interface{}
|
|
for _, toItem := range to {
|
|
toRule = append(toRule, toItem)
|
|
}
|
|
var valueRule []interface{}
|
|
for _, valueItem := range value {
|
|
valueRule = append(valueRule, valueItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerMarket.contract.FilterLogs(opts, "Transfer", fromRule, toRule, valueRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerMarketTransferIterator{contract: _StickerMarket.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 value)
|
|
func (_StickerMarket *StickerMarketFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *StickerMarketTransfer, from []common.Address, to []common.Address, value []*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 valueRule []interface{}
|
|
for _, valueItem := range value {
|
|
valueRule = append(valueRule, valueItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerMarket.contract.WatchLogs(opts, "Transfer", fromRule, toRule, valueRule)
|
|
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(StickerMarketTransfer)
|
|
if err := _StickerMarket.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 value)
|
|
func (_StickerMarket *StickerMarketFilterer) ParseTransfer(log types.Log) (*StickerMarketTransfer, error) {
|
|
event := new(StickerMarketTransfer)
|
|
if err := _StickerMarket.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerPackABI is the input ABI used to generate the binding from.
|
|
const StickerPackABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"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\":\"_owner\",\"type\":\"address\"},{\"name\":\"_packId\",\"type\":\"uint256\"}],\"name\":\"generateToken\",\"outputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newController\",\"type\":\"address\"}],\"name\":\"changeController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenPackId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_controller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ClaimedTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"NewController\",\"type\":\"event\"}]"
|
|
|
|
// StickerPackFuncSigs maps the 4-byte function signature to its string representation.
|
|
var StickerPackFuncSigs = map[string]string{
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"3cebb823": "changeController(address)",
|
|
"df8de3e7": "claimTokens(address)",
|
|
"f77c4791": "controller()",
|
|
"188b5372": "generateToken(address,uint256)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"06fdde03": "name()",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"95d89b41": "symbol()",
|
|
"4f6ccce7": "tokenByIndex(uint256)",
|
|
"9f181b5e": "tokenCount()",
|
|
"2f745c59": "tokenOfOwnerByIndex(address,uint256)",
|
|
"a546af4c": "tokenPackId(uint256)",
|
|
"c87b56dd": "tokenURI(uint256)",
|
|
"18160ddd": "totalSupply()",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// StickerPackBin is the compiled bytecode used for deploying new contracts.
|
|
var StickerPackBin = "0x601360809081527f53746174757320537469636b6572205061636b0000000000000000000000000060a052610100604052600460c09081527f53544b500000000000000000000000000000000000000000000000000000000060e052600080546001600160a01b031916331790558181620000a37f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b620000d77f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b6200010b7f780e9d63000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b81516200012090600a90602085019062000247565b5080516200013690600b90602084019062000247565b506200016b7f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b50505050620002ec565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200020757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152600160208190526040909120805460ff19169091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200028a57805160ff1916838001178555620002ba565b82800160010185558215620002ba579182015b82811115620002ba5782518255916020019190600101906200029d565b50620002c8929150620002cc565b5090565b620002e991905b80821115620002c85760008155600101620002d3565b90565b61191080620002fc6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80636352211e116100b8578063a546af4c1161007c578063a546af4c14610408578063b88d4fde14610425578063c87b56dd146104eb578063df8de3e714610508578063e985e9c51461052e578063f77c47911461055c57610142565b80636352211e1461038757806370a08231146103a457806395d89b41146103ca5780639f181b5e146103d2578063a22cb465146103da57610142565b8063188b53721161010a578063188b53721461028057806323b872dd146102ac5780632f745c59146102e25780633cebb8231461030e57806342842e0e146103345780634f6ccce71461036a57610142565b806301ffc9a71461014757806306fdde0314610182578063081812fc146101ff578063095ea7b31461023857806318160ddd14610266575b600080fd5b61016e6004803603602081101561015d57600080fd5b50356001600160e01b031916610564565b604080519115158252519081900360200190f35b61018a610583565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101c45781810151838201526020016101ac565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021c6004803603602081101561021557600080fd5b503561061a565b604080516001600160a01b039092168252519081900360200190f35b6102646004803603604081101561024e57600080fd5b506001600160a01b03813516906020013561067c565b005b61026e61078d565b60408051918252519081900360200190f35b61026e6004803603604081101561029657600080fd5b506001600160a01b038135169060200135610793565b610264600480360360608110156102c257600080fd5b506001600160a01b0381358116916020810135909116906040013561080f565b61026e600480360360408110156102f857600080fd5b506001600160a01b038135169060200135610864565b6102646004803603602081101561032457600080fd5b50356001600160a01b03166108e3565b6102646004803603606081101561034a57600080fd5b506001600160a01b03813581169160208101359091169060400135610985565b61026e6004803603602081101561038057600080fd5b50356109a0565b61021c6004803603602081101561039d57600080fd5b5035610a06565b61026e600480360360208110156103ba57600080fd5b50356001600160a01b0316610a5a565b61018a610ac2565b61026e610b23565b610264600480360360408110156103f057600080fd5b506001600160a01b0381351690602001351515610b29565b61026e6004803603602081101561041e57600080fd5b5035610bf5565b6102646004803603608081101561043b57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561047657600080fd5b82018360208201111561048857600080fd5b803590602001918460018302840111640100000000831117156104aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c07945050505050565b61018a6004803603602081101561050157600080fd5b5035610c5f565b6102646004803603602081101561051e57600080fd5b50356001600160a01b0316610d44565b61016e6004803603604081101561054457600080fd5b506001600160a01b0381358116916020013516610dac565b61021c610dda565b6001600160e01b03191660009081526001602052604090205460ff1690565b600a8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561060f5780601f106105e45761010080835404028352916020019161060f565b820191906000526020600020905b8154815290600101906020018083116105f257829003601f168201915b505050505090505b90565b600061062582610de9565b6106605760405162461bcd60e51b815260040180806020018281038252602c8152602001806117da602c913960400191505060405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061068782610a06565b9050806001600160a01b0316836001600160a01b031614156106da5760405162461bcd60e51b815260040180806020018281038252602181526020018061185e6021913960400191505060405180910390fd5b336001600160a01b03821614806106f657506106f68133610dac565b6107315760405162461bcd60e51b815260040180806020018281038252603881526020018061174f6038913960400191505060405180910390fd5b60008281526003602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60085490565b600080546001600160a01b031633146107e2576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b50600e8054600181019091556000818152600d602052604090208290556108098382610e06565b92915050565b6108193382610e27565b6108545760405162461bcd60e51b815260040180806020018281038252603181526020018061187f6031913960400191505060405180910390fd5b61085f838383610ecb565b505050565b600061086f83610a5a565b82106108ac5760405162461bcd60e51b815260040180806020018281038252602b8152602001806116a2602b913960400191505060405180910390fd5b6001600160a01b03831660009081526006602052604090208054839081106108d057fe5b9060005260206000200154905092915050565b6000546001600160a01b03163314610931576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c69181900360200190a150565b61085f83838360405180602001604052806000815250610c07565b60006109aa61078d565b82106109e75760405162461bcd60e51b815260040180806020018281038252602c8152602001806118b0602c913960400191505060405180910390fd5b600882815481106109f457fe5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806108095760405162461bcd60e51b81526004018080602001828103825260298152602001806117b16029913960400191505060405180910390fd5b60006001600160a01b038216610aa15760405162461bcd60e51b815260040180806020018281038252602a815260200180611787602a913960400191505060405180910390fd5b6001600160a01b038216600090815260046020526040902061080990610eea565b600b8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561060f5780601f106105e45761010080835404028352916020019161060f565b600e5481565b6001600160a01b038216331415610b87576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b600d6020526000908152604090205481565b610c1284848461080f565b610c1e84848484610eee565b610c595760405162461bcd60e51b81526004018080602001828103825260328152602001806116cd6032913960400191505060405180910390fd5b50505050565b6060610c6a82610de9565b610ca55760405162461bcd60e51b815260040180806020018281038252602f81526020018061182f602f913960400191505060405180910390fd5b6000828152600c602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610d385780601f10610d0d57610100808354040283529160200191610d38565b820191906000526020600020905b815481529060010190602001808311610d1b57829003601f168201915b50505050509050919050565b6000546001600160a01b03163314610d92576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b600054610da99082906001600160a01b0316611021565b50565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000546001600160a01b031681565b6000908152600260205260409020546001600160a01b0316151590565b610e1082826111ba565b610e1a82826112eb565b610e2381611329565b5050565b6000610e3282610de9565b610e6d5760405162461bcd60e51b815260040180806020018281038252602c815260200180611723602c913960400191505060405180910390fd5b6000610e7883610a06565b9050806001600160a01b0316846001600160a01b03161480610eb35750836001600160a01b0316610ea88461061a565b6001600160a01b0316145b80610ec35750610ec38185610dac565b949350505050565b610ed683838361136d565b610ee083826114b1565b61085f82826112eb565b5490565b6000610f02846001600160a01b03166115a6565b610f0e57506001610ec3565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015610f88578181015183820152602001610f70565b50505050905090810190601f168015610fb55780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610fd757600080fd5b505af1158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b60006001600160a01b03831661107157506040513031906001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561106b573d6000803e3d6000fd5b5061116a565b604080516370a0823160e01b8152306004820152905184916001600160a01b038316916370a0823191602480820192602092909190829003018186803b1580156110ba57600080fd5b505afa1580156110ce573d6000803e3d6000fd5b505050506040513d60208110156110e457600080fd5b50516040805163a9059cbb60e01b81526001600160a01b0386811660048301526024820184905291519294509083169163a9059cbb916044808201926020929091908290030181600087803b15801561113c57600080fd5b505af1158015611150573d6000803e3d6000fd5b505050506040513d602081101561116657600080fd5b5050505b816001600160a01b0316836001600160a01b03167ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c836040518082815260200191505060405180910390a3505050565b6001600160a01b038216611215576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61121e81610de9565b15611270576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b600081815260026020908152604080832080546001600160a01b0319166001600160a01b0387169081179091558352600490915290206112af906115ac565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0390911660009081526006602081815260408084208054868652600784529185208290559282526001810183559183529091200155565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b826001600160a01b031661138082610a06565b6001600160a01b0316146113c55760405162461bcd60e51b81526004018080602001828103825260298152602001806118066029913960400191505060405180910390fd5b6001600160a01b03821661140a5760405162461bcd60e51b81526004018080602001828103825260248152602001806116ff6024913960400191505060405180910390fd5b611413816115b5565b6001600160a01b0383166000908152600460205260409020611434906115f0565b6001600160a01b0382166000908152600460205260409020611455906115ac565b60008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166000908152600660205260408120546114db90600163ffffffff61160716565b600083815260076020526040902054909150808214611576576001600160a01b038416600090815260066020526040812080548490811061151857fe5b906000526020600020015490508060066000876001600160a01b03166001600160a01b03168152602001908152602001600020838154811061155657fe5b600091825260208083209091019290925591825260079052604090208190555b6001600160a01b038416600090815260066020526040902080549061159f906000198301611664565b5050505050565b3b151590565b80546001019055565b6000818152600360205260409020546001600160a01b031615610da957600090815260036020526040902080546001600160a01b0319169055565b805461160390600163ffffffff61160716565b9055565b60008282111561165e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b81548183558181111561085f5760008381526020902061085f91810190830161061791905b8082111561169d5760008155600101611689565b509056fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e6473a265627a7a72305820eb076376e246b05cfc5a94cb6f0e71dd465ffaf296d3dac655c16b2c8f4013db64736f6c634300050a0032"
|
|
|
|
// DeployStickerPack deploys a new Ethereum contract, binding an instance of StickerPack to it.
|
|
func DeployStickerPack(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *StickerPack, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(StickerPackABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StickerPackBin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &StickerPack{StickerPackCaller: StickerPackCaller{contract: contract}, StickerPackTransactor: StickerPackTransactor{contract: contract}, StickerPackFilterer: StickerPackFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// StickerPack is an auto generated Go binding around an Ethereum contract.
|
|
type StickerPack struct {
|
|
StickerPackCaller // Read-only binding to the contract
|
|
StickerPackTransactor // Write-only binding to the contract
|
|
StickerPackFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// StickerPackCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type StickerPackCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerPackTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type StickerPackTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerPackFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type StickerPackFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerPackSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type StickerPackSession struct {
|
|
Contract *StickerPack // 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
|
|
}
|
|
|
|
// StickerPackCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type StickerPackCallerSession struct {
|
|
Contract *StickerPackCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// StickerPackTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type StickerPackTransactorSession struct {
|
|
Contract *StickerPackTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// StickerPackRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type StickerPackRaw struct {
|
|
Contract *StickerPack // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// StickerPackCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type StickerPackCallerRaw struct {
|
|
Contract *StickerPackCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// StickerPackTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type StickerPackTransactorRaw struct {
|
|
Contract *StickerPackTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewStickerPack creates a new instance of StickerPack, bound to a specific deployed contract.
|
|
func NewStickerPack(address common.Address, backend bind.ContractBackend) (*StickerPack, error) {
|
|
contract, err := bindStickerPack(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPack{StickerPackCaller: StickerPackCaller{contract: contract}, StickerPackTransactor: StickerPackTransactor{contract: contract}, StickerPackFilterer: StickerPackFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewStickerPackCaller creates a new read-only instance of StickerPack, bound to a specific deployed contract.
|
|
func NewStickerPackCaller(address common.Address, caller bind.ContractCaller) (*StickerPackCaller, error) {
|
|
contract, err := bindStickerPack(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewStickerPackTransactor creates a new write-only instance of StickerPack, bound to a specific deployed contract.
|
|
func NewStickerPackTransactor(address common.Address, transactor bind.ContractTransactor) (*StickerPackTransactor, error) {
|
|
contract, err := bindStickerPack(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewStickerPackFilterer creates a new log filterer instance of StickerPack, bound to a specific deployed contract.
|
|
func NewStickerPackFilterer(address common.Address, filterer bind.ContractFilterer) (*StickerPackFilterer, error) {
|
|
contract, err := bindStickerPack(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindStickerPack binds a generic wrapper to an already deployed contract.
|
|
func bindStickerPack(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(StickerPackABI))
|
|
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 (_StickerPack *StickerPackRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _StickerPack.Contract.StickerPackCaller.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 (_StickerPack *StickerPackRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.StickerPackTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_StickerPack *StickerPackRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.StickerPackTransactor.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 (_StickerPack *StickerPackCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _StickerPack.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 (_StickerPack *StickerPackTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_StickerPack *StickerPackTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _StickerPack.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 (_StickerPack *StickerPackCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _StickerPack.Contract.BalanceOf(&_StickerPack.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256)
|
|
func (_StickerPack *StickerPackCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _StickerPack.Contract.BalanceOf(&_StickerPack.CallOpts, owner)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerPack *StickerPackCaller) Controller(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "controller")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerPack *StickerPackSession) Controller() (common.Address, error) {
|
|
return _StickerPack.Contract.Controller(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerPack *StickerPackCallerSession) Controller() (common.Address, error) {
|
|
return _StickerPack.Contract.Controller(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_StickerPack *StickerPackCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerPack.Contract.GetApproved(&_StickerPack.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_StickerPack *StickerPackCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerPack.Contract.GetApproved(&_StickerPack.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 (_StickerPack *StickerPackCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _StickerPack.Contract.IsApprovedForAll(&_StickerPack.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 (_StickerPack *StickerPackCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _StickerPack.Contract.IsApprovedForAll(&_StickerPack.CallOpts, owner, operator)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_StickerPack *StickerPackCaller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) Name() (string, error) {
|
|
return _StickerPack.Contract.Name(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_StickerPack *StickerPackCallerSession) Name() (string, error) {
|
|
return _StickerPack.Contract.Name(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_StickerPack *StickerPackCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerPack.Contract.OwnerOf(&_StickerPack.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_StickerPack *StickerPackCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerPack.Contract.OwnerOf(&_StickerPack.CallOpts, tokenId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_StickerPack *StickerPackCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_StickerPack *StickerPackSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _StickerPack.Contract.SupportsInterface(&_StickerPack.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_StickerPack *StickerPackCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _StickerPack.Contract.SupportsInterface(&_StickerPack.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_StickerPack *StickerPackCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) Symbol() (string, error) {
|
|
return _StickerPack.Contract.Symbol(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_StickerPack *StickerPackCallerSession) Symbol() (string, error) {
|
|
return _StickerPack.Contract.Symbol(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_StickerPack *StickerPackCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "tokenByIndex", index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_StickerPack *StickerPackSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenByIndex(&_StickerPack.CallOpts, index)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_StickerPack *StickerPackCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenByIndex(&_StickerPack.CallOpts, index)
|
|
}
|
|
|
|
// TokenCount is a free data retrieval call binding the contract method 0x9f181b5e.
|
|
//
|
|
// Solidity: function tokenCount() view returns(uint256)
|
|
func (_StickerPack *StickerPackCaller) TokenCount(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "tokenCount")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenCount is a free data retrieval call binding the contract method 0x9f181b5e.
|
|
//
|
|
// Solidity: function tokenCount() view returns(uint256)
|
|
func (_StickerPack *StickerPackSession) TokenCount() (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenCount(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// TokenCount is a free data retrieval call binding the contract method 0x9f181b5e.
|
|
//
|
|
// Solidity: function tokenCount() view returns(uint256)
|
|
func (_StickerPack *StickerPackCallerSession) TokenCount() (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenCount(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_StickerPack *StickerPackCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_StickerPack *StickerPackSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenOfOwnerByIndex(&_StickerPack.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_StickerPack *StickerPackCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenOfOwnerByIndex(&_StickerPack.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenPackId is a free data retrieval call binding the contract method 0xa546af4c.
|
|
//
|
|
// Solidity: function tokenPackId(uint256 ) view returns(uint256)
|
|
func (_StickerPack *StickerPackCaller) TokenPackId(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "tokenPackId", arg0)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenPackId is a free data retrieval call binding the contract method 0xa546af4c.
|
|
//
|
|
// Solidity: function tokenPackId(uint256 ) view returns(uint256)
|
|
func (_StickerPack *StickerPackSession) TokenPackId(arg0 *big.Int) (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenPackId(&_StickerPack.CallOpts, arg0)
|
|
}
|
|
|
|
// TokenPackId is a free data retrieval call binding the contract method 0xa546af4c.
|
|
//
|
|
// Solidity: function tokenPackId(uint256 ) view returns(uint256)
|
|
func (_StickerPack *StickerPackCallerSession) TokenPackId(arg0 *big.Int) (*big.Int, error) {
|
|
return _StickerPack.Contract.TokenPackId(&_StickerPack.CallOpts, arg0)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_StickerPack *StickerPackCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.contract.Call(opts, &out, "tokenURI", tokenId)
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_StickerPack *StickerPackSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _StickerPack.Contract.TokenURI(&_StickerPack.CallOpts, tokenId)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_StickerPack *StickerPackCallerSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _StickerPack.Contract.TokenURI(&_StickerPack.CallOpts, tokenId)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_StickerPack *StickerPackCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerPack.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 (_StickerPack *StickerPackSession) TotalSupply() (*big.Int, error) {
|
|
return _StickerPack.Contract.TotalSupply(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_StickerPack *StickerPackCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _StickerPack.Contract.TotalSupply(&_StickerPack.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_StickerPack *StickerPackTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_StickerPack *StickerPackSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.Approve(&_StickerPack.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_StickerPack *StickerPackTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.Approve(&_StickerPack.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerPack *StickerPackTransactor) ChangeController(opts *bind.TransactOpts, _newController common.Address) (*types.Transaction, error) {
|
|
return _StickerPack.contract.Transact(opts, "changeController", _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerPack *StickerPackSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.ChangeController(&_StickerPack.TransactOpts, _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerPack *StickerPackTransactorSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.ChangeController(&_StickerPack.TransactOpts, _newController)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerPack *StickerPackTransactor) ClaimTokens(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) {
|
|
return _StickerPack.contract.Transact(opts, "claimTokens", _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerPack *StickerPackSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.ClaimTokens(&_StickerPack.TransactOpts, _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerPack *StickerPackTransactorSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.ClaimTokens(&_StickerPack.TransactOpts, _token)
|
|
}
|
|
|
|
// GenerateToken is a paid mutator transaction binding the contract method 0x188b5372.
|
|
//
|
|
// Solidity: function generateToken(address _owner, uint256 _packId) returns(uint256 tokenId)
|
|
func (_StickerPack *StickerPackTransactor) GenerateToken(opts *bind.TransactOpts, _owner common.Address, _packId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.contract.Transact(opts, "generateToken", _owner, _packId)
|
|
}
|
|
|
|
// GenerateToken is a paid mutator transaction binding the contract method 0x188b5372.
|
|
//
|
|
// Solidity: function generateToken(address _owner, uint256 _packId) returns(uint256 tokenId)
|
|
func (_StickerPack *StickerPackSession) GenerateToken(_owner common.Address, _packId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.GenerateToken(&_StickerPack.TransactOpts, _owner, _packId)
|
|
}
|
|
|
|
// GenerateToken is a paid mutator transaction binding the contract method 0x188b5372.
|
|
//
|
|
// Solidity: function generateToken(address _owner, uint256 _packId) returns(uint256 tokenId)
|
|
func (_StickerPack *StickerPackTransactorSession) GenerateToken(_owner common.Address, _packId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.GenerateToken(&_StickerPack.TransactOpts, _owner, _packId)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_StickerPack *StickerPackTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.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 (_StickerPack *StickerPackSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.SafeTransferFrom(&_StickerPack.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 (_StickerPack *StickerPackTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.SafeTransferFrom(&_StickerPack.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 (_StickerPack *StickerPackTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _StickerPack.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 (_StickerPack *StickerPackSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.SafeTransferFrom0(&_StickerPack.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 (_StickerPack *StickerPackTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.SafeTransferFrom0(&_StickerPack.TransactOpts, from, to, tokenId, _data)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_StickerPack *StickerPackTransactor) SetApprovalForAll(opts *bind.TransactOpts, to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _StickerPack.contract.Transact(opts, "setApprovalForAll", to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_StickerPack *StickerPackSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.SetApprovalForAll(&_StickerPack.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_StickerPack *StickerPackTransactorSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.SetApprovalForAll(&_StickerPack.TransactOpts, to, approved)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_StickerPack *StickerPackTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.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 (_StickerPack *StickerPackSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.TransferFrom(&_StickerPack.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 (_StickerPack *StickerPackTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerPack.Contract.TransferFrom(&_StickerPack.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// StickerPackApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the StickerPack contract.
|
|
type StickerPackApprovalIterator struct {
|
|
Event *StickerPackApproval // 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 *StickerPackApprovalIterator) 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(StickerPackApproval)
|
|
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(StickerPackApproval)
|
|
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 *StickerPackApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerPackApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerPackApproval represents a Approval event raised by the StickerPack contract.
|
|
type StickerPackApproval 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 (_StickerPack *StickerPackFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*StickerPackApprovalIterator, 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 := _StickerPack.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackApprovalIterator{contract: _StickerPack.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 (_StickerPack *StickerPackFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *StickerPackApproval, 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 := _StickerPack.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(StickerPackApproval)
|
|
if err := _StickerPack.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 (_StickerPack *StickerPackFilterer) ParseApproval(log types.Log) (*StickerPackApproval, error) {
|
|
event := new(StickerPackApproval)
|
|
if err := _StickerPack.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerPackApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the StickerPack contract.
|
|
type StickerPackApprovalForAllIterator struct {
|
|
Event *StickerPackApprovalForAll // 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 *StickerPackApprovalForAllIterator) 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(StickerPackApprovalForAll)
|
|
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(StickerPackApprovalForAll)
|
|
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 *StickerPackApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerPackApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerPackApprovalForAll represents a ApprovalForAll event raised by the StickerPack contract.
|
|
type StickerPackApprovalForAll 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 (_StickerPack *StickerPackFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*StickerPackApprovalForAllIterator, 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 := _StickerPack.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackApprovalForAllIterator{contract: _StickerPack.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 (_StickerPack *StickerPackFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *StickerPackApprovalForAll, 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 := _StickerPack.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(StickerPackApprovalForAll)
|
|
if err := _StickerPack.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 (_StickerPack *StickerPackFilterer) ParseApprovalForAll(log types.Log) (*StickerPackApprovalForAll, error) {
|
|
event := new(StickerPackApprovalForAll)
|
|
if err := _StickerPack.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerPackClaimedTokensIterator is returned from FilterClaimedTokens and is used to iterate over the raw logs and unpacked data for ClaimedTokens events raised by the StickerPack contract.
|
|
type StickerPackClaimedTokensIterator struct {
|
|
Event *StickerPackClaimedTokens // 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 *StickerPackClaimedTokensIterator) 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(StickerPackClaimedTokens)
|
|
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(StickerPackClaimedTokens)
|
|
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 *StickerPackClaimedTokensIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerPackClaimedTokensIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerPackClaimedTokens represents a ClaimedTokens event raised by the StickerPack contract.
|
|
type StickerPackClaimedTokens struct {
|
|
Token common.Address
|
|
Controller common.Address
|
|
Amount *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterClaimedTokens is a free log retrieval operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerPack *StickerPackFilterer) FilterClaimedTokens(opts *bind.FilterOpts, _token []common.Address, _controller []common.Address) (*StickerPackClaimedTokensIterator, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerPack.contract.FilterLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackClaimedTokensIterator{contract: _StickerPack.contract, event: "ClaimedTokens", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchClaimedTokens is a free log subscription operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerPack *StickerPackFilterer) WatchClaimedTokens(opts *bind.WatchOpts, sink chan<- *StickerPackClaimedTokens, _token []common.Address, _controller []common.Address) (event.Subscription, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerPack.contract.WatchLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
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(StickerPackClaimedTokens)
|
|
if err := _StickerPack.contract.UnpackLog(event, "ClaimedTokens", 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
|
|
}
|
|
|
|
// ParseClaimedTokens is a log parse operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerPack *StickerPackFilterer) ParseClaimedTokens(log types.Log) (*StickerPackClaimedTokens, error) {
|
|
event := new(StickerPackClaimedTokens)
|
|
if err := _StickerPack.contract.UnpackLog(event, "ClaimedTokens", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerPackNewControllerIterator is returned from FilterNewController and is used to iterate over the raw logs and unpacked data for NewController events raised by the StickerPack contract.
|
|
type StickerPackNewControllerIterator struct {
|
|
Event *StickerPackNewController // 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 *StickerPackNewControllerIterator) 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(StickerPackNewController)
|
|
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(StickerPackNewController)
|
|
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 *StickerPackNewControllerIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerPackNewControllerIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerPackNewController represents a NewController event raised by the StickerPack contract.
|
|
type StickerPackNewController struct {
|
|
Controller common.Address
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterNewController is a free log retrieval operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerPack *StickerPackFilterer) FilterNewController(opts *bind.FilterOpts) (*StickerPackNewControllerIterator, error) {
|
|
|
|
logs, sub, err := _StickerPack.contract.FilterLogs(opts, "NewController")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackNewControllerIterator{contract: _StickerPack.contract, event: "NewController", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchNewController is a free log subscription operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerPack *StickerPackFilterer) WatchNewController(opts *bind.WatchOpts, sink chan<- *StickerPackNewController) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _StickerPack.contract.WatchLogs(opts, "NewController")
|
|
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(StickerPackNewController)
|
|
if err := _StickerPack.contract.UnpackLog(event, "NewController", 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
|
|
}
|
|
|
|
// ParseNewController is a log parse operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerPack *StickerPackFilterer) ParseNewController(log types.Log) (*StickerPackNewController, error) {
|
|
event := new(StickerPackNewController)
|
|
if err := _StickerPack.contract.UnpackLog(event, "NewController", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerPackTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the StickerPack contract.
|
|
type StickerPackTransferIterator struct {
|
|
Event *StickerPackTransfer // 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 *StickerPackTransferIterator) 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(StickerPackTransfer)
|
|
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(StickerPackTransfer)
|
|
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 *StickerPackTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerPackTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerPackTransfer represents a Transfer event raised by the StickerPack contract.
|
|
type StickerPackTransfer 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 (_StickerPack *StickerPackFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*StickerPackTransferIterator, 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 := _StickerPack.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerPackTransferIterator{contract: _StickerPack.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 (_StickerPack *StickerPackFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *StickerPackTransfer, 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 := _StickerPack.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(StickerPackTransfer)
|
|
if err := _StickerPack.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 (_StickerPack *StickerPackFilterer) ParseTransfer(log types.Log) (*StickerPackTransfer, error) {
|
|
event := new(StickerPackTransfer)
|
|
if err := _StickerPack.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeABI is the input ABI used to generate the binding from.
|
|
const StickerTypeABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"purgePack\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"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\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newController\",\"type\":\"address\"}],\"name\":\"changeController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"},{\"name\":\"_donate\",\"type\":\"uint256\"},{\"name\":\"_category\",\"type\":\"bytes4[]\"},{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_contenthash\",\"type\":\"bytes\"}],\"name\":\"generatePack\",\"outputs\":[{\"name\":\"packId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"packCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_contenthash\",\"type\":\"bytes\"}],\"name\":\"setPackContenthash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"}],\"name\":\"getPackSummary\",\"outputs\":[{\"name\":\"category\",\"type\":\"bytes4[]\"},{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"contenthash\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_price\",\"type\":\"uint256\"},{\"name\":\"_donate\",\"type\":\"uint256\"}],\"name\":\"setPackPrice\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"}],\"name\":\"getPaymentData\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"mintable\",\"type\":\"bool\"},{\"name\":\"price\",\"type\":\"uint256\"},{\"name\":\"donate\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_category\",\"type\":\"bytes4\"}],\"name\":\"getCategoryLength\",\"outputs\":[{\"name\":\"size\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_category\",\"type\":\"bytes4\"}],\"name\":\"addPackCategory\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_category\",\"type\":\"bytes4\"}],\"name\":\"getAvailablePacks\",\"outputs\":[{\"name\":\"availableIds\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_category\",\"type\":\"bytes4\"},{\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getCategoryPack\",\"outputs\":[{\"name\":\"packId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_mintable\",\"type\":\"bool\"}],\"name\":\"setPackState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"packs\",\"outputs\":[{\"name\":\"mintable\",\"type\":\"bool\"},{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"price\",\"type\":\"uint256\"},{\"name\":\"donate\",\"type\":\"uint256\"},{\"name\":\"contenthash\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"}],\"name\":\"getPackData\",\"outputs\":[{\"name\":\"category\",\"type\":\"bytes4[]\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"mintable\",\"type\":\"bool\"},{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"price\",\"type\":\"uint256\"},{\"name\":\"contenthash\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_packId\",\"type\":\"uint256\"},{\"name\":\"_category\",\"type\":\"bytes4\"}],\"name\":\"removePackCategory\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"dataPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"contenthash\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"mintable\",\"type\":\"bool\"}],\"name\":\"Register\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"dataPrice\",\"type\":\"uint256\"}],\"name\":\"PriceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"mintable\",\"type\":\"bool\"}],\"name\":\"MintabilityChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"packid\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"contenthash\",\"type\":\"bytes\"}],\"name\":\"ContenthashChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"category\",\"type\":\"bytes4\"},{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"}],\"name\":\"Categorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"category\",\"type\":\"bytes4\"},{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"}],\"name\":\"Uncategorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"packId\",\"type\":\"uint256\"}],\"name\":\"Unregister\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_controller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ClaimedTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"NewController\",\"type\":\"event\"}]"
|
|
|
|
// StickerTypeFuncSigs maps the 4-byte function signature to its string representation.
|
|
var StickerTypeFuncSigs = map[string]string{
|
|
"aeeaf3da": "addPackCategory(uint256,bytes4)",
|
|
"095ea7b3": "approve(address,uint256)",
|
|
"70a08231": "balanceOf(address)",
|
|
"3cebb823": "changeController(address)",
|
|
"df8de3e7": "claimTokens(address)",
|
|
"f77c4791": "controller()",
|
|
"4c06dc17": "generatePack(uint256,uint256,bytes4[],address,bytes)",
|
|
"081812fc": "getApproved(uint256)",
|
|
"b34b5825": "getAvailablePacks(bytes4)",
|
|
"9f9a9b63": "getCategoryLength(bytes4)",
|
|
"b5420d68": "getCategoryPack(bytes4,uint256)",
|
|
"d2bf36c0": "getPackData(uint256)",
|
|
"81ec792d": "getPackSummary(uint256)",
|
|
"9c3a39a2": "getPaymentData(uint256)",
|
|
"e985e9c5": "isApprovedForAll(address,address)",
|
|
"06fdde03": "name()",
|
|
"6352211e": "ownerOf(uint256)",
|
|
"61bd6725": "packCount()",
|
|
"b84c1392": "packs(uint256)",
|
|
"00b3c91b": "purgePack(uint256,uint256)",
|
|
"e8bb7143": "removePackCategory(uint256,bytes4)",
|
|
"42842e0e": "safeTransferFrom(address,address,uint256)",
|
|
"b88d4fde": "safeTransferFrom(address,address,uint256,bytes)",
|
|
"a22cb465": "setApprovalForAll(address,bool)",
|
|
"6a847981": "setPackContenthash(uint256,bytes)",
|
|
"9389c5b5": "setPackPrice(uint256,uint256,uint256)",
|
|
"b7f48211": "setPackState(uint256,bool)",
|
|
"01ffc9a7": "supportsInterface(bytes4)",
|
|
"95d89b41": "symbol()",
|
|
"4f6ccce7": "tokenByIndex(uint256)",
|
|
"2f745c59": "tokenOfOwnerByIndex(address,uint256)",
|
|
"c87b56dd": "tokenURI(uint256)",
|
|
"18160ddd": "totalSupply()",
|
|
"23b872dd": "transferFrom(address,address,uint256)",
|
|
}
|
|
|
|
// StickerTypeBin is the compiled bytecode used for deploying new contracts.
|
|
var StickerTypeBin = "0x601e60809081527f53746174757320537469636b6572205061636b20417574686f7273686970000060a052610100604052600460c09081527f53544b410000000000000000000000000000000000000000000000000000000060e052600080546001600160a01b031916331790558181620000a37f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b620000d77f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b6200010b7f780e9d63000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b81516200012090600a90602085019062000247565b5080516200013690600b90602084019062000247565b506200016b7f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b036200017516565b50505050620002ec565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200020757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152600160208190526040909120805460ff19169091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200028a57805160ff1916838001178555620002ba565b82800160010185558215620002ba579182015b82811115620002ba5782518255916020019190600101906200029d565b50620002c8929150620002cc565b5090565b620002e991905b80821115620002c85760008155600101620002d3565b90565b61366080620002fc6000396000f3fe608060405234801561001057600080fd5b50600436106102055760003560e01c80639389c5b51161011a578063b7f48211116100ad578063d2bf36c01161007c578063d2bf36c014610a18578063df8de3e714610b24578063e8bb714314610b4a578063e985e9c514610b77578063f77c479114610ba557610205565b8063b7f482111461085d578063b84c139214610882578063b88d4fde14610937578063c87b56dd146109fb57610205565b8063a22cb465116100e9578063a22cb4651461075e578063aeeaf3da1461078c578063b34b5825146107b9578063b5420d681461083057610205565b80639389c5b5146106b957806395d89b41146106e25780639c3a39a2146106ea5780639f9a9b631461073757610205565b80633cebb8231161019d57806361bd67251161016c57806361bd6725146105185780636352211e146105205780636a8479811461053d57806370a08231146105b257806381ec792d146105d857610205565b80633cebb823146103c857806342842e0e146103ee5780634c06dc17146104245780634f6ccce7146104fb57610205565b8063095ea7b3116101d9578063095ea7b31461032057806318160ddd1461034c57806323b872dd146103665780632f745c591461039c57610205565b8062b3c91b1461020a57806301ffc9a71461022f57806306fdde031461026a578063081812fc146102e7575b600080fd5b61022d6004803603604081101561022057600080fd5b5080359060200135610bad565b005b6102566004803603602081101561024557600080fd5b50356001600160e01b031916610dc1565b604080519115158252519081900360200190f35b610272610de0565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102ac578181015183820152602001610294565b50505050905090810190601f1680156102d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610304600480360360208110156102fd57600080fd5b5035610e77565b604080516001600160a01b039092168252519081900360200190f35b61022d6004803603604081101561033657600080fd5b506001600160a01b038135169060200135610ed9565b610354610fea565b60408051918252519081900360200190f35b61022d6004803603606081101561037c57600080fd5b506001600160a01b03813581169160208101359091169060400135610ff0565b610354600480360360408110156103b257600080fd5b506001600160a01b038135169060200135611045565b61022d600480360360208110156103de57600080fd5b50356001600160a01b03166110c4565b61022d6004803603606081101561040457600080fd5b506001600160a01b03813581169160208101359091169060400135611166565b610354600480360360a081101561043a57600080fd5b813591602081013591810190606081016040820135600160201b81111561046057600080fd5b82018360208201111561047257600080fd5b803590602001918460208302840111600160201b8311171561049357600080fd5b919390926001600160a01b0383351692604081019060200135600160201b8111156104bd57600080fd5b8201836020820111156104cf57600080fd5b803590602001918460018302840111600160201b831117156104f057600080fd5b509092509050611181565b6103546004803603602081101561051157600080fd5b50356113ca565b610354611430565b6103046004803603602081101561053657600080fd5b5035611436565b61022d6004803603604081101561055357600080fd5b81359190810190604081016020820135600160201b81111561057457600080fd5b82018360208201111561058657600080fd5b803590602001918460018302840111600160201b831117156105a757600080fd5b509092509050611490565b610354600480360360208110156105c857600080fd5b50356001600160a01b0316611561565b6105f5600480360360208110156105ee57600080fd5b50356115c9565b604051808060200184815260200180602001838103835286818151815260200191508051906020019060200280838360005b8381101561063f578181015183820152602001610627565b50505050905001838103825284818151815260200191508051906020019080838360005b8381101561067b578181015183820152602001610663565b50505050905090810190601f1680156106a85780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b61022d600480360360608110156106cf57600080fd5b5080359060208101359060400135611750565b610272611868565b6107076004803603602081101561070057600080fd5b50356118c9565b604080516001600160a01b0390951685529215156020850152838301919091526060830152519081900360800190f35b6103546004803603602081101561074d57600080fd5b50356001600160e01b031916611a5e565b61022d6004803603604081101561077457600080fd5b506001600160a01b0381351690602001351515611a7a565b61022d600480360360408110156107a257600080fd5b50803590602001356001600160e01b031916611b46565b6107e0600480360360208110156107cf57600080fd5b50356001600160e01b031916611bd2565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561081c578181015183820152602001610804565b505050509050019250505060405180910390f35b6103546004803603604081101561084657600080fd5b506001600160e01b03198135169060200135611c3f565b61022d6004803603604081101561087357600080fd5b50803590602001351515611c64565b61089f6004803603602081101561089857600080fd5b5035611d43565b604051808615151515815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108f85781810151838201526020016108e0565b50505050905090810190601f1680156109255780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b61022d6004803603608081101561094d57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561098757600080fd5b82018360208201111561099957600080fd5b803590602001918460018302840111600160201b831117156109ba57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611e04945050505050565b61027260048036036020811015610a1157600080fd5b5035611e56565b610a3560048036036020811015610a2e57600080fd5b5035611f31565b6040518080602001876001600160a01b03166001600160a01b031681526020018615151515815260200185815260200184815260200180602001838103835289818151815260200191508051906020019060200280838360005b83811015610aa7578181015183820152602001610a8f565b50505050905001838103825284818151815260200191508051906020019080838360005b83811015610ae3578181015183820152602001610acb565b50505050905090810190601f168015610b105780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b61022d60048036036020811015610b3a57600080fd5b50356001600160a01b03166120d9565b61022d60048036036040811015610b6057600080fd5b50803590602001356001600160e01b031916612141565b61025660048036036040811015610b8d57600080fd5b506001600160a01b03813581169160200135166121cd565b6103046121fb565b6000546001600160a01b03163314610bfb576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6000828152600f6020908152604091829020805483518184028101840190945280845260609392830182828015610c7e57602002820191906000526020600020906000905b82829054906101000a900460e01b6001600160e01b03191681526020019060040190602082600301049283019260010382029150808411610c405790505b5050505050905060008260001415610c9857508051610cdd565b8151831115610cda576040805162461bcd60e51b8152602060048201526009602482015268109859081b1a5b5a5d60ba1b604482015290519081900360640190fd5b50815b81518015610cea57600019015b60005b82811015610d1c57610d14868583850381518110610d0757fe5b602002602001015161220a565b600101610ced565b506000858152600f6020526040902054610dba57610d42610d3c86611436565b8661253a565b6000858152600f6020526040812090610d5b82826130d7565b60018201805460ff191690556000600283018190556003830181905560048301819055610d8c9060058401906130fc565b505060405185907f98f986773731debbbf041b73d7edaec62da3ff42b2116c45cd0001fb40ed908690600090a25b5050505050565b6001600160e01b03191660009081526001602052604090205460ff1690565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e6c5780601f10610e4157610100808354040283529160200191610e6c565b820191906000526020600020905b815481529060010190602001808311610e4f57829003601f168201915b505050505090505b90565b6000610e8282612586565b610ebd5760405162461bcd60e51b815260040180806020018281038252602c815260200180613505602c913960400191505060405180910390fd5b506000908152600360205260409020546001600160a01b031690565b6000610ee482611436565b9050806001600160a01b0316836001600160a01b03161415610f375760405162461bcd60e51b81526004018080602001828103825260218152602001806135896021913960400191505060405180910390fd5b336001600160a01b0382161480610f535750610f5381336121cd565b610f8e5760405162461bcd60e51b815260040180806020018281038252603881526020018061347a6038913960400191505060405180910390fd5b60008281526003602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60085490565b610ffa33826125a3565b6110355760405162461bcd60e51b81526004018080602001828103825260318152602001806135aa6031913960400191505060405180910390fd5b611040838383612647565b505050565b600061105083611561565b821061108d5760405162461bcd60e51b815260040180806020018281038252602b81526020018061339c602b913960400191505060405180910390fd5b6001600160a01b03831660009081526006602052604090208054839081106110b157fe5b9060005260206000200154905092915050565b6000546001600160a01b03163314611112576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c69181900360200190a150565b61104083838360405180602001604052806000815250611e04565b600080546001600160a01b031633146111d0576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6127108711156112115760405162461bcd60e51b81526004018080602001828103825260318152602001806133f96031913960400191505060405180910390fd5b5060108054600181019091556112278482612666565b60408051600060c0820181815260e083019093529091829150815260200160011515815260200142815260200189815260200188815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050838152600f60209081526040909120835180519193506112bc928492910190613140565b5060208281015160018301805460ff191691151591909117905560408301516002830155606083015160038301556080830151600483015560a0830151805161130b92600585019201906131ec565b50905050807f8304dd8a0ecd1927e64564792f1147f0aca02ba211e48c2981bf7244a987797589858560016040518085815260200180602001831515151581526020018281038252858582818152602001925080828437600083820152604051601f909101601f191690920182900397509095505050505050a260005b858110156113be576113b6828888848181106113a057fe5b905060200201356001600160e01b031916612683565b600101611388565b50979650505050505050565b60006113d4610fea565b82106114115760405162461bcd60e51b815260040180806020018281038252602c8152602001806135db602c913960400191505060405180910390fd5b6008828154811061141e57fe5b90600052602060002001549050919050565b60105481565b6000818152600260205260408120546001600160a01b03168061148a5760405162461bcd60e51b81526004018080602001828103825260298152602001806134dc6029913960400191505060405180910390fd5b92915050565b6000546001600160a01b031633146114de576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b827f6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb9838360405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a26000838152600f6020526040902061155b906005018383613266565b50505050565b60006001600160a01b0382166115a85760405162461bcd60e51b815260040180806020018281038252602a8152602001806134b2602a913960400191505060405180910390fd5b6001600160a01b038216600090815260046020526040902061148a906127c5565b6060600060606115d76132d4565b6000858152600f60209081526040918290208251815460e09381028201840190945260c08101848152909391928492849184018282801561166457602002820191906000526020600020906000905b82829054906101000a900460e01b6001600160e01b031916815260200190600401906020826003010492830192600103820291508084116116265790505b505050918352505060018281015460ff161515602080840191909152600280850154604080860191909152600386015460608601526004860154608086015260058601805482516101009682161596909602600019011692909204601f810184900484028501840190915280845260a090940193909183018282801561172b5780601f106117005761010080835404028352916020019161172b565b820191906000526020600020905b81548152906001019060200180831161170e57829003601f168201915b5050509190925250508151604083015160a09093015190989297509550909350505050565b82600061175c82611436565b9050336001600160a01b038216148061179257506001600160a01b0381161580159061179257506000546001600160a01b031633145b6117d2576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6127108311156118135760405162461bcd60e51b81526004018080602001828103825260318152602001806133f96031913960400191505060405180910390fd5b60408051858152905186917f8aa4fa52648a6d15edce8a179c792c86f3719d0cc3c572cf90f91948f0f2cb68919081900360200190a250506000928352600f6020526040909220600381019190915560040155565b600b8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e6c5780601f10610e4157610100808354040283529160200191610e6c565b6000806000806118d76132d4565b6000868152600f60209081526040918290208251815460e09381028201840190945260c08101848152909391928492849184018282801561196457602002820191906000526020600020906000905b82829054906101000a900460e01b6001600160e01b031916815260200190600401906020826003010492830192600103820291508084116119265790505b505050918352505060018281015460ff161515602080840191909152600280850154604080860191909152600386015460608601526004860154608086015260058601805482516101009682161596909602600019011692909204601f810184900484028501840190915280845260a0909401939091830182828015611a2b5780601f10611a0057610100808354040283529160200191611a2b565b820191906000526020600020905b815481529060010190602001808311611a0e57829003601f168201915b5050505050815250509050611a3f86611436565b8160200151826060015183608001519450945094509450509193509193565b6001600160e01b03191660009081526011602052604090205490565b6001600160a01b038216331415611ad8576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b816000611b5282611436565b9050336001600160a01b0382161480611b8857506001600160a01b03811615801590611b8857506000546001600160a01b031633145b611bc8576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b61155b8484612683565b6001600160e01b03198116600090815260116020908152604091829020805483518184028101840190945280845260609392830182828015611c3357602002820191906000526020600020905b815481526020019060010190808311611c1f575b50505050509050919050565b6001600160e01b0319821660009081526011602052604081208054839081106110b157fe5b816000611c7082611436565b9050336001600160a01b0382161480611ca657506001600160a01b03811615801590611ca657506000546001600160a01b031633145b611ce6576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b604080518415158152905185917f7a5b9103727f29409c14d2581e9710a1648b1354e667e1c803d4bda045159660919081900360200190a250506000918252600f6020526040909120600101805460ff1916911515919091179055565b600f60209081526000918252604091829020600180820154600280840154600385015460048601546005870180548a516101009882161598909802600019011694909404601f810189900489028701890190995288865260ff90941697919690959394929190830182828015611dfa5780601f10611dcf57610100808354040283529160200191611dfa565b820191906000526020600020905b815481529060010190602001808311611ddd57829003601f168201915b5050505050905085565b611e0f848484610ff0565b611e1b848484846127c9565b61155b5760405162461bcd60e51b81526004018080602001828103825260328152602001806133c76032913960400191505060405180910390fd5b6060611e6182612586565b611e9c5760405162461bcd60e51b815260040180806020018281038252602f81526020018061355a602f913960400191505060405180910390fd5b6000828152600c602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015611c335780601f10611f0457610100808354040283529160200191611c33565b820191906000526020600020905b815481529060010190602001808311611f125750939695505050505050565b60606000806000806060611f436132d4565b6000888152600f60209081526040918290208251815460e09381028201840190945260c081018481529093919284928491840182828015611fd057602002820191906000526020600020906000905b82829054906101000a900460e01b6001600160e01b03191681526020019060040190602082600301049283019260010382029150808411611f925790505b505050918352505060018281015460ff161515602080840191909152600280850154604080860191909152600386015460608601526004860154608086015260058601805482516101009682161596909602600019011692909204601f810184900484028501840190915280845260a09094019390918301828280156120975780601f1061206c57610100808354040283529160200191612097565b820191906000526020600020905b81548152906001019060200180831161207a57829003601f168201915b505050505081525050905080600001516120b089611436565b60208301516040840151606085015160a090950151939c929b5090995097509195509350915050565b6000546001600160a01b03163314612127576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b60005461213e9082906001600160a01b03166128fc565b50565b81600061214d82611436565b9050336001600160a01b038216148061218357506001600160a01b0381161580159061218357506000546001600160a01b031633145b6121c3576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b61155b848461220a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000546001600160a01b031681565b6001600160e01b03198116600090815260126020908152604080832085845290915290205480612277576040805162461bcd60e51b81526020600482015260136024820152724e6f742063617465676f72697a6564205b315d60681b604482015290519081900360640190fd5b6001600160e01b0319821660008181526012602090815260408083208784528252808320839055928252601190522054811461234c576001600160e01b031982166000908152601160205260408120805460001981019081106122d657fe5b906000526020600020015490508060116000856001600160e01b0319166001600160e01b0319168152602001908152602001600020600184038154811061231957fe5b60009182526020808320909101929092556001600160e01b03198516815260128252604080822093825292909152208190555b6001600160e01b03198216600090815260116020526040902080549061237690600019830161330c565b5060008381526013602090815260408083206001600160e01b031986168452909152902054806123e3576040805162461bcd60e51b81526020600482015260136024820152724e6f742063617465676f72697a6564205b325d60681b604482015290519081900360640190fd5b60008481526013602090815260408083206001600160e01b0319871684528252808320839055868352600f90915290205481146124dd576000848152600f602052604081208054600019810190811061243857fe5b90600052602060002090600891828204019190066004029054906101000a900460e01b905080600f6000878152602001908152602001600020600001600184038154811061248257fe5b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790558681526013825260408082206001600160e01b031994909416825292909152208190555b6000848152600f602052604090208054906124fc906000198301613330565b5060405184906001600160e01b03198516907f9574a9d09dc883e69228a0eea15ed4da6e520b13cc84cca994c1787c234d78fe90600090a350505050565b6125448282612a95565b6000818152600c60205260409020546002600019610100600184161502019091160415612582576000818152600c60205260408120612582916130fc565b5050565b6000908152600260205260409020546001600160a01b0316151590565b60006125ae82612586565b6125e95760405162461bcd60e51b815260040180806020018281038252602c81526020018061344e602c913960400191505060405180910390fd5b60006125f483611436565b9050806001600160a01b0316846001600160a01b0316148061262f5750836001600160a01b031661262484610e77565b6001600160a01b0316145b8061263f575061263f81856121cd565b949350505050565b612652838383612ac1565b61265c8382612c05565b6110408282612cf3565b6126708282612d31565b61267a8282612cf3565b61258281612e62565b60008281526013602090815260408083206001600160e01b031985168452909152902054156126f9576040805162461bcd60e51b815260206004820152601860248201527f4475706c69636174652063617465676f72697a6174696f6e0000000000000000604482015290519081900360640190fd5b6001600160e01b0319811660008181526011602090815260408083208054600180820180845592865284862090910188905585855260128452828520888652845282852091909155600f835281842080549182018082559085528385206008830401805463ffffffff60079094166004026101000a938402191660e089901c93909302929092179091558684526013835281842085855290925280832091909155518492917f74186c4c4ee368ea5564982241efb7357014b52d6e195d026bc4fdfaa112691b91a35050565b5490565b60006127dd846001600160a01b0316612ea6565b6127e95750600161263f565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b8381101561286357818101518382015260200161284b565b50505050905090810190601f1680156128905780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156128b257600080fd5b505af11580156128c6573d6000803e3d6000fd5b505050506040513d60208110156128dc57600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b60006001600160a01b03831661294c57506040513031906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015612946573d6000803e3d6000fd5b50612a45565b604080516370a0823160e01b8152306004820152905184916001600160a01b038316916370a0823191602480820192602092909190829003018186803b15801561299557600080fd5b505afa1580156129a9573d6000803e3d6000fd5b505050506040513d60208110156129bf57600080fd5b50516040805163a9059cbb60e01b81526001600160a01b0386811660048301526024820184905291519294509083169163a9059cbb916044808201926020929091908290030181600087803b158015612a1757600080fd5b505af1158015612a2b573d6000803e3d6000fd5b505050506040513d6020811015612a4157600080fd5b5050505b816001600160a01b0316836001600160a01b03167ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c836040518082815260200191505060405180910390a3505050565b612a9f8282612eac565b612aa98282612c05565b60008181526007602052604081205561258281612f83565b826001600160a01b0316612ad482611436565b6001600160a01b031614612b195760405162461bcd60e51b81526004018080602001828103825260298152602001806135316029913960400191505060405180910390fd5b6001600160a01b038216612b5e5760405162461bcd60e51b815260040180806020018281038252602481526020018061342a6024913960400191505060405180910390fd5b612b678161301f565b6001600160a01b0383166000908152600460205260409020612b889061305a565b6001600160a01b0382166000908152600460205260409020612ba990613071565b60008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216600090815260066020526040812054612c2f90600163ffffffff61307a16565b600083815260076020526040902054909150808214612cca576001600160a01b0384166000908152600660205260408120805484908110612c6c57fe5b906000526020600020015490508060066000876001600160a01b03166001600160a01b031681526020019081526020016000208381548110612caa57fe5b600091825260208083209091019290925591825260079052604090208190555b6001600160a01b0384166000908152600660205260409020805490610dba90600019830161330c565b6001600160a01b0390911660009081526006602081815260408084208054868652600784529185208290559282526001810183559183529091200155565b6001600160a01b038216612d8c576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612d9581612586565b15612de7576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b600081815260026020908152604080832080546001600160a01b0319166001600160a01b038716908117909155835260049091529020612e2690613071565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b3b151590565b816001600160a01b0316612ebf82611436565b6001600160a01b031614612f045760405162461bcd60e51b81526004018080602001828103825260258152602001806136076025913960400191505060405180910390fd5b612f0d8161301f565b6001600160a01b0382166000908152600460205260409020612f2e9061305a565b60008181526002602052604080822080546001600160a01b0319169055518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600854600090612f9a90600163ffffffff61307a16565b60008381526009602052604081205460088054939450909284908110612fbc57fe5b906000526020600020015490508060088381548110612fd757fe5b6000918252602080832090910192909255828152600990915260409020829055600880549061300a90600019830161330c565b50505060009182525060096020526040812055565b6000818152600360205260409020546001600160a01b03161561213e57600090815260036020526040902080546001600160a01b0319169055565b805461306d90600163ffffffff61307a16565b9055565b80546001019055565b6000828211156130d1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b50805460008255600701600890049060005260206000209081019061213e9190613360565b50805460018160011615610100020316600290046000825580601f10613122575061213e565b601f01602090049060005260206000209081019061213e9190613360565b828054828255906000526020600020906007016008900481019282156131dc5791602002820160005b838211156131aa57835183826101000a81548163ffffffff021916908360e01c02179055509260200192600401602081600301049283019260010302613169565b80156131da5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026131aa565b505b506131e892915061337a565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061322d57805160ff191683800117855561325a565b8280016001018555821561325a579182015b8281111561325a57825182559160200191906001019061323f565b506131e8929150613360565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106132a75782800160ff1982351617855561325a565b8280016001018555821561325a579182015b8281111561325a5782358255916020019190600101906132b9565b6040518060c0016040528060608152602001600015158152602001600081526020016000815260200160008152602001606081525090565b81548183558181111561104057600083815260209020611040918101908301613360565b81548183558181111561104057600701600890048160070160089004836000526020600020918201910161104091905b610e7491905b808211156131e85760008155600101613366565b610e7491905b808211156131e857805463ffffffff1916815560010161338056fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e74657242616420617267756d656e742c205f646f6e6174652063616e6e6f74206265206d6f7265207468656e203130302e3030254552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e64734552433732313a206275726e206f6620746f6b656e2074686174206973206e6f74206f776ea265627a7a72305820d13e91ff273089853480a46eb09bcff742389c8cbc4ade7f572b734eac6741bc64736f6c634300050a0032"
|
|
|
|
// DeployStickerType deploys a new Ethereum contract, binding an instance of StickerType to it.
|
|
func DeployStickerType(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *StickerType, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(StickerTypeABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StickerTypeBin), backend)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &StickerType{StickerTypeCaller: StickerTypeCaller{contract: contract}, StickerTypeTransactor: StickerTypeTransactor{contract: contract}, StickerTypeFilterer: StickerTypeFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// StickerType is an auto generated Go binding around an Ethereum contract.
|
|
type StickerType struct {
|
|
StickerTypeCaller // Read-only binding to the contract
|
|
StickerTypeTransactor // Write-only binding to the contract
|
|
StickerTypeFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// StickerTypeCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type StickerTypeCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerTypeTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type StickerTypeTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerTypeFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type StickerTypeFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// StickerTypeSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type StickerTypeSession struct {
|
|
Contract *StickerType // 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
|
|
}
|
|
|
|
// StickerTypeCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type StickerTypeCallerSession struct {
|
|
Contract *StickerTypeCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// StickerTypeTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type StickerTypeTransactorSession struct {
|
|
Contract *StickerTypeTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// StickerTypeRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type StickerTypeRaw struct {
|
|
Contract *StickerType // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// StickerTypeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type StickerTypeCallerRaw struct {
|
|
Contract *StickerTypeCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// StickerTypeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type StickerTypeTransactorRaw struct {
|
|
Contract *StickerTypeTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewStickerType creates a new instance of StickerType, bound to a specific deployed contract.
|
|
func NewStickerType(address common.Address, backend bind.ContractBackend) (*StickerType, error) {
|
|
contract, err := bindStickerType(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerType{StickerTypeCaller: StickerTypeCaller{contract: contract}, StickerTypeTransactor: StickerTypeTransactor{contract: contract}, StickerTypeFilterer: StickerTypeFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewStickerTypeCaller creates a new read-only instance of StickerType, bound to a specific deployed contract.
|
|
func NewStickerTypeCaller(address common.Address, caller bind.ContractCaller) (*StickerTypeCaller, error) {
|
|
contract, err := bindStickerType(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewStickerTypeTransactor creates a new write-only instance of StickerType, bound to a specific deployed contract.
|
|
func NewStickerTypeTransactor(address common.Address, transactor bind.ContractTransactor) (*StickerTypeTransactor, error) {
|
|
contract, err := bindStickerType(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewStickerTypeFilterer creates a new log filterer instance of StickerType, bound to a specific deployed contract.
|
|
func NewStickerTypeFilterer(address common.Address, filterer bind.ContractFilterer) (*StickerTypeFilterer, error) {
|
|
contract, err := bindStickerType(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindStickerType binds a generic wrapper to an already deployed contract.
|
|
func bindStickerType(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(StickerTypeABI))
|
|
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 (_StickerType *StickerTypeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _StickerType.Contract.StickerTypeCaller.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 (_StickerType *StickerTypeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _StickerType.Contract.StickerTypeTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_StickerType *StickerTypeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _StickerType.Contract.StickerTypeTransactor.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 (_StickerType *StickerTypeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _StickerType.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 (_StickerType *StickerTypeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _StickerType.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_StickerType *StickerTypeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _StickerType.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 (_StickerType *StickerTypeCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _StickerType.Contract.BalanceOf(&_StickerType.CallOpts, owner)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address owner) view returns(uint256)
|
|
func (_StickerType *StickerTypeCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
|
return _StickerType.Contract.BalanceOf(&_StickerType.CallOpts, owner)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerType *StickerTypeCaller) Controller(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "controller")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerType *StickerTypeSession) Controller() (common.Address, error) {
|
|
return _StickerType.Contract.Controller(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// Controller is a free data retrieval call binding the contract method 0xf77c4791.
|
|
//
|
|
// Solidity: function controller() view returns(address)
|
|
func (_StickerType *StickerTypeCallerSession) Controller() (common.Address, error) {
|
|
return _StickerType.Contract.Controller(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_StickerType *StickerTypeCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerType.Contract.GetApproved(&_StickerType.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetApproved is a free data retrieval call binding the contract method 0x081812fc.
|
|
//
|
|
// Solidity: function getApproved(uint256 tokenId) view returns(address)
|
|
func (_StickerType *StickerTypeCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerType.Contract.GetApproved(&_StickerType.CallOpts, tokenId)
|
|
}
|
|
|
|
// GetAvailablePacks is a free data retrieval call binding the contract method 0xb34b5825.
|
|
//
|
|
// Solidity: function getAvailablePacks(bytes4 _category) view returns(uint256[] availableIds)
|
|
func (_StickerType *StickerTypeCaller) GetAvailablePacks(opts *bind.CallOpts, _category [4]byte) ([]*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "getAvailablePacks", _category)
|
|
|
|
if err != nil {
|
|
return *new([]*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetAvailablePacks is a free data retrieval call binding the contract method 0xb34b5825.
|
|
//
|
|
// Solidity: function getAvailablePacks(bytes4 _category) view returns(uint256[] availableIds)
|
|
func (_StickerType *StickerTypeSession) GetAvailablePacks(_category [4]byte) ([]*big.Int, error) {
|
|
return _StickerType.Contract.GetAvailablePacks(&_StickerType.CallOpts, _category)
|
|
}
|
|
|
|
// GetAvailablePacks is a free data retrieval call binding the contract method 0xb34b5825.
|
|
//
|
|
// Solidity: function getAvailablePacks(bytes4 _category) view returns(uint256[] availableIds)
|
|
func (_StickerType *StickerTypeCallerSession) GetAvailablePacks(_category [4]byte) ([]*big.Int, error) {
|
|
return _StickerType.Contract.GetAvailablePacks(&_StickerType.CallOpts, _category)
|
|
}
|
|
|
|
// GetCategoryLength is a free data retrieval call binding the contract method 0x9f9a9b63.
|
|
//
|
|
// Solidity: function getCategoryLength(bytes4 _category) view returns(uint256 size)
|
|
func (_StickerType *StickerTypeCaller) GetCategoryLength(opts *bind.CallOpts, _category [4]byte) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "getCategoryLength", _category)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetCategoryLength is a free data retrieval call binding the contract method 0x9f9a9b63.
|
|
//
|
|
// Solidity: function getCategoryLength(bytes4 _category) view returns(uint256 size)
|
|
func (_StickerType *StickerTypeSession) GetCategoryLength(_category [4]byte) (*big.Int, error) {
|
|
return _StickerType.Contract.GetCategoryLength(&_StickerType.CallOpts, _category)
|
|
}
|
|
|
|
// GetCategoryLength is a free data retrieval call binding the contract method 0x9f9a9b63.
|
|
//
|
|
// Solidity: function getCategoryLength(bytes4 _category) view returns(uint256 size)
|
|
func (_StickerType *StickerTypeCallerSession) GetCategoryLength(_category [4]byte) (*big.Int, error) {
|
|
return _StickerType.Contract.GetCategoryLength(&_StickerType.CallOpts, _category)
|
|
}
|
|
|
|
// GetCategoryPack is a free data retrieval call binding the contract method 0xb5420d68.
|
|
//
|
|
// Solidity: function getCategoryPack(bytes4 _category, uint256 _index) view returns(uint256 packId)
|
|
func (_StickerType *StickerTypeCaller) GetCategoryPack(opts *bind.CallOpts, _category [4]byte, _index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "getCategoryPack", _category, _index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetCategoryPack is a free data retrieval call binding the contract method 0xb5420d68.
|
|
//
|
|
// Solidity: function getCategoryPack(bytes4 _category, uint256 _index) view returns(uint256 packId)
|
|
func (_StickerType *StickerTypeSession) GetCategoryPack(_category [4]byte, _index *big.Int) (*big.Int, error) {
|
|
return _StickerType.Contract.GetCategoryPack(&_StickerType.CallOpts, _category, _index)
|
|
}
|
|
|
|
// GetCategoryPack is a free data retrieval call binding the contract method 0xb5420d68.
|
|
//
|
|
// Solidity: function getCategoryPack(bytes4 _category, uint256 _index) view returns(uint256 packId)
|
|
func (_StickerType *StickerTypeCallerSession) GetCategoryPack(_category [4]byte, _index *big.Int) (*big.Int, error) {
|
|
return _StickerType.Contract.GetCategoryPack(&_StickerType.CallOpts, _category, _index)
|
|
}
|
|
|
|
// GetPackData is a free data retrieval call binding the contract method 0xd2bf36c0.
|
|
//
|
|
// Solidity: function getPackData(uint256 _packId) view returns(bytes4[] category, address owner, bool mintable, uint256 timestamp, uint256 price, bytes contenthash)
|
|
func (_StickerType *StickerTypeCaller) GetPackData(opts *bind.CallOpts, _packId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Owner common.Address
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "getPackData", _packId)
|
|
|
|
outstruct := new(struct {
|
|
Category [][4]byte
|
|
Owner common.Address
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Contenthash []byte
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Category = *abi.ConvertType(out[0], new([][4]byte)).(*[][4]byte)
|
|
outstruct.Owner = *abi.ConvertType(out[1], new(common.Address)).(*common.Address)
|
|
outstruct.Mintable = *abi.ConvertType(out[2], new(bool)).(*bool)
|
|
outstruct.Timestamp = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
|
|
outstruct.Price = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
|
|
outstruct.Contenthash = *abi.ConvertType(out[5], new([]byte)).(*[]byte)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// GetPackData is a free data retrieval call binding the contract method 0xd2bf36c0.
|
|
//
|
|
// Solidity: function getPackData(uint256 _packId) view returns(bytes4[] category, address owner, bool mintable, uint256 timestamp, uint256 price, bytes contenthash)
|
|
func (_StickerType *StickerTypeSession) GetPackData(_packId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Owner common.Address
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerType.Contract.GetPackData(&_StickerType.CallOpts, _packId)
|
|
}
|
|
|
|
// GetPackData is a free data retrieval call binding the contract method 0xd2bf36c0.
|
|
//
|
|
// Solidity: function getPackData(uint256 _packId) view returns(bytes4[] category, address owner, bool mintable, uint256 timestamp, uint256 price, bytes contenthash)
|
|
func (_StickerType *StickerTypeCallerSession) GetPackData(_packId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Owner common.Address
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerType.Contract.GetPackData(&_StickerType.CallOpts, _packId)
|
|
}
|
|
|
|
// GetPackSummary is a free data retrieval call binding the contract method 0x81ec792d.
|
|
//
|
|
// Solidity: function getPackSummary(uint256 _packId) view returns(bytes4[] category, uint256 timestamp, bytes contenthash)
|
|
func (_StickerType *StickerTypeCaller) GetPackSummary(opts *bind.CallOpts, _packId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "getPackSummary", _packId)
|
|
|
|
outstruct := new(struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Category = *abi.ConvertType(out[0], new([][4]byte)).(*[][4]byte)
|
|
outstruct.Timestamp = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.Contenthash = *abi.ConvertType(out[2], new([]byte)).(*[]byte)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// GetPackSummary is a free data retrieval call binding the contract method 0x81ec792d.
|
|
//
|
|
// Solidity: function getPackSummary(uint256 _packId) view returns(bytes4[] category, uint256 timestamp, bytes contenthash)
|
|
func (_StickerType *StickerTypeSession) GetPackSummary(_packId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerType.Contract.GetPackSummary(&_StickerType.CallOpts, _packId)
|
|
}
|
|
|
|
// GetPackSummary is a free data retrieval call binding the contract method 0x81ec792d.
|
|
//
|
|
// Solidity: function getPackSummary(uint256 _packId) view returns(bytes4[] category, uint256 timestamp, bytes contenthash)
|
|
func (_StickerType *StickerTypeCallerSession) GetPackSummary(_packId *big.Int) (struct {
|
|
Category [][4]byte
|
|
Timestamp *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerType.Contract.GetPackSummary(&_StickerType.CallOpts, _packId)
|
|
}
|
|
|
|
// GetPaymentData is a free data retrieval call binding the contract method 0x9c3a39a2.
|
|
//
|
|
// Solidity: function getPaymentData(uint256 _packId) view returns(address owner, bool mintable, uint256 price, uint256 donate)
|
|
func (_StickerType *StickerTypeCaller) GetPaymentData(opts *bind.CallOpts, _packId *big.Int) (struct {
|
|
Owner common.Address
|
|
Mintable bool
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "getPaymentData", _packId)
|
|
|
|
outstruct := new(struct {
|
|
Owner common.Address
|
|
Mintable bool
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Owner = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
outstruct.Mintable = *abi.ConvertType(out[1], new(bool)).(*bool)
|
|
outstruct.Price = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
|
|
outstruct.Donate = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// GetPaymentData is a free data retrieval call binding the contract method 0x9c3a39a2.
|
|
//
|
|
// Solidity: function getPaymentData(uint256 _packId) view returns(address owner, bool mintable, uint256 price, uint256 donate)
|
|
func (_StickerType *StickerTypeSession) GetPaymentData(_packId *big.Int) (struct {
|
|
Owner common.Address
|
|
Mintable bool
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
}, error) {
|
|
return _StickerType.Contract.GetPaymentData(&_StickerType.CallOpts, _packId)
|
|
}
|
|
|
|
// GetPaymentData is a free data retrieval call binding the contract method 0x9c3a39a2.
|
|
//
|
|
// Solidity: function getPaymentData(uint256 _packId) view returns(address owner, bool mintable, uint256 price, uint256 donate)
|
|
func (_StickerType *StickerTypeCallerSession) GetPaymentData(_packId *big.Int) (struct {
|
|
Owner common.Address
|
|
Mintable bool
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
}, error) {
|
|
return _StickerType.Contract.GetPaymentData(&_StickerType.CallOpts, _packId)
|
|
}
|
|
|
|
// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5.
|
|
//
|
|
// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool)
|
|
func (_StickerType *StickerTypeCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _StickerType.Contract.IsApprovedForAll(&_StickerType.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 (_StickerType *StickerTypeCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) {
|
|
return _StickerType.Contract.IsApprovedForAll(&_StickerType.CallOpts, owner, operator)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_StickerType *StickerTypeCaller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) Name() (string, error) {
|
|
return _StickerType.Contract.Name(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_StickerType *StickerTypeCallerSession) Name() (string, error) {
|
|
return _StickerType.Contract.Name(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_StickerType *StickerTypeCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerType.Contract.OwnerOf(&_StickerType.CallOpts, tokenId)
|
|
}
|
|
|
|
// OwnerOf is a free data retrieval call binding the contract method 0x6352211e.
|
|
//
|
|
// Solidity: function ownerOf(uint256 tokenId) view returns(address)
|
|
func (_StickerType *StickerTypeCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) {
|
|
return _StickerType.Contract.OwnerOf(&_StickerType.CallOpts, tokenId)
|
|
}
|
|
|
|
// PackCount is a free data retrieval call binding the contract method 0x61bd6725.
|
|
//
|
|
// Solidity: function packCount() view returns(uint256)
|
|
func (_StickerType *StickerTypeCaller) PackCount(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "packCount")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// PackCount is a free data retrieval call binding the contract method 0x61bd6725.
|
|
//
|
|
// Solidity: function packCount() view returns(uint256)
|
|
func (_StickerType *StickerTypeSession) PackCount() (*big.Int, error) {
|
|
return _StickerType.Contract.PackCount(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// PackCount is a free data retrieval call binding the contract method 0x61bd6725.
|
|
//
|
|
// Solidity: function packCount() view returns(uint256)
|
|
func (_StickerType *StickerTypeCallerSession) PackCount() (*big.Int, error) {
|
|
return _StickerType.Contract.PackCount(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// Packs is a free data retrieval call binding the contract method 0xb84c1392.
|
|
//
|
|
// Solidity: function packs(uint256 ) view returns(bool mintable, uint256 timestamp, uint256 price, uint256 donate, bytes contenthash)
|
|
func (_StickerType *StickerTypeCaller) Packs(opts *bind.CallOpts, arg0 *big.Int) (struct {
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "packs", arg0)
|
|
|
|
outstruct := new(struct {
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
Contenthash []byte
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Mintable = *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
outstruct.Timestamp = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.Price = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
|
|
outstruct.Donate = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
|
|
outstruct.Contenthash = *abi.ConvertType(out[4], new([]byte)).(*[]byte)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// Packs is a free data retrieval call binding the contract method 0xb84c1392.
|
|
//
|
|
// Solidity: function packs(uint256 ) view returns(bool mintable, uint256 timestamp, uint256 price, uint256 donate, bytes contenthash)
|
|
func (_StickerType *StickerTypeSession) Packs(arg0 *big.Int) (struct {
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerType.Contract.Packs(&_StickerType.CallOpts, arg0)
|
|
}
|
|
|
|
// Packs is a free data retrieval call binding the contract method 0xb84c1392.
|
|
//
|
|
// Solidity: function packs(uint256 ) view returns(bool mintable, uint256 timestamp, uint256 price, uint256 donate, bytes contenthash)
|
|
func (_StickerType *StickerTypeCallerSession) Packs(arg0 *big.Int) (struct {
|
|
Mintable bool
|
|
Timestamp *big.Int
|
|
Price *big.Int
|
|
Donate *big.Int
|
|
Contenthash []byte
|
|
}, error) {
|
|
return _StickerType.Contract.Packs(&_StickerType.CallOpts, arg0)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_StickerType *StickerTypeCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
|
|
|
if err != nil {
|
|
return *new(bool), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_StickerType *StickerTypeSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _StickerType.Contract.SupportsInterface(&_StickerType.CallOpts, interfaceId)
|
|
}
|
|
|
|
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
|
//
|
|
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
|
func (_StickerType *StickerTypeCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
|
return _StickerType.Contract.SupportsInterface(&_StickerType.CallOpts, interfaceId)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_StickerType *StickerTypeCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) Symbol() (string, error) {
|
|
return _StickerType.Contract.Symbol(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_StickerType *StickerTypeCallerSession) Symbol() (string, error) {
|
|
return _StickerType.Contract.Symbol(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_StickerType *StickerTypeCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "tokenByIndex", index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_StickerType *StickerTypeSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _StickerType.Contract.TokenByIndex(&_StickerType.CallOpts, index)
|
|
}
|
|
|
|
// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.
|
|
//
|
|
// Solidity: function tokenByIndex(uint256 index) view returns(uint256)
|
|
func (_StickerType *StickerTypeCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) {
|
|
return _StickerType.Contract.TokenByIndex(&_StickerType.CallOpts, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_StickerType *StickerTypeCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_StickerType *StickerTypeSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _StickerType.Contract.TokenOfOwnerByIndex(&_StickerType.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.
|
|
//
|
|
// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256)
|
|
func (_StickerType *StickerTypeCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) {
|
|
return _StickerType.Contract.TokenOfOwnerByIndex(&_StickerType.CallOpts, owner, index)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_StickerType *StickerTypeCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) {
|
|
var out []interface{}
|
|
err := _StickerType.contract.Call(opts, &out, "tokenURI", tokenId)
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_StickerType *StickerTypeSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _StickerType.Contract.TokenURI(&_StickerType.CallOpts, tokenId)
|
|
}
|
|
|
|
// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.
|
|
//
|
|
// Solidity: function tokenURI(uint256 tokenId) view returns(string)
|
|
func (_StickerType *StickerTypeCallerSession) TokenURI(tokenId *big.Int) (string, error) {
|
|
return _StickerType.Contract.TokenURI(&_StickerType.CallOpts, tokenId)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_StickerType *StickerTypeCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _StickerType.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 (_StickerType *StickerTypeSession) TotalSupply() (*big.Int, error) {
|
|
return _StickerType.Contract.TotalSupply(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_StickerType *StickerTypeCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _StickerType.Contract.TotalSupply(&_StickerType.CallOpts)
|
|
}
|
|
|
|
// AddPackCategory is a paid mutator transaction binding the contract method 0xaeeaf3da.
|
|
//
|
|
// Solidity: function addPackCategory(uint256 _packId, bytes4 _category) returns()
|
|
func (_StickerType *StickerTypeTransactor) AddPackCategory(opts *bind.TransactOpts, _packId *big.Int, _category [4]byte) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "addPackCategory", _packId, _category)
|
|
}
|
|
|
|
// AddPackCategory is a paid mutator transaction binding the contract method 0xaeeaf3da.
|
|
//
|
|
// Solidity: function addPackCategory(uint256 _packId, bytes4 _category) returns()
|
|
func (_StickerType *StickerTypeSession) AddPackCategory(_packId *big.Int, _category [4]byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.AddPackCategory(&_StickerType.TransactOpts, _packId, _category)
|
|
}
|
|
|
|
// AddPackCategory is a paid mutator transaction binding the contract method 0xaeeaf3da.
|
|
//
|
|
// Solidity: function addPackCategory(uint256 _packId, bytes4 _category) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) AddPackCategory(_packId *big.Int, _category [4]byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.AddPackCategory(&_StickerType.TransactOpts, _packId, _category)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_StickerType *StickerTypeTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "approve", to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_StickerType *StickerTypeSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.Approve(&_StickerType.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address to, uint256 tokenId) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.Approve(&_StickerType.TransactOpts, to, tokenId)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerType *StickerTypeTransactor) ChangeController(opts *bind.TransactOpts, _newController common.Address) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "changeController", _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerType *StickerTypeSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerType.Contract.ChangeController(&_StickerType.TransactOpts, _newController)
|
|
}
|
|
|
|
// ChangeController is a paid mutator transaction binding the contract method 0x3cebb823.
|
|
//
|
|
// Solidity: function changeController(address _newController) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) ChangeController(_newController common.Address) (*types.Transaction, error) {
|
|
return _StickerType.Contract.ChangeController(&_StickerType.TransactOpts, _newController)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerType *StickerTypeTransactor) ClaimTokens(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "claimTokens", _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerType *StickerTypeSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _StickerType.Contract.ClaimTokens(&_StickerType.TransactOpts, _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _StickerType.Contract.ClaimTokens(&_StickerType.TransactOpts, _token)
|
|
}
|
|
|
|
// GeneratePack is a paid mutator transaction binding the contract method 0x4c06dc17.
|
|
//
|
|
// Solidity: function generatePack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash) returns(uint256 packId)
|
|
func (_StickerType *StickerTypeTransactor) GeneratePack(opts *bind.TransactOpts, _price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "generatePack", _price, _donate, _category, _owner, _contenthash)
|
|
}
|
|
|
|
// GeneratePack is a paid mutator transaction binding the contract method 0x4c06dc17.
|
|
//
|
|
// Solidity: function generatePack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash) returns(uint256 packId)
|
|
func (_StickerType *StickerTypeSession) GeneratePack(_price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.GeneratePack(&_StickerType.TransactOpts, _price, _donate, _category, _owner, _contenthash)
|
|
}
|
|
|
|
// GeneratePack is a paid mutator transaction binding the contract method 0x4c06dc17.
|
|
//
|
|
// Solidity: function generatePack(uint256 _price, uint256 _donate, bytes4[] _category, address _owner, bytes _contenthash) returns(uint256 packId)
|
|
func (_StickerType *StickerTypeTransactorSession) GeneratePack(_price *big.Int, _donate *big.Int, _category [][4]byte, _owner common.Address, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.GeneratePack(&_StickerType.TransactOpts, _price, _donate, _category, _owner, _contenthash)
|
|
}
|
|
|
|
// PurgePack is a paid mutator transaction binding the contract method 0x00b3c91b.
|
|
//
|
|
// Solidity: function purgePack(uint256 _packId, uint256 _limit) returns()
|
|
func (_StickerType *StickerTypeTransactor) PurgePack(opts *bind.TransactOpts, _packId *big.Int, _limit *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "purgePack", _packId, _limit)
|
|
}
|
|
|
|
// PurgePack is a paid mutator transaction binding the contract method 0x00b3c91b.
|
|
//
|
|
// Solidity: function purgePack(uint256 _packId, uint256 _limit) returns()
|
|
func (_StickerType *StickerTypeSession) PurgePack(_packId *big.Int, _limit *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.PurgePack(&_StickerType.TransactOpts, _packId, _limit)
|
|
}
|
|
|
|
// PurgePack is a paid mutator transaction binding the contract method 0x00b3c91b.
|
|
//
|
|
// Solidity: function purgePack(uint256 _packId, uint256 _limit) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) PurgePack(_packId *big.Int, _limit *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.PurgePack(&_StickerType.TransactOpts, _packId, _limit)
|
|
}
|
|
|
|
// RemovePackCategory is a paid mutator transaction binding the contract method 0xe8bb7143.
|
|
//
|
|
// Solidity: function removePackCategory(uint256 _packId, bytes4 _category) returns()
|
|
func (_StickerType *StickerTypeTransactor) RemovePackCategory(opts *bind.TransactOpts, _packId *big.Int, _category [4]byte) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "removePackCategory", _packId, _category)
|
|
}
|
|
|
|
// RemovePackCategory is a paid mutator transaction binding the contract method 0xe8bb7143.
|
|
//
|
|
// Solidity: function removePackCategory(uint256 _packId, bytes4 _category) returns()
|
|
func (_StickerType *StickerTypeSession) RemovePackCategory(_packId *big.Int, _category [4]byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.RemovePackCategory(&_StickerType.TransactOpts, _packId, _category)
|
|
}
|
|
|
|
// RemovePackCategory is a paid mutator transaction binding the contract method 0xe8bb7143.
|
|
//
|
|
// Solidity: function removePackCategory(uint256 _packId, bytes4 _category) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) RemovePackCategory(_packId *big.Int, _category [4]byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.RemovePackCategory(&_StickerType.TransactOpts, _packId, _category)
|
|
}
|
|
|
|
// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e.
|
|
//
|
|
// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_StickerType *StickerTypeTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.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 (_StickerType *StickerTypeSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SafeTransferFrom(&_StickerType.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 (_StickerType *StickerTypeTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SafeTransferFrom(&_StickerType.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 (_StickerType *StickerTypeTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _StickerType.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 (_StickerType *StickerTypeSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SafeTransferFrom0(&_StickerType.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 (_StickerType *StickerTypeTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SafeTransferFrom0(&_StickerType.TransactOpts, from, to, tokenId, _data)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_StickerType *StickerTypeTransactor) SetApprovalForAll(opts *bind.TransactOpts, to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "setApprovalForAll", to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_StickerType *StickerTypeSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetApprovalForAll(&_StickerType.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.
|
|
//
|
|
// Solidity: function setApprovalForAll(address to, bool approved) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) SetApprovalForAll(to common.Address, approved bool) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetApprovalForAll(&_StickerType.TransactOpts, to, approved)
|
|
}
|
|
|
|
// SetPackContenthash is a paid mutator transaction binding the contract method 0x6a847981.
|
|
//
|
|
// Solidity: function setPackContenthash(uint256 _packId, bytes _contenthash) returns()
|
|
func (_StickerType *StickerTypeTransactor) SetPackContenthash(opts *bind.TransactOpts, _packId *big.Int, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "setPackContenthash", _packId, _contenthash)
|
|
}
|
|
|
|
// SetPackContenthash is a paid mutator transaction binding the contract method 0x6a847981.
|
|
//
|
|
// Solidity: function setPackContenthash(uint256 _packId, bytes _contenthash) returns()
|
|
func (_StickerType *StickerTypeSession) SetPackContenthash(_packId *big.Int, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetPackContenthash(&_StickerType.TransactOpts, _packId, _contenthash)
|
|
}
|
|
|
|
// SetPackContenthash is a paid mutator transaction binding the contract method 0x6a847981.
|
|
//
|
|
// Solidity: function setPackContenthash(uint256 _packId, bytes _contenthash) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) SetPackContenthash(_packId *big.Int, _contenthash []byte) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetPackContenthash(&_StickerType.TransactOpts, _packId, _contenthash)
|
|
}
|
|
|
|
// SetPackPrice is a paid mutator transaction binding the contract method 0x9389c5b5.
|
|
//
|
|
// Solidity: function setPackPrice(uint256 _packId, uint256 _price, uint256 _donate) returns()
|
|
func (_StickerType *StickerTypeTransactor) SetPackPrice(opts *bind.TransactOpts, _packId *big.Int, _price *big.Int, _donate *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "setPackPrice", _packId, _price, _donate)
|
|
}
|
|
|
|
// SetPackPrice is a paid mutator transaction binding the contract method 0x9389c5b5.
|
|
//
|
|
// Solidity: function setPackPrice(uint256 _packId, uint256 _price, uint256 _donate) returns()
|
|
func (_StickerType *StickerTypeSession) SetPackPrice(_packId *big.Int, _price *big.Int, _donate *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetPackPrice(&_StickerType.TransactOpts, _packId, _price, _donate)
|
|
}
|
|
|
|
// SetPackPrice is a paid mutator transaction binding the contract method 0x9389c5b5.
|
|
//
|
|
// Solidity: function setPackPrice(uint256 _packId, uint256 _price, uint256 _donate) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) SetPackPrice(_packId *big.Int, _price *big.Int, _donate *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetPackPrice(&_StickerType.TransactOpts, _packId, _price, _donate)
|
|
}
|
|
|
|
// SetPackState is a paid mutator transaction binding the contract method 0xb7f48211.
|
|
//
|
|
// Solidity: function setPackState(uint256 _packId, bool _mintable) returns()
|
|
func (_StickerType *StickerTypeTransactor) SetPackState(opts *bind.TransactOpts, _packId *big.Int, _mintable bool) (*types.Transaction, error) {
|
|
return _StickerType.contract.Transact(opts, "setPackState", _packId, _mintable)
|
|
}
|
|
|
|
// SetPackState is a paid mutator transaction binding the contract method 0xb7f48211.
|
|
//
|
|
// Solidity: function setPackState(uint256 _packId, bool _mintable) returns()
|
|
func (_StickerType *StickerTypeSession) SetPackState(_packId *big.Int, _mintable bool) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetPackState(&_StickerType.TransactOpts, _packId, _mintable)
|
|
}
|
|
|
|
// SetPackState is a paid mutator transaction binding the contract method 0xb7f48211.
|
|
//
|
|
// Solidity: function setPackState(uint256 _packId, bool _mintable) returns()
|
|
func (_StickerType *StickerTypeTransactorSession) SetPackState(_packId *big.Int, _mintable bool) (*types.Transaction, error) {
|
|
return _StickerType.Contract.SetPackState(&_StickerType.TransactOpts, _packId, _mintable)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns()
|
|
func (_StickerType *StickerTypeTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.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 (_StickerType *StickerTypeSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.TransferFrom(&_StickerType.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 (_StickerType *StickerTypeTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) {
|
|
return _StickerType.Contract.TransferFrom(&_StickerType.TransactOpts, from, to, tokenId)
|
|
}
|
|
|
|
// StickerTypeApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the StickerType contract.
|
|
type StickerTypeApprovalIterator struct {
|
|
Event *StickerTypeApproval // 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 *StickerTypeApprovalIterator) 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(StickerTypeApproval)
|
|
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(StickerTypeApproval)
|
|
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 *StickerTypeApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeApproval represents a Approval event raised by the StickerType contract.
|
|
type StickerTypeApproval 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 (_StickerType *StickerTypeFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*StickerTypeApprovalIterator, 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 := _StickerType.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeApprovalIterator{contract: _StickerType.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 (_StickerType *StickerTypeFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *StickerTypeApproval, 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 := _StickerType.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(StickerTypeApproval)
|
|
if err := _StickerType.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 (_StickerType *StickerTypeFilterer) ParseApproval(log types.Log) (*StickerTypeApproval, error) {
|
|
event := new(StickerTypeApproval)
|
|
if err := _StickerType.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the StickerType contract.
|
|
type StickerTypeApprovalForAllIterator struct {
|
|
Event *StickerTypeApprovalForAll // 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 *StickerTypeApprovalForAllIterator) 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(StickerTypeApprovalForAll)
|
|
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(StickerTypeApprovalForAll)
|
|
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 *StickerTypeApprovalForAllIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeApprovalForAllIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeApprovalForAll represents a ApprovalForAll event raised by the StickerType contract.
|
|
type StickerTypeApprovalForAll 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 (_StickerType *StickerTypeFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*StickerTypeApprovalForAllIterator, 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 := _StickerType.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeApprovalForAllIterator{contract: _StickerType.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 (_StickerType *StickerTypeFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *StickerTypeApprovalForAll, 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 := _StickerType.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(StickerTypeApprovalForAll)
|
|
if err := _StickerType.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 (_StickerType *StickerTypeFilterer) ParseApprovalForAll(log types.Log) (*StickerTypeApprovalForAll, error) {
|
|
event := new(StickerTypeApprovalForAll)
|
|
if err := _StickerType.contract.UnpackLog(event, "ApprovalForAll", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeCategorizedIterator is returned from FilterCategorized and is used to iterate over the raw logs and unpacked data for Categorized events raised by the StickerType contract.
|
|
type StickerTypeCategorizedIterator struct {
|
|
Event *StickerTypeCategorized // 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 *StickerTypeCategorizedIterator) 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(StickerTypeCategorized)
|
|
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(StickerTypeCategorized)
|
|
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 *StickerTypeCategorizedIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeCategorizedIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeCategorized represents a Categorized event raised by the StickerType contract.
|
|
type StickerTypeCategorized struct {
|
|
Category [4]byte
|
|
PackId *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterCategorized is a free log retrieval operation binding the contract event 0x74186c4c4ee368ea5564982241efb7357014b52d6e195d026bc4fdfaa112691b.
|
|
//
|
|
// Solidity: event Categorized(bytes4 indexed category, uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) FilterCategorized(opts *bind.FilterOpts, category [][4]byte, packId []*big.Int) (*StickerTypeCategorizedIterator, error) {
|
|
|
|
var categoryRule []interface{}
|
|
for _, categoryItem := range category {
|
|
categoryRule = append(categoryRule, categoryItem)
|
|
}
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "Categorized", categoryRule, packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeCategorizedIterator{contract: _StickerType.contract, event: "Categorized", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchCategorized is a free log subscription operation binding the contract event 0x74186c4c4ee368ea5564982241efb7357014b52d6e195d026bc4fdfaa112691b.
|
|
//
|
|
// Solidity: event Categorized(bytes4 indexed category, uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) WatchCategorized(opts *bind.WatchOpts, sink chan<- *StickerTypeCategorized, category [][4]byte, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var categoryRule []interface{}
|
|
for _, categoryItem := range category {
|
|
categoryRule = append(categoryRule, categoryItem)
|
|
}
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "Categorized", categoryRule, packIdRule)
|
|
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(StickerTypeCategorized)
|
|
if err := _StickerType.contract.UnpackLog(event, "Categorized", 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
|
|
}
|
|
|
|
// ParseCategorized is a log parse operation binding the contract event 0x74186c4c4ee368ea5564982241efb7357014b52d6e195d026bc4fdfaa112691b.
|
|
//
|
|
// Solidity: event Categorized(bytes4 indexed category, uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) ParseCategorized(log types.Log) (*StickerTypeCategorized, error) {
|
|
event := new(StickerTypeCategorized)
|
|
if err := _StickerType.contract.UnpackLog(event, "Categorized", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeClaimedTokensIterator is returned from FilterClaimedTokens and is used to iterate over the raw logs and unpacked data for ClaimedTokens events raised by the StickerType contract.
|
|
type StickerTypeClaimedTokensIterator struct {
|
|
Event *StickerTypeClaimedTokens // 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 *StickerTypeClaimedTokensIterator) 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(StickerTypeClaimedTokens)
|
|
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(StickerTypeClaimedTokens)
|
|
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 *StickerTypeClaimedTokensIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeClaimedTokensIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeClaimedTokens represents a ClaimedTokens event raised by the StickerType contract.
|
|
type StickerTypeClaimedTokens struct {
|
|
Token common.Address
|
|
Controller common.Address
|
|
Amount *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterClaimedTokens is a free log retrieval operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerType *StickerTypeFilterer) FilterClaimedTokens(opts *bind.FilterOpts, _token []common.Address, _controller []common.Address) (*StickerTypeClaimedTokensIterator, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeClaimedTokensIterator{contract: _StickerType.contract, event: "ClaimedTokens", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchClaimedTokens is a free log subscription operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerType *StickerTypeFilterer) WatchClaimedTokens(opts *bind.WatchOpts, sink chan<- *StickerTypeClaimedTokens, _token []common.Address, _controller []common.Address) (event.Subscription, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
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(StickerTypeClaimedTokens)
|
|
if err := _StickerType.contract.UnpackLog(event, "ClaimedTokens", 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
|
|
}
|
|
|
|
// ParseClaimedTokens is a log parse operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_StickerType *StickerTypeFilterer) ParseClaimedTokens(log types.Log) (*StickerTypeClaimedTokens, error) {
|
|
event := new(StickerTypeClaimedTokens)
|
|
if err := _StickerType.contract.UnpackLog(event, "ClaimedTokens", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeContenthashChangedIterator is returned from FilterContenthashChanged and is used to iterate over the raw logs and unpacked data for ContenthashChanged events raised by the StickerType contract.
|
|
type StickerTypeContenthashChangedIterator struct {
|
|
Event *StickerTypeContenthashChanged // 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 *StickerTypeContenthashChangedIterator) 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(StickerTypeContenthashChanged)
|
|
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(StickerTypeContenthashChanged)
|
|
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 *StickerTypeContenthashChangedIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeContenthashChangedIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeContenthashChanged represents a ContenthashChanged event raised by the StickerType contract.
|
|
type StickerTypeContenthashChanged struct {
|
|
Packid *big.Int
|
|
Contenthash []byte
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterContenthashChanged is a free log retrieval operation binding the contract event 0x6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb9.
|
|
//
|
|
// Solidity: event ContenthashChanged(uint256 indexed packid, bytes contenthash)
|
|
func (_StickerType *StickerTypeFilterer) FilterContenthashChanged(opts *bind.FilterOpts, packid []*big.Int) (*StickerTypeContenthashChangedIterator, error) {
|
|
|
|
var packidRule []interface{}
|
|
for _, packidItem := range packid {
|
|
packidRule = append(packidRule, packidItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "ContenthashChanged", packidRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeContenthashChangedIterator{contract: _StickerType.contract, event: "ContenthashChanged", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchContenthashChanged is a free log subscription operation binding the contract event 0x6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb9.
|
|
//
|
|
// Solidity: event ContenthashChanged(uint256 indexed packid, bytes contenthash)
|
|
func (_StickerType *StickerTypeFilterer) WatchContenthashChanged(opts *bind.WatchOpts, sink chan<- *StickerTypeContenthashChanged, packid []*big.Int) (event.Subscription, error) {
|
|
|
|
var packidRule []interface{}
|
|
for _, packidItem := range packid {
|
|
packidRule = append(packidRule, packidItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "ContenthashChanged", packidRule)
|
|
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(StickerTypeContenthashChanged)
|
|
if err := _StickerType.contract.UnpackLog(event, "ContenthashChanged", 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
|
|
}
|
|
|
|
// ParseContenthashChanged is a log parse operation binding the contract event 0x6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb9.
|
|
//
|
|
// Solidity: event ContenthashChanged(uint256 indexed packid, bytes contenthash)
|
|
func (_StickerType *StickerTypeFilterer) ParseContenthashChanged(log types.Log) (*StickerTypeContenthashChanged, error) {
|
|
event := new(StickerTypeContenthashChanged)
|
|
if err := _StickerType.contract.UnpackLog(event, "ContenthashChanged", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeMintabilityChangedIterator is returned from FilterMintabilityChanged and is used to iterate over the raw logs and unpacked data for MintabilityChanged events raised by the StickerType contract.
|
|
type StickerTypeMintabilityChangedIterator struct {
|
|
Event *StickerTypeMintabilityChanged // 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 *StickerTypeMintabilityChangedIterator) 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(StickerTypeMintabilityChanged)
|
|
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(StickerTypeMintabilityChanged)
|
|
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 *StickerTypeMintabilityChangedIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeMintabilityChangedIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeMintabilityChanged represents a MintabilityChanged event raised by the StickerType contract.
|
|
type StickerTypeMintabilityChanged struct {
|
|
PackId *big.Int
|
|
Mintable bool
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterMintabilityChanged is a free log retrieval operation binding the contract event 0x7a5b9103727f29409c14d2581e9710a1648b1354e667e1c803d4bda045159660.
|
|
//
|
|
// Solidity: event MintabilityChanged(uint256 indexed packId, bool mintable)
|
|
func (_StickerType *StickerTypeFilterer) FilterMintabilityChanged(opts *bind.FilterOpts, packId []*big.Int) (*StickerTypeMintabilityChangedIterator, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "MintabilityChanged", packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeMintabilityChangedIterator{contract: _StickerType.contract, event: "MintabilityChanged", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchMintabilityChanged is a free log subscription operation binding the contract event 0x7a5b9103727f29409c14d2581e9710a1648b1354e667e1c803d4bda045159660.
|
|
//
|
|
// Solidity: event MintabilityChanged(uint256 indexed packId, bool mintable)
|
|
func (_StickerType *StickerTypeFilterer) WatchMintabilityChanged(opts *bind.WatchOpts, sink chan<- *StickerTypeMintabilityChanged, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "MintabilityChanged", packIdRule)
|
|
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(StickerTypeMintabilityChanged)
|
|
if err := _StickerType.contract.UnpackLog(event, "MintabilityChanged", 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
|
|
}
|
|
|
|
// ParseMintabilityChanged is a log parse operation binding the contract event 0x7a5b9103727f29409c14d2581e9710a1648b1354e667e1c803d4bda045159660.
|
|
//
|
|
// Solidity: event MintabilityChanged(uint256 indexed packId, bool mintable)
|
|
func (_StickerType *StickerTypeFilterer) ParseMintabilityChanged(log types.Log) (*StickerTypeMintabilityChanged, error) {
|
|
event := new(StickerTypeMintabilityChanged)
|
|
if err := _StickerType.contract.UnpackLog(event, "MintabilityChanged", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeNewControllerIterator is returned from FilterNewController and is used to iterate over the raw logs and unpacked data for NewController events raised by the StickerType contract.
|
|
type StickerTypeNewControllerIterator struct {
|
|
Event *StickerTypeNewController // 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 *StickerTypeNewControllerIterator) 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(StickerTypeNewController)
|
|
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(StickerTypeNewController)
|
|
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 *StickerTypeNewControllerIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeNewControllerIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeNewController represents a NewController event raised by the StickerType contract.
|
|
type StickerTypeNewController struct {
|
|
Controller common.Address
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterNewController is a free log retrieval operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerType *StickerTypeFilterer) FilterNewController(opts *bind.FilterOpts) (*StickerTypeNewControllerIterator, error) {
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "NewController")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeNewControllerIterator{contract: _StickerType.contract, event: "NewController", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchNewController is a free log subscription operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerType *StickerTypeFilterer) WatchNewController(opts *bind.WatchOpts, sink chan<- *StickerTypeNewController) (event.Subscription, error) {
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "NewController")
|
|
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(StickerTypeNewController)
|
|
if err := _StickerType.contract.UnpackLog(event, "NewController", 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
|
|
}
|
|
|
|
// ParseNewController is a log parse operation binding the contract event 0xe253457d9ad994ca9682fc3bbc38c890dca73a2d5ecee3809e548bac8b00d7c6.
|
|
//
|
|
// Solidity: event NewController(address controller)
|
|
func (_StickerType *StickerTypeFilterer) ParseNewController(log types.Log) (*StickerTypeNewController, error) {
|
|
event := new(StickerTypeNewController)
|
|
if err := _StickerType.contract.UnpackLog(event, "NewController", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypePriceChangedIterator is returned from FilterPriceChanged and is used to iterate over the raw logs and unpacked data for PriceChanged events raised by the StickerType contract.
|
|
type StickerTypePriceChangedIterator struct {
|
|
Event *StickerTypePriceChanged // 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 *StickerTypePriceChangedIterator) 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(StickerTypePriceChanged)
|
|
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(StickerTypePriceChanged)
|
|
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 *StickerTypePriceChangedIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypePriceChangedIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypePriceChanged represents a PriceChanged event raised by the StickerType contract.
|
|
type StickerTypePriceChanged struct {
|
|
PackId *big.Int
|
|
DataPrice *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterPriceChanged is a free log retrieval operation binding the contract event 0x8aa4fa52648a6d15edce8a179c792c86f3719d0cc3c572cf90f91948f0f2cb68.
|
|
//
|
|
// Solidity: event PriceChanged(uint256 indexed packId, uint256 dataPrice)
|
|
func (_StickerType *StickerTypeFilterer) FilterPriceChanged(opts *bind.FilterOpts, packId []*big.Int) (*StickerTypePriceChangedIterator, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "PriceChanged", packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypePriceChangedIterator{contract: _StickerType.contract, event: "PriceChanged", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchPriceChanged is a free log subscription operation binding the contract event 0x8aa4fa52648a6d15edce8a179c792c86f3719d0cc3c572cf90f91948f0f2cb68.
|
|
//
|
|
// Solidity: event PriceChanged(uint256 indexed packId, uint256 dataPrice)
|
|
func (_StickerType *StickerTypeFilterer) WatchPriceChanged(opts *bind.WatchOpts, sink chan<- *StickerTypePriceChanged, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "PriceChanged", packIdRule)
|
|
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(StickerTypePriceChanged)
|
|
if err := _StickerType.contract.UnpackLog(event, "PriceChanged", 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
|
|
}
|
|
|
|
// ParsePriceChanged is a log parse operation binding the contract event 0x8aa4fa52648a6d15edce8a179c792c86f3719d0cc3c572cf90f91948f0f2cb68.
|
|
//
|
|
// Solidity: event PriceChanged(uint256 indexed packId, uint256 dataPrice)
|
|
func (_StickerType *StickerTypeFilterer) ParsePriceChanged(log types.Log) (*StickerTypePriceChanged, error) {
|
|
event := new(StickerTypePriceChanged)
|
|
if err := _StickerType.contract.UnpackLog(event, "PriceChanged", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeRegisterIterator is returned from FilterRegister and is used to iterate over the raw logs and unpacked data for Register events raised by the StickerType contract.
|
|
type StickerTypeRegisterIterator struct {
|
|
Event *StickerTypeRegister // 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 *StickerTypeRegisterIterator) 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(StickerTypeRegister)
|
|
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(StickerTypeRegister)
|
|
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 *StickerTypeRegisterIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeRegisterIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeRegister represents a Register event raised by the StickerType contract.
|
|
type StickerTypeRegister struct {
|
|
PackId *big.Int
|
|
DataPrice *big.Int
|
|
Contenthash []byte
|
|
Mintable bool
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterRegister is a free log retrieval operation binding the contract event 0x8304dd8a0ecd1927e64564792f1147f0aca02ba211e48c2981bf7244a9877975.
|
|
//
|
|
// Solidity: event Register(uint256 indexed packId, uint256 dataPrice, bytes contenthash, bool mintable)
|
|
func (_StickerType *StickerTypeFilterer) FilterRegister(opts *bind.FilterOpts, packId []*big.Int) (*StickerTypeRegisterIterator, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "Register", packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeRegisterIterator{contract: _StickerType.contract, event: "Register", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchRegister is a free log subscription operation binding the contract event 0x8304dd8a0ecd1927e64564792f1147f0aca02ba211e48c2981bf7244a9877975.
|
|
//
|
|
// Solidity: event Register(uint256 indexed packId, uint256 dataPrice, bytes contenthash, bool mintable)
|
|
func (_StickerType *StickerTypeFilterer) WatchRegister(opts *bind.WatchOpts, sink chan<- *StickerTypeRegister, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "Register", packIdRule)
|
|
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(StickerTypeRegister)
|
|
if err := _StickerType.contract.UnpackLog(event, "Register", 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
|
|
}
|
|
|
|
// ParseRegister is a log parse operation binding the contract event 0x8304dd8a0ecd1927e64564792f1147f0aca02ba211e48c2981bf7244a9877975.
|
|
//
|
|
// Solidity: event Register(uint256 indexed packId, uint256 dataPrice, bytes contenthash, bool mintable)
|
|
func (_StickerType *StickerTypeFilterer) ParseRegister(log types.Log) (*StickerTypeRegister, error) {
|
|
event := new(StickerTypeRegister)
|
|
if err := _StickerType.contract.UnpackLog(event, "Register", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the StickerType contract.
|
|
type StickerTypeTransferIterator struct {
|
|
Event *StickerTypeTransfer // 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 *StickerTypeTransferIterator) 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(StickerTypeTransfer)
|
|
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(StickerTypeTransfer)
|
|
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 *StickerTypeTransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeTransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeTransfer represents a Transfer event raised by the StickerType contract.
|
|
type StickerTypeTransfer 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 (_StickerType *StickerTypeFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*StickerTypeTransferIterator, 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 := _StickerType.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeTransferIterator{contract: _StickerType.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 (_StickerType *StickerTypeFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *StickerTypeTransfer, 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 := _StickerType.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(StickerTypeTransfer)
|
|
if err := _StickerType.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 (_StickerType *StickerTypeFilterer) ParseTransfer(log types.Log) (*StickerTypeTransfer, error) {
|
|
event := new(StickerTypeTransfer)
|
|
if err := _StickerType.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeUncategorizedIterator is returned from FilterUncategorized and is used to iterate over the raw logs and unpacked data for Uncategorized events raised by the StickerType contract.
|
|
type StickerTypeUncategorizedIterator struct {
|
|
Event *StickerTypeUncategorized // 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 *StickerTypeUncategorizedIterator) 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(StickerTypeUncategorized)
|
|
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(StickerTypeUncategorized)
|
|
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 *StickerTypeUncategorizedIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeUncategorizedIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeUncategorized represents a Uncategorized event raised by the StickerType contract.
|
|
type StickerTypeUncategorized struct {
|
|
Category [4]byte
|
|
PackId *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterUncategorized is a free log retrieval operation binding the contract event 0x9574a9d09dc883e69228a0eea15ed4da6e520b13cc84cca994c1787c234d78fe.
|
|
//
|
|
// Solidity: event Uncategorized(bytes4 indexed category, uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) FilterUncategorized(opts *bind.FilterOpts, category [][4]byte, packId []*big.Int) (*StickerTypeUncategorizedIterator, error) {
|
|
|
|
var categoryRule []interface{}
|
|
for _, categoryItem := range category {
|
|
categoryRule = append(categoryRule, categoryItem)
|
|
}
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "Uncategorized", categoryRule, packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeUncategorizedIterator{contract: _StickerType.contract, event: "Uncategorized", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchUncategorized is a free log subscription operation binding the contract event 0x9574a9d09dc883e69228a0eea15ed4da6e520b13cc84cca994c1787c234d78fe.
|
|
//
|
|
// Solidity: event Uncategorized(bytes4 indexed category, uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) WatchUncategorized(opts *bind.WatchOpts, sink chan<- *StickerTypeUncategorized, category [][4]byte, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var categoryRule []interface{}
|
|
for _, categoryItem := range category {
|
|
categoryRule = append(categoryRule, categoryItem)
|
|
}
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "Uncategorized", categoryRule, packIdRule)
|
|
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(StickerTypeUncategorized)
|
|
if err := _StickerType.contract.UnpackLog(event, "Uncategorized", 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
|
|
}
|
|
|
|
// ParseUncategorized is a log parse operation binding the contract event 0x9574a9d09dc883e69228a0eea15ed4da6e520b13cc84cca994c1787c234d78fe.
|
|
//
|
|
// Solidity: event Uncategorized(bytes4 indexed category, uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) ParseUncategorized(log types.Log) (*StickerTypeUncategorized, error) {
|
|
event := new(StickerTypeUncategorized)
|
|
if err := _StickerType.contract.UnpackLog(event, "Uncategorized", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// StickerTypeUnregisterIterator is returned from FilterUnregister and is used to iterate over the raw logs and unpacked data for Unregister events raised by the StickerType contract.
|
|
type StickerTypeUnregisterIterator struct {
|
|
Event *StickerTypeUnregister // 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 *StickerTypeUnregisterIterator) 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(StickerTypeUnregister)
|
|
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(StickerTypeUnregister)
|
|
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 *StickerTypeUnregisterIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *StickerTypeUnregisterIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// StickerTypeUnregister represents a Unregister event raised by the StickerType contract.
|
|
type StickerTypeUnregister struct {
|
|
PackId *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterUnregister is a free log retrieval operation binding the contract event 0x98f986773731debbbf041b73d7edaec62da3ff42b2116c45cd0001fb40ed9086.
|
|
//
|
|
// Solidity: event Unregister(uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) FilterUnregister(opts *bind.FilterOpts, packId []*big.Int) (*StickerTypeUnregisterIterator, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.FilterLogs(opts, "Unregister", packIdRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &StickerTypeUnregisterIterator{contract: _StickerType.contract, event: "Unregister", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchUnregister is a free log subscription operation binding the contract event 0x98f986773731debbbf041b73d7edaec62da3ff42b2116c45cd0001fb40ed9086.
|
|
//
|
|
// Solidity: event Unregister(uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) WatchUnregister(opts *bind.WatchOpts, sink chan<- *StickerTypeUnregister, packId []*big.Int) (event.Subscription, error) {
|
|
|
|
var packIdRule []interface{}
|
|
for _, packIdItem := range packId {
|
|
packIdRule = append(packIdRule, packIdItem)
|
|
}
|
|
|
|
logs, sub, err := _StickerType.contract.WatchLogs(opts, "Unregister", packIdRule)
|
|
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(StickerTypeUnregister)
|
|
if err := _StickerType.contract.UnpackLog(event, "Unregister", 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
|
|
}
|
|
|
|
// ParseUnregister is a log parse operation binding the contract event 0x98f986773731debbbf041b73d7edaec62da3ff42b2116c45cd0001fb40ed9086.
|
|
//
|
|
// Solidity: event Unregister(uint256 indexed packId)
|
|
func (_StickerType *StickerTypeFilterer) ParseUnregister(log types.Log) (*StickerTypeUnregister, error) {
|
|
event := new(StickerTypeUnregister)
|
|
if err := _StickerType.contract.UnpackLog(event, "Unregister", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// TokenClaimerABI is the input ABI used to generate the binding from.
|
|
const TokenClaimerABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_controller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ClaimedTokens\",\"type\":\"event\"}]"
|
|
|
|
// TokenClaimerFuncSigs maps the 4-byte function signature to its string representation.
|
|
var TokenClaimerFuncSigs = map[string]string{
|
|
"df8de3e7": "claimTokens(address)",
|
|
}
|
|
|
|
// TokenClaimer is an auto generated Go binding around an Ethereum contract.
|
|
type TokenClaimer struct {
|
|
TokenClaimerCaller // Read-only binding to the contract
|
|
TokenClaimerTransactor // Write-only binding to the contract
|
|
TokenClaimerFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// TokenClaimerCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type TokenClaimerCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TokenClaimerTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type TokenClaimerTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TokenClaimerFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type TokenClaimerFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TokenClaimerSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type TokenClaimerSession struct {
|
|
Contract *TokenClaimer // 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
|
|
}
|
|
|
|
// TokenClaimerCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type TokenClaimerCallerSession struct {
|
|
Contract *TokenClaimerCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// TokenClaimerTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type TokenClaimerTransactorSession struct {
|
|
Contract *TokenClaimerTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// TokenClaimerRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type TokenClaimerRaw struct {
|
|
Contract *TokenClaimer // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// TokenClaimerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type TokenClaimerCallerRaw struct {
|
|
Contract *TokenClaimerCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// TokenClaimerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type TokenClaimerTransactorRaw struct {
|
|
Contract *TokenClaimerTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewTokenClaimer creates a new instance of TokenClaimer, bound to a specific deployed contract.
|
|
func NewTokenClaimer(address common.Address, backend bind.ContractBackend) (*TokenClaimer, error) {
|
|
contract, err := bindTokenClaimer(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenClaimer{TokenClaimerCaller: TokenClaimerCaller{contract: contract}, TokenClaimerTransactor: TokenClaimerTransactor{contract: contract}, TokenClaimerFilterer: TokenClaimerFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewTokenClaimerCaller creates a new read-only instance of TokenClaimer, bound to a specific deployed contract.
|
|
func NewTokenClaimerCaller(address common.Address, caller bind.ContractCaller) (*TokenClaimerCaller, error) {
|
|
contract, err := bindTokenClaimer(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenClaimerCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewTokenClaimerTransactor creates a new write-only instance of TokenClaimer, bound to a specific deployed contract.
|
|
func NewTokenClaimerTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenClaimerTransactor, error) {
|
|
contract, err := bindTokenClaimer(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenClaimerTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewTokenClaimerFilterer creates a new log filterer instance of TokenClaimer, bound to a specific deployed contract.
|
|
func NewTokenClaimerFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenClaimerFilterer, error) {
|
|
contract, err := bindTokenClaimer(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenClaimerFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindTokenClaimer binds a generic wrapper to an already deployed contract.
|
|
func bindTokenClaimer(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(TokenClaimerABI))
|
|
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 (_TokenClaimer *TokenClaimerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _TokenClaimer.Contract.TokenClaimerCaller.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 (_TokenClaimer *TokenClaimerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _TokenClaimer.Contract.TokenClaimerTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_TokenClaimer *TokenClaimerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _TokenClaimer.Contract.TokenClaimerTransactor.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 (_TokenClaimer *TokenClaimerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _TokenClaimer.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 (_TokenClaimer *TokenClaimerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _TokenClaimer.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_TokenClaimer *TokenClaimerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _TokenClaimer.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_TokenClaimer *TokenClaimerTransactor) ClaimTokens(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) {
|
|
return _TokenClaimer.contract.Transact(opts, "claimTokens", _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_TokenClaimer *TokenClaimerSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _TokenClaimer.Contract.ClaimTokens(&_TokenClaimer.TransactOpts, _token)
|
|
}
|
|
|
|
// ClaimTokens is a paid mutator transaction binding the contract method 0xdf8de3e7.
|
|
//
|
|
// Solidity: function claimTokens(address _token) returns()
|
|
func (_TokenClaimer *TokenClaimerTransactorSession) ClaimTokens(_token common.Address) (*types.Transaction, error) {
|
|
return _TokenClaimer.Contract.ClaimTokens(&_TokenClaimer.TransactOpts, _token)
|
|
}
|
|
|
|
// TokenClaimerClaimedTokensIterator is returned from FilterClaimedTokens and is used to iterate over the raw logs and unpacked data for ClaimedTokens events raised by the TokenClaimer contract.
|
|
type TokenClaimerClaimedTokensIterator struct {
|
|
Event *TokenClaimerClaimedTokens // 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 *TokenClaimerClaimedTokensIterator) 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(TokenClaimerClaimedTokens)
|
|
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(TokenClaimerClaimedTokens)
|
|
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 *TokenClaimerClaimedTokensIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *TokenClaimerClaimedTokensIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// TokenClaimerClaimedTokens represents a ClaimedTokens event raised by the TokenClaimer contract.
|
|
type TokenClaimerClaimedTokens struct {
|
|
Token common.Address
|
|
Controller common.Address
|
|
Amount *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterClaimedTokens is a free log retrieval operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_TokenClaimer *TokenClaimerFilterer) FilterClaimedTokens(opts *bind.FilterOpts, _token []common.Address, _controller []common.Address) (*TokenClaimerClaimedTokensIterator, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _TokenClaimer.contract.FilterLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenClaimerClaimedTokensIterator{contract: _TokenClaimer.contract, event: "ClaimedTokens", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchClaimedTokens is a free log subscription operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_TokenClaimer *TokenClaimerFilterer) WatchClaimedTokens(opts *bind.WatchOpts, sink chan<- *TokenClaimerClaimedTokens, _token []common.Address, _controller []common.Address) (event.Subscription, error) {
|
|
|
|
var _tokenRule []interface{}
|
|
for _, _tokenItem := range _token {
|
|
_tokenRule = append(_tokenRule, _tokenItem)
|
|
}
|
|
var _controllerRule []interface{}
|
|
for _, _controllerItem := range _controller {
|
|
_controllerRule = append(_controllerRule, _controllerItem)
|
|
}
|
|
|
|
logs, sub, err := _TokenClaimer.contract.WatchLogs(opts, "ClaimedTokens", _tokenRule, _controllerRule)
|
|
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(TokenClaimerClaimedTokens)
|
|
if err := _TokenClaimer.contract.UnpackLog(event, "ClaimedTokens", 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
|
|
}
|
|
|
|
// ParseClaimedTokens is a log parse operation binding the contract event 0xf931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c.
|
|
//
|
|
// Solidity: event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount)
|
|
func (_TokenClaimer *TokenClaimerFilterer) ParseClaimedTokens(log types.Log) (*TokenClaimerClaimedTokens, error) {
|
|
event := new(TokenClaimerClaimedTokens)
|
|
if err := _TokenClaimer.contract.UnpackLog(event, "ClaimedTokens", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|