Skip to main content
You can look up transactions by hash, search by events, decode raw transaction bytes, and simulate gas usage — all without broadcasting anything on-chain.

Lookup by Hash

Search by Events

Event queries use Tendermint’s query syntax. Multiple conditions are combined with AND.

Structured Query Syntax

searchTx accepts either a raw query string or a structured SearchPair[]. Structured queries are safer — string values are automatically quoted and numeric values are left unquoted (required by Tendermint):

Decoding Raw Transaction Bytes

IndexedTx.tx contains the raw transaction bytes. Use decodeTxRaw to inspect the messages, memo, fee, and signer info:

Working with IndexedTx Fields

The IndexedTx response provides several useful fields beyond the raw bytes:
rawLog is deprecated and empty on Cosmos SDK 0.50+. Use events instead.

Parsing Transaction Events

Transaction results include events emitted by Cosmos SDK modules. You can extract specific attributes from these events.

From DeliverTxResponse

After broadcasting with a SigningStargateClient, use events directly from the response:

From IndexedTx

Events from searched transactions follow the same structure:

Extracting Contract Addresses (CosmWasm)

After uploading or instantiating a CosmWasm contract, the contract address is in the events. Use the same filtering pattern to extract it (broadcast through SigningCosmWasmClient):
SigningCosmWasmClient.instantiate returns the contract address directly in its result, so you typically don’t need to parse events manually for instantiation.

Using parseRawLog (Legacy)

For chains running Cosmos SDK < 0.50, you can parse the rawLog field through the logs namespace:
rawLog is empty on Cosmos SDK 0.50+. Prefer working with events directly.

Using the Tx Extension

The tx extension provides a lower-level getTx and a simulate method for gas estimation:

Gas Simulation

Signing clients can simulate a transaction against the chain to estimate gas usage before broadcasting. Nothing is committed on-chain.
When you use "auto" as the fee in signAndBroadcast, the client calls simulate internally and applies a 1.4x multiplier to the result.

Next Steps

Error Handling

Handle broadcast errors and timeouts.

Blocks & Chain Info

Block data and chain status.