Chains API
The dispute games an OP-Stack chain settles its state with, newest first
An OP-Stack L2's fault-proof dispute games, newest first, 50 per page: the L2 block each one claims, when it was created and resolved, and whether the claim held.
/api/external/chain-analysis/dispute-games/{chain}What it returns
The fault-proof dispute games opened on the parent chain for one OP-Stack L2, newest first, 50 per page: each game's index, type, contract, the L2 block its claim names, when it was created and resolved, and who won. claimedL2BlockNumber is what the game claims, not a checked block: anyone may open a game, and a false claim ends challenger_wins. Keep passing nextCursor back as cursor until it is null. How many games there are is in rollup-settlement-totals.
Chains
- Optimism OP
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/dispute-games/OP"
| Parameter | Description |
|---|---|
cursorquery · string · optional | An opaque cursor from a previous response's nextCursor, for the next page. It only pages the chain it was issued for; an empty one, or one over 256 characters, is a 400 (enforced after the API-key gate). |
chainpath · string · required | OP only; every other chain 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 |
|---|---|---|
games | object[] | Newest first. [] when the chain has no games. |
games[].index | integer | The game's position in the chain's game factory, from 0. |
games[].gameType | integer | The factory's game type. |
games[].contract | string | The game contract on the parent chain, lowercase. |
games[].claimedL2BlockNumber | integer | The L2 block the game's root claim names. A claim, not a checked block: see status. |
games[].createdAt | integer | Unix seconds the game was created at. |
games[].resolvedAt | integer | null | Unix seconds it resolved at; null while in progress. |
games[].status | string | defender_wins: the claim held. challenger_wins: it was shown false. in_progress: not resolved yet. |
nextCursor | string | null | Pass back as cursor for the next page. null on the last page. |
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