github.com/n1ghtfa1l/go-vnt@v0.6.4-alpha.6/contracts/vns/contract/vns.go (about)

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