What it offers
- setResolver: Set the resolver contract for an ENS name
- setOwner: Transfer ownership of an ENS name
Notes
- node = namehash of the ENS name (e.g. namehash(“vitalik.eth”) = keccak256 chain)
- .eth names are ERC-721 NFTs held in the baseRegistrar contract
- Resolver contract stores the address/content records for a name
- Only the owner of a node can setResolver or setOwner
- Registration/renewal happens via the ETHRegistrarController (not in this ABI set)
Its names in a program
On Ethereum,Ens is a namespace: its contracts need no import.
Deployments
ABI
BaseRegistrarABI
import BaseRegistrarABI from "./protocols/ens/BaseRegistrarABI.json"; Speaks for: baseRegistrar.
nameExpires(uint256 id) view returns (uint256)reclaim(uint256 id, address owner)
ENSRegistryABI
import ENSRegistryABI from "./protocols/ens/ENSRegistryABI.json"; Speaks for: registry.
owner(bytes32 node) view returns (address)resolver(bytes32 node) view returns (address)setOwner(bytes32 node, address owner)setResolver(bytes32 node, address resolver)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
