The Ethereum Name Service (ENS)is a distributed, open, and extensible naming system based on the Ethereum blockchain.

Users are able to register an ENS domain and replace their address with human-readable names that are easier to type and remember.

ENS Tables

The following ENS tables are available for users to query and enrich their analysis.

Table NameDescription
namesContains all ENS names and their corresponding numeric token ID.
registrationsContains all ENS registration events. Registration events happen when a new ENS name is registered (almost like minted) for the first time, or when a registration expires and someone else registers it again.
renewalsContains all ENS renewal events
net_transfersContains all ENS transfer events with ENS token ID as, sender and recipient address as well as transaction-level data.
primary_records_latestContains the current ENS primary record of any address.

Sample Queries

Below are some examples of how you can use the ENS table to enrich your analysis.

Example 1 - Labelling of Wallets.

Using ens.primary_records_latest to identify ENS names of BoredApeYachtClub minters

 select 

  block_timestamp,

  name, 

  token_to_address, 

  token_address,

  token_name,

  token_symbol,

  token_id,

  raw_price,

  price,

  usd_price,

  transaction_hash

from ethereum.nfts.mints 

   left join (select name, address from ethereum.ens.primary_records_latest) on address = token_to_address 

   where token_address = '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d' -- BAYC contract 

limit 100

Example 2 - Identify ENS sold by name

Using the ens.names to find sales of ENS by name with nfts.trades.

select

  a.token_id as ens_id,

  ens.name as ens_name,

  marketplace,

  buyer_address,

  seller_address,

  usd_price,

  transaction_hash,

  block_timestamp

from ethereum.nfts.trades a

  left join ethereum.ens.names ens on a.token_id = ens.token_id 

  where token_address = '0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85' -- ENS Contract 

limit 100

Table Column Name

Names

ethereum.ens.names

Column NameDescription
token_idNumeric token ID corresponding to the ENS name.
nameAn ENS identifier such as ‘alice.eth’. Names may consist of multiple parts, called labels, separated by dots.

Registrations

ethereum.ens.registrations

ColumnDescription
nameAn individual component of a name, such as ‘alice’.
owner_addressAddress of the ENS owner.
eth_costETH cost of the ENS registration.
usd_costUSD cost of the ENS registration at the time of transaction.
registration_timestampTimestamp of the ENS registration.
expiry_timestampExpiry timestamp of the ENS name registered.
token_idNumeric token ID corresponding to the ENS name.
log_indexLog index of the ENS registration.
transaction_hashTransaction hash of the ENS registration.
block_numberBlock number of the record.
block_hashBlock hash of the record.

Renewals

ethereum.ens.renewals

Column NameDescription
block_hashBlock hash of the renewal.
block_numberBlock number of the renewal.
block_timestampBlock timestamp of the renewal.
costRenewal cost in ETH.
expiry_dateDate of expiry of the renewal.
log_indexLog index of the ENS registration.
nameName of the ENS domain that was renewed
transaction_hashTransaction hash of the renewal.

Net Transfers

ethereum.ens.net_transfers

Column NameDescription
block_hashBlock hash of the transfer.
block_numberBlock number of the transfer.
block_timestampBlock timestamp of the transfer.
prev_transfer_block_timestampBlock timestamp of the previous transfer.
from_addressAddress of the sender.
to_addressAddress of the receiver
token_idToken ID of the ENS being transferred.
transaction_hashTransaction hash of the transfer.

Primary Record Latest

ethereum.ens.primary_records_latest

Column NameDescription
addressAddress that registered the ENS name.
block_hashBlock hash of the record.
block_numberBlock number of the record.
block_timestampBlock timestamp of the record.
nameAn ENS identifier such as ‘alice.eth’. Names may consist of multiple parts, called labels, separated by dots.