Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeSDK

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.

ReadBatchablestable
Since v1.0.0View source

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; safe and finalized are null when 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.

FieldTypeDescription
status"ready" | "degraded" | "stale"
chainsReadonly<Record<number, ChainStatus>>
indexerstring

Errors

ErrorCodesWhen
ConfigErrorINDEXER_NOT_CONFIGUREDthe client has no indexer.
IndexerErrorINDEXER_UNSUPPORTEDthe indexer does not serve the query or its namespace.
IndexerErrorINDEXER_UNAVAILABLE, INDEXER_RATE_LIMITED, INDEXER_BEHIND, INDEXER_REQUEST_REJECTED, INDEXER_RESPONSE_INVALIDthe 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

Reading the status
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?