contracts/ens: update public resolver, update go bindings
This commit is contained in:
@ -1,23 +0,0 @@
|
|||||||
pragma solidity ^0.4.0;
|
|
||||||
|
|
||||||
contract AbstractENS {
|
|
||||||
function owner(bytes32 node) constant returns(address);
|
|
||||||
function resolver(bytes32 node) constant returns(address);
|
|
||||||
function ttl(bytes32 node) constant returns(uint64);
|
|
||||||
function setOwner(bytes32 node, address owner);
|
|
||||||
function setSubnodeOwner(bytes32 node, bytes32 label, address owner);
|
|
||||||
function setResolver(bytes32 node, address resolver);
|
|
||||||
function setTTL(bytes32 node, uint64 ttl);
|
|
||||||
|
|
||||||
// Logged when the owner of a node assigns a new owner to a subnode.
|
|
||||||
event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);
|
|
||||||
|
|
||||||
// Logged when the owner of a node transfers ownership to a new account.
|
|
||||||
event Transfer(bytes32 indexed node, address owner);
|
|
||||||
|
|
||||||
// Logged when the resolver for a node changes.
|
|
||||||
event NewResolver(bytes32 indexed node, address resolver);
|
|
||||||
|
|
||||||
// Logged when the TTL of a node changes
|
|
||||||
event NewTTL(bytes32 indexed node, uint64 ttl);
|
|
||||||
}
|
|
@ -1,94 +1,26 @@
|
|||||||
pragma solidity ^0.4.0;
|
pragma solidity >=0.4.24;
|
||||||
|
|
||||||
import './AbstractENS.sol';
|
interface ENS {
|
||||||
|
|
||||||
/**
|
// Logged when the owner of a node assigns a new owner to a subnode.
|
||||||
* The ENS registry contract.
|
event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);
|
||||||
*/
|
|
||||||
contract ENS is AbstractENS {
|
|
||||||
struct Record {
|
|
||||||
address owner;
|
|
||||||
address resolver;
|
|
||||||
uint64 ttl;
|
|
||||||
}
|
|
||||||
|
|
||||||
mapping(bytes32=>Record) records;
|
// Logged when the owner of a node transfers ownership to a new account.
|
||||||
|
event Transfer(bytes32 indexed node, address owner);
|
||||||
|
|
||||||
// Permits modifications only by the owner of the specified node.
|
// Logged when the resolver for a node changes.
|
||||||
modifier only_owner(bytes32 node) {
|
event NewResolver(bytes32 indexed node, address resolver);
|
||||||
if (records[node].owner != msg.sender) throw;
|
|
||||||
_;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
// Logged when the TTL of a node changes
|
||||||
* Constructs a new ENS registrar.
|
event NewTTL(bytes32 indexed node, uint64 ttl);
|
||||||
*/
|
|
||||||
function ENS() {
|
|
||||||
records[0].owner = msg.sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the address that owns the specified node.
|
|
||||||
*/
|
|
||||||
function owner(bytes32 node) constant returns (address) {
|
|
||||||
return records[node].owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external;
|
||||||
* Returns the address of the resolver for the specified node.
|
function setResolver(bytes32 node, address resolver) external;
|
||||||
*/
|
function setOwner(bytes32 node, address owner) external;
|
||||||
function resolver(bytes32 node) constant returns (address) {
|
function setTTL(bytes32 node, uint64 ttl) external;
|
||||||
return records[node].resolver;
|
function owner(bytes32 node) external view returns (address);
|
||||||
}
|
function resolver(bytes32 node) external view returns (address);
|
||||||
|
function ttl(bytes32 node) external view returns (uint64);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the TTL of a node, and any records associated with it.
|
|
||||||
*/
|
|
||||||
function ttl(bytes32 node) constant returns (uint64) {
|
|
||||||
return records[node].ttl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transfers ownership of a node to a new address. May only be called by the current
|
|
||||||
* owner of the node.
|
|
||||||
* @param node The node to transfer ownership of.
|
|
||||||
* @param owner The address of the new owner.
|
|
||||||
*/
|
|
||||||
function setOwner(bytes32 node, address owner) only_owner(node) {
|
|
||||||
Transfer(node, owner);
|
|
||||||
records[node].owner = owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transfers ownership of a subnode sha3(node, label) to a new address. May only be
|
|
||||||
* called by the owner of the parent node.
|
|
||||||
* @param node The parent node.
|
|
||||||
* @param label The hash of the label specifying the subnode.
|
|
||||||
* @param owner The address of the new owner.
|
|
||||||
*/
|
|
||||||
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) only_owner(node) {
|
|
||||||
var subnode = sha3(node, label);
|
|
||||||
NewOwner(node, label, owner);
|
|
||||||
records[subnode].owner = owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the resolver address for the specified node.
|
|
||||||
* @param node The node to update.
|
|
||||||
* @param resolver The address of the resolver.
|
|
||||||
*/
|
|
||||||
function setResolver(bytes32 node, address resolver) only_owner(node) {
|
|
||||||
NewResolver(node, resolver);
|
|
||||||
records[node].resolver = resolver;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the TTL for the specified node.
|
|
||||||
* @param node The node to update.
|
|
||||||
* @param ttl The TTL in seconds.
|
|
||||||
*/
|
|
||||||
function setTTL(bytes32 node, uint64 ttl) only_owner(node) {
|
|
||||||
NewTTL(node, ttl);
|
|
||||||
records[node].ttl = ttl;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,20 +1,17 @@
|
|||||||
pragma solidity ^0.4.0;
|
pragma solidity ^0.5.0;
|
||||||
|
|
||||||
import './AbstractENS.sol';
|
import "./ENS.sol";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A registrar that allocates subdomains to the first person to claim them.
|
* A registrar that allocates subdomains to the first person to claim them.
|
||||||
*/
|
*/
|
||||||
contract FIFSRegistrar {
|
contract FIFSRegistrar {
|
||||||
AbstractENS ens;
|
ENS ens;
|
||||||
bytes32 rootNode;
|
bytes32 rootNode;
|
||||||
|
|
||||||
modifier only_owner(bytes32 subnode) {
|
modifier only_owner(bytes32 label) {
|
||||||
var node = sha3(rootNode, subnode);
|
address currentOwner = ens.owner(keccak256(abi.encodePacked(rootNode, label)));
|
||||||
var currentOwner = ens.owner(node);
|
require(currentOwner == address(0x0) || currentOwner == msg.sender);
|
||||||
|
|
||||||
if (currentOwner != 0 && currentOwner != msg.sender) throw;
|
|
||||||
|
|
||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,17 +20,17 @@ contract FIFSRegistrar {
|
|||||||
* @param ensAddr The address of the ENS registry.
|
* @param ensAddr The address of the ENS registry.
|
||||||
* @param node The node that this registrar administers.
|
* @param node The node that this registrar administers.
|
||||||
*/
|
*/
|
||||||
function FIFSRegistrar(AbstractENS ensAddr, bytes32 node) {
|
constructor(ENS ensAddr, bytes32 node) public {
|
||||||
ens = ensAddr;
|
ens = ensAddr;
|
||||||
rootNode = node;
|
rootNode = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a name, or change the owner of an existing registration.
|
* Register a name, or change the owner of an existing registration.
|
||||||
* @param subnode The hash of the label to register.
|
* @param label The hash of the label to register.
|
||||||
* @param owner The address of the new owner.
|
* @param owner The address of the new owner.
|
||||||
*/
|
*/
|
||||||
function register(bytes32 subnode, address owner) only_owner(subnode) {
|
function register(bytes32 label, address owner) public only_owner(label) {
|
||||||
ens.setSubnodeOwner(rootNode, subnode, owner);
|
ens.setSubnodeOwner(rootNode, label, owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
pragma solidity >=0.4.25;
|
pragma solidity >=0.4.25;
|
||||||
|
|
||||||
import "@ensdomains/ens/contracts/ENS.sol";
|
import "./ENS.sol";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple resolver anyone can use; only allows the owner of a node to set its
|
* A simple resolver anyone can use; only allows the owner of a node to set its
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
package contract
|
package contract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/ethereum/go-ethereum"
|
||||||
@ -14,11 +15,23 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/ethereum/go-ethereum/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var (
|
||||||
|
_ = big.NewInt
|
||||||
|
_ = strings.NewReader
|
||||||
|
_ = ethereum.NotFound
|
||||||
|
_ = abi.U256
|
||||||
|
_ = bind.Bind
|
||||||
|
_ = common.Big1
|
||||||
|
_ = types.BloomLookup
|
||||||
|
_ = event.NewSubscription
|
||||||
|
)
|
||||||
|
|
||||||
// ENSABI is the input ABI used to generate the binding from.
|
// ENSABI is the input ABI used to generate the binding from.
|
||||||
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\"}]"
|
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\"}]"
|
||||||
|
|
||||||
// ENSBin is the compiled bytecode used for deploying new contracts.
|
// ENSBin is the compiled bytecode used for deploying new contracts.
|
||||||
const ENSBin = `0x6060604052341561000f57600080fd5b60008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb58054600160a060020a033316600160a060020a0319909116179055610503806100626000396000f3006060604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461008757806302571be3146100b957806306ab5923146100cf57806314ab9038146100f657806316a25cbd146101195780631896f70a1461014c5780635b0fc9c31461016e575b600080fd5b341561009257600080fd5b61009d600435610190565b604051600160a060020a03909116815260200160405180910390f35b34156100c457600080fd5b61009d6004356101ae565b34156100da57600080fd5b6100f4600435602435600160a060020a03604435166101c9565b005b341561010157600080fd5b6100f460043567ffffffffffffffff6024351661028b565b341561012457600080fd5b61012f600435610357565b60405167ffffffffffffffff909116815260200160405180910390f35b341561015757600080fd5b6100f4600435600160a060020a036024351661038e565b341561017957600080fd5b6100f4600435600160a060020a0360243516610434565b600090815260208190526040902060010154600160a060020a031690565b600090815260208190526040902054600160a060020a031690565b600083815260208190526040812054849033600160a060020a039081169116146101f257600080fd5b8484604051918252602082015260409081019051908190039020915083857fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8285604051600160a060020a03909116815260200160405180910390a3506000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600082815260208190526040902054829033600160a060020a039081169116146102b457600080fd5b827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa688360405167ffffffffffffffff909116815260200160405180910390a250600091825260208290526040909120600101805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60009081526020819052604090206001015474010000000000000000000000000000000000000000900467ffffffffffffffff1690565b600082815260208190526040902054829033600160a060020a039081169116146103b757600080fd5b827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051600160a060020a03909116815260200160405180910390a250600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b600082815260208190526040902054829033600160a060020a0390811691161461045d57600080fd5b827fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26683604051600160a060020a03909116815260200160405180910390a250600091825260208290526040909120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555600a165627a7a72305820f4c798d4c84c9912f389f64631e85e8d16c3e6644f8c2e1579936015c7d5f6660029`
|
const ENSBin = `0x`
|
||||||
|
|
||||||
// DeployENS deploys a new Ethereum contract, binding an instance of ENS to it.
|
// DeployENS deploys a new Ethereum contract, binding an instance of ENS to it.
|
||||||
func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ENS, error) {
|
func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ENS, error) {
|
||||||
@ -177,7 +190,7 @@ func (_ENS *ENSTransactorRaw) Transact(opts *bind.TransactOpts, method string, p
|
|||||||
|
|
||||||
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
||||||
//
|
//
|
||||||
// Solidity: function owner(node bytes32) constant returns(address)
|
// Solidity: function owner(bytes32 node) constant returns(address)
|
||||||
func (_ENS *ENSCaller) Owner(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
|
func (_ENS *ENSCaller) Owner(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
|
||||||
var (
|
var (
|
||||||
ret0 = new(common.Address)
|
ret0 = new(common.Address)
|
||||||
@ -189,21 +202,21 @@ func (_ENS *ENSCaller) Owner(opts *bind.CallOpts, node [32]byte) (common.Address
|
|||||||
|
|
||||||
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
||||||
//
|
//
|
||||||
// Solidity: function owner(node bytes32) constant returns(address)
|
// Solidity: function owner(bytes32 node) constant returns(address)
|
||||||
func (_ENS *ENSSession) Owner(node [32]byte) (common.Address, error) {
|
func (_ENS *ENSSession) Owner(node [32]byte) (common.Address, error) {
|
||||||
return _ENS.Contract.Owner(&_ENS.CallOpts, node)
|
return _ENS.Contract.Owner(&_ENS.CallOpts, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
||||||
//
|
//
|
||||||
// Solidity: function owner(node bytes32) constant returns(address)
|
// Solidity: function owner(bytes32 node) constant returns(address)
|
||||||
func (_ENS *ENSCallerSession) Owner(node [32]byte) (common.Address, error) {
|
func (_ENS *ENSCallerSession) Owner(node [32]byte) (common.Address, error) {
|
||||||
return _ENS.Contract.Owner(&_ENS.CallOpts, node)
|
return _ENS.Contract.Owner(&_ENS.CallOpts, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
||||||
//
|
//
|
||||||
// Solidity: function resolver(node bytes32) constant returns(address)
|
// Solidity: function resolver(bytes32 node) constant returns(address)
|
||||||
func (_ENS *ENSCaller) Resolver(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
|
func (_ENS *ENSCaller) Resolver(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
|
||||||
var (
|
var (
|
||||||
ret0 = new(common.Address)
|
ret0 = new(common.Address)
|
||||||
@ -215,22 +228,22 @@ func (_ENS *ENSCaller) Resolver(opts *bind.CallOpts, node [32]byte) (common.Addr
|
|||||||
|
|
||||||
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
||||||
//
|
//
|
||||||
// Solidity: function resolver(node bytes32) constant returns(address)
|
// Solidity: function resolver(bytes32 node) constant returns(address)
|
||||||
func (_ENS *ENSSession) Resolver(node [32]byte) (common.Address, error) {
|
func (_ENS *ENSSession) Resolver(node [32]byte) (common.Address, error) {
|
||||||
return _ENS.Contract.Resolver(&_ENS.CallOpts, node)
|
return _ENS.Contract.Resolver(&_ENS.CallOpts, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
||||||
//
|
//
|
||||||
// Solidity: function resolver(node bytes32) constant returns(address)
|
// Solidity: function resolver(bytes32 node) constant returns(address)
|
||||||
func (_ENS *ENSCallerSession) Resolver(node [32]byte) (common.Address, error) {
|
func (_ENS *ENSCallerSession) Resolver(node [32]byte) (common.Address, error) {
|
||||||
return _ENS.Contract.Resolver(&_ENS.CallOpts, node)
|
return _ENS.Contract.Resolver(&_ENS.CallOpts, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TTL is a free data retrieval call binding the contract method 0x16a25cbd.
|
// Ttl is a free data retrieval call binding the contract method 0x16a25cbd.
|
||||||
//
|
//
|
||||||
// Solidity: function ttl(node bytes32) constant returns(uint64)
|
// Solidity: function ttl(bytes32 node) constant returns(uint64)
|
||||||
func (_ENS *ENSCaller) TTL(opts *bind.CallOpts, node [32]byte) (uint64, error) {
|
func (_ENS *ENSCaller) Ttl(opts *bind.CallOpts, node [32]byte) (uint64, error) {
|
||||||
var (
|
var (
|
||||||
ret0 = new(uint64)
|
ret0 = new(uint64)
|
||||||
)
|
)
|
||||||
@ -239,100 +252,100 @@ func (_ENS *ENSCaller) TTL(opts *bind.CallOpts, node [32]byte) (uint64, error) {
|
|||||||
return *ret0, err
|
return *ret0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TTL is a free data retrieval call binding the contract method 0x16a25cbd.
|
// Ttl is a free data retrieval call binding the contract method 0x16a25cbd.
|
||||||
//
|
//
|
||||||
// Solidity: function ttl(node bytes32) constant returns(uint64)
|
// Solidity: function ttl(bytes32 node) constant returns(uint64)
|
||||||
func (_ENS *ENSSession) TTL(node [32]byte) (uint64, error) {
|
func (_ENS *ENSSession) Ttl(node [32]byte) (uint64, error) {
|
||||||
return _ENS.Contract.TTL(&_ENS.CallOpts, node)
|
return _ENS.Contract.Ttl(&_ENS.CallOpts, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TTL is a free data retrieval call binding the contract method 0x16a25cbd.
|
// Ttl is a free data retrieval call binding the contract method 0x16a25cbd.
|
||||||
//
|
//
|
||||||
// Solidity: function ttl(node bytes32) constant returns(uint64)
|
// Solidity: function ttl(bytes32 node) constant returns(uint64)
|
||||||
func (_ENS *ENSCallerSession) TTL(node [32]byte) (uint64, error) {
|
func (_ENS *ENSCallerSession) Ttl(node [32]byte) (uint64, error) {
|
||||||
return _ENS.Contract.TTL(&_ENS.CallOpts, node)
|
return _ENS.Contract.Ttl(&_ENS.CallOpts, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
||||||
//
|
//
|
||||||
// Solidity: function setOwner(node bytes32, owner address) returns()
|
// Solidity: function setOwner(bytes32 node, address owner) returns()
|
||||||
func (_ENS *ENSTransactor) SetOwner(opts *bind.TransactOpts, node [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSTransactor) SetOwner(opts *bind.TransactOpts, node [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.contract.Transact(opts, "setOwner", node, owner)
|
return _ENS.contract.Transact(opts, "setOwner", node, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
||||||
//
|
//
|
||||||
// Solidity: function setOwner(node bytes32, owner address) returns()
|
// Solidity: function setOwner(bytes32 node, address owner) returns()
|
||||||
func (_ENS *ENSSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner)
|
return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
||||||
//
|
//
|
||||||
// Solidity: function setOwner(node bytes32, owner address) returns()
|
// Solidity: function setOwner(bytes32 node, address owner) returns()
|
||||||
func (_ENS *ENSTransactorSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSTransactorSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner)
|
return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
||||||
//
|
//
|
||||||
// Solidity: function setResolver(node bytes32, resolver address) returns()
|
// Solidity: function setResolver(bytes32 node, address resolver) returns()
|
||||||
func (_ENS *ENSTransactor) SetResolver(opts *bind.TransactOpts, node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSTransactor) SetResolver(opts *bind.TransactOpts, node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.contract.Transact(opts, "setResolver", node, resolver)
|
return _ENS.contract.Transact(opts, "setResolver", node, resolver)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
||||||
//
|
//
|
||||||
// Solidity: function setResolver(node bytes32, resolver address) returns()
|
// Solidity: function setResolver(bytes32 node, address resolver) returns()
|
||||||
func (_ENS *ENSSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver)
|
return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
||||||
//
|
//
|
||||||
// Solidity: function setResolver(node bytes32, resolver address) returns()
|
// Solidity: function setResolver(bytes32 node, address resolver) returns()
|
||||||
func (_ENS *ENSTransactorSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSTransactorSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver)
|
return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
||||||
//
|
//
|
||||||
// Solidity: function setSubnodeOwner(node bytes32, label bytes32, owner address) returns()
|
// Solidity: function setSubnodeOwner(bytes32 node, bytes32 label, address owner) returns()
|
||||||
func (_ENS *ENSTransactor) SetSubnodeOwner(opts *bind.TransactOpts, node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSTransactor) SetSubnodeOwner(opts *bind.TransactOpts, node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.contract.Transact(opts, "setSubnodeOwner", node, label, owner)
|
return _ENS.contract.Transact(opts, "setSubnodeOwner", node, label, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
||||||
//
|
//
|
||||||
// Solidity: function setSubnodeOwner(node bytes32, label bytes32, owner address) returns()
|
// Solidity: function setSubnodeOwner(bytes32 node, bytes32 label, address owner) returns()
|
||||||
func (_ENS *ENSSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner)
|
return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
||||||
//
|
//
|
||||||
// Solidity: function setSubnodeOwner(node bytes32, label bytes32, owner address) returns()
|
// Solidity: function setSubnodeOwner(bytes32 node, bytes32 label, address owner) returns()
|
||||||
func (_ENS *ENSTransactorSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_ENS *ENSTransactorSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner)
|
return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
||||||
//
|
//
|
||||||
// Solidity: function setTTL(node bytes32, ttl uint64) returns()
|
// Solidity: function setTTL(bytes32 node, uint64 ttl) returns()
|
||||||
func (_ENS *ENSTransactor) SetTTL(opts *bind.TransactOpts, node [32]byte, ttl uint64) (*types.Transaction, error) {
|
func (_ENS *ENSTransactor) SetTTL(opts *bind.TransactOpts, node [32]byte, ttl uint64) (*types.Transaction, error) {
|
||||||
return _ENS.contract.Transact(opts, "setTTL", node, ttl)
|
return _ENS.contract.Transact(opts, "setTTL", node, ttl)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
||||||
//
|
//
|
||||||
// Solidity: function setTTL(node bytes32, ttl uint64) returns()
|
// Solidity: function setTTL(bytes32 node, uint64 ttl) returns()
|
||||||
func (_ENS *ENSSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) {
|
func (_ENS *ENSSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl)
|
return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
||||||
//
|
//
|
||||||
// Solidity: function setTTL(node bytes32, ttl uint64) returns()
|
// Solidity: function setTTL(bytes32 node, uint64 ttl) returns()
|
||||||
func (_ENS *ENSTransactorSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) {
|
func (_ENS *ENSTransactorSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) {
|
||||||
return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl)
|
return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl)
|
||||||
}
|
}
|
||||||
@ -392,7 +405,7 @@ func (it *ENSNewOwnerIterator) Next() bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error retruned any retrieval or parsing error occurred during filtering.
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
func (it *ENSNewOwnerIterator) Error() error {
|
func (it *ENSNewOwnerIterator) Error() error {
|
||||||
return it.fail
|
return it.fail
|
||||||
}
|
}
|
||||||
@ -414,7 +427,7 @@ type ENSNewOwner struct {
|
|||||||
|
|
||||||
// FilterNewOwner is a free log retrieval operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82.
|
// FilterNewOwner is a free log retrieval operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82.
|
||||||
//
|
//
|
||||||
// Solidity: event NewOwner(node indexed bytes32, label indexed bytes32, owner address)
|
// Solidity: event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner)
|
||||||
func (_ENS *ENSFilterer) FilterNewOwner(opts *bind.FilterOpts, node [][32]byte, label [][32]byte) (*ENSNewOwnerIterator, error) {
|
func (_ENS *ENSFilterer) FilterNewOwner(opts *bind.FilterOpts, node [][32]byte, label [][32]byte) (*ENSNewOwnerIterator, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -435,7 +448,7 @@ func (_ENS *ENSFilterer) FilterNewOwner(opts *bind.FilterOpts, node [][32]byte,
|
|||||||
|
|
||||||
// WatchNewOwner is a free log subscription operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82.
|
// WatchNewOwner is a free log subscription operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82.
|
||||||
//
|
//
|
||||||
// Solidity: event NewOwner(node indexed bytes32, label indexed bytes32, owner address)
|
// Solidity: event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner)
|
||||||
func (_ENS *ENSFilterer) WatchNewOwner(opts *bind.WatchOpts, sink chan<- *ENSNewOwner, node [][32]byte, label [][32]byte) (event.Subscription, error) {
|
func (_ENS *ENSFilterer) WatchNewOwner(opts *bind.WatchOpts, sink chan<- *ENSNewOwner, node [][32]byte, label [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -534,7 +547,7 @@ func (it *ENSNewResolverIterator) Next() bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error retruned any retrieval or parsing error occurred during filtering.
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
func (it *ENSNewResolverIterator) Error() error {
|
func (it *ENSNewResolverIterator) Error() error {
|
||||||
return it.fail
|
return it.fail
|
||||||
}
|
}
|
||||||
@ -555,7 +568,7 @@ type ENSNewResolver struct {
|
|||||||
|
|
||||||
// FilterNewResolver is a free log retrieval operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0.
|
// FilterNewResolver is a free log retrieval operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0.
|
||||||
//
|
//
|
||||||
// Solidity: event NewResolver(node indexed bytes32, resolver address)
|
// Solidity: event NewResolver(bytes32 indexed node, address resolver)
|
||||||
func (_ENS *ENSFilterer) FilterNewResolver(opts *bind.FilterOpts, node [][32]byte) (*ENSNewResolverIterator, error) {
|
func (_ENS *ENSFilterer) FilterNewResolver(opts *bind.FilterOpts, node [][32]byte) (*ENSNewResolverIterator, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -572,7 +585,7 @@ func (_ENS *ENSFilterer) FilterNewResolver(opts *bind.FilterOpts, node [][32]byt
|
|||||||
|
|
||||||
// WatchNewResolver is a free log subscription operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0.
|
// WatchNewResolver is a free log subscription operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0.
|
||||||
//
|
//
|
||||||
// Solidity: event NewResolver(node indexed bytes32, resolver address)
|
// Solidity: event NewResolver(bytes32 indexed node, address resolver)
|
||||||
func (_ENS *ENSFilterer) WatchNewResolver(opts *bind.WatchOpts, sink chan<- *ENSNewResolver, node [][32]byte) (event.Subscription, error) {
|
func (_ENS *ENSFilterer) WatchNewResolver(opts *bind.WatchOpts, sink chan<- *ENSNewResolver, node [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -667,7 +680,7 @@ func (it *ENSNewTTLIterator) Next() bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error retruned any retrieval or parsing error occurred during filtering.
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
func (it *ENSNewTTLIterator) Error() error {
|
func (it *ENSNewTTLIterator) Error() error {
|
||||||
return it.fail
|
return it.fail
|
||||||
}
|
}
|
||||||
@ -682,13 +695,13 @@ func (it *ENSNewTTLIterator) Close() error {
|
|||||||
// ENSNewTTL represents a NewTTL event raised by the ENS contract.
|
// ENSNewTTL represents a NewTTL event raised by the ENS contract.
|
||||||
type ENSNewTTL struct {
|
type ENSNewTTL struct {
|
||||||
Node [32]byte
|
Node [32]byte
|
||||||
TTL uint64
|
Ttl uint64
|
||||||
Raw types.Log // Blockchain specific contextual infos
|
Raw types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
// FilterNewTTL is a free log retrieval operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68.
|
// FilterNewTTL is a free log retrieval operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68.
|
||||||
//
|
//
|
||||||
// Solidity: event NewTTL(node indexed bytes32, ttl uint64)
|
// Solidity: event NewTTL(bytes32 indexed node, uint64 ttl)
|
||||||
func (_ENS *ENSFilterer) FilterNewTTL(opts *bind.FilterOpts, node [][32]byte) (*ENSNewTTLIterator, error) {
|
func (_ENS *ENSFilterer) FilterNewTTL(opts *bind.FilterOpts, node [][32]byte) (*ENSNewTTLIterator, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -705,7 +718,7 @@ func (_ENS *ENSFilterer) FilterNewTTL(opts *bind.FilterOpts, node [][32]byte) (*
|
|||||||
|
|
||||||
// WatchNewTTL is a free log subscription operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68.
|
// WatchNewTTL is a free log subscription operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68.
|
||||||
//
|
//
|
||||||
// Solidity: event NewTTL(node indexed bytes32, ttl uint64)
|
// Solidity: event NewTTL(bytes32 indexed node, uint64 ttl)
|
||||||
func (_ENS *ENSFilterer) WatchNewTTL(opts *bind.WatchOpts, sink chan<- *ENSNewTTL, node [][32]byte) (event.Subscription, error) {
|
func (_ENS *ENSFilterer) WatchNewTTL(opts *bind.WatchOpts, sink chan<- *ENSNewTTL, node [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -800,7 +813,7 @@ func (it *ENSTransferIterator) Next() bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error retruned any retrieval or parsing error occurred during filtering.
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
func (it *ENSTransferIterator) Error() error {
|
func (it *ENSTransferIterator) Error() error {
|
||||||
return it.fail
|
return it.fail
|
||||||
}
|
}
|
||||||
@ -821,7 +834,7 @@ type ENSTransfer struct {
|
|||||||
|
|
||||||
// FilterTransfer is a free log retrieval operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266.
|
// FilterTransfer is a free log retrieval operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266.
|
||||||
//
|
//
|
||||||
// Solidity: event Transfer(node indexed bytes32, owner address)
|
// Solidity: event Transfer(bytes32 indexed node, address owner)
|
||||||
func (_ENS *ENSFilterer) FilterTransfer(opts *bind.FilterOpts, node [][32]byte) (*ENSTransferIterator, error) {
|
func (_ENS *ENSFilterer) FilterTransfer(opts *bind.FilterOpts, node [][32]byte) (*ENSTransferIterator, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
@ -838,7 +851,7 @@ func (_ENS *ENSFilterer) FilterTransfer(opts *bind.FilterOpts, node [][32]byte)
|
|||||||
|
|
||||||
// WatchTransfer is a free log subscription operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266.
|
// WatchTransfer is a free log subscription operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266.
|
||||||
//
|
//
|
||||||
// Solidity: event Transfer(node indexed bytes32, owner address)
|
// Solidity: event Transfer(bytes32 indexed node, address owner)
|
||||||
func (_ENS *ENSFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ENSTransfer, node [][32]byte) (event.Subscription, error) {
|
func (_ENS *ENSFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ENSTransfer, node [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
var nodeRule []interface{}
|
var nodeRule []interface{}
|
||||||
|
@ -4,19 +4,898 @@
|
|||||||
package contract
|
package contract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
ethereum "github.com/ethereum/go-ethereum"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/ethereum/go-ethereum/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
|
"github.com/ethereum/go-ethereum/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var (
|
||||||
|
_ = big.NewInt
|
||||||
|
_ = strings.NewReader
|
||||||
|
_ = ethereum.NotFound
|
||||||
|
_ = abi.U256
|
||||||
|
_ = bind.Bind
|
||||||
|
_ = common.Big1
|
||||||
|
_ = types.BloomLookup
|
||||||
|
_ = event.NewSubscription
|
||||||
|
)
|
||||||
|
|
||||||
|
// ENSABI is the input ABI used to generate the binding from.
|
||||||
|
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\"}]"
|
||||||
|
|
||||||
|
// ENSBin is the compiled bytecode used for deploying new contracts.
|
||||||
|
const ENSBin = `0x`
|
||||||
|
|
||||||
|
// DeployENS deploys a new Ethereum contract, binding an instance of ENS to it.
|
||||||
|
func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ENS, error) {
|
||||||
|
parsed, err := abi.JSON(strings.NewReader(ENSABI))
|
||||||
|
if err != nil {
|
||||||
|
return common.Address{}, nil, nil, err
|
||||||
|
}
|
||||||
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ENSBin), backend)
|
||||||
|
if err != nil {
|
||||||
|
return common.Address{}, nil, nil, err
|
||||||
|
}
|
||||||
|
return address, tx, &ENS{ENSCaller: ENSCaller{contract: contract}, ENSTransactor: ENSTransactor{contract: contract}, ENSFilterer: ENSFilterer{contract: contract}}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENS is an auto generated Go binding around an Ethereum contract.
|
||||||
|
type ENS struct {
|
||||||
|
ENSCaller // Read-only binding to the contract
|
||||||
|
ENSTransactor // Write-only binding to the contract
|
||||||
|
ENSFilterer // Log filterer for contract events
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSCaller is an auto generated read-only Go binding around an Ethereum contract.
|
||||||
|
type ENSCaller struct {
|
||||||
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
||||||
|
type ENSTransactor struct {
|
||||||
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
||||||
|
type ENSFilterer struct {
|
||||||
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSSession is an auto generated Go binding around an Ethereum contract,
|
||||||
|
// with pre-set call and transact options.
|
||||||
|
type ENSSession struct {
|
||||||
|
Contract *ENS // Generic contract binding to set the session for
|
||||||
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
||||||
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
||||||
|
// with pre-set call options.
|
||||||
|
type ENSCallerSession struct {
|
||||||
|
Contract *ENSCaller // Generic contract caller binding to set the session for
|
||||||
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
||||||
|
// with pre-set transact options.
|
||||||
|
type ENSTransactorSession struct {
|
||||||
|
Contract *ENSTransactor // Generic contract transactor binding to set the session for
|
||||||
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSRaw is an auto generated low-level Go binding around an Ethereum contract.
|
||||||
|
type ENSRaw struct {
|
||||||
|
Contract *ENS // Generic contract binding to access the raw methods on
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
||||||
|
type ENSCallerRaw struct {
|
||||||
|
Contract *ENSCaller // Generic read-only contract binding to access the raw methods on
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
||||||
|
type ENSTransactorRaw struct {
|
||||||
|
Contract *ENSTransactor // Generic write-only contract binding to access the raw methods on
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewENS creates a new instance of ENS, bound to a specific deployed contract.
|
||||||
|
func NewENS(address common.Address, backend bind.ContractBackend) (*ENS, error) {
|
||||||
|
contract, err := bindENS(address, backend, backend, backend)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENS{ENSCaller: ENSCaller{contract: contract}, ENSTransactor: ENSTransactor{contract: contract}, ENSFilterer: ENSFilterer{contract: contract}}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewENSCaller creates a new read-only instance of ENS, bound to a specific deployed contract.
|
||||||
|
func NewENSCaller(address common.Address, caller bind.ContractCaller) (*ENSCaller, error) {
|
||||||
|
contract, err := bindENS(address, caller, nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSCaller{contract: contract}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewENSTransactor creates a new write-only instance of ENS, bound to a specific deployed contract.
|
||||||
|
func NewENSTransactor(address common.Address, transactor bind.ContractTransactor) (*ENSTransactor, error) {
|
||||||
|
contract, err := bindENS(address, nil, transactor, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSTransactor{contract: contract}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewENSFilterer creates a new log filterer instance of ENS, bound to a specific deployed contract.
|
||||||
|
func NewENSFilterer(address common.Address, filterer bind.ContractFilterer) (*ENSFilterer, error) {
|
||||||
|
contract, err := bindENS(address, nil, nil, filterer)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSFilterer{contract: contract}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// bindENS binds a generic wrapper to an already deployed contract.
|
||||||
|
func bindENS(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
||||||
|
parsed, err := abi.JSON(strings.NewReader(ENSABI))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call invokes the (constant) contract method with params as input values and
|
||||||
|
// sets the output to result. The result type might be a single field for simple
|
||||||
|
// returns, a slice of interfaces for anonymous returns and a struct for named
|
||||||
|
// returns.
|
||||||
|
func (_ENS *ENSRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
|
||||||
|
return _ENS.Contract.ENSCaller.contract.Call(opts, result, method, params...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
||||||
|
// its default method if one is available.
|
||||||
|
func (_ENS *ENSRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.ENSTransactor.contract.Transfer(opts)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transact invokes the (paid) contract method with params as input values.
|
||||||
|
func (_ENS *ENSRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.ENSTransactor.contract.Transact(opts, method, params...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call invokes the (constant) contract method with params as input values and
|
||||||
|
// sets the output to result. The result type might be a single field for simple
|
||||||
|
// returns, a slice of interfaces for anonymous returns and a struct for named
|
||||||
|
// returns.
|
||||||
|
func (_ENS *ENSCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
|
||||||
|
return _ENS.Contract.contract.Call(opts, result, method, params...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
||||||
|
// its default method if one is available.
|
||||||
|
func (_ENS *ENSTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.contract.Transfer(opts)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transact invokes the (paid) contract method with params as input values.
|
||||||
|
func (_ENS *ENSTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.contract.Transact(opts, method, params...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
||||||
|
//
|
||||||
|
// Solidity: function owner(bytes32 node) constant returns(address)
|
||||||
|
func (_ENS *ENSCaller) Owner(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
|
||||||
|
var (
|
||||||
|
ret0 = new(common.Address)
|
||||||
|
)
|
||||||
|
out := ret0
|
||||||
|
err := _ENS.contract.Call(opts, out, "owner", node)
|
||||||
|
return *ret0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
||||||
|
//
|
||||||
|
// Solidity: function owner(bytes32 node) constant returns(address)
|
||||||
|
func (_ENS *ENSSession) Owner(node [32]byte) (common.Address, error) {
|
||||||
|
return _ENS.Contract.Owner(&_ENS.CallOpts, node)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Owner is a free data retrieval call binding the contract method 0x02571be3.
|
||||||
|
//
|
||||||
|
// Solidity: function owner(bytes32 node) constant returns(address)
|
||||||
|
func (_ENS *ENSCallerSession) Owner(node [32]byte) (common.Address, error) {
|
||||||
|
return _ENS.Contract.Owner(&_ENS.CallOpts, node)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
||||||
|
//
|
||||||
|
// Solidity: function resolver(bytes32 node) constant returns(address)
|
||||||
|
func (_ENS *ENSCaller) Resolver(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
|
||||||
|
var (
|
||||||
|
ret0 = new(common.Address)
|
||||||
|
)
|
||||||
|
out := ret0
|
||||||
|
err := _ENS.contract.Call(opts, out, "resolver", node)
|
||||||
|
return *ret0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
||||||
|
//
|
||||||
|
// Solidity: function resolver(bytes32 node) constant returns(address)
|
||||||
|
func (_ENS *ENSSession) Resolver(node [32]byte) (common.Address, error) {
|
||||||
|
return _ENS.Contract.Resolver(&_ENS.CallOpts, node)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolver is a free data retrieval call binding the contract method 0x0178b8bf.
|
||||||
|
//
|
||||||
|
// Solidity: function resolver(bytes32 node) constant returns(address)
|
||||||
|
func (_ENS *ENSCallerSession) Resolver(node [32]byte) (common.Address, error) {
|
||||||
|
return _ENS.Contract.Resolver(&_ENS.CallOpts, node)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ttl is a free data retrieval call binding the contract method 0x16a25cbd.
|
||||||
|
//
|
||||||
|
// Solidity: function ttl(bytes32 node) constant returns(uint64)
|
||||||
|
func (_ENS *ENSCaller) Ttl(opts *bind.CallOpts, node [32]byte) (uint64, error) {
|
||||||
|
var (
|
||||||
|
ret0 = new(uint64)
|
||||||
|
)
|
||||||
|
out := ret0
|
||||||
|
err := _ENS.contract.Call(opts, out, "ttl", node)
|
||||||
|
return *ret0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ttl is a free data retrieval call binding the contract method 0x16a25cbd.
|
||||||
|
//
|
||||||
|
// Solidity: function ttl(bytes32 node) constant returns(uint64)
|
||||||
|
func (_ENS *ENSSession) Ttl(node [32]byte) (uint64, error) {
|
||||||
|
return _ENS.Contract.Ttl(&_ENS.CallOpts, node)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ttl is a free data retrieval call binding the contract method 0x16a25cbd.
|
||||||
|
//
|
||||||
|
// Solidity: function ttl(bytes32 node) constant returns(uint64)
|
||||||
|
func (_ENS *ENSCallerSession) Ttl(node [32]byte) (uint64, error) {
|
||||||
|
return _ENS.Contract.Ttl(&_ENS.CallOpts, node)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
||||||
|
//
|
||||||
|
// Solidity: function setOwner(bytes32 node, address owner) returns()
|
||||||
|
func (_ENS *ENSTransactor) SetOwner(opts *bind.TransactOpts, node [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.contract.Transact(opts, "setOwner", node, owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
||||||
|
//
|
||||||
|
// Solidity: function setOwner(bytes32 node, address owner) returns()
|
||||||
|
func (_ENS *ENSSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOwner is a paid mutator transaction binding the contract method 0x5b0fc9c3.
|
||||||
|
//
|
||||||
|
// Solidity: function setOwner(bytes32 node, address owner) returns()
|
||||||
|
func (_ENS *ENSTransactorSession) SetOwner(node [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetOwner(&_ENS.TransactOpts, node, owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
||||||
|
//
|
||||||
|
// Solidity: function setResolver(bytes32 node, address resolver) returns()
|
||||||
|
func (_ENS *ENSTransactor) SetResolver(opts *bind.TransactOpts, node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.contract.Transact(opts, "setResolver", node, resolver)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
||||||
|
//
|
||||||
|
// Solidity: function setResolver(bytes32 node, address resolver) returns()
|
||||||
|
func (_ENS *ENSSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResolver is a paid mutator transaction binding the contract method 0x1896f70a.
|
||||||
|
//
|
||||||
|
// Solidity: function setResolver(bytes32 node, address resolver) returns()
|
||||||
|
func (_ENS *ENSTransactorSession) SetResolver(node [32]byte, resolver common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetResolver(&_ENS.TransactOpts, node, resolver)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
||||||
|
//
|
||||||
|
// Solidity: function setSubnodeOwner(bytes32 node, bytes32 label, address owner) returns()
|
||||||
|
func (_ENS *ENSTransactor) SetSubnodeOwner(opts *bind.TransactOpts, node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.contract.Transact(opts, "setSubnodeOwner", node, label, owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
||||||
|
//
|
||||||
|
// Solidity: function setSubnodeOwner(bytes32 node, bytes32 label, address owner) returns()
|
||||||
|
func (_ENS *ENSSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSubnodeOwner is a paid mutator transaction binding the contract method 0x06ab5923.
|
||||||
|
//
|
||||||
|
// Solidity: function setSubnodeOwner(bytes32 node, bytes32 label, address owner) returns()
|
||||||
|
func (_ENS *ENSTransactorSession) SetSubnodeOwner(node [32]byte, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetSubnodeOwner(&_ENS.TransactOpts, node, label, owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
||||||
|
//
|
||||||
|
// Solidity: function setTTL(bytes32 node, uint64 ttl) returns()
|
||||||
|
func (_ENS *ENSTransactor) SetTTL(opts *bind.TransactOpts, node [32]byte, ttl uint64) (*types.Transaction, error) {
|
||||||
|
return _ENS.contract.Transact(opts, "setTTL", node, ttl)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
||||||
|
//
|
||||||
|
// Solidity: function setTTL(bytes32 node, uint64 ttl) returns()
|
||||||
|
func (_ENS *ENSSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTTL is a paid mutator transaction binding the contract method 0x14ab9038.
|
||||||
|
//
|
||||||
|
// Solidity: function setTTL(bytes32 node, uint64 ttl) returns()
|
||||||
|
func (_ENS *ENSTransactorSession) SetTTL(node [32]byte, ttl uint64) (*types.Transaction, error) {
|
||||||
|
return _ENS.Contract.SetTTL(&_ENS.TransactOpts, node, ttl)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
type ENSNewOwnerIterator struct {
|
||||||
|
Event *ENSNewOwner // Event containing the contract specifics and raw log
|
||||||
|
|
||||||
|
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
||||||
|
event string // Event name to use for unpacking event data
|
||||||
|
|
||||||
|
logs chan types.Log // Log channel receiving the found contract events
|
||||||
|
sub ethereum.Subscription // Subscription for errors, completion and termination
|
||||||
|
done bool // Whether the subscription completed delivering logs
|
||||||
|
fail error // Occurred error to stop iteration
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next advances the iterator to the subsequent event, returning whether there
|
||||||
|
// are any more events found. In case of a retrieval or parsing error, false is
|
||||||
|
// returned and Error() can be queried for the exact failure.
|
||||||
|
func (it *ENSNewOwnerIterator) Next() bool {
|
||||||
|
// If the iterator failed, stop iterating
|
||||||
|
if it.fail != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// If the iterator completed, deliver directly whatever's available
|
||||||
|
if it.done {
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSNewOwner)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Iterator still in progress, wait for either a data or an error event
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSNewOwner)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
case err := <-it.sub.Err():
|
||||||
|
it.done = true
|
||||||
|
it.fail = err
|
||||||
|
return it.Next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
|
func (it *ENSNewOwnerIterator) Error() error {
|
||||||
|
return it.fail
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close terminates the iteration process, releasing any pending underlying
|
||||||
|
// resources.
|
||||||
|
func (it *ENSNewOwnerIterator) Close() error {
|
||||||
|
it.sub.Unsubscribe()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSNewOwner represents a NewOwner event raised by the ENS contract.
|
||||||
|
type ENSNewOwner struct {
|
||||||
|
Node [32]byte
|
||||||
|
Label [32]byte
|
||||||
|
Owner common.Address
|
||||||
|
Raw types.Log // Blockchain specific contextual infos
|
||||||
|
}
|
||||||
|
|
||||||
|
// FilterNewOwner is a free log retrieval operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82.
|
||||||
|
//
|
||||||
|
// Solidity: event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner)
|
||||||
|
func (_ENS *ENSFilterer) FilterNewOwner(opts *bind.FilterOpts, node [][32]byte, label [][32]byte) (*ENSNewOwnerIterator, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
var labelRule []interface{}
|
||||||
|
for _, labelItem := range label {
|
||||||
|
labelRule = append(labelRule, labelItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.FilterLogs(opts, "NewOwner", nodeRule, labelRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSNewOwnerIterator{contract: _ENS.contract, event: "NewOwner", logs: logs, sub: sub}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// WatchNewOwner is a free log subscription operation binding the contract event 0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82.
|
||||||
|
//
|
||||||
|
// Solidity: event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner)
|
||||||
|
func (_ENS *ENSFilterer) WatchNewOwner(opts *bind.WatchOpts, sink chan<- *ENSNewOwner, node [][32]byte, label [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
var labelRule []interface{}
|
||||||
|
for _, labelItem := range label {
|
||||||
|
labelRule = append(labelRule, labelItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.WatchLogs(opts, "NewOwner", nodeRule, labelRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return event.NewSubscription(func(quit <-chan struct{}) error {
|
||||||
|
defer sub.Unsubscribe()
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case log := <-logs:
|
||||||
|
// New log arrived, parse the event and forward to the user
|
||||||
|
event := new(ENSNewOwner)
|
||||||
|
if err := _ENS.contract.UnpackLog(event, "NewOwner", log); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
event.Raw = log
|
||||||
|
|
||||||
|
select {
|
||||||
|
case sink <- event:
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
type ENSNewResolverIterator struct {
|
||||||
|
Event *ENSNewResolver // Event containing the contract specifics and raw log
|
||||||
|
|
||||||
|
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
||||||
|
event string // Event name to use for unpacking event data
|
||||||
|
|
||||||
|
logs chan types.Log // Log channel receiving the found contract events
|
||||||
|
sub ethereum.Subscription // Subscription for errors, completion and termination
|
||||||
|
done bool // Whether the subscription completed delivering logs
|
||||||
|
fail error // Occurred error to stop iteration
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next advances the iterator to the subsequent event, returning whether there
|
||||||
|
// are any more events found. In case of a retrieval or parsing error, false is
|
||||||
|
// returned and Error() can be queried for the exact failure.
|
||||||
|
func (it *ENSNewResolverIterator) Next() bool {
|
||||||
|
// If the iterator failed, stop iterating
|
||||||
|
if it.fail != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// If the iterator completed, deliver directly whatever's available
|
||||||
|
if it.done {
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSNewResolver)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Iterator still in progress, wait for either a data or an error event
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSNewResolver)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
case err := <-it.sub.Err():
|
||||||
|
it.done = true
|
||||||
|
it.fail = err
|
||||||
|
return it.Next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
|
func (it *ENSNewResolverIterator) Error() error {
|
||||||
|
return it.fail
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close terminates the iteration process, releasing any pending underlying
|
||||||
|
// resources.
|
||||||
|
func (it *ENSNewResolverIterator) Close() error {
|
||||||
|
it.sub.Unsubscribe()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSNewResolver represents a NewResolver event raised by the ENS contract.
|
||||||
|
type ENSNewResolver struct {
|
||||||
|
Node [32]byte
|
||||||
|
Resolver common.Address
|
||||||
|
Raw types.Log // Blockchain specific contextual infos
|
||||||
|
}
|
||||||
|
|
||||||
|
// FilterNewResolver is a free log retrieval operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0.
|
||||||
|
//
|
||||||
|
// Solidity: event NewResolver(bytes32 indexed node, address resolver)
|
||||||
|
func (_ENS *ENSFilterer) FilterNewResolver(opts *bind.FilterOpts, node [][32]byte) (*ENSNewResolverIterator, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.FilterLogs(opts, "NewResolver", nodeRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSNewResolverIterator{contract: _ENS.contract, event: "NewResolver", logs: logs, sub: sub}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// WatchNewResolver is a free log subscription operation binding the contract event 0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0.
|
||||||
|
//
|
||||||
|
// Solidity: event NewResolver(bytes32 indexed node, address resolver)
|
||||||
|
func (_ENS *ENSFilterer) WatchNewResolver(opts *bind.WatchOpts, sink chan<- *ENSNewResolver, node [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.WatchLogs(opts, "NewResolver", nodeRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return event.NewSubscription(func(quit <-chan struct{}) error {
|
||||||
|
defer sub.Unsubscribe()
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case log := <-logs:
|
||||||
|
// New log arrived, parse the event and forward to the user
|
||||||
|
event := new(ENSNewResolver)
|
||||||
|
if err := _ENS.contract.UnpackLog(event, "NewResolver", log); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
event.Raw = log
|
||||||
|
|
||||||
|
select {
|
||||||
|
case sink <- event:
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
type ENSNewTTLIterator struct {
|
||||||
|
Event *ENSNewTTL // Event containing the contract specifics and raw log
|
||||||
|
|
||||||
|
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
||||||
|
event string // Event name to use for unpacking event data
|
||||||
|
|
||||||
|
logs chan types.Log // Log channel receiving the found contract events
|
||||||
|
sub ethereum.Subscription // Subscription for errors, completion and termination
|
||||||
|
done bool // Whether the subscription completed delivering logs
|
||||||
|
fail error // Occurred error to stop iteration
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next advances the iterator to the subsequent event, returning whether there
|
||||||
|
// are any more events found. In case of a retrieval or parsing error, false is
|
||||||
|
// returned and Error() can be queried for the exact failure.
|
||||||
|
func (it *ENSNewTTLIterator) Next() bool {
|
||||||
|
// If the iterator failed, stop iterating
|
||||||
|
if it.fail != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// If the iterator completed, deliver directly whatever's available
|
||||||
|
if it.done {
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSNewTTL)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Iterator still in progress, wait for either a data or an error event
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSNewTTL)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
case err := <-it.sub.Err():
|
||||||
|
it.done = true
|
||||||
|
it.fail = err
|
||||||
|
return it.Next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
|
func (it *ENSNewTTLIterator) Error() error {
|
||||||
|
return it.fail
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close terminates the iteration process, releasing any pending underlying
|
||||||
|
// resources.
|
||||||
|
func (it *ENSNewTTLIterator) Close() error {
|
||||||
|
it.sub.Unsubscribe()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSNewTTL represents a NewTTL event raised by the ENS contract.
|
||||||
|
type ENSNewTTL struct {
|
||||||
|
Node [32]byte
|
||||||
|
Ttl uint64
|
||||||
|
Raw types.Log // Blockchain specific contextual infos
|
||||||
|
}
|
||||||
|
|
||||||
|
// FilterNewTTL is a free log retrieval operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68.
|
||||||
|
//
|
||||||
|
// Solidity: event NewTTL(bytes32 indexed node, uint64 ttl)
|
||||||
|
func (_ENS *ENSFilterer) FilterNewTTL(opts *bind.FilterOpts, node [][32]byte) (*ENSNewTTLIterator, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.FilterLogs(opts, "NewTTL", nodeRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSNewTTLIterator{contract: _ENS.contract, event: "NewTTL", logs: logs, sub: sub}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// WatchNewTTL is a free log subscription operation binding the contract event 0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68.
|
||||||
|
//
|
||||||
|
// Solidity: event NewTTL(bytes32 indexed node, uint64 ttl)
|
||||||
|
func (_ENS *ENSFilterer) WatchNewTTL(opts *bind.WatchOpts, sink chan<- *ENSNewTTL, node [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.WatchLogs(opts, "NewTTL", nodeRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return event.NewSubscription(func(quit <-chan struct{}) error {
|
||||||
|
defer sub.Unsubscribe()
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case log := <-logs:
|
||||||
|
// New log arrived, parse the event and forward to the user
|
||||||
|
event := new(ENSNewTTL)
|
||||||
|
if err := _ENS.contract.UnpackLog(event, "NewTTL", log); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
event.Raw = log
|
||||||
|
|
||||||
|
select {
|
||||||
|
case sink <- event:
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
type ENSTransferIterator struct {
|
||||||
|
Event *ENSTransfer // Event containing the contract specifics and raw log
|
||||||
|
|
||||||
|
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
||||||
|
event string // Event name to use for unpacking event data
|
||||||
|
|
||||||
|
logs chan types.Log // Log channel receiving the found contract events
|
||||||
|
sub ethereum.Subscription // Subscription for errors, completion and termination
|
||||||
|
done bool // Whether the subscription completed delivering logs
|
||||||
|
fail error // Occurred error to stop iteration
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next advances the iterator to the subsequent event, returning whether there
|
||||||
|
// are any more events found. In case of a retrieval or parsing error, false is
|
||||||
|
// returned and Error() can be queried for the exact failure.
|
||||||
|
func (it *ENSTransferIterator) Next() bool {
|
||||||
|
// If the iterator failed, stop iterating
|
||||||
|
if it.fail != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// If the iterator completed, deliver directly whatever's available
|
||||||
|
if it.done {
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSTransfer)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Iterator still in progress, wait for either a data or an error event
|
||||||
|
select {
|
||||||
|
case log := <-it.logs:
|
||||||
|
it.Event = new(ENSTransfer)
|
||||||
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
||||||
|
it.fail = err
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
it.Event.Raw = log
|
||||||
|
return true
|
||||||
|
|
||||||
|
case err := <-it.sub.Err():
|
||||||
|
it.done = true
|
||||||
|
it.fail = err
|
||||||
|
return it.Next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns any retrieval or parsing error occurred during filtering.
|
||||||
|
func (it *ENSTransferIterator) Error() error {
|
||||||
|
return it.fail
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close terminates the iteration process, releasing any pending underlying
|
||||||
|
// resources.
|
||||||
|
func (it *ENSTransferIterator) Close() error {
|
||||||
|
it.sub.Unsubscribe()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENSTransfer represents a Transfer event raised by the ENS contract.
|
||||||
|
type ENSTransfer struct {
|
||||||
|
Node [32]byte
|
||||||
|
Owner common.Address
|
||||||
|
Raw types.Log // Blockchain specific contextual infos
|
||||||
|
}
|
||||||
|
|
||||||
|
// FilterTransfer is a free log retrieval operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266.
|
||||||
|
//
|
||||||
|
// Solidity: event Transfer(bytes32 indexed node, address owner)
|
||||||
|
func (_ENS *ENSFilterer) FilterTransfer(opts *bind.FilterOpts, node [][32]byte) (*ENSTransferIterator, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.FilterLogs(opts, "Transfer", nodeRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ENSTransferIterator{contract: _ENS.contract, event: "Transfer", logs: logs, sub: sub}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// WatchTransfer is a free log subscription operation binding the contract event 0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266.
|
||||||
|
//
|
||||||
|
// Solidity: event Transfer(bytes32 indexed node, address owner)
|
||||||
|
func (_ENS *ENSFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ENSTransfer, node [][32]byte) (event.Subscription, error) {
|
||||||
|
|
||||||
|
var nodeRule []interface{}
|
||||||
|
for _, nodeItem := range node {
|
||||||
|
nodeRule = append(nodeRule, nodeItem)
|
||||||
|
}
|
||||||
|
|
||||||
|
logs, sub, err := _ENS.contract.WatchLogs(opts, "Transfer", nodeRule)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return event.NewSubscription(func(quit <-chan struct{}) error {
|
||||||
|
defer sub.Unsubscribe()
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case log := <-logs:
|
||||||
|
// New log arrived, parse the event and forward to the user
|
||||||
|
event := new(ENSTransfer)
|
||||||
|
if err := _ENS.contract.UnpackLog(event, "Transfer", log); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
event.Raw = log
|
||||||
|
|
||||||
|
select {
|
||||||
|
case sink <- event:
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case err := <-sub.Err():
|
||||||
|
return err
|
||||||
|
case <-quit:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}), nil
|
||||||
|
}
|
||||||
|
|
||||||
// FIFSRegistrarABI is the input ABI used to generate the binding from.
|
// FIFSRegistrarABI is the input ABI used to generate the binding from.
|
||||||
const FIFSRegistrarABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"subnode\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"},{\"name\":\"node\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]"
|
const FIFSRegistrarABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"label\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"},{\"name\":\"node\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]"
|
||||||
|
|
||||||
// FIFSRegistrarBin is the compiled bytecode used for deploying new contracts.
|
// FIFSRegistrarBin is the compiled bytecode used for deploying new contracts.
|
||||||
const FIFSRegistrarBin = `0x6060604052341561000f57600080fd5b604051604080610224833981016040528080519190602001805160008054600160a060020a03909516600160a060020a03199095169490941790935550506001556101c58061005f6000396000f3006060604052600436106100275763ffffffff60e060020a600035041663d22057a9811461002c575b600080fd5b341561003757600080fd5b61004e600435600160a060020a0360243516610050565b005b816000806001548360405191825260208201526040908101905190819003902060008054919350600160a060020a03909116906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156100c857600080fd5b6102c65a03f115156100d957600080fd5b5050506040518051915050600160a060020a0381161580159061010e575033600160a060020a031681600160a060020a031614155b1561011857600080fd5b600054600154600160a060020a03909116906306ab592390878760405160e060020a63ffffffff861602815260048101939093526024830191909152600160a060020a03166044820152606401600060405180830381600087803b151561017e57600080fd5b6102c65a03f1151561018f57600080fd5b50505050505050505600a165627a7a723058206fb963cb168d5e3a51af12cd6bb23e324dbd32dd4954f43653ba27e66b68ea650029`
|
const FIFSRegistrarBin = `0x608060405234801561001057600080fd5b506040516040806102cc8339810180604052604081101561003057600080fd5b50805160209091015160008054600160a060020a031916600160a060020a0390931692909217825560015561026190819061006b90396000f3fe6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663d22057a98114610045575b600080fd5b34801561005157600080fd5b5061008b6004803603604081101561006857600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661008d565b005b6000805460015460408051602080820193909352808201879052815180820383018152606082018084528151918501919091207f02571be3000000000000000000000000000000000000000000000000000000009091526064820152905186949373ffffffffffffffffffffffffffffffffffffffff16926302571be39260848082019391829003018186803b15801561012657600080fd5b505afa15801561013a573d6000803e3d6000fd5b505050506040513d602081101561015057600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff8116158061018c575073ffffffffffffffffffffffffffffffffffffffff811633145b151561019757600080fd5b60008054600154604080517f06ab592300000000000000000000000000000000000000000000000000000000815260048101929092526024820188905273ffffffffffffffffffffffffffffffffffffffff878116604484015290519216926306ab59239260648084019382900301818387803b15801561021757600080fd5b505af115801561022b573d6000803e3d6000fd5b505050505050505056fea165627a7a723058200f21424d48c6fc6f2bc79f5b36b3a0e3067a97d4ce084ab0e0f9106303a3ee520029`
|
||||||
|
|
||||||
// DeployFIFSRegistrar deploys a new Ethereum contract, binding an instance of FIFSRegistrar to it.
|
// DeployFIFSRegistrar deploys a new Ethereum contract, binding an instance of FIFSRegistrar to it.
|
||||||
func DeployFIFSRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, ensAddr common.Address, node [32]byte) (common.Address, *types.Transaction, *FIFSRegistrar, error) {
|
func DeployFIFSRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, ensAddr common.Address, node [32]byte) (common.Address, *types.Transaction, *FIFSRegistrar, error) {
|
||||||
@ -175,21 +1054,21 @@ func (_FIFSRegistrar *FIFSRegistrarTransactorRaw) Transact(opts *bind.TransactOp
|
|||||||
|
|
||||||
// Register is a paid mutator transaction binding the contract method 0xd22057a9.
|
// Register is a paid mutator transaction binding the contract method 0xd22057a9.
|
||||||
//
|
//
|
||||||
// Solidity: function register(subnode bytes32, owner address) returns()
|
// Solidity: function register(bytes32 label, address owner) returns()
|
||||||
func (_FIFSRegistrar *FIFSRegistrarTransactor) Register(opts *bind.TransactOpts, subnode [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_FIFSRegistrar *FIFSRegistrarTransactor) Register(opts *bind.TransactOpts, label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _FIFSRegistrar.contract.Transact(opts, "register", subnode, owner)
|
return _FIFSRegistrar.contract.Transact(opts, "register", label, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register is a paid mutator transaction binding the contract method 0xd22057a9.
|
// Register is a paid mutator transaction binding the contract method 0xd22057a9.
|
||||||
//
|
//
|
||||||
// Solidity: function register(subnode bytes32, owner address) returns()
|
// Solidity: function register(bytes32 label, address owner) returns()
|
||||||
func (_FIFSRegistrar *FIFSRegistrarSession) Register(subnode [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_FIFSRegistrar *FIFSRegistrarSession) Register(label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _FIFSRegistrar.Contract.Register(&_FIFSRegistrar.TransactOpts, subnode, owner)
|
return _FIFSRegistrar.Contract.Register(&_FIFSRegistrar.TransactOpts, label, owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register is a paid mutator transaction binding the contract method 0xd22057a9.
|
// Register is a paid mutator transaction binding the contract method 0xd22057a9.
|
||||||
//
|
//
|
||||||
// Solidity: function register(subnode bytes32, owner address) returns()
|
// Solidity: function register(bytes32 label, address owner) returns()
|
||||||
func (_FIFSRegistrar *FIFSRegistrarTransactorSession) Register(subnode [32]byte, owner common.Address) (*types.Transaction, error) {
|
func (_FIFSRegistrar *FIFSRegistrarTransactorSession) Register(label [32]byte, owner common.Address) (*types.Transaction, error) {
|
||||||
return _FIFSRegistrar.Contract.Register(&_FIFSRegistrar.TransactOpts, subnode, owner)
|
return _FIFSRegistrar.Contract.Register(&_FIFSRegistrar.TransactOpts, label, owner)
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
package ens
|
package ens
|
||||||
|
|
||||||
//go:generate abigen --sol contract/ENS.sol --exc contract/AbstractENS.sol:AbstractENS --pkg contract --out contract/ens.go
|
//go:generate abigen --sol contract/ENS.sol --pkg contract --out contract/ens.go
|
||||||
//go:generate abigen --sol contract/FIFSRegistrar.sol --exc contract/AbstractENS.sol:AbstractENS --pkg contract --out contract/fifsregistrar.go
|
//go:generate abigen --sol contract/FIFSRegistrar.sol --pkg contract --out contract/fifsregistrar.go
|
||||||
//go:generate abigen --sol contract/PublicResolver.sol --exc contract/AbstractENS.sol:AbstractENS --pkg contract --out contract/publicresolver.go
|
//go:generate abigen --sol contract/PublicResolver.sol --pkg contract --out contract/publicresolver.go
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
Reference in New Issue
Block a user