github.com/0chain/gosdk@v1.17.11/zcnbridge/ethereum/nftconfig/nftconfig.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 nftconfig 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 ) 30 31 // NFTConfigMetaData contains all meta data concerning the NFTConfig contract. 32 var NFTConfigMetaData = &bind.MetaData{ 33 ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previous\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"updated\",\"type\":\"uint256\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setUint256\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"value\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"getUint256\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true}]", 34 } 35 36 // NFTConfigABI is the input ABI used to generate the binding from. 37 // Deprecated: Use NFTConfigMetaData.ABI instead. 38 var NFTConfigABI = NFTConfigMetaData.ABI 39 40 // NFTConfig is an auto generated Go binding around an Ethereum contract. 41 type NFTConfig struct { 42 NFTConfigCaller // Read-only binding to the contract 43 NFTConfigTransactor // Write-only binding to the contract 44 NFTConfigFilterer // Log filterer for contract events 45 } 46 47 // NFTConfigCaller is an auto generated read-only Go binding around an Ethereum contract. 48 type NFTConfigCaller struct { 49 contract *bind.BoundContract // Generic contract wrapper for the low level calls 50 } 51 52 // NFTConfigTransactor is an auto generated write-only Go binding around an Ethereum contract. 53 type NFTConfigTransactor struct { 54 contract *bind.BoundContract // Generic contract wrapper for the low level calls 55 } 56 57 // NFTConfigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 58 type NFTConfigFilterer struct { 59 contract *bind.BoundContract // Generic contract wrapper for the low level calls 60 } 61 62 // NFTConfigSession is an auto generated Go binding around an Ethereum contract, 63 // with pre-set call and transact options. 64 type NFTConfigSession struct { 65 Contract *NFTConfig // Generic contract binding to set the session for 66 CallOpts bind.CallOpts // Call options to use throughout this session 67 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 68 } 69 70 // NFTConfigCallerSession is an auto generated read-only Go binding around an Ethereum contract, 71 // with pre-set call options. 72 type NFTConfigCallerSession struct { 73 Contract *NFTConfigCaller // Generic contract caller binding to set the session for 74 CallOpts bind.CallOpts // Call options to use throughout this session 75 } 76 77 // NFTConfigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 78 // with pre-set transact options. 79 type NFTConfigTransactorSession struct { 80 Contract *NFTConfigTransactor // Generic contract transactor binding to set the session for 81 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 82 } 83 84 // NFTConfigRaw is an auto generated low-level Go binding around an Ethereum contract. 85 type NFTConfigRaw struct { 86 Contract *NFTConfig // Generic contract binding to access the raw methods on 87 } 88 89 // NFTConfigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 90 type NFTConfigCallerRaw struct { 91 Contract *NFTConfigCaller // Generic read-only contract binding to access the raw methods on 92 } 93 94 // NFTConfigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 95 type NFTConfigTransactorRaw struct { 96 Contract *NFTConfigTransactor // Generic write-only contract binding to access the raw methods on 97 } 98 99 // NewNFTConfig creates a new instance of NFTConfig, bound to a specific deployed contract. 100 func NewNFTConfig(address common.Address, backend bind.ContractBackend) (*NFTConfig, error) { 101 contract, err := bindNFTConfig(address, backend, backend, backend) 102 if err != nil { 103 return nil, err 104 } 105 return &NFTConfig{NFTConfigCaller: NFTConfigCaller{contract: contract}, NFTConfigTransactor: NFTConfigTransactor{contract: contract}, NFTConfigFilterer: NFTConfigFilterer{contract: contract}}, nil 106 } 107 108 // NewNFTConfigCaller creates a new read-only instance of NFTConfig, bound to a specific deployed contract. 109 func NewNFTConfigCaller(address common.Address, caller bind.ContractCaller) (*NFTConfigCaller, error) { 110 contract, err := bindNFTConfig(address, caller, nil, nil) 111 if err != nil { 112 return nil, err 113 } 114 return &NFTConfigCaller{contract: contract}, nil 115 } 116 117 // NewNFTConfigTransactor creates a new write-only instance of NFTConfig, bound to a specific deployed contract. 118 func NewNFTConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*NFTConfigTransactor, error) { 119 contract, err := bindNFTConfig(address, nil, transactor, nil) 120 if err != nil { 121 return nil, err 122 } 123 return &NFTConfigTransactor{contract: contract}, nil 124 } 125 126 // NewNFTConfigFilterer creates a new log filterer instance of NFTConfig, bound to a specific deployed contract. 127 func NewNFTConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*NFTConfigFilterer, error) { 128 contract, err := bindNFTConfig(address, nil, nil, filterer) 129 if err != nil { 130 return nil, err 131 } 132 return &NFTConfigFilterer{contract: contract}, nil 133 } 134 135 // bindNFTConfig binds a generic wrapper to an already deployed contract. 136 func bindNFTConfig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 137 parsed, err := abi.JSON(strings.NewReader(NFTConfigABI)) 138 if err != nil { 139 return nil, err 140 } 141 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 142 } 143 144 // Call invokes the (constant) contract method with params as input values and 145 // sets the output to result. The result type might be a single field for simple 146 // returns, a slice of interfaces for anonymous returns and a struct for named 147 // returns. 148 func (_NFTConfig *NFTConfigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 149 return _NFTConfig.Contract.NFTConfigCaller.contract.Call(opts, result, method, params...) 150 } 151 152 // Transfer initiates a plain transaction to move funds to the contract, calling 153 // its default method if one is available. 154 func (_NFTConfig *NFTConfigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 155 return _NFTConfig.Contract.NFTConfigTransactor.contract.Transfer(opts) 156 } 157 158 // Transact invokes the (paid) contract method with params as input values. 159 func (_NFTConfig *NFTConfigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 160 return _NFTConfig.Contract.NFTConfigTransactor.contract.Transact(opts, method, params...) 161 } 162 163 // Call invokes the (constant) contract method with params as input values and 164 // sets the output to result. The result type might be a single field for simple 165 // returns, a slice of interfaces for anonymous returns and a struct for named 166 // returns. 167 func (_NFTConfig *NFTConfigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 168 return _NFTConfig.Contract.contract.Call(opts, result, method, params...) 169 } 170 171 // Transfer initiates a plain transaction to move funds to the contract, calling 172 // its default method if one is available. 173 func (_NFTConfig *NFTConfigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 174 return _NFTConfig.Contract.contract.Transfer(opts) 175 } 176 177 // Transact invokes the (paid) contract method with params as input values. 178 func (_NFTConfig *NFTConfigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 179 return _NFTConfig.Contract.contract.Transact(opts, method, params...) 180 } 181 182 // GetAddress is a free data retrieval call binding the contract method 0x21f8a721. 183 // 184 // Solidity: function getAddress(bytes32 key) view returns(address) 185 func (_NFTConfig *NFTConfigCaller) GetAddress(opts *bind.CallOpts, key [32]byte) (common.Address, error) { 186 var out []interface{} 187 err := _NFTConfig.contract.Call(opts, &out, "getAddress", key) 188 189 if err != nil { 190 return *new(common.Address), err 191 } 192 193 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 194 195 return out0, err 196 197 } 198 199 // GetAddress is a free data retrieval call binding the contract method 0x21f8a721. 200 // 201 // Solidity: function getAddress(bytes32 key) view returns(address) 202 func (_NFTConfig *NFTConfigSession) GetAddress(key [32]byte) (common.Address, error) { 203 return _NFTConfig.Contract.GetAddress(&_NFTConfig.CallOpts, key) 204 } 205 206 // GetAddress is a free data retrieval call binding the contract method 0x21f8a721. 207 // 208 // Solidity: function getAddress(bytes32 key) view returns(address) 209 func (_NFTConfig *NFTConfigCallerSession) GetAddress(key [32]byte) (common.Address, error) { 210 return _NFTConfig.Contract.GetAddress(&_NFTConfig.CallOpts, key) 211 } 212 213 // GetUint256 is a free data retrieval call binding the contract method 0x33598b00. 214 // 215 // Solidity: function getUint256(bytes32 key) view returns(uint256) 216 func (_NFTConfig *NFTConfigCaller) GetUint256(opts *bind.CallOpts, key [32]byte) (*big.Int, error) { 217 var out []interface{} 218 err := _NFTConfig.contract.Call(opts, &out, "getUint256", key) 219 220 if err != nil { 221 return *new(*big.Int), err 222 } 223 224 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 225 226 return out0, err 227 228 } 229 230 // GetUint256 is a free data retrieval call binding the contract method 0x33598b00. 231 // 232 // Solidity: function getUint256(bytes32 key) view returns(uint256) 233 func (_NFTConfig *NFTConfigSession) GetUint256(key [32]byte) (*big.Int, error) { 234 return _NFTConfig.Contract.GetUint256(&_NFTConfig.CallOpts, key) 235 } 236 237 // GetUint256 is a free data retrieval call binding the contract method 0x33598b00. 238 // 239 // Solidity: function getUint256(bytes32 key) view returns(uint256) 240 func (_NFTConfig *NFTConfigCallerSession) GetUint256(key [32]byte) (*big.Int, error) { 241 return _NFTConfig.Contract.GetUint256(&_NFTConfig.CallOpts, key) 242 } 243 244 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 245 // 246 // Solidity: function owner() view returns(address) 247 func (_NFTConfig *NFTConfigCaller) Owner(opts *bind.CallOpts) (common.Address, error) { 248 var out []interface{} 249 err := _NFTConfig.contract.Call(opts, &out, "owner") 250 251 if err != nil { 252 return *new(common.Address), err 253 } 254 255 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 256 257 return out0, err 258 259 } 260 261 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 262 // 263 // Solidity: function owner() view returns(address) 264 func (_NFTConfig *NFTConfigSession) Owner() (common.Address, error) { 265 return _NFTConfig.Contract.Owner(&_NFTConfig.CallOpts) 266 } 267 268 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 269 // 270 // Solidity: function owner() view returns(address) 271 func (_NFTConfig *NFTConfigCallerSession) Owner() (common.Address, error) { 272 return _NFTConfig.Contract.Owner(&_NFTConfig.CallOpts) 273 } 274 275 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 276 // 277 // Solidity: function renounceOwnership() returns() 278 func (_NFTConfig *NFTConfigTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { 279 return _NFTConfig.contract.Transact(opts, "renounceOwnership") 280 } 281 282 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 283 // 284 // Solidity: function renounceOwnership() returns() 285 func (_NFTConfig *NFTConfigSession) RenounceOwnership() (*types.Transaction, error) { 286 return _NFTConfig.Contract.RenounceOwnership(&_NFTConfig.TransactOpts) 287 } 288 289 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 290 // 291 // Solidity: function renounceOwnership() returns() 292 func (_NFTConfig *NFTConfigTransactorSession) RenounceOwnership() (*types.Transaction, error) { 293 return _NFTConfig.Contract.RenounceOwnership(&_NFTConfig.TransactOpts) 294 } 295 296 // SetAddress is a paid mutator transaction binding the contract method 0xca446dd9. 297 // 298 // Solidity: function setAddress(bytes32 key, address value) returns() 299 func (_NFTConfig *NFTConfigTransactor) SetAddress(opts *bind.TransactOpts, key [32]byte, value common.Address) (*types.Transaction, error) { 300 return _NFTConfig.contract.Transact(opts, "setAddress", key, value) 301 } 302 303 // SetAddress is a paid mutator transaction binding the contract method 0xca446dd9. 304 // 305 // Solidity: function setAddress(bytes32 key, address value) returns() 306 func (_NFTConfig *NFTConfigSession) SetAddress(key [32]byte, value common.Address) (*types.Transaction, error) { 307 return _NFTConfig.Contract.SetAddress(&_NFTConfig.TransactOpts, key, value) 308 } 309 310 // SetAddress is a paid mutator transaction binding the contract method 0xca446dd9. 311 // 312 // Solidity: function setAddress(bytes32 key, address value) returns() 313 func (_NFTConfig *NFTConfigTransactorSession) SetAddress(key [32]byte, value common.Address) (*types.Transaction, error) { 314 return _NFTConfig.Contract.SetAddress(&_NFTConfig.TransactOpts, key, value) 315 } 316 317 // SetUint256 is a paid mutator transaction binding the contract method 0x4f3029c2. 318 // 319 // Solidity: function setUint256(bytes32 key, uint256 value) returns() 320 func (_NFTConfig *NFTConfigTransactor) SetUint256(opts *bind.TransactOpts, key [32]byte, value *big.Int) (*types.Transaction, error) { 321 return _NFTConfig.contract.Transact(opts, "setUint256", key, value) 322 } 323 324 // SetUint256 is a paid mutator transaction binding the contract method 0x4f3029c2. 325 // 326 // Solidity: function setUint256(bytes32 key, uint256 value) returns() 327 func (_NFTConfig *NFTConfigSession) SetUint256(key [32]byte, value *big.Int) (*types.Transaction, error) { 328 return _NFTConfig.Contract.SetUint256(&_NFTConfig.TransactOpts, key, value) 329 } 330 331 // SetUint256 is a paid mutator transaction binding the contract method 0x4f3029c2. 332 // 333 // Solidity: function setUint256(bytes32 key, uint256 value) returns() 334 func (_NFTConfig *NFTConfigTransactorSession) SetUint256(key [32]byte, value *big.Int) (*types.Transaction, error) { 335 return _NFTConfig.Contract.SetUint256(&_NFTConfig.TransactOpts, key, value) 336 } 337 338 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 339 // 340 // Solidity: function transferOwnership(address newOwner) returns() 341 func (_NFTConfig *NFTConfigTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { 342 return _NFTConfig.contract.Transact(opts, "transferOwnership", newOwner) 343 } 344 345 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 346 // 347 // Solidity: function transferOwnership(address newOwner) returns() 348 func (_NFTConfig *NFTConfigSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 349 return _NFTConfig.Contract.TransferOwnership(&_NFTConfig.TransactOpts, newOwner) 350 } 351 352 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 353 // 354 // Solidity: function transferOwnership(address newOwner) returns() 355 func (_NFTConfig *NFTConfigTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 356 return _NFTConfig.Contract.TransferOwnership(&_NFTConfig.TransactOpts, newOwner) 357 } 358 359 // NFTConfigConfigUpdatedIterator is returned from FilterConfigUpdated and is used to iterate over the raw logs and unpacked data for ConfigUpdated events raised by the NFTConfig contract. 360 type NFTConfigConfigUpdatedIterator struct { 361 Event *NFTConfigConfigUpdated // Event containing the contract specifics and raw log 362 363 contract *bind.BoundContract // Generic contract to use for unpacking event data 364 event string // Event name to use for unpacking event data 365 366 logs chan types.Log // Log channel receiving the found contract events 367 sub ethereum.Subscription // Subscription for errors, completion and termination 368 done bool // Whether the subscription completed delivering logs 369 fail error // Occurred error to stop iteration 370 } 371 372 // Next advances the iterator to the subsequent event, returning whether there 373 // are any more events found. In case of a retrieval or parsing error, false is 374 // returned and Error() can be queried for the exact failure. 375 func (it *NFTConfigConfigUpdatedIterator) Next() bool { 376 // If the iterator failed, stop iterating 377 if it.fail != nil { 378 return false 379 } 380 // If the iterator completed, deliver directly whatever's available 381 if it.done { 382 select { 383 case log := <-it.logs: 384 it.Event = new(NFTConfigConfigUpdated) 385 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 386 it.fail = err 387 return false 388 } 389 it.Event.Raw = log 390 return true 391 392 default: 393 return false 394 } 395 } 396 // Iterator still in progress, wait for either a data or an error event 397 select { 398 case log := <-it.logs: 399 it.Event = new(NFTConfigConfigUpdated) 400 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 401 it.fail = err 402 return false 403 } 404 it.Event.Raw = log 405 return true 406 407 case err := <-it.sub.Err(): 408 it.done = true 409 it.fail = err 410 return it.Next() 411 } 412 } 413 414 // Error returns any retrieval or parsing error occurred during filtering. 415 func (it *NFTConfigConfigUpdatedIterator) Error() error { 416 return it.fail 417 } 418 419 // Close terminates the iteration process, releasing any pending underlying 420 // resources. 421 func (it *NFTConfigConfigUpdatedIterator) Close() error { 422 it.sub.Unsubscribe() 423 return nil 424 } 425 426 // NFTConfigConfigUpdated represents a ConfigUpdated event raised by the NFTConfig contract. 427 type NFTConfigConfigUpdated struct { 428 Key [32]byte 429 Previous *big.Int 430 Updated *big.Int 431 Raw types.Log // Blockchain specific contextual infos 432 } 433 434 // FilterConfigUpdated is a free log retrieval operation binding the contract event 0xac2ccce3de9c0816ae772598f7f65fe69f9893b637f7c490497378cbb3ea043e. 435 // 436 // Solidity: event ConfigUpdated(bytes32 indexed key, uint256 previous, uint256 updated) 437 func (_NFTConfig *NFTConfigFilterer) FilterConfigUpdated(opts *bind.FilterOpts, key [][32]byte) (*NFTConfigConfigUpdatedIterator, error) { 438 439 var keyRule []interface{} 440 for _, keyItem := range key { 441 keyRule = append(keyRule, keyItem) 442 } 443 444 logs, sub, err := _NFTConfig.contract.FilterLogs(opts, "ConfigUpdated", keyRule) 445 if err != nil { 446 return nil, err 447 } 448 return &NFTConfigConfigUpdatedIterator{contract: _NFTConfig.contract, event: "ConfigUpdated", logs: logs, sub: sub}, nil 449 } 450 451 // WatchConfigUpdated is a free log subscription operation binding the contract event 0xac2ccce3de9c0816ae772598f7f65fe69f9893b637f7c490497378cbb3ea043e. 452 // 453 // Solidity: event ConfigUpdated(bytes32 indexed key, uint256 previous, uint256 updated) 454 func (_NFTConfig *NFTConfigFilterer) WatchConfigUpdated(opts *bind.WatchOpts, sink chan<- *NFTConfigConfigUpdated, key [][32]byte) (event.Subscription, error) { 455 456 var keyRule []interface{} 457 for _, keyItem := range key { 458 keyRule = append(keyRule, keyItem) 459 } 460 461 logs, sub, err := _NFTConfig.contract.WatchLogs(opts, "ConfigUpdated", keyRule) 462 if err != nil { 463 return nil, err 464 } 465 return event.NewSubscription(func(quit <-chan struct{}) error { 466 defer sub.Unsubscribe() 467 for { 468 select { 469 case log := <-logs: 470 // New log arrived, parse the event and forward to the user 471 event := new(NFTConfigConfigUpdated) 472 if err := _NFTConfig.contract.UnpackLog(event, "ConfigUpdated", log); err != nil { 473 return err 474 } 475 event.Raw = log 476 477 select { 478 case sink <- event: 479 case err := <-sub.Err(): 480 return err 481 case <-quit: 482 return nil 483 } 484 case err := <-sub.Err(): 485 return err 486 case <-quit: 487 return nil 488 } 489 } 490 }), nil 491 } 492 493 // ParseConfigUpdated is a log parse operation binding the contract event 0xac2ccce3de9c0816ae772598f7f65fe69f9893b637f7c490497378cbb3ea043e. 494 // 495 // Solidity: event ConfigUpdated(bytes32 indexed key, uint256 previous, uint256 updated) 496 func (_NFTConfig *NFTConfigFilterer) ParseConfigUpdated(log types.Log) (*NFTConfigConfigUpdated, error) { 497 event := new(NFTConfigConfigUpdated) 498 if err := _NFTConfig.contract.UnpackLog(event, "ConfigUpdated", log); err != nil { 499 return nil, err 500 } 501 event.Raw = log 502 return event, nil 503 } 504 505 // NFTConfigOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NFTConfig contract. 506 type NFTConfigOwnershipTransferredIterator struct { 507 Event *NFTConfigOwnershipTransferred // Event containing the contract specifics and raw log 508 509 contract *bind.BoundContract // Generic contract to use for unpacking event data 510 event string // Event name to use for unpacking event data 511 512 logs chan types.Log // Log channel receiving the found contract events 513 sub ethereum.Subscription // Subscription for errors, completion and termination 514 done bool // Whether the subscription completed delivering logs 515 fail error // Occurred error to stop iteration 516 } 517 518 // Next advances the iterator to the subsequent event, returning whether there 519 // are any more events found. In case of a retrieval or parsing error, false is 520 // returned and Error() can be queried for the exact failure. 521 func (it *NFTConfigOwnershipTransferredIterator) Next() bool { 522 // If the iterator failed, stop iterating 523 if it.fail != nil { 524 return false 525 } 526 // If the iterator completed, deliver directly whatever's available 527 if it.done { 528 select { 529 case log := <-it.logs: 530 it.Event = new(NFTConfigOwnershipTransferred) 531 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 532 it.fail = err 533 return false 534 } 535 it.Event.Raw = log 536 return true 537 538 default: 539 return false 540 } 541 } 542 // Iterator still in progress, wait for either a data or an error event 543 select { 544 case log := <-it.logs: 545 it.Event = new(NFTConfigOwnershipTransferred) 546 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 547 it.fail = err 548 return false 549 } 550 it.Event.Raw = log 551 return true 552 553 case err := <-it.sub.Err(): 554 it.done = true 555 it.fail = err 556 return it.Next() 557 } 558 } 559 560 // Error returns any retrieval or parsing error occurred during filtering. 561 func (it *NFTConfigOwnershipTransferredIterator) Error() error { 562 return it.fail 563 } 564 565 // Close terminates the iteration process, releasing any pending underlying 566 // resources. 567 func (it *NFTConfigOwnershipTransferredIterator) Close() error { 568 it.sub.Unsubscribe() 569 return nil 570 } 571 572 // NFTConfigOwnershipTransferred represents a OwnershipTransferred event raised by the NFTConfig contract. 573 type NFTConfigOwnershipTransferred struct { 574 PreviousOwner common.Address 575 NewOwner common.Address 576 Raw types.Log // Blockchain specific contextual infos 577 } 578 579 // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 580 // 581 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 582 func (_NFTConfig *NFTConfigFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NFTConfigOwnershipTransferredIterator, error) { 583 584 var previousOwnerRule []interface{} 585 for _, previousOwnerItem := range previousOwner { 586 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 587 } 588 var newOwnerRule []interface{} 589 for _, newOwnerItem := range newOwner { 590 newOwnerRule = append(newOwnerRule, newOwnerItem) 591 } 592 593 logs, sub, err := _NFTConfig.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 594 if err != nil { 595 return nil, err 596 } 597 return &NFTConfigOwnershipTransferredIterator{contract: _NFTConfig.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil 598 } 599 600 // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 601 // 602 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 603 func (_NFTConfig *NFTConfigFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NFTConfigOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { 604 605 var previousOwnerRule []interface{} 606 for _, previousOwnerItem := range previousOwner { 607 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 608 } 609 var newOwnerRule []interface{} 610 for _, newOwnerItem := range newOwner { 611 newOwnerRule = append(newOwnerRule, newOwnerItem) 612 } 613 614 logs, sub, err := _NFTConfig.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 615 if err != nil { 616 return nil, err 617 } 618 return event.NewSubscription(func(quit <-chan struct{}) error { 619 defer sub.Unsubscribe() 620 for { 621 select { 622 case log := <-logs: 623 // New log arrived, parse the event and forward to the user 624 event := new(NFTConfigOwnershipTransferred) 625 if err := _NFTConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 626 return err 627 } 628 event.Raw = log 629 630 select { 631 case sink <- event: 632 case err := <-sub.Err(): 633 return err 634 case <-quit: 635 return nil 636 } 637 case err := <-sub.Err(): 638 return err 639 case <-quit: 640 return nil 641 } 642 } 643 }), nil 644 } 645 646 // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 647 // 648 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 649 func (_NFTConfig *NFTConfigFilterer) ParseOwnershipTransferred(log types.Log) (*NFTConfigOwnershipTransferred, error) { 650 event := new(NFTConfigOwnershipTransferred) 651 if err := _NFTConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 652 return nil, err 653 } 654 event.Raw = log 655 return event, nil 656 }