> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ENS (ens)

> Ethereum Name Service - the decentralized naming system for wallets, websites, and resources. Maps human-readable names to Ethereum addresses.

Ethereum Name Service - the decentralized naming system for wallets, websites, and resources. Maps human-readable names to Ethereum addresses.

| Fact | Value |
| - | - |
| Category | Infrastructure and standards |
| Family | none |
| Namespace | `Ens` on ethereum |
| Chains | ethereum |

## 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.

```ts theme={null}
function main() {
  // Ethereum's baseRegistrar, `0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85`.
  require(Ens.BaseRegistrar != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Ethereum](https://docs.eco.com/sauce-sdk/reference/chains/ethereum.md) | baseRegistrar | `0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85` | `Ens.BaseRegistrar` |
| [Ethereum](https://docs.eco.com/sauce-sdk/reference/chains/ethereum.md) | registry | `0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e` | `Ens.Registry` |

## 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](https://docs.eco.com/sauce-sdk/reference/protocols.md): the other protocols, by what they do.
* [Protocols and tokens](https://docs.eco.com/sauce/names.md): calling a contract by its namespace, or through its ABI.
* [Glossary](https://docs.eco.com/sauce/glossary.md): the words these pages use, in plain terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.