Chains API
Rollup batch settlement
Which parent-chain batch carries a rollup block, the transaction that posted it, and whether the parent chain has confirmed it yet — by batch number or by block number.
/api/external/chain-analysis/rollup-settlement/{chain}What it returns
Ask by batch (a settlement batch number) or by block (a rollup block number) — exactly one. Answers the batch (its block range and transaction count), the parent-chain transaction that posted it (commitment) and the parent-chain transaction that confirmed the rollup state through it (confirmation). status is committed once posted, confirmed once confirmed (on RHC confirmation typically trails the commitment by about a week, on SCROLL by minutes), pending for a block no batch carries yet, and null for a batch or block that does not exist yet. OP batch numbers skip values while the blocks they carry stay contiguous, so on OP a skipped number answers null for good. On OP the answer stops at committed and confirmation is always null: OP confirms rollup state through dispute games, which no batch names (see the dispute-games endpoint). For a transaction, read its block number first and ask by block (RHC and OP).
Chains
- Robinhood Chain RHC
- Optimism OP
- Scroll SCROLL
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/chain-analysis/rollup-settlement/RHC"
| Parameter | Description |
|---|---|
batchquery · integer · optional | The settlement batch number. Give this or block, not both. |
blockquery · integer · optional | A rollup block number; the answer is about the batch that carries it. Give this or batch, not both. Not available on SCROLL, nor on OP before block 105235064 (no batch carries earlier blocks). |
chainpath · string · required | RHC, SCROLL or OP; every other chain returns 400. Settlement batches are what a rollup posts to its parent chain. SCROLL is answered by batch only: asking it by block returns 400. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
query | object | What was asked. |
query.batch | integer | null | The batch asked about, or null when asked by block. |
query.block | integer | null | The block asked about, or null when asked by batch. |
status | string | null | committed: the batch is posted to the parent chain. confirmed: the parent chain confirmed the rollup state through it. pending: the block exists but no batch carries it yet. null: the batch or block does not exist yet (on OP, or a batch number the numbering skipped). |
batch | object | null | The batch asked about or carrying the block. null when status is pending or null. |
batch.number | integer | The settlement batch number. |
batch.firstBlock | integer | The first rollup block in the batch. |
batch.lastBlock | integer | The last rollup block in the batch. |
batch.transactionsCount | integer | Rollup transactions in the batch. |
commitment | object | null | The parent-chain transaction that posted the batch. null exactly when batch is. A batch posted in several parent-chain transactions is committed by the last one, which is the one given. |
commitment.hash | string | The transaction hash on the parent chain. |
commitment.timestamp | integer | Unix seconds of the parent-chain block that carries it. |
commitment.finalized | boolean | null | Whether the parent chain has finalised that block. false means it can still be reorganised. null when it is not stated, which is always the case on SCROLL and OP. |
commitment.parentChainBlock | integer | null | The parent-chain block the batch was posted in. null when not stated, which is always the case on OP. |
confirmation | object | null | The parent-chain transaction that confirmed the rollup state through the block asked about or, for a batch, through its last block (which covers the whole batch). null until confirmed, and always on OP. |
confirmation.hash | string | The transaction hash on the parent chain. |
confirmation.timestamp | integer | Unix seconds of the parent-chain block that carries it. |
confirmation.finalized | boolean | null | Whether the parent chain has finalised that block. false means it can still be reorganised. null when it is not stated, which is always the case on SCROLL and OP. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key