github.com/status-im/status-go@v1.1.0/contracts/ierc1155/ierc1155.go (about) 1 // Code generated - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package ierc1155 5 6 import ( 7 "errors" 8 "math/big" 9 "strings" 10 11 ethereum "github.com/ethereum/go-ethereum" 12 "github.com/ethereum/go-ethereum/accounts/abi" 13 "github.com/ethereum/go-ethereum/accounts/abi/bind" 14 "github.com/ethereum/go-ethereum/common" 15 "github.com/ethereum/go-ethereum/core/types" 16 "github.com/ethereum/go-ethereum/event" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var ( 21 _ = errors.New 22 _ = big.NewInt 23 _ = strings.NewReader 24 _ = ethereum.NotFound 25 _ = bind.Bind 26 _ = common.Big1 27 _ = types.BloomLookup 28 _ = event.NewSubscription 29 _ = abi.ConvertType 30 ) 31 32 // Ierc1155MetaData contains all meta data concerning the Ierc1155 contract. 33 var Ierc1155MetaData = &bind.MetaData{ 34 ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", 35 } 36 37 // Ierc1155ABI is the input ABI used to generate the binding from. 38 // Deprecated: Use Ierc1155MetaData.ABI instead. 39 var Ierc1155ABI = Ierc1155MetaData.ABI 40 41 // Ierc1155 is an auto generated Go binding around an Ethereum contract. 42 type Ierc1155 struct { 43 Ierc1155Caller // Read-only binding to the contract 44 Ierc1155Transactor // Write-only binding to the contract 45 Ierc1155Filterer // Log filterer for contract events 46 } 47 48 // Ierc1155Caller is an auto generated read-only Go binding around an Ethereum contract. 49 type Ierc1155Caller struct { 50 contract *bind.BoundContract // Generic contract wrapper for the low level calls 51 } 52 53 // Ierc1155Transactor is an auto generated write-only Go binding around an Ethereum contract. 54 type Ierc1155Transactor struct { 55 contract *bind.BoundContract // Generic contract wrapper for the low level calls 56 } 57 58 // Ierc1155Filterer is an auto generated log filtering Go binding around an Ethereum contract events. 59 type Ierc1155Filterer struct { 60 contract *bind.BoundContract // Generic contract wrapper for the low level calls 61 } 62 63 // Ierc1155Session is an auto generated Go binding around an Ethereum contract, 64 // with pre-set call and transact options. 65 type Ierc1155Session struct { 66 Contract *Ierc1155 // Generic contract binding to set the session for 67 CallOpts bind.CallOpts // Call options to use throughout this session 68 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 69 } 70 71 // Ierc1155CallerSession is an auto generated read-only Go binding around an Ethereum contract, 72 // with pre-set call options. 73 type Ierc1155CallerSession struct { 74 Contract *Ierc1155Caller // Generic contract caller binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 } 77 78 // Ierc1155TransactorSession is an auto generated write-only Go binding around an Ethereum contract, 79 // with pre-set transact options. 80 type Ierc1155TransactorSession struct { 81 Contract *Ierc1155Transactor // Generic contract transactor binding to set the session for 82 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 83 } 84 85 // Ierc1155Raw is an auto generated low-level Go binding around an Ethereum contract. 86 type Ierc1155Raw struct { 87 Contract *Ierc1155 // Generic contract binding to access the raw methods on 88 } 89 90 // Ierc1155CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 91 type Ierc1155CallerRaw struct { 92 Contract *Ierc1155Caller // Generic read-only contract binding to access the raw methods on 93 } 94 95 // Ierc1155TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 96 type Ierc1155TransactorRaw struct { 97 Contract *Ierc1155Transactor // Generic write-only contract binding to access the raw methods on 98 } 99 100 // NewIerc1155 creates a new instance of Ierc1155, bound to a specific deployed contract. 101 func NewIerc1155(address common.Address, backend bind.ContractBackend) (*Ierc1155, error) { 102 contract, err := bindIerc1155(address, backend, backend, backend) 103 if err != nil { 104 return nil, err 105 } 106 return &Ierc1155{Ierc1155Caller: Ierc1155Caller{contract: contract}, Ierc1155Transactor: Ierc1155Transactor{contract: contract}, Ierc1155Filterer: Ierc1155Filterer{contract: contract}}, nil 107 } 108 109 // NewIerc1155Caller creates a new read-only instance of Ierc1155, bound to a specific deployed contract. 110 func NewIerc1155Caller(address common.Address, caller bind.ContractCaller) (*Ierc1155Caller, error) { 111 contract, err := bindIerc1155(address, caller, nil, nil) 112 if err != nil { 113 return nil, err 114 } 115 return &Ierc1155Caller{contract: contract}, nil 116 } 117 118 // NewIerc1155Transactor creates a new write-only instance of Ierc1155, bound to a specific deployed contract. 119 func NewIerc1155Transactor(address common.Address, transactor bind.ContractTransactor) (*Ierc1155Transactor, error) { 120 contract, err := bindIerc1155(address, nil, transactor, nil) 121 if err != nil { 122 return nil, err 123 } 124 return &Ierc1155Transactor{contract: contract}, nil 125 } 126 127 // NewIerc1155Filterer creates a new log filterer instance of Ierc1155, bound to a specific deployed contract. 128 func NewIerc1155Filterer(address common.Address, filterer bind.ContractFilterer) (*Ierc1155Filterer, error) { 129 contract, err := bindIerc1155(address, nil, nil, filterer) 130 if err != nil { 131 return nil, err 132 } 133 return &Ierc1155Filterer{contract: contract}, nil 134 } 135 136 // bindIerc1155 binds a generic wrapper to an already deployed contract. 137 func bindIerc1155(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 138 parsed, err := Ierc1155MetaData.GetAbi() 139 if err != nil { 140 return nil, err 141 } 142 return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil 143 } 144 145 // Call invokes the (constant) contract method with params as input values and 146 // sets the output to result. The result type might be a single field for simple 147 // returns, a slice of interfaces for anonymous returns and a struct for named 148 // returns. 149 func (_Ierc1155 *Ierc1155Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 150 return _Ierc1155.Contract.Ierc1155Caller.contract.Call(opts, result, method, params...) 151 } 152 153 // Transfer initiates a plain transaction to move funds to the contract, calling 154 // its default method if one is available. 155 func (_Ierc1155 *Ierc1155Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 156 return _Ierc1155.Contract.Ierc1155Transactor.contract.Transfer(opts) 157 } 158 159 // Transact invokes the (paid) contract method with params as input values. 160 func (_Ierc1155 *Ierc1155Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 161 return _Ierc1155.Contract.Ierc1155Transactor.contract.Transact(opts, method, params...) 162 } 163 164 // Call invokes the (constant) contract method with params as input values and 165 // sets the output to result. The result type might be a single field for simple 166 // returns, a slice of interfaces for anonymous returns and a struct for named 167 // returns. 168 func (_Ierc1155 *Ierc1155CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 169 return _Ierc1155.Contract.contract.Call(opts, result, method, params...) 170 } 171 172 // Transfer initiates a plain transaction to move funds to the contract, calling 173 // its default method if one is available. 174 func (_Ierc1155 *Ierc1155TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 175 return _Ierc1155.Contract.contract.Transfer(opts) 176 } 177 178 // Transact invokes the (paid) contract method with params as input values. 179 func (_Ierc1155 *Ierc1155TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 180 return _Ierc1155.Contract.contract.Transact(opts, method, params...) 181 } 182 183 // BalanceOf is a free data retrieval call binding the contract method 0x00fdd58e. 184 // 185 // Solidity: function balanceOf(address _owner, uint256 _id) view returns(uint256) 186 func (_Ierc1155 *Ierc1155Caller) BalanceOf(opts *bind.CallOpts, _owner common.Address, _id *big.Int) (*big.Int, error) { 187 var out []interface{} 188 err := _Ierc1155.contract.Call(opts, &out, "balanceOf", _owner, _id) 189 190 if err != nil { 191 return *new(*big.Int), err 192 } 193 194 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 195 196 return out0, err 197 198 } 199 200 // BalanceOf is a free data retrieval call binding the contract method 0x00fdd58e. 201 // 202 // Solidity: function balanceOf(address _owner, uint256 _id) view returns(uint256) 203 func (_Ierc1155 *Ierc1155Session) BalanceOf(_owner common.Address, _id *big.Int) (*big.Int, error) { 204 return _Ierc1155.Contract.BalanceOf(&_Ierc1155.CallOpts, _owner, _id) 205 } 206 207 // BalanceOf is a free data retrieval call binding the contract method 0x00fdd58e. 208 // 209 // Solidity: function balanceOf(address _owner, uint256 _id) view returns(uint256) 210 func (_Ierc1155 *Ierc1155CallerSession) BalanceOf(_owner common.Address, _id *big.Int) (*big.Int, error) { 211 return _Ierc1155.Contract.BalanceOf(&_Ierc1155.CallOpts, _owner, _id) 212 } 213 214 // BalanceOfBatch is a free data retrieval call binding the contract method 0x4e1273f4. 215 // 216 // Solidity: function balanceOfBatch(address[] _owners, uint256[] _ids) view returns(uint256[]) 217 func (_Ierc1155 *Ierc1155Caller) BalanceOfBatch(opts *bind.CallOpts, _owners []common.Address, _ids []*big.Int) ([]*big.Int, error) { 218 var out []interface{} 219 err := _Ierc1155.contract.Call(opts, &out, "balanceOfBatch", _owners, _ids) 220 221 if err != nil { 222 return *new([]*big.Int), err 223 } 224 225 out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) 226 227 return out0, err 228 229 } 230 231 // BalanceOfBatch is a free data retrieval call binding the contract method 0x4e1273f4. 232 // 233 // Solidity: function balanceOfBatch(address[] _owners, uint256[] _ids) view returns(uint256[]) 234 func (_Ierc1155 *Ierc1155Session) BalanceOfBatch(_owners []common.Address, _ids []*big.Int) ([]*big.Int, error) { 235 return _Ierc1155.Contract.BalanceOfBatch(&_Ierc1155.CallOpts, _owners, _ids) 236 } 237 238 // BalanceOfBatch is a free data retrieval call binding the contract method 0x4e1273f4. 239 // 240 // Solidity: function balanceOfBatch(address[] _owners, uint256[] _ids) view returns(uint256[]) 241 func (_Ierc1155 *Ierc1155CallerSession) BalanceOfBatch(_owners []common.Address, _ids []*big.Int) ([]*big.Int, error) { 242 return _Ierc1155.Contract.BalanceOfBatch(&_Ierc1155.CallOpts, _owners, _ids) 243 } 244 245 // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. 246 // 247 // Solidity: function isApprovedForAll(address _owner, address _operator) view returns(bool) 248 func (_Ierc1155 *Ierc1155Caller) IsApprovedForAll(opts *bind.CallOpts, _owner common.Address, _operator common.Address) (bool, error) { 249 var out []interface{} 250 err := _Ierc1155.contract.Call(opts, &out, "isApprovedForAll", _owner, _operator) 251 252 if err != nil { 253 return *new(bool), err 254 } 255 256 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 257 258 return out0, err 259 260 } 261 262 // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. 263 // 264 // Solidity: function isApprovedForAll(address _owner, address _operator) view returns(bool) 265 func (_Ierc1155 *Ierc1155Session) IsApprovedForAll(_owner common.Address, _operator common.Address) (bool, error) { 266 return _Ierc1155.Contract.IsApprovedForAll(&_Ierc1155.CallOpts, _owner, _operator) 267 } 268 269 // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. 270 // 271 // Solidity: function isApprovedForAll(address _owner, address _operator) view returns(bool) 272 func (_Ierc1155 *Ierc1155CallerSession) IsApprovedForAll(_owner common.Address, _operator common.Address) (bool, error) { 273 return _Ierc1155.Contract.IsApprovedForAll(&_Ierc1155.CallOpts, _owner, _operator) 274 } 275 276 // SafeBatchTransferFrom is a paid mutator transaction binding the contract method 0x2eb2c2d6. 277 // 278 // Solidity: function safeBatchTransferFrom(address _from, address _to, uint256[] _ids, uint256[] _values, bytes _data) returns() 279 func (_Ierc1155 *Ierc1155Transactor) SafeBatchTransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _ids []*big.Int, _values []*big.Int, _data []byte) (*types.Transaction, error) { 280 return _Ierc1155.contract.Transact(opts, "safeBatchTransferFrom", _from, _to, _ids, _values, _data) 281 } 282 283 // SafeBatchTransferFrom is a paid mutator transaction binding the contract method 0x2eb2c2d6. 284 // 285 // Solidity: function safeBatchTransferFrom(address _from, address _to, uint256[] _ids, uint256[] _values, bytes _data) returns() 286 func (_Ierc1155 *Ierc1155Session) SafeBatchTransferFrom(_from common.Address, _to common.Address, _ids []*big.Int, _values []*big.Int, _data []byte) (*types.Transaction, error) { 287 return _Ierc1155.Contract.SafeBatchTransferFrom(&_Ierc1155.TransactOpts, _from, _to, _ids, _values, _data) 288 } 289 290 // SafeBatchTransferFrom is a paid mutator transaction binding the contract method 0x2eb2c2d6. 291 // 292 // Solidity: function safeBatchTransferFrom(address _from, address _to, uint256[] _ids, uint256[] _values, bytes _data) returns() 293 func (_Ierc1155 *Ierc1155TransactorSession) SafeBatchTransferFrom(_from common.Address, _to common.Address, _ids []*big.Int, _values []*big.Int, _data []byte) (*types.Transaction, error) { 294 return _Ierc1155.Contract.SafeBatchTransferFrom(&_Ierc1155.TransactOpts, _from, _to, _ids, _values, _data) 295 } 296 297 // SafeTransferFrom is a paid mutator transaction binding the contract method 0xf242432a. 298 // 299 // Solidity: function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes _data) returns() 300 func (_Ierc1155 *Ierc1155Transactor) SafeTransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _id *big.Int, _value *big.Int, _data []byte) (*types.Transaction, error) { 301 return _Ierc1155.contract.Transact(opts, "safeTransferFrom", _from, _to, _id, _value, _data) 302 } 303 304 // SafeTransferFrom is a paid mutator transaction binding the contract method 0xf242432a. 305 // 306 // Solidity: function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes _data) returns() 307 func (_Ierc1155 *Ierc1155Session) SafeTransferFrom(_from common.Address, _to common.Address, _id *big.Int, _value *big.Int, _data []byte) (*types.Transaction, error) { 308 return _Ierc1155.Contract.SafeTransferFrom(&_Ierc1155.TransactOpts, _from, _to, _id, _value, _data) 309 } 310 311 // SafeTransferFrom is a paid mutator transaction binding the contract method 0xf242432a. 312 // 313 // Solidity: function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes _data) returns() 314 func (_Ierc1155 *Ierc1155TransactorSession) SafeTransferFrom(_from common.Address, _to common.Address, _id *big.Int, _value *big.Int, _data []byte) (*types.Transaction, error) { 315 return _Ierc1155.Contract.SafeTransferFrom(&_Ierc1155.TransactOpts, _from, _to, _id, _value, _data) 316 } 317 318 // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. 319 // 320 // Solidity: function setApprovalForAll(address _operator, bool _approved) returns() 321 func (_Ierc1155 *Ierc1155Transactor) SetApprovalForAll(opts *bind.TransactOpts, _operator common.Address, _approved bool) (*types.Transaction, error) { 322 return _Ierc1155.contract.Transact(opts, "setApprovalForAll", _operator, _approved) 323 } 324 325 // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. 326 // 327 // Solidity: function setApprovalForAll(address _operator, bool _approved) returns() 328 func (_Ierc1155 *Ierc1155Session) SetApprovalForAll(_operator common.Address, _approved bool) (*types.Transaction, error) { 329 return _Ierc1155.Contract.SetApprovalForAll(&_Ierc1155.TransactOpts, _operator, _approved) 330 } 331 332 // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. 333 // 334 // Solidity: function setApprovalForAll(address _operator, bool _approved) returns() 335 func (_Ierc1155 *Ierc1155TransactorSession) SetApprovalForAll(_operator common.Address, _approved bool) (*types.Transaction, error) { 336 return _Ierc1155.Contract.SetApprovalForAll(&_Ierc1155.TransactOpts, _operator, _approved) 337 } 338 339 // Ierc1155ApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the Ierc1155 contract. 340 type Ierc1155ApprovalForAllIterator struct { 341 Event *Ierc1155ApprovalForAll // Event containing the contract specifics and raw log 342 343 contract *bind.BoundContract // Generic contract to use for unpacking event data 344 event string // Event name to use for unpacking event data 345 346 logs chan types.Log // Log channel receiving the found contract events 347 sub ethereum.Subscription // Subscription for errors, completion and termination 348 done bool // Whether the subscription completed delivering logs 349 fail error // Occurred error to stop iteration 350 } 351 352 // Next advances the iterator to the subsequent event, returning whether there 353 // are any more events found. In case of a retrieval or parsing error, false is 354 // returned and Error() can be queried for the exact failure. 355 func (it *Ierc1155ApprovalForAllIterator) Next() bool { 356 // If the iterator failed, stop iterating 357 if it.fail != nil { 358 return false 359 } 360 // If the iterator completed, deliver directly whatever's available 361 if it.done { 362 select { 363 case log := <-it.logs: 364 it.Event = new(Ierc1155ApprovalForAll) 365 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 366 it.fail = err 367 return false 368 } 369 it.Event.Raw = log 370 return true 371 372 default: 373 return false 374 } 375 } 376 // Iterator still in progress, wait for either a data or an error event 377 select { 378 case log := <-it.logs: 379 it.Event = new(Ierc1155ApprovalForAll) 380 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 381 it.fail = err 382 return false 383 } 384 it.Event.Raw = log 385 return true 386 387 case err := <-it.sub.Err(): 388 it.done = true 389 it.fail = err 390 return it.Next() 391 } 392 } 393 394 // Error returns any retrieval or parsing error occurred during filtering. 395 func (it *Ierc1155ApprovalForAllIterator) Error() error { 396 return it.fail 397 } 398 399 // Close terminates the iteration process, releasing any pending underlying 400 // resources. 401 func (it *Ierc1155ApprovalForAllIterator) Close() error { 402 it.sub.Unsubscribe() 403 return nil 404 } 405 406 // Ierc1155ApprovalForAll represents a ApprovalForAll event raised by the Ierc1155 contract. 407 type Ierc1155ApprovalForAll struct { 408 Owner common.Address 409 Operator common.Address 410 Approved bool 411 Raw types.Log // Blockchain specific contextual infos 412 } 413 414 // FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. 415 // 416 // Solidity: event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved) 417 func (_Ierc1155 *Ierc1155Filterer) FilterApprovalForAll(opts *bind.FilterOpts, _owner []common.Address, _operator []common.Address) (*Ierc1155ApprovalForAllIterator, error) { 418 419 var _ownerRule []interface{} 420 for _, _ownerItem := range _owner { 421 _ownerRule = append(_ownerRule, _ownerItem) 422 } 423 var _operatorRule []interface{} 424 for _, _operatorItem := range _operator { 425 _operatorRule = append(_operatorRule, _operatorItem) 426 } 427 428 logs, sub, err := _Ierc1155.contract.FilterLogs(opts, "ApprovalForAll", _ownerRule, _operatorRule) 429 if err != nil { 430 return nil, err 431 } 432 return &Ierc1155ApprovalForAllIterator{contract: _Ierc1155.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil 433 } 434 435 // WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. 436 // 437 // Solidity: event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved) 438 func (_Ierc1155 *Ierc1155Filterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *Ierc1155ApprovalForAll, _owner []common.Address, _operator []common.Address) (event.Subscription, error) { 439 440 var _ownerRule []interface{} 441 for _, _ownerItem := range _owner { 442 _ownerRule = append(_ownerRule, _ownerItem) 443 } 444 var _operatorRule []interface{} 445 for _, _operatorItem := range _operator { 446 _operatorRule = append(_operatorRule, _operatorItem) 447 } 448 449 logs, sub, err := _Ierc1155.contract.WatchLogs(opts, "ApprovalForAll", _ownerRule, _operatorRule) 450 if err != nil { 451 return nil, err 452 } 453 return event.NewSubscription(func(quit <-chan struct{}) error { 454 defer sub.Unsubscribe() 455 for { 456 select { 457 case log := <-logs: 458 // New log arrived, parse the event and forward to the user 459 event := new(Ierc1155ApprovalForAll) 460 if err := _Ierc1155.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { 461 return err 462 } 463 event.Raw = log 464 465 select { 466 case sink <- event: 467 case err := <-sub.Err(): 468 return err 469 case <-quit: 470 return nil 471 } 472 case err := <-sub.Err(): 473 return err 474 case <-quit: 475 return nil 476 } 477 } 478 }), nil 479 } 480 481 // ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. 482 // 483 // Solidity: event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved) 484 func (_Ierc1155 *Ierc1155Filterer) ParseApprovalForAll(log types.Log) (*Ierc1155ApprovalForAll, error) { 485 event := new(Ierc1155ApprovalForAll) 486 if err := _Ierc1155.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { 487 return nil, err 488 } 489 event.Raw = log 490 return event, nil 491 } 492 493 // Ierc1155TransferBatchIterator is returned from FilterTransferBatch and is used to iterate over the raw logs and unpacked data for TransferBatch events raised by the Ierc1155 contract. 494 type Ierc1155TransferBatchIterator struct { 495 Event *Ierc1155TransferBatch // Event containing the contract specifics and raw log 496 497 contract *bind.BoundContract // Generic contract to use for unpacking event data 498 event string // Event name to use for unpacking event data 499 500 logs chan types.Log // Log channel receiving the found contract events 501 sub ethereum.Subscription // Subscription for errors, completion and termination 502 done bool // Whether the subscription completed delivering logs 503 fail error // Occurred error to stop iteration 504 } 505 506 // Next advances the iterator to the subsequent event, returning whether there 507 // are any more events found. In case of a retrieval or parsing error, false is 508 // returned and Error() can be queried for the exact failure. 509 func (it *Ierc1155TransferBatchIterator) Next() bool { 510 // If the iterator failed, stop iterating 511 if it.fail != nil { 512 return false 513 } 514 // If the iterator completed, deliver directly whatever's available 515 if it.done { 516 select { 517 case log := <-it.logs: 518 it.Event = new(Ierc1155TransferBatch) 519 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 520 it.fail = err 521 return false 522 } 523 it.Event.Raw = log 524 return true 525 526 default: 527 return false 528 } 529 } 530 // Iterator still in progress, wait for either a data or an error event 531 select { 532 case log := <-it.logs: 533 it.Event = new(Ierc1155TransferBatch) 534 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 535 it.fail = err 536 return false 537 } 538 it.Event.Raw = log 539 return true 540 541 case err := <-it.sub.Err(): 542 it.done = true 543 it.fail = err 544 return it.Next() 545 } 546 } 547 548 // Error returns any retrieval or parsing error occurred during filtering. 549 func (it *Ierc1155TransferBatchIterator) Error() error { 550 return it.fail 551 } 552 553 // Close terminates the iteration process, releasing any pending underlying 554 // resources. 555 func (it *Ierc1155TransferBatchIterator) Close() error { 556 it.sub.Unsubscribe() 557 return nil 558 } 559 560 // Ierc1155TransferBatch represents a TransferBatch event raised by the Ierc1155 contract. 561 type Ierc1155TransferBatch struct { 562 Operator common.Address 563 From common.Address 564 To common.Address 565 Ids []*big.Int 566 Values []*big.Int 567 Raw types.Log // Blockchain specific contextual infos 568 } 569 570 // FilterTransferBatch is a free log retrieval operation binding the contract event 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb. 571 // 572 // Solidity: event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values) 573 func (_Ierc1155 *Ierc1155Filterer) FilterTransferBatch(opts *bind.FilterOpts, _operator []common.Address, _from []common.Address, _to []common.Address) (*Ierc1155TransferBatchIterator, error) { 574 575 var _operatorRule []interface{} 576 for _, _operatorItem := range _operator { 577 _operatorRule = append(_operatorRule, _operatorItem) 578 } 579 var _fromRule []interface{} 580 for _, _fromItem := range _from { 581 _fromRule = append(_fromRule, _fromItem) 582 } 583 var _toRule []interface{} 584 for _, _toItem := range _to { 585 _toRule = append(_toRule, _toItem) 586 } 587 588 logs, sub, err := _Ierc1155.contract.FilterLogs(opts, "TransferBatch", _operatorRule, _fromRule, _toRule) 589 if err != nil { 590 return nil, err 591 } 592 return &Ierc1155TransferBatchIterator{contract: _Ierc1155.contract, event: "TransferBatch", logs: logs, sub: sub}, nil 593 } 594 595 // WatchTransferBatch is a free log subscription operation binding the contract event 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb. 596 // 597 // Solidity: event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values) 598 func (_Ierc1155 *Ierc1155Filterer) WatchTransferBatch(opts *bind.WatchOpts, sink chan<- *Ierc1155TransferBatch, _operator []common.Address, _from []common.Address, _to []common.Address) (event.Subscription, error) { 599 600 var _operatorRule []interface{} 601 for _, _operatorItem := range _operator { 602 _operatorRule = append(_operatorRule, _operatorItem) 603 } 604 var _fromRule []interface{} 605 for _, _fromItem := range _from { 606 _fromRule = append(_fromRule, _fromItem) 607 } 608 var _toRule []interface{} 609 for _, _toItem := range _to { 610 _toRule = append(_toRule, _toItem) 611 } 612 613 logs, sub, err := _Ierc1155.contract.WatchLogs(opts, "TransferBatch", _operatorRule, _fromRule, _toRule) 614 if err != nil { 615 return nil, err 616 } 617 return event.NewSubscription(func(quit <-chan struct{}) error { 618 defer sub.Unsubscribe() 619 for { 620 select { 621 case log := <-logs: 622 // New log arrived, parse the event and forward to the user 623 event := new(Ierc1155TransferBatch) 624 if err := _Ierc1155.contract.UnpackLog(event, "TransferBatch", log); err != nil { 625 return err 626 } 627 event.Raw = log 628 629 select { 630 case sink <- event: 631 case err := <-sub.Err(): 632 return err 633 case <-quit: 634 return nil 635 } 636 case err := <-sub.Err(): 637 return err 638 case <-quit: 639 return nil 640 } 641 } 642 }), nil 643 } 644 645 // ParseTransferBatch is a log parse operation binding the contract event 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb. 646 // 647 // Solidity: event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values) 648 func (_Ierc1155 *Ierc1155Filterer) ParseTransferBatch(log types.Log) (*Ierc1155TransferBatch, error) { 649 event := new(Ierc1155TransferBatch) 650 if err := _Ierc1155.contract.UnpackLog(event, "TransferBatch", log); err != nil { 651 return nil, err 652 } 653 event.Raw = log 654 return event, nil 655 } 656 657 // Ierc1155TransferSingleIterator is returned from FilterTransferSingle and is used to iterate over the raw logs and unpacked data for TransferSingle events raised by the Ierc1155 contract. 658 type Ierc1155TransferSingleIterator struct { 659 Event *Ierc1155TransferSingle // Event containing the contract specifics and raw log 660 661 contract *bind.BoundContract // Generic contract to use for unpacking event data 662 event string // Event name to use for unpacking event data 663 664 logs chan types.Log // Log channel receiving the found contract events 665 sub ethereum.Subscription // Subscription for errors, completion and termination 666 done bool // Whether the subscription completed delivering logs 667 fail error // Occurred error to stop iteration 668 } 669 670 // Next advances the iterator to the subsequent event, returning whether there 671 // are any more events found. In case of a retrieval or parsing error, false is 672 // returned and Error() can be queried for the exact failure. 673 func (it *Ierc1155TransferSingleIterator) Next() bool { 674 // If the iterator failed, stop iterating 675 if it.fail != nil { 676 return false 677 } 678 // If the iterator completed, deliver directly whatever's available 679 if it.done { 680 select { 681 case log := <-it.logs: 682 it.Event = new(Ierc1155TransferSingle) 683 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 684 it.fail = err 685 return false 686 } 687 it.Event.Raw = log 688 return true 689 690 default: 691 return false 692 } 693 } 694 // Iterator still in progress, wait for either a data or an error event 695 select { 696 case log := <-it.logs: 697 it.Event = new(Ierc1155TransferSingle) 698 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 699 it.fail = err 700 return false 701 } 702 it.Event.Raw = log 703 return true 704 705 case err := <-it.sub.Err(): 706 it.done = true 707 it.fail = err 708 return it.Next() 709 } 710 } 711 712 // Error returns any retrieval or parsing error occurred during filtering. 713 func (it *Ierc1155TransferSingleIterator) Error() error { 714 return it.fail 715 } 716 717 // Close terminates the iteration process, releasing any pending underlying 718 // resources. 719 func (it *Ierc1155TransferSingleIterator) Close() error { 720 it.sub.Unsubscribe() 721 return nil 722 } 723 724 // Ierc1155TransferSingle represents a TransferSingle event raised by the Ierc1155 contract. 725 type Ierc1155TransferSingle struct { 726 Operator common.Address 727 From common.Address 728 To common.Address 729 Id *big.Int 730 Value *big.Int 731 Raw types.Log // Blockchain specific contextual infos 732 } 733 734 // FilterTransferSingle is a free log retrieval operation binding the contract event 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62. 735 // 736 // Solidity: event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value) 737 func (_Ierc1155 *Ierc1155Filterer) FilterTransferSingle(opts *bind.FilterOpts, _operator []common.Address, _from []common.Address, _to []common.Address) (*Ierc1155TransferSingleIterator, error) { 738 739 var _operatorRule []interface{} 740 for _, _operatorItem := range _operator { 741 _operatorRule = append(_operatorRule, _operatorItem) 742 } 743 var _fromRule []interface{} 744 for _, _fromItem := range _from { 745 _fromRule = append(_fromRule, _fromItem) 746 } 747 var _toRule []interface{} 748 for _, _toItem := range _to { 749 _toRule = append(_toRule, _toItem) 750 } 751 752 logs, sub, err := _Ierc1155.contract.FilterLogs(opts, "TransferSingle", _operatorRule, _fromRule, _toRule) 753 if err != nil { 754 return nil, err 755 } 756 return &Ierc1155TransferSingleIterator{contract: _Ierc1155.contract, event: "TransferSingle", logs: logs, sub: sub}, nil 757 } 758 759 // WatchTransferSingle is a free log subscription operation binding the contract event 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62. 760 // 761 // Solidity: event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value) 762 func (_Ierc1155 *Ierc1155Filterer) WatchTransferSingle(opts *bind.WatchOpts, sink chan<- *Ierc1155TransferSingle, _operator []common.Address, _from []common.Address, _to []common.Address) (event.Subscription, error) { 763 764 var _operatorRule []interface{} 765 for _, _operatorItem := range _operator { 766 _operatorRule = append(_operatorRule, _operatorItem) 767 } 768 var _fromRule []interface{} 769 for _, _fromItem := range _from { 770 _fromRule = append(_fromRule, _fromItem) 771 } 772 var _toRule []interface{} 773 for _, _toItem := range _to { 774 _toRule = append(_toRule, _toItem) 775 } 776 777 logs, sub, err := _Ierc1155.contract.WatchLogs(opts, "TransferSingle", _operatorRule, _fromRule, _toRule) 778 if err != nil { 779 return nil, err 780 } 781 return event.NewSubscription(func(quit <-chan struct{}) error { 782 defer sub.Unsubscribe() 783 for { 784 select { 785 case log := <-logs: 786 // New log arrived, parse the event and forward to the user 787 event := new(Ierc1155TransferSingle) 788 if err := _Ierc1155.contract.UnpackLog(event, "TransferSingle", log); err != nil { 789 return err 790 } 791 event.Raw = log 792 793 select { 794 case sink <- event: 795 case err := <-sub.Err(): 796 return err 797 case <-quit: 798 return nil 799 } 800 case err := <-sub.Err(): 801 return err 802 case <-quit: 803 return nil 804 } 805 } 806 }), nil 807 } 808 809 // ParseTransferSingle is a log parse operation binding the contract event 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62. 810 // 811 // Solidity: event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value) 812 func (_Ierc1155 *Ierc1155Filterer) ParseTransferSingle(log types.Log) (*Ierc1155TransferSingle, error) { 813 event := new(Ierc1155TransferSingle) 814 if err := _Ierc1155.contract.UnpackLog(event, "TransferSingle", log); err != nil { 815 return nil, err 816 } 817 event.Raw = log 818 return event, nil 819 } 820 821 // Ierc1155URIIterator is returned from FilterURI and is used to iterate over the raw logs and unpacked data for URI events raised by the Ierc1155 contract. 822 type Ierc1155URIIterator struct { 823 Event *Ierc1155URI // Event containing the contract specifics and raw log 824 825 contract *bind.BoundContract // Generic contract to use for unpacking event data 826 event string // Event name to use for unpacking event data 827 828 logs chan types.Log // Log channel receiving the found contract events 829 sub ethereum.Subscription // Subscription for errors, completion and termination 830 done bool // Whether the subscription completed delivering logs 831 fail error // Occurred error to stop iteration 832 } 833 834 // Next advances the iterator to the subsequent event, returning whether there 835 // are any more events found. In case of a retrieval or parsing error, false is 836 // returned and Error() can be queried for the exact failure. 837 func (it *Ierc1155URIIterator) Next() bool { 838 // If the iterator failed, stop iterating 839 if it.fail != nil { 840 return false 841 } 842 // If the iterator completed, deliver directly whatever's available 843 if it.done { 844 select { 845 case log := <-it.logs: 846 it.Event = new(Ierc1155URI) 847 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 848 it.fail = err 849 return false 850 } 851 it.Event.Raw = log 852 return true 853 854 default: 855 return false 856 } 857 } 858 // Iterator still in progress, wait for either a data or an error event 859 select { 860 case log := <-it.logs: 861 it.Event = new(Ierc1155URI) 862 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 863 it.fail = err 864 return false 865 } 866 it.Event.Raw = log 867 return true 868 869 case err := <-it.sub.Err(): 870 it.done = true 871 it.fail = err 872 return it.Next() 873 } 874 } 875 876 // Error returns any retrieval or parsing error occurred during filtering. 877 func (it *Ierc1155URIIterator) Error() error { 878 return it.fail 879 } 880 881 // Close terminates the iteration process, releasing any pending underlying 882 // resources. 883 func (it *Ierc1155URIIterator) Close() error { 884 it.sub.Unsubscribe() 885 return nil 886 } 887 888 // Ierc1155URI represents a URI event raised by the Ierc1155 contract. 889 type Ierc1155URI struct { 890 Value string 891 Id *big.Int 892 Raw types.Log // Blockchain specific contextual infos 893 } 894 895 // FilterURI is a free log retrieval operation binding the contract event 0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b. 896 // 897 // Solidity: event URI(string _value, uint256 indexed _id) 898 func (_Ierc1155 *Ierc1155Filterer) FilterURI(opts *bind.FilterOpts, _id []*big.Int) (*Ierc1155URIIterator, error) { 899 900 var _idRule []interface{} 901 for _, _idItem := range _id { 902 _idRule = append(_idRule, _idItem) 903 } 904 905 logs, sub, err := _Ierc1155.contract.FilterLogs(opts, "URI", _idRule) 906 if err != nil { 907 return nil, err 908 } 909 return &Ierc1155URIIterator{contract: _Ierc1155.contract, event: "URI", logs: logs, sub: sub}, nil 910 } 911 912 // WatchURI is a free log subscription operation binding the contract event 0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b. 913 // 914 // Solidity: event URI(string _value, uint256 indexed _id) 915 func (_Ierc1155 *Ierc1155Filterer) WatchURI(opts *bind.WatchOpts, sink chan<- *Ierc1155URI, _id []*big.Int) (event.Subscription, error) { 916 917 var _idRule []interface{} 918 for _, _idItem := range _id { 919 _idRule = append(_idRule, _idItem) 920 } 921 922 logs, sub, err := _Ierc1155.contract.WatchLogs(opts, "URI", _idRule) 923 if err != nil { 924 return nil, err 925 } 926 return event.NewSubscription(func(quit <-chan struct{}) error { 927 defer sub.Unsubscribe() 928 for { 929 select { 930 case log := <-logs: 931 // New log arrived, parse the event and forward to the user 932 event := new(Ierc1155URI) 933 if err := _Ierc1155.contract.UnpackLog(event, "URI", log); err != nil { 934 return err 935 } 936 event.Raw = log 937 938 select { 939 case sink <- event: 940 case err := <-sub.Err(): 941 return err 942 case <-quit: 943 return nil 944 } 945 case err := <-sub.Err(): 946 return err 947 case <-quit: 948 return nil 949 } 950 } 951 }), nil 952 } 953 954 // ParseURI is a log parse operation binding the contract event 0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b. 955 // 956 // Solidity: event URI(string _value, uint256 indexed _id) 957 func (_Ierc1155 *Ierc1155Filterer) ParseURI(log types.Log) (*Ierc1155URI, error) { 958 event := new(Ierc1155URI) 959 if err := _Ierc1155.contract.UnpackLog(event, "URI", log); err != nil { 960 return nil, err 961 } 962 event.Raw = log 963 return event, nil 964 }