Documentation ¶
Index ¶
- Variables
- func EnsNode(name string) common.Hash
- type ENS
- func (ens *ENS) Addr(name string) (common.Address, error)
- func (ens *ENS) Register(name string) (*types.Transaction, error)
- func (ens *ENS) Resolve(name string) (common.Hash, error)
- func (ens *ENS) SetAddr(name string, addr common.Address) (*types.Transaction, error)
- func (ens *ENS) SetContentHash(name string, hash common.Hash) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var ( MainNetAddress = common.MustBech32ToAddress("atp1x9q4jfjamrdmxyry97v02rqxv9euzfvm0sc0dx") TestNetAddress = common.MustBech32ToAddress("atx1zy3rg32u8ge06yfrp3pw00xdf2zwqgqstk8wlv") )
Functions ¶
Types ¶
type ENS ¶
type ENS struct { *contract.ENSSession // contains filtered or unexported fields }
ENS is the swarm domain name registry and resolver
func DeployENS ¶
func DeployENS(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend) (common.Address, *ENS, error)
DeployENS deploys an instance of the ENS nameservice, with a 'first-in, first-served' root registrar.
func NewENS ¶
func NewENS(transactOpts *bind.TransactOpts, contractAddr common.Address, contractBackend bind.ContractBackend) (*ENS, error)
NewENS creates a struct exposing convenient high-level operations for interacting with the Ethereum Name Service.
func (*ENS) Addr ¶ added in v0.16.1
Addr is a non-transactional call that returns the address associated with a name.
func (*ENS) Register ¶
func (ens *ENS) Register(name string) (*types.Transaction, error)
Register registers a new domain name for the caller, making them the owner of the new name. Only works if the registrar for the parent domain implements the FIFS registrar protocol.
func (*ENS) Resolve ¶
Resolve is a non-transactional call that returns the content hash associated with a name.
func (*ENS) SetAddr ¶ added in v0.16.1
SetAddress sets the address associated with a name. Only works if the caller owns the name, and the associated resolver implements a `setAddress` function.
func (*ENS) SetContentHash ¶
SetContentHash sets the content hash associated with a name. Only works if the caller owns the name, and the associated resolver implements a `setContent` function.