Skip to content
LogoLogo

state.json is the multi-chain deployment map used by Abstract / Terp tooling (abstract-interface, scripts, and public mirrors). One file keys every chain by chain ID, then nests code IDs, live contract addresses, assets, and IBC path metadata.

Canonical reads (pick one):

SourceURL / path
Public S3 (ops mirror)https://s3.terp.network/snapshots/mainnet/morocco-1/state.json
abstract-interface embedcrates/abstract/framework/packages/abstract-interface/state.json
terp-rs publiccrates/terp-rs/public/state.json

Top-level shape

{
  "<chain-id>": {
    "code_ids":  { "<contract-id>": <number>, ... },
    "default":   { "<contract-id>": "<bech32-address>", ... },
    "assets":    { ... },      // optional — denom metadata / IBC assets
    "chains":    { ... },      // optional — cross-chain asset views
    "ibc_data":  { ... }       // optional — clients, connections, channels
  },
  ...
}

Root keys (chain IDs)

Examples present in the public file:

Chain IDRole
morocco-1Terp mainnet (richest entry: assets + ibc_data)
120u-1Terp testnet (often sparse)
osmosis-1, juno-1, akash-1, …Peer / remote chains with deployments

Parse root as Record&lt;string, ChainState>.

Field reference

code_ids

Map of logical contract id → CosmWasm code id (on-chain number).

PropertyTypeExample
keystringabstract:registry, cw-infuser, crates.io:terp721-account
valuenumber (u64)66

Use: store / instantiate matching bytecode; verify with compile & verify code ID.

default

Map of logical contract id → instantiated address for the “default” deployment on that chain.

PropertyTypeExample
keystringabstract:ans-host
valuebech32 stringterp133wf9…

Use: clients and CLIs resolve known modules without hardcoding addresses in app code.

Abstract interface helpers (Rust mental model):

contract_code_id(chain_id, contract_id)  → code_ids[contract_id]
contract_addr(chain_id, contract_id)     → default[contract_id]

assets (optional)

Denom / IBC asset metadata, often under a nested key (including "" as a bucket). Entries follow chain-registry-like objects:

Common fieldsMeaning
baseMinimal denom (native, factory, or ibc/…)
display / symbol / nameHuman labels
denom_unitsexponent ladder
tracesIBC / mintage path
type_assete.g. sdk.coin, ics20
logo_URIs, coingecko_idoptional presentation

ibc_data (optional)

Keyed by counterparty chain name (e.g. osmosis, akash). Each value is an IBC path record:

FieldMeaning
chain_1 / chain_2chain_id, chain_name, client_id, connection_id
channels[]channel_id, port_id, ordering, version, tags
client_statuse.g. Active
$schemaoptional pointer to ibc_data schema

chains (optional)

Cross-chain asset projections (e.g. how Terp assets appear on Osmosis). Nested similarly to assets.

Worked example: morocco-1

curl -sL https://s3.terp.network/snapshots/mainnet/morocco-1/state.json \
  | jq '.["morocco-1"] | keys'
## ["assets","chains","code_ids","default","ibc_data"]
 
## Registry code id + address
curl -sL https://s3.terp.network/snapshots/mainnet/morocco-1/state.json \
  | jq '{
      code_id: .["morocco-1"].code_ids["abstract:registry"],
      address: .["morocco-1"].default["abstract:registry"]
    }'
 
## IBC path Terp ↔ Osmosis
curl -sL https://s3.terp.network/snapshots/mainnet/morocco-1/state.json \
  | jq '.["morocco-1"].ibc_data.osmosis | {
      clients: [.chain_1.client_id, .chain_2.client_id],
      channels: [.channels[0].chain_1.channel_id, .channels[0].chain_2.channel_id]
    }'

Parsing recipes

Verification habits

Claim in state.jsonHow to verify
code_ids[id] = Nterpd query wasm code-info N → checksum; rebuild source
default[id] = addrterpd query wasm contract addr → code_id matches map
ibc_data channelsIBC info checksums
Asset denomsLCD bank metadata + chain-registry cross-check

Further reading