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.

GET/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"
Parameters
ParameterDescription
batch

query · integer · optional

The settlement batch number. Give this or block, not both.
block

query · 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).
chain

path · 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.

Response fields of Rollup batch settlement
FieldTypeDescription
queryobjectWhat was asked.
query.batchinteger | nullThe batch asked about, or null when asked by block.
query.blockinteger | nullThe block asked about, or null when asked by batch.
statusstring | nullcommitted: 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).
batchobject | nullThe batch asked about or carrying the block. null when status is pending or null.
batch.numberintegerThe settlement batch number.
batch.firstBlockintegerThe first rollup block in the batch.
batch.lastBlockintegerThe last rollup block in the batch.
batch.transactionsCountintegerRollup transactions in the batch.
commitmentobject | nullThe 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.hashstringThe transaction hash on the parent chain.
commitment.timestampintegerUnix seconds of the parent-chain block that carries it.
commitment.finalizedboolean | nullWhether 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.parentChainBlockinteger | nullThe parent-chain block the batch was posted in. null when not stated, which is always the case on OP.
confirmationobject | nullThe 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.hashstringThe transaction hash on the parent chain.
confirmation.timestampintegerUnix seconds of the parent-chain block that carries it.
confirmation.finalizedboolean | nullWhether 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