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