Indexing Status
Using the Unigraph SQL requires that you have the unigraph plugin activated in your ENSNode instance. Learn more
Read the indexing status snapshot for an ENSIndexer instance from the shared ensnode.metadata table. See Connect for setup.
The ENSNode Schema is a database
schema within an ENSDb instance, used to store metadata about ENSIndexer instances that have ever connected to the ENSDb instance. There can be only one ENSNode Schema per ENSDb instance,
and its name is always
ensnode.
-- Indexing status snapshot for the `ensindexer_0` ENSIndexer SchemaSELECT value -> 'indexingStatus' as indexing_status_snapshotFROM "ensnode"."metadata"WHERE ens_indexer_schema_name = 'ensindexer_0'AND key = 'indexing_metadata_context';Result
{
"indexing_status_snapshot": {
"strategy": "omnichain",
"snapshotTime": 1779795066,
"omnichainSnapshot": {
"chains": {
"1": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 3327417,
"timestamp": 1489165544
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 25171597,
"timestamp": 1779703391
},
"latestIndexedBlock": {
"number": 21224717,
"timestamp": 1732054691
}
},
"10": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 110393959,
"timestamp": 1696386695
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 152052671,
"timestamp": 1779704119
},
"latestIndexedBlock": {
"number": 128226309,
"timestamp": 1732051395
}
},
"8453": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 17522624,
"timestamp": 1721834595
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 46457386,
"timestamp": 1779704119
},
"latestIndexedBlock": {
"number": 22632818,
"timestamp": 1732054983
}
},
"42161": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 349263357,
"timestamp": 1750406457
}
},
"chainStatus": "chain-queued"
},
"59144": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 6682888,
"timestamp": 1720768992
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 30774477,
"timestamp": 1779703911
},
"latestIndexedBlock": {
"number": 12280006,
"timestamp": 1732054967
}
},
"534352": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 16604272,
"timestamp": 1750406415
}
},
"chainStatus": "chain-queued"
}
},
"omnichainStatus": "omnichain-backfill",
"omnichainIndexingCursor": 1732054983
},
"slowestChainIndexingCursor": 1732054983
}
}
See how to connect to ENSDb and get access to the
ensDb query builder and ensIndexerSchema
schema definition in the Connect section if you haven't
already.
import { IndexingMetadataContextStatusCodes } from "@ensnode/ensdb-sdk";
const indexingMetadataContext = await ensDbReader.getIndexingMetadataContext();if (indexingMetadataContext.statusCode === IndexingMetadataContextStatusCodes.Initialized) { const indexingStatusSnapshot = indexingMetadataContext.indexingStatus; console.log(JSON.stringify(indexingStatusSnapshot, null, 2));}Result
{
"strategy": "omnichain",
"snapshotTime": 1779795066,
"omnichainSnapshot": {
"chains": {
"1": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 3327417,
"timestamp": 1489165544
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 25171597,
"timestamp": 1779703391
},
"latestIndexedBlock": {
"number": 21224717,
"timestamp": 1732054691
}
},
"10": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 110393959,
"timestamp": 1696386695
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 152052671,
"timestamp": 1779704119
},
"latestIndexedBlock": {
"number": 128226309,
"timestamp": 1732051395
}
},
"8453": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 17522624,
"timestamp": 1721834595
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 46457386,
"timestamp": 1779704119
},
"latestIndexedBlock": {
"number": 22632818,
"timestamp": 1732054983
}
},
"42161": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 349263357,
"timestamp": 1750406457
}
},
"chainStatus": "chain-queued"
},
"59144": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 6682888,
"timestamp": 1720768992
}
},
"chainStatus": "chain-backfill",
"backfillEndBlock": {
"number": 30774477,
"timestamp": 1779703911
},
"latestIndexedBlock": {
"number": 12280006,
"timestamp": 1732054967
}
},
"534352": {
"config": {
"rangeType": "left-bounded",
"startBlock": {
"number": 16604272,
"timestamp": 1750406415
}
},
"chainStatus": "chain-queued"
}
},
"omnichainStatus": "omnichain-backfill",
"omnichainIndexingCursor": 1732054983
},
"slowestChainIndexingCursor": 1732054983
}