Domain Events
Raw contract events associated with a domain’s registry records. Terminal window Terminal window Terminal window
Run in ENSAdmin
Open an interactive playground to execute this example on our sepolia-v2
ENSNode instance.
GraphQL
query DomainEvents($name: InterpretedName!) { domain(by: {name: $name}) { events { totalCount edges { node { from to topics data timestamp transactionHash } } } }} Variables
{ "name": "roppp.eth"} Output
{ "data": { "domain": { "events": { "edges": [ { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0x2fe093918572373e9f1f0368f414dffd0043a74ae8c9fd7b0e390b26a0d20b6e", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1a4cc166b", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000006bf187840000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191" ], "data": "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1000000000000000000000000000000000000000000000000000000000000000000000001", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xebd3982eafd13b820e3edb2a4abd57a82ce3b8802e0cd45637a5de51383f9fac", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050e8854658f7b92297fd3c8241e249f615dca0150000000000000000000000000000000000000000000000000000000001e133800000000000000000000000006fdfd2a902ae83a1617abc47eec6d9d2cbe7d38e000000000000000000000000000000000000000000000000000000000079fca600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } } ], "totalCount": 3 } } }}Output matches a GraphQL Response snapshot; live output depends on your ENSNode instance.
Opens an editable StackBlitz project with this snippet.
TypeScript
import { createEnsNodeClient } from "enssdk/core";import { asInterpretedName } from "enssdk";import { graphql, omnigraph } from "enssdk/omnigraph";
const client = createEnsNodeClient({ url: process.env.ENSNODE_URL || "https://api.v2-sepolia.ensnode.io"}).extend(omnigraph);
const DomainEventsQuery = graphql(` query DomainEvents($name: InterpretedName!) { domain(by: {name: $name}) { events { totalCount edges { node { from to topics data timestamp transactionHash } } } } }`);
const result = await client.omnigraph.query({ query: DomainEventsQuery, variables: { name: asInterpretedName("roppp.eth"), },});
if (result.errors) throw new Error(JSON.stringify(result.errors));console.log(JSON.stringify(result.data, null, 2)); Output
{ "data": { "domain": { "events": { "edges": [ { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0x2fe093918572373e9f1f0368f414dffd0043a74ae8c9fd7b0e390b26a0d20b6e", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1a4cc166b", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000006bf187840000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191" ], "data": "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1000000000000000000000000000000000000000000000000000000000000000000000001", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xebd3982eafd13b820e3edb2a4abd57a82ce3b8802e0cd45637a5de51383f9fac", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050e8854658f7b92297fd3c8241e249f615dca0150000000000000000000000000000000000000000000000000000000001e133800000000000000000000000006fdfd2a902ae83a1617abc47eec6d9d2cbe7d38e000000000000000000000000000000000000000000000000000000000079fca600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } } ], "totalCount": 3 } } }}Output matches a GraphQL Response snapshot; live output depends on your ENSNode instance.
enssdk package manager setup
# 1. Create projectmkdir -p my-ens-script/src && cd my-ens-scriptnpm init -y && touch src/index.tsnpm pkg set type=module scripts.start="tsx src/index.ts"# 2. Install dependenciesnpm install enssdk@1.15.1 && npm install -D tsx typescript @types/node# 3. Paste the TypeScript snippet above into src/index.ts# 4. RunENSNODE_URL=https://api.v2-sepolia.ensnode.io npm startSee the enssdk docs for gql.tada plugin and tsconfig setup.
Opens an editable StackBlitz project with this snippet.
TSX (React)
import { OmnigraphProvider, useOmnigraphQuery, graphql } from "enskit/react/omnigraph";import { createEnsNodeClient } from "enssdk/core";import { asInterpretedName } from "enssdk";import { omnigraph } from "enssdk/omnigraph";
const client = createEnsNodeClient({ url: import.meta.env.VITE_ENSNODE_URL || "https://api.v2-sepolia.ensnode.io"}).extend(omnigraph);
const DomainEventsQuery = graphql(` query DomainEvents($name: InterpretedName!) { domain(by: {name: $name}) { events { totalCount edges { node { from to topics data timestamp transactionHash } } } } }`);
function DomainEventsResult() { const [result] = useOmnigraphQuery({ query: DomainEventsQuery, variables: { name: asInterpretedName("roppp.eth"), }, }); const { data, fetching, error } = result; if (!data && fetching) return <p>Loading…</p>; if (error) return <p>Error: {error.message}</p>; if (!data) return <p>No data returned.</p>; const formatted = JSON.stringify( data, (_, value) => (typeof value === "bigint" ? value.toString() : value), 2, ); return <code>{formatted}</code>;}
export default function App() { return ( <OmnigraphProvider client={client}> <DomainEventsResult /> </OmnigraphProvider> );} Output
{ "data": { "domain": { "events": { "edges": [ { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0x2fe093918572373e9f1f0368f414dffd0043a74ae8c9fd7b0e390b26a0d20b6e", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1a4cc166b", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000006bf187840000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191" ], "data": "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1000000000000000000000000000000000000000000000000000000000000000000000001", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xebd3982eafd13b820e3edb2a4abd57a82ce3b8802e0cd45637a5de51383f9fac", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050e8854658f7b92297fd3c8241e249f615dca0150000000000000000000000000000000000000000000000000000000001e133800000000000000000000000006fdfd2a902ae83a1617abc47eec6d9d2cbe7d38e000000000000000000000000000000000000000000000000000000000079fca600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } } ], "totalCount": 3 } } }}Output matches a GraphQL Response snapshot; live output depends on your ENSNode instance.
enskit package manager setup
# 1. Create projectnpm create vite@latest my-ens-app -- --template react-ts --no-interactive --no-immediatecd my-ens-app# 2. Install dependenciesnpm installnpm install enskit@1.15.1 enssdk@1.15.1# 3. Copy the TSX snippet above into src/App.tsx# 4. RunVITE_ENSNODE_URL=https://api.v2-sepolia.ensnode.io npm run devSee the enskit docs for gql.tada plugin and provider setup.
cURL
# POST JSON to your ENSNode Omnigraph endpoint (same path enssdk uses).curl -sS -X POST "https://api.v2-sepolia.ensnode.io/api/omnigraph" \ -H "Content-Type: application/json" \ -d @- <<'EOF'{ "query": "query DomainEvents($name: InterpretedName!) { domain(by: {name: $name}) { events { totalCount edges { node { from to topics data timestamp transactionHash } } } } }", "variables": { "name": "roppp.eth" }}EOF Response
{ "data": { "domain": { "events": { "edges": [ { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0x2fe093918572373e9f1f0368f414dffd0043a74ae8c9fd7b0e390b26a0d20b6e", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1a4cc166b", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000006bf187840000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62", "0x000000000000000000000000b68e594a47fe057bd31e7a8229ffcfd85b2e28af", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191" ], "data": "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c1000000000000000000000000000000000000000000000000000000000000000000000001", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } }, { "node": { "from": "0x801d2e48d378f161dba7ad7ad002ad557714c191", "to": "0xb68e594a47fe057bd31e7a8229ffcfd85b2e28af", "topics": [ "0xebd3982eafd13b820e3edb2a4abd57a82ce3b8802e0cd45637a5de51383f9fac", "0xc32a1c1f67a98f2a48153a0e85ddb762207044cc7beb9517b6da41c100000000", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000801d2e48d378f161dba7ad7ad002ad557714c191000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050e8854658f7b92297fd3c8241e249f615dca0150000000000000000000000000000000000000000000000000000000001e133800000000000000000000000006fdfd2a902ae83a1617abc47eec6d9d2cbe7d38e000000000000000000000000000000000000000000000000000000000079fca600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005726f707070000000000000000000000000000000000000000000000000000000", "timestamp": "1779454980", "transactionHash": "0xed0c37a9fa3e9757a1946fd099089d7c7ce12166c227451f76c207d2c639afd7" } } ], "totalCount": 3 } } }}Output matches a GraphQL Response snapshot; live output depends on your ENSNode instance.
Back to Examples