indexer.getStatus
Reads the indexer's health and how far each chain is indexed. Parameters, return value, errors and examples for indexer.getStatus in @ensforge/sdk.
Reads the indexer's health and how far each chain is indexed.
When to use
Use to show a sync banner, or to wait until a write is indexed before reading it back.
Details
- Chains are keyed by chain ID;
safeandfinalizedarenullwhen the indexer does not track them.
Signature
function getStatus(
client: Like,
options?: getStatus.Options,
): Promise<getStatus.ReturnType>Call it as ens.indexer.getStatus(options) on a client, or Actions.indexer.getStatus(client, options).
indexer.getStatus.request(options) builds a deferred read for Actions.batch. See Look up many at once.
Parameters
Also takes the read options.
Returns
Resolves to IndexerStatus. Overall status and per-chain progress.
| Field | Type | Description |
|---|---|---|
status | "ready" | "degraded" | "stale" | |
chains | Readonly<Record<number, ChainStatus>> | |
indexer | string |
Errors
| Error | Codes | When |
|---|---|---|
ConfigError | INDEXER_NOT_CONFIGURED | the client has no indexer. |
IndexerError | INDEXER_UNSUPPORTED | the indexer does not serve the query or its namespace. |
IndexerError | INDEXER_UNAVAILABLE, INDEXER_RATE_LIMITED, INDEXER_BEHIND, INDEXER_REQUEST_REJECTED, INDEXER_RESPONSE_INVALID | the indexer is unavailable, rate limiting, behind, rejects the request or answers unexpectedly. |
It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
const status = await ens.indexer.getStatus()Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.indexer.getStatus({}){
"status": "ready",
"chains": {
"1": {
"status": "ready",
"indexed": "26443964n",
"latest": "26443965n",
"safe": "26443916n",
"finalized": "26443884n",
"lagBlocks": 1,
"lagSeconds": 12
}
},
"indexer": "bigname"
}Was this page helpful?