github.com/aerth/aquachain@v1.4.1/contracts/ens/contract/ens.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 contract 5 6 import ( 7 "strings" 8 9 ethereum "github.com/aquanetwork/aquachain" 10 "github.com/aquanetwork/aquachain/accounts/abi" 11 "github.com/aquanetwork/aquachain/accounts/abi/bind" 12 "github.com/aquanetwork/aquachain/common" 13 "github.com/aquanetwork/aquachain/core/types" 14 "github.com/aquanetwork/aquachain/event" 15 ) 16 17 // ENSABI is the input ABI used to generate the binding from. 18 const ENSABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"resolver\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"label\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"setTTL\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ttl\",\"outputs\":[{\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"NewResolver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"NewTTL\",\"type\":\"event\"}]" 19 20 // ENSBin is the compiled bytecode used for deploying new contracts. 21 const ENSBin = `0x6060604052341561000f57600080fd5b60008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb58054600160a060020a033316600160a060020a0319909116179055610503806100626000396000f3006060604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461008757806302571be3146100b957806306ab5923146100cf57806314ab9038146100f657806316a25cbd146101195780631896f70a1461014c5780635b0fc9c31461016e575b600080fd5b341561009257600080fd5b61009d600435610190565b604051600160a060020a03909116815260200160405180910390f35b34156100c457600080fd5b61009d6004356101ae565b34156100da57600080fd5b6100f4600435602435600160a060020a03604435166101c9565b005b341561010157600080fd5b6100f460043567ffffffffffffffff6024351661028b565b341561012457600080fd5b61012f600435610357565b60405167ffffffffffffffff909116815260200160405180910390f35b341561015757600080fd5b6100f4600435600160a060020a036024351661038e565b341561017957600080fd5b6100f4600435600160a060020a0360243516610434565b600090815260208190526040902060010154600160a060020a031690565b600090815260208190526040902054600160a060020a031690565b600083815260208190526040812054849033600160a060020a039081169116146101f257600080fd5b8484604051918252602082015260409081019051908190039020915083857fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8285604051600160a060020a03909116815260200160405180910390a3506000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600082815260208190526040902054829033600160a060020a039081169116146102b457600080fd5b827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa688360405167ffffffffffffffff909116815260200160405180910390a250600091825260208290526040909120600101805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60009081526020819052604090206001015474010000000000000000000000000000000000000000900467ffffffffffffffff1690565b600082815260208190526040902054829033600160a060020a039081169116146103b757600080fd5b827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051600160a060020a03909116815260200160405180910390a250600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b600082815260208190526040902054829033600160a060020a0390811691161461045d57600080fd5b827fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26683604051600160a060020a03909116815260200160405180910390a250600091825260208290526040909120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555600a165627a7a72305820f4c798d4c84c9912f389f64631e85e8d16c3e6644f8c2e1579936015c7d5f6660029` 22 23 // DeployENS deploys a new Ethereum contract, binding an instance of ENS to it. 24 func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ENS, error) { 25 parsed, err := abi.JSON(strings.NewReader(ENSABI)) 26 if err != nil { 27 return common.Address{}, nil, nil, err 28 } 29 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ENSBin), backend) 30 if err != nil { 31 return common.Address{}, nil, nil, err 32 } 33 return address, tx, &ENS{ENSCaller: ENSCaller{contract: contract}, ENSTransactor: ENSTransactor{contract: contract}, ENSFilterer: ENSFilterer{contract: contract}}, nil 34 } 35 36 // ENS is an auto generated Go binding around an Ethereum contract. 37 type ENS struct { 38 ENSCaller // Read-only binding to the contract 39 ENSTransactor // Write-only binding to the contract 40 ENSFilterer // Log filterer for contract events 41 } 42 43 // ENSCaller is an auto generated read-only Go binding around an Ethereum contract. 44 type ENSCaller struct { 45 contract *bind.BoundContract // Generic contract wrapper for the low level calls 46 } 47 48 // ENSTransactor is an auto generated write-only Go binding around an Ethereum contract. 49 type ENSTransactor struct { 50 contract *bind.BoundContract // Generic contract wrapper for the low level calls 51 } 52 53 // ENSFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 54 type ENSFilterer struct { 55 contract *bind.BoundContract // Generic contract wrapper for the low level calls 56 } 57 58 // ENSSession is an auto generated Go binding around an Ethereum contract, 59 // with pre-set call and transact options. 60 type ENSSession struct { 61 Contract *ENS // Generic contract binding to set the session for 62 CallOpts bind.CallOpts // Call options to use throughout this session 63 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 64 } 65 66 // ENSCallerSession is an auto generated read-only Go binding around an Ethereum contract, 67 // with pre-set call options. 68 type ENSCallerSession struct { 69 Contract *ENSCaller // Generic contract caller binding to set the session for 70 CallOpts bind.CallOpts // Call options to use throughout this session 71 } 72 73 // ENSTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 74 // with pre-set transact options. 75 type ENSTransactorSession struct { 76 Contract *ENSTransactor // Generic contract transactor binding to set the session for 77 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 78 } 79 80 // ENSRaw is an auto generated low-level Go binding around an Ethereum contract. 81 type ENSRaw struct { 82 Contract *ENS // Generic contract binding to access the raw methods on 83 } 84 85 // ENSCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 86 type ENSCallerRaw struct { 87 Contract *ENSCaller // Generic read-only contract binding to access the raw methods on 88 } 89 90 // ENSTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 91 type ENSTransactorRaw struct { 92 Contract *ENSTransactor // Generic write-only contract binding to access the raw methods on 93 } 94 95 // NewENS creates a new instance of ENS, bound to a specific deployed contract. 96 func NewENS(address common.Address, backend bind.ContractBackend) (*ENS, error) { 97 contract, err := bindENS(address, backend, backend, backend) 98 if err != nil { 99 return nil, err 100 } 101 return &ENS{ENSCaller: ENSCaller{contract: contract}, ENSTransactor: ENSTransactor{contract: contract}, ENSFilterer: ENSFilterer{contract: contract}}, nil 102 } 103 104 // NewENSCaller creates a new read-only instance of ENS, bound to a specific deployed contract. 105 func NewENSCaller(address common.Address, caller bind.ContractCaller) (*ENSCaller, error) { 106 contract, err := bindENS(address, caller, nil, nil) 107 if err != nil { 108 return nil, err 109 } 110 return &ENSCaller{contract: contract}, nil 111 } 112 113 // NewENSTransactor creates a new write-only instance of ENS, bound to a specific deployed contract. 114 func NewENSTransactor(address common.Address, transactor bind.ContractTransactor) (*ENSTransactor, error) { 115 contract, err := bindENS(address, nil, transactor, nil) 116 if err != nil { 117 return nil, err 118 } 119 return &ENSTransactor{contract: contract}, nil 120 } 121 122 // NewENSFilterer creates a new log filterer instance of ENS, bound to a specific deployed contract. 123 func NewENSFilterer(address common.Address, filterer bind.ContractFilterer) (*ENSFilterer, error) { 124 contract, err := bindENS(address, nil, nil, filterer) 125 if err != nil { 126 return nil, err 127 } 128 return &ENSFilterer{contract: contract}, nil 129 } 130 131 // bindENS binds a generic wrapper to an already deployed contract. 132 func bindENS(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 133 parsed, err := abi.JSON(strings.NewReader(ENSABI)) 134 if err != nil { 135 return nil, err 136 } 137 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 138 } 139 140 // Call invokes the (constant) contract method with params as input values and 141 // sets the output to result. The result type might be a single field for simple 142 // returns, a slice of interfaces for anonymous returns and a struct for named 143 // returns. 144 func (_ENS *ENSRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 145 return _ENS.Contract.ENSCaller.contract.Call(opts, result, method, params...) 146 } 147 148 // Transfer initiates a plain transaction to move funds to the contract, calling 149 // its default method if one is available. 150 func (_ENS *ENSRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 151 return _ENS.Contract.ENSTransactor.contract.Transfer(opts) 152 } 153 154 // Transact invokes the (paid) contract method with params as input values. 155 func (_ENS *ENSRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 156 return _ENS.Contract.ENSTransactor.contract.Transact(opts, method, params...) 157 } 158 159 // Call invokes the (constant) contract method with params as input values and 160 // sets the output to result. The result type might be a single field for simple 161 // returns, a slice of interfaces for anonymous returns and a struct for named 162 // returns. 163 func (_ENS *ENSCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 164 return _ENS.Contract.contract.Call(opts, result, method, params...) 165 } 166 167 // Transfer initiates a plain transaction to move funds to the contract, calling 168 // its default method if one is available. 169 func (_ENS *ENSTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 170 return _ENS.Contract.contract.Transfer(opts) 171 } 172 173 // Transact invokes the (paid) contract method with params as input values. 174 func (_ENS *ENSTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 175 return _ENS.Contract.contract.Transact(opts, method, params...) 176 } 177 178 // Owner is a free data retrieval call binding the contract method 0x02571be3. 179 // 180 // Solidity: function owner(node bytes32) constant returns(address) 181 func (_ENS *ENSCaller) Owner(opts *bind.CallOpts, node [32]byte) (common.Address, error) { 182 var ( 183 ret0 = new(common.Address) 184 ) 185 out := ret0 186 err := _ENS.contract.Call(opts, out, "owner", node) 187 return *ret0, err 188 } 189 190 // Owner is a free data retrieval call binding the contract method 0x02571be3. 191 // 192 // Solidity: function owner(node bytes32) constant returns(address) 193 func (_ENS *ENSSession) Owner(node [32]byte) (common.Address, error) { 194 return _ENS.Contract.Owner(&_ENS.CallOpts, node) 195 } 196 197 // Owner is a free data retrieval call binding the contract method 0x02571be3. 198 // 199 // Solidity: function owner(node bytes32) constant returns(address) 200 func (_ENS *ENSCallerSession) Owner(node [32]byte) (common.Address, error) { 201 return _ENS.Contract.Owner(&_ENS.CallOpts, node) 202 } 203 204 // Resolver is a free data retrieval call binding the contract method 0x0178b8bf. 205 // 206 // Solidity: function resolver(node bytes32) constant returns(address) 207 func (_ENS *ENSCaller) Resolver(opts *bind.CallOpts, node [32]byte) (common.Address, error) { 208 var ( 209 ret0 = new(common.Address) 210 ) 211 out := ret0 212 err := _ENS.contract.Call(opts, out, "resolver", node) 213 return *ret0, err 214 } 215 216 // Resolver is a free data retrieval call binding the contract method 0x0178b8bf. 217 // 218 // Solidity: function resolver(node bytes32) constant returns(address) 219 func (_ENS *ENSSession) Resolver(node [32]byte) (common.Address, error) { 220 return _ENS.Contract.Resolver(&_ENS.CallOpts, node) 221 } 222 223 // Resolver is a free data retrieval call binding the contract method 0x0178b8bf. 224 // 225 // Solidity: function resolver(node bytes32) constant returns(address) 226 func (_ENS *ENSCallerSession) Resolver(node [32]byte) (common.Address, error) { 227 return _ENS.Contract.Resolver(&_ENS.CallOpts, node) 228 } 229 230 // Ttl is a free data retrieval call binding the contract method 0x16a25cbd. 231 // 232 // Solidity: function ttl(node bytes32) constant returns(uint64) 233 func (_ENS *ENSCaller) Ttl(opts *bind.CallOpts, node [32]byte) (uint64, error) { 234 var ( 235 ret0 = new(uint64) 236 ) 237 out := ret0 238 err := _ENS.contract.Call(opts, out, "ttl", node) 239 return *ret0, err 240 } 241 242 // Ttl is a free data retrieval call binding the contract method 0x16a25cbd. 243 // 244 // Solidity: function ttl(node bytes32) constant returns(uint64) 245 func (_ENS *ENSSession) Ttl(node [32]byte) (uint64, error) { 246 return _ENS.Contract.Ttl(&_ENS.CallOpts, node) 247 } 248 249 // Ttl is a free data retrieval call binding the contract method 0x16a25cbd. 250 // 251 // Solidity: function ttl(node bytes32) constant returns(uint64) 252 func (_ENS *ENSCallerSession) Ttl(node [32]byte) (uint64, error) { 253 return _ENS.Contract.Ttl(&_ENS.CallOpts, node) 254 } 255 256 // SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3. 257 // 258 // Solidity: function setOwner(node bytes32, owner address) returns() 259 func (_ENS *ENSTransactor) SetOwner(opts *bind.TransactOpts, node [32]byte, owner common.Address) (*types.Transaction, error) { 260 return _ENS.contract.Transact(opts, "setOwner", node, owner) 261 } 262 263 // SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3. 264 // 265 // Solidity: function setOwner(node bytes32, owner address) returns() 266 func (_ENS *ENSSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) { 267 return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner) 268 } 269 270 // SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3. 271 // 272 // Solidity: function setOwner(node bytes32, owner address) returns() 273 func (_ENS *ENSTransactorSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) { 274 return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner) 275 } 276 277 // SetResolver is a paid mutator transaction binding the contract method 0x1896f70a. 278 // 279 // Solidity: function setResolver(node bytes32, resolver address) returns() 280 func (_ENS *ENSTransactor) SetResolver(opts *bind.TransactOpts, node [32]byte, resolver common.Address) (*types.Transaction, error) { 281 return _ENS.contract.Transact(opts, "setResolver", node, resolver) 282 } 283 284 // SetResolver is a paid mutator transaction binding the contract method 0x1896f70a. 285 // 286 // Solidity: function setResolver(node bytes32, resolver address) returns() 287 func (_ENS *ENSSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) { 288 return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver) 289 } 290 291 // SetResolver is a paid mutator transaction binding the contract method 0x1896f70a. 292 // 293 // Solidity: function setResolver(node bytes32, resolver address) returns() 294 func (_ENS *ENSTransactorSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) { 295 return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver) 296 } 297 298 // SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923. 299 // 300 // Solidity: function setSubnodeOwner(node bytes32, label bytes32, owner address) returns() 301 func (_ENS *ENSTransactor) SetSubnodeOwner(opts *bind.TransactOpts, node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) { 302 return _ENS.contract.Transact(opts, "setSubnodeOwner", node, label, owner) 303 } 304 305 // SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923. 306 // 307 // Solidity: function setSubnodeOwner(node bytes32, label bytes32, owner address) returns() 308 func (_ENS *ENSSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) { 309 return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner) 310 } 311 312 // SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923. 313 // 314 // Solidity: function setSubnodeOwner(node bytes32, label bytes32, owner address) returns() 315 func (_ENS *ENSTransactorSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) { 316 return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner) 317 } 318 319 // SetTTL is a paid mutator transaction binding the contract method 0x14ab9038. 320 // 321 // Solidity: function setTTL(node bytes32, ttl uint64) returns() 322 func (_ENS *ENSTransactor) SetTTL(opts *bind.TransactOpts, node [32]byte, ttl uint64) (*types.Transaction, error) { 323 return _ENS.contract.Transact(opts, "setTTL", node, ttl) 324 } 325 326 // SetTTL is a paid mutator transaction binding the contract method 0x14ab9038. 327 // 328 // Solidity: function setTTL(node bytes32, ttl uint64) returns() 329 func (_ENS *ENSSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) { 330 return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl) 331 } 332 333 // SetTTL is a paid mutator transaction binding the contract method 0x14ab9038. 334 // 335 // Solidity: function setTTL(node bytes32, ttl uint64) returns() 336 func (_ENS *ENSTransactorSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) { 337 return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl) 338 } 339 340 // ENSNewOwnerIterator is returned from FilterNewOwner and is used to iterate over the raw logs and unpacked data for NewOwner events raised by the ENS contract. 341 type ENSNewOwnerIterator struct { 342 Event *ENSNewOwner // Event containing the contract specifics and raw log 343 344 contract *bind.BoundContract // Generic contract to use for unpacking event data 345 event string // Event name to use for unpacking event data 346 347 logs chan types.Log // Log channel receiving the found contract events 348 sub ethereum.Subscription // Subscription for errors, completion and termination 349 done bool // Whether the subscription completed delivering logs 350 fail error // Occurred error to stop iteration 351 } 352 353 // Next advances the iterator to the subsequent event, returning whether there 354 // are any more events found. In case of a retrieval or parsing error, false is 355 // returned and Error() can be queried for the exact failure. 356 func (it *ENSNewOwnerIterator) Next() bool { 357 // If the iterator failed, stop iterating 358 if it.fail != nil { 359 return false 360 } 361 // If the iterator completed, deliver directly whatever's available 362 if it.done { 363 select { 364 case log := <-it.logs: 365 it.Event = new(ENSNewOwner) 366 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 367 it.fail = err 368 return false 369 } 370 it.Event.Raw = log 371 return true 372 373 default: 374 return false 375 } 376 } 377 // Iterator still in progress, wait for either a data or an error event 378 select { 379 case log := <-it.logs: 380 it.Event = new(ENSNewOwner) 381 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 382 it.fail = err 383 return false 384 } 385 it.Event.Raw = log 386 return true 387 388 case err := <-it.sub.Err(): 389 it.done = true 390 it.fail = err 391 return it.Next() 392 } 393 } 394 395 // Error retruned any retrieval or parsing error occurred during filtering. 396 func (it *ENSNewOwnerIterator) Error() error { 397 return it.fail 398 } 399 400 // Close terminates the iteration process, releasing any pending underlying 401 // resources. 402 func (it *ENSNewOwnerIterator) Close() error { 403 it.sub.Unsubscribe() 404 return nil 405 } 406 407 // ENSNewOwner represents a NewOwner event raised by the ENS contract. 408 type ENSNewOwner struct { 409 Node [32]byte 410 Label [32]byte 411 Owner common.Address 412 Raw types.Log // Blockchain specific contextual infos 413 } 414 415 // FilterNewOwner is a free log retrieval operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82. 416 // 417 // Solidity: event NewOwner(node indexed bytes32, label indexed bytes32, owner address) 418 func (_ENS *ENSFilterer) FilterNewOwner(opts *bind.FilterOpts, node [][32]byte, label [][32]byte) (*ENSNewOwnerIterator, error) { 419 420 var nodeRule []interface{} 421 for _, nodeItem := range node { 422 nodeRule = append(nodeRule, nodeItem) 423 } 424 var labelRule []interface{} 425 for _, labelItem := range label { 426 labelRule = append(labelRule, labelItem) 427 } 428 429 logs, sub, err := _ENS.contract.FilterLogs(opts, "NewOwner", nodeRule, labelRule) 430 if err != nil { 431 return nil, err 432 } 433 return &ENSNewOwnerIterator{contract: _ENS.contract, event: "NewOwner", logs: logs, sub: sub}, nil 434 } 435 436 // WatchNewOwner is a free log subscription operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82. 437 // 438 // Solidity: event NewOwner(node indexed bytes32, label indexed bytes32, owner address) 439 func (_ENS *ENSFilterer) WatchNewOwner(opts *bind.WatchOpts, sink chan<- *ENSNewOwner, node [][32]byte, label [][32]byte) (event.Subscription, error) { 440 441 var nodeRule []interface{} 442 for _, nodeItem := range node { 443 nodeRule = append(nodeRule, nodeItem) 444 } 445 var labelRule []interface{} 446 for _, labelItem := range label { 447 labelRule = append(labelRule, labelItem) 448 } 449 450 logs, sub, err := _ENS.contract.WatchLogs(opts, "NewOwner", nodeRule, labelRule) 451 if err != nil { 452 return nil, err 453 } 454 return event.NewSubscription(func(quit <-chan struct{}) error { 455 defer sub.Unsubscribe() 456 for { 457 select { 458 case log := <-logs: 459 // New log arrived, parse the event and forward to the user 460 event := new(ENSNewOwner) 461 if err := _ENS.contract.UnpackLog(event, "NewOwner", log); err != nil { 462 return err 463 } 464 event.Raw = log 465 466 select { 467 case sink <- event: 468 case err := <-sub.Err(): 469 return err 470 case <-quit: 471 return nil 472 } 473 case err := <-sub.Err(): 474 return err 475 case <-quit: 476 return nil 477 } 478 } 479 }), nil 480 } 481 482 // ENSNewResolverIterator is returned from FilterNewResolver and is used to iterate over the raw logs and unpacked data for NewResolver events raised by the ENS contract. 483 type ENSNewResolverIterator struct { 484 Event *ENSNewResolver // Event containing the contract specifics and raw log 485 486 contract *bind.BoundContract // Generic contract to use for unpacking event data 487 event string // Event name to use for unpacking event data 488 489 logs chan types.Log // Log channel receiving the found contract events 490 sub ethereum.Subscription // Subscription for errors, completion and termination 491 done bool // Whether the subscription completed delivering logs 492 fail error // Occurred error to stop iteration 493 } 494 495 // Next advances the iterator to the subsequent event, returning whether there 496 // are any more events found. In case of a retrieval or parsing error, false is 497 // returned and Error() can be queried for the exact failure. 498 func (it *ENSNewResolverIterator) Next() bool { 499 // If the iterator failed, stop iterating 500 if it.fail != nil { 501 return false 502 } 503 // If the iterator completed, deliver directly whatever's available 504 if it.done { 505 select { 506 case log := <-it.logs: 507 it.Event = new(ENSNewResolver) 508 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 509 it.fail = err 510 return false 511 } 512 it.Event.Raw = log 513 return true 514 515 default: 516 return false 517 } 518 } 519 // Iterator still in progress, wait for either a data or an error event 520 select { 521 case log := <-it.logs: 522 it.Event = new(ENSNewResolver) 523 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 524 it.fail = err 525 return false 526 } 527 it.Event.Raw = log 528 return true 529 530 case err := <-it.sub.Err(): 531 it.done = true 532 it.fail = err 533 return it.Next() 534 } 535 } 536 537 // Error retruned any retrieval or parsing error occurred during filtering. 538 func (it *ENSNewResolverIterator) Error() error { 539 return it.fail 540 } 541 542 // Close terminates the iteration process, releasing any pending underlying 543 // resources. 544 func (it *ENSNewResolverIterator) Close() error { 545 it.sub.Unsubscribe() 546 return nil 547 } 548 549 // ENSNewResolver represents a NewResolver event raised by the ENS contract. 550 type ENSNewResolver struct { 551 Node [32]byte 552 Resolver common.Address 553 Raw types.Log // Blockchain specific contextual infos 554 } 555 556 // FilterNewResolver is a free log retrieval operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0. 557 // 558 // Solidity: event NewResolver(node indexed bytes32, resolver address) 559 func (_ENS *ENSFilterer) FilterNewResolver(opts *bind.FilterOpts, node [][32]byte) (*ENSNewResolverIterator, error) { 560 561 var nodeRule []interface{} 562 for _, nodeItem := range node { 563 nodeRule = append(nodeRule, nodeItem) 564 } 565 566 logs, sub, err := _ENS.contract.FilterLogs(opts, "NewResolver", nodeRule) 567 if err != nil { 568 return nil, err 569 } 570 return &ENSNewResolverIterator{contract: _ENS.contract, event: "NewResolver", logs: logs, sub: sub}, nil 571 } 572 573 // WatchNewResolver is a free log subscription operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0. 574 // 575 // Solidity: event NewResolver(node indexed bytes32, resolver address) 576 func (_ENS *ENSFilterer) WatchNewResolver(opts *bind.WatchOpts, sink chan<- *ENSNewResolver, node [][32]byte) (event.Subscription, error) { 577 578 var nodeRule []interface{} 579 for _, nodeItem := range node { 580 nodeRule = append(nodeRule, nodeItem) 581 } 582 583 logs, sub, err := _ENS.contract.WatchLogs(opts, "NewResolver", nodeRule) 584 if err != nil { 585 return nil, err 586 } 587 return event.NewSubscription(func(quit <-chan struct{}) error { 588 defer sub.Unsubscribe() 589 for { 590 select { 591 case log := <-logs: 592 // New log arrived, parse the event and forward to the user 593 event := new(ENSNewResolver) 594 if err := _ENS.contract.UnpackLog(event, "NewResolver", log); err != nil { 595 return err 596 } 597 event.Raw = log 598 599 select { 600 case sink <- event: 601 case err := <-sub.Err(): 602 return err 603 case <-quit: 604 return nil 605 } 606 case err := <-sub.Err(): 607 return err 608 case <-quit: 609 return nil 610 } 611 } 612 }), nil 613 } 614 615 // ENSNewTTLIterator is returned from FilterNewTTL and is used to iterate over the raw logs and unpacked data for NewTTL events raised by the ENS contract. 616 type ENSNewTTLIterator struct { 617 Event *ENSNewTTL // Event containing the contract specifics and raw log 618 619 contract *bind.BoundContract // Generic contract to use for unpacking event data 620 event string // Event name to use for unpacking event data 621 622 logs chan types.Log // Log channel receiving the found contract events 623 sub ethereum.Subscription // Subscription for errors, completion and termination 624 done bool // Whether the subscription completed delivering logs 625 fail error // Occurred error to stop iteration 626 } 627 628 // Next advances the iterator to the subsequent event, returning whether there 629 // are any more events found. In case of a retrieval or parsing error, false is 630 // returned and Error() can be queried for the exact failure. 631 func (it *ENSNewTTLIterator) Next() bool { 632 // If the iterator failed, stop iterating 633 if it.fail != nil { 634 return false 635 } 636 // If the iterator completed, deliver directly whatever's available 637 if it.done { 638 select { 639 case log := <-it.logs: 640 it.Event = new(ENSNewTTL) 641 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 642 it.fail = err 643 return false 644 } 645 it.Event.Raw = log 646 return true 647 648 default: 649 return false 650 } 651 } 652 // Iterator still in progress, wait for either a data or an error event 653 select { 654 case log := <-it.logs: 655 it.Event = new(ENSNewTTL) 656 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 657 it.fail = err 658 return false 659 } 660 it.Event.Raw = log 661 return true 662 663 case err := <-it.sub.Err(): 664 it.done = true 665 it.fail = err 666 return it.Next() 667 } 668 } 669 670 // Error retruned any retrieval or parsing error occurred during filtering. 671 func (it *ENSNewTTLIterator) Error() error { 672 return it.fail 673 } 674 675 // Close terminates the iteration process, releasing any pending underlying 676 // resources. 677 func (it *ENSNewTTLIterator) Close() error { 678 it.sub.Unsubscribe() 679 return nil 680 } 681 682 // ENSNewTTL represents a NewTTL event raised by the ENS contract. 683 type ENSNewTTL struct { 684 Node [32]byte 685 Ttl uint64 686 Raw types.Log // Blockchain specific contextual infos 687 } 688 689 // FilterNewTTL is a free log retrieval operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68. 690 // 691 // Solidity: event NewTTL(node indexed bytes32, ttl uint64) 692 func (_ENS *ENSFilterer) FilterNewTTL(opts *bind.FilterOpts, node [][32]byte) (*ENSNewTTLIterator, error) { 693 694 var nodeRule []interface{} 695 for _, nodeItem := range node { 696 nodeRule = append(nodeRule, nodeItem) 697 } 698 699 logs, sub, err := _ENS.contract.FilterLogs(opts, "NewTTL", nodeRule) 700 if err != nil { 701 return nil, err 702 } 703 return &ENSNewTTLIterator{contract: _ENS.contract, event: "NewTTL", logs: logs, sub: sub}, nil 704 } 705 706 // WatchNewTTL is a free log subscription operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68. 707 // 708 // Solidity: event NewTTL(node indexed bytes32, ttl uint64) 709 func (_ENS *ENSFilterer) WatchNewTTL(opts *bind.WatchOpts, sink chan<- *ENSNewTTL, node [][32]byte) (event.Subscription, error) { 710 711 var nodeRule []interface{} 712 for _, nodeItem := range node { 713 nodeRule = append(nodeRule, nodeItem) 714 } 715 716 logs, sub, err := _ENS.contract.WatchLogs(opts, "NewTTL", nodeRule) 717 if err != nil { 718 return nil, err 719 } 720 return event.NewSubscription(func(quit <-chan struct{}) error { 721 defer sub.Unsubscribe() 722 for { 723 select { 724 case log := <-logs: 725 // New log arrived, parse the event and forward to the user 726 event := new(ENSNewTTL) 727 if err := _ENS.contract.UnpackLog(event, "NewTTL", log); err != nil { 728 return err 729 } 730 event.Raw = log 731 732 select { 733 case sink <- event: 734 case err := <-sub.Err(): 735 return err 736 case <-quit: 737 return nil 738 } 739 case err := <-sub.Err(): 740 return err 741 case <-quit: 742 return nil 743 } 744 } 745 }), nil 746 } 747 748 // ENSTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ENS contract. 749 type ENSTransferIterator struct { 750 Event *ENSTransfer // Event containing the contract specifics and raw log 751 752 contract *bind.BoundContract // Generic contract to use for unpacking event data 753 event string // Event name to use for unpacking event data 754 755 logs chan types.Log // Log channel receiving the found contract events 756 sub ethereum.Subscription // Subscription for errors, completion and termination 757 done bool // Whether the subscription completed delivering logs 758 fail error // Occurred error to stop iteration 759 } 760 761 // Next advances the iterator to the subsequent event, returning whether there 762 // are any more events found. In case of a retrieval or parsing error, false is 763 // returned and Error() can be queried for the exact failure. 764 func (it *ENSTransferIterator) Next() bool { 765 // If the iterator failed, stop iterating 766 if it.fail != nil { 767 return false 768 } 769 // If the iterator completed, deliver directly whatever's available 770 if it.done { 771 select { 772 case log := <-it.logs: 773 it.Event = new(ENSTransfer) 774 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 775 it.fail = err 776 return false 777 } 778 it.Event.Raw = log 779 return true 780 781 default: 782 return false 783 } 784 } 785 // Iterator still in progress, wait for either a data or an error event 786 select { 787 case log := <-it.logs: 788 it.Event = new(ENSTransfer) 789 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 790 it.fail = err 791 return false 792 } 793 it.Event.Raw = log 794 return true 795 796 case err := <-it.sub.Err(): 797 it.done = true 798 it.fail = err 799 return it.Next() 800 } 801 } 802 803 // Error retruned any retrieval or parsing error occurred during filtering. 804 func (it *ENSTransferIterator) Error() error { 805 return it.fail 806 } 807 808 // Close terminates the iteration process, releasing any pending underlying 809 // resources. 810 func (it *ENSTransferIterator) Close() error { 811 it.sub.Unsubscribe() 812 return nil 813 } 814 815 // ENSTransfer represents a Transfer event raised by the ENS contract. 816 type ENSTransfer struct { 817 Node [32]byte 818 Owner common.Address 819 Raw types.Log // Blockchain specific contextual infos 820 } 821 822 // FilterTransfer is a free log retrieval operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266. 823 // 824 // Solidity: event Transfer(node indexed bytes32, owner address) 825 func (_ENS *ENSFilterer) FilterTransfer(opts *bind.FilterOpts, node [][32]byte) (*ENSTransferIterator, error) { 826 827 var nodeRule []interface{} 828 for _, nodeItem := range node { 829 nodeRule = append(nodeRule, nodeItem) 830 } 831 832 logs, sub, err := _ENS.contract.FilterLogs(opts, "Transfer", nodeRule) 833 if err != nil { 834 return nil, err 835 } 836 return &ENSTransferIterator{contract: _ENS.contract, event: "Transfer", logs: logs, sub: sub}, nil 837 } 838 839 // WatchTransfer is a free log subscription operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266. 840 // 841 // Solidity: event Transfer(node indexed bytes32, owner address) 842 func (_ENS *ENSFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ENSTransfer, node [][32]byte) (event.Subscription, error) { 843 844 var nodeRule []interface{} 845 for _, nodeItem := range node { 846 nodeRule = append(nodeRule, nodeItem) 847 } 848 849 logs, sub, err := _ENS.contract.WatchLogs(opts, "Transfer", nodeRule) 850 if err != nil { 851 return nil, err 852 } 853 return event.NewSubscription(func(quit <-chan struct{}) error { 854 defer sub.Unsubscribe() 855 for { 856 select { 857 case log := <-logs: 858 // New log arrived, parse the event and forward to the user 859 event := new(ENSTransfer) 860 if err := _ENS.contract.UnpackLog(event, "Transfer", log); err != nil { 861 return err 862 } 863 event.Raw = log 864 865 select { 866 case sink <- event: 867 case err := <-sub.Err(): 868 return err 869 case <-quit: 870 return nil 871 } 872 case err := <-sub.Err(): 873 return err 874 case <-quit: 875 return nil 876 } 877 } 878 }), nil 879 }