Data Class

To cover ENS actions and features, we created the following data classes.

  • af_ens_event: Records all events (actions) related to ENS. One event per row, one transaction can have multiple events.

  • af_ens_node_current: Records an ENS node's (name) related information. One node per row, only keep current state.

  • af_ens_address_current: Records an address's current ENS related data (primary name). One address per row, only keep current state.

Besides, since each ENS name is either an ERC721 or an ERC1155 token. The ENS job will also require data from generic data class address_token_balance.

af_ens_event

Column NameData TypeNote

transaction_hash

bytea

Hash of the transaction

log_index

integer

Index of the log in the transaction

transaction_index

integer

Index of the transaction within the block

block_number

bigint

Number of the block containing the transaction

block_hash

bytea

Hash of the block containing the transaction

block_timestamp

timestamp

Timestamp of when the block was mined

method

varchar

Method name associated with the event

event_name

varchar

Name of the event

from_address

bytea

Address that initiated the transaction

to_address

bytea

Address that received the transaction

base_node

bytea

Base node of the ENS name

node

bytea

Node hash of the ENS name

label

bytea

Label hash of the ENS name

name

varchar

Human-readable ENS name

expires

timestamp

Expiry time of the ENS registration

owner

bytea

Owner address of the ENS name

resolver

bytea

Resolver address associated with the ENS name

registrant

bytea

Address of the registrant of the ENS name

address

bytea

Address associated with the ENS name (forward resolution)

reverse_base_node

bytea

Base node for reverse resolution

reverse_node

bytea

Node for reverse resolution

reverse_label

bytea

Label hash for reverse resolution

reverse_name

varchar

Human-readable name for reverse resolution

token_id

numeric(100)

Token ID representing the ENS name in numeric format

w_token_id

numeric(100)

Wrapped token ID, if applicable

create_time

timestamp

Time when the record was created, defaults to current timestamp

update_time

timestamp

Time when the record was last updated, defaults to current timestamp

reorg

boolean

Flag indicating if the record was affected by a chain reorganization

ens_tnx_log_index

constraint

Primary key on (transaction_hash, log_index)

af_ens_address_current:

Column NameData TypeNote

address

bytea

ENS address; primary key

name

varchar

Human-readable ENS name associated with the address

reverse_node

bytea

Node for reverse resolution

create_time

timestamp

Time when the record was created, defaults to the current timestamp

update_time

timestamp

Time when the record was last updated, defaults to the current timestamp

block_number

bigint

Block number when the address was last updated or registered

af_ens_node_current

Column NameData TypeNote

node

bytea

Node hash of the ENS name; primary key

token_id

numeric(100)

ERC721 Token ID representing the ENS name in numeric format

w_token_id

numeric(100)

ERC1155 Wrapped token ID, if applicable

first_owned_by

bytea

Address of the first owner of the ENS name

name

varchar

Human-readable ENS name

registration

timestamp

Timestamp of when the ENS name was registered

expires

timestamp

Expiry time of the ENS registration

address

bytea

Address associated with the ENS name

create_time

timestamp

Time when the record was created, defaults to the current timestamp

update_time

timestamp

Time when the record was last updated, defaults to the current timestamp

Last updated