Terra Data: Index CosmWasm Events, Transfers, and Transactions

Index Terra's CosmWasm contract events, LUNA transfers, and transaction results in one pipeline, delivered to your own database. Real-time and complete historical data, no node to run.


Terra is an open-source, proof-of-stake blockchain built with the Cosmos SDK, running CosmWasm smart contracts with Luna as its native staking token. The current Terra mainnet, chain ID phoenix-1, launched on 28 May 2022 after Terra Classic governance proposal 1623 approved the genesis of a new chain. Since Terraform Labs wound down in 2024, the chain has been maintained by its validators, delegators, and governance rather than by a single company. The original chain continues separately as Terra Classic.

You can read the protocol documentation at docs.terra.money. Terra's data lives in CometBFT block results: every transaction carries a list of typed ABCI events with key and value attributes, and every block adds its own block-level events for minting, commission, and staking rewards. Indexing Co reads those blocks, lets you shape the events in a transform, and delivers rows to your own PostgreSQL, warehouse, or webhook. Real-time and full history, with no node to operate.

Source phoenix-1 blocks
Ingest block results, tx results
Decode ABCI events to fields
Transform your JavaScript
Deliver your database

Why Terra data is hard

Events, Not Logs Terra has no EVM receipts. Contract activity surfaces as ABCI events inside each transaction result: a `wasm` event carrying `_contract_address` and whatever attributes the contract chose to emit, alongside `message`, `transfer`, `coin_spent`, and `coin_received` events. There is no ABI to decode against, so every contract's attribute keys have to be mapped by hand.
Two Layers of Events Not everything happens inside a transaction. Minting, validator commission, and staking rewards arrive as block-level `finalize_block_events`, separate from the per-transaction `txs_results`. A dataset that only reads transactions silently misses the protocol's own token movements.
Raw Transactions Are Protobuf The transactions inside a Terra block are base64-encoded protobuf bytes. The readable view of what happened, message types like `/cosmwasm.wasm.v1.MsgExecuteContract`, senders, fees, and gas, comes from the result events, which have to be matched back to each transaction by position.
Your Own DB, Not a Hosted API Public LCD and RPC endpoints are rate-limited and prune history. Powering an app or analytics workload on Terra means owning the data in your own store, shaped the way your product queries it.

What Indexing Co delivers for Terra

The DIY Path

Stand up and maintain the whole stack yourself.

  • Run a Terra archive node or depend on public RPC and LCD endpoints.
  • Poll block results and pair each tx result with its raw transaction.
  • Map event attribute keys per contract and per module by hand.
  • Build backfill and real-time delivery from scratch.
Indexing Co

One pipeline sources, shapes, and delivers Terra to your store.

  • Terra tx results, ABCI events, and block-level events in a single pipeline.
  • Event attributes, shaped by your JavaScript transform.
  • Lands in your PostgreSQL, BigQuery, warehouse, or webhook.
  • Real-time delivery plus complete backfilled history. No node, no RPC babysitting.

What you can index

ABCI data type On Terra, for example
CosmWasm wasm and execute events Contract address, action, and custom attributes per execution
Token movements transfer, coin_spent, and coin_received events in uluna and other denoms
Transaction results Success code, gas wanted and used, fee, fee payer, message type
Block-level events Minting, validator commission, and staking rewards from finalize_block_events

A transform, not a subgraph

You write the transform in JavaScript, not AssemblyScript, and change it without re-indexing from block zero. Indexing Co runs your function over each block server-side: walk the transaction results, pick the events you care about, and return rows for your destination.

// Indexing Co transform: flatten CosmWasm wasm events into rows
function transform(block) {
  const results = [];
  const txs = block.txs_results || [];

  txs.forEach((tx, txIndex) => {
    if (tx.code !== 0) return; // skip failed transactions
    for (const event of tx.events || []) {
      if (event.type !== 'wasm') continue;
      const attrs = {};
      for (const a of event.attributes || []) attrs[a.key] = a.value;
      results.push({
        chain: block._network,
        height: Number(block.height),
        time: block.block.header.time,
        tx_index: txIndex,
        gas_used: Number(tx.gas_used),
        contract_address: attrs._contract_address,
        action: attrs.action || null,
        attributes: attrs,
      });
    }
  });
  return results;
}

Terra with Indexing Co

Run it yourself if

You want full control of node infrastructure and have the team to operate a Terra archive node, map every contract's event attributes, and build backfill and delivery in-house.

Use Indexing Co if

You want Terra CosmWasm events, token transfers, and transaction results delivered to your own database, with real-time plus complete history and no infrastructure to run.

Get a DemoOpen the Console

Related Reading

FAQ

Do I need to run a Terra node?

No. Indexing Co sources Terra blocks and block results for you, including full historical data, so you never operate an archive node or depend on public endpoints.

Is this Terra or Terra Classic?

This page covers Terra, the phoenix-1 chain launched in May 2022. The original chain, columbus-5, is a separate network with its own pipeline: see Terra Classic.

Can I index any CosmWasm contract on Terra?

Yes. Every contract execution emits a wasm event tagged with _contract_address, so a transform can filter on one contract, a set of contracts, or all of them, and keep whichever attributes the contract emits.

Are messages decoded from protobuf?

The pipeline delivers the transaction results and their ABCI events, which carry the message type, sender, fees, gas, and contract attributes. The raw transaction bytes in the block are base64 protobuf and are passed through as-is.

Where does the Terra data go?

Into your own destination: PostgreSQL, BigQuery, a warehouse, or a webhook. You define the output schema and own the storage.

Get Started

Index Terra in minutes. Set up your first Terra contract or token pipeline without running a node.

Get a DemoOpen the Console