For the complete documentation index, see llms.txt. This page is also available as Markdown.

block_results - Cosmos

Example code for the block_results JSON-RPC method. Complete guide on how to use block_results JSON-RPC in GetBlock Web3 documentation.

Returns the results of all transactions executed in a block — ABCI codes, gas used, events emitted, and per-transaction data. This is where event-driven indexers extract structured information about what happened in a block.

Parameters

Parameter
Type
Required
Description

height

integer

No

Block height (decimal). Defaults to the latest block if omitted

Request Example

# JSON-RPC over HTTP POST (canonical)
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/block_results' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "block_results",
    "params": {
        "height": 23456789
    },
    "id": "getblock.io"
}'

# URI over HTTP GET (alternate, for simple methods)
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/block_results?height=23456789'

Response Example

Response Parameters

Field
Type
Description

result.height

string

Block height (echoed)

result.txs_results

array

Per-transaction execution results

result.txs_results[].code

integer

ABCI response code: 0 for success, non-zero for failure

result.txs_results[].gas_wanted

string

Gas limit declared by the transaction

result.txs_results[].gas_used

string

Actual gas consumed

result.txs_results[].events

array

Events emitted by the transaction — the primary event-sourcing surface

result.finalize_block_events

array

Events emitted by the BeginBlock/EndBlock app phases

result.validator_updates

array

Validator set changes applied at this block

Use Cases

  • Event-driven indexers extracting transfers, delegations, IBC packets, etc.

  • Computing per-transaction gas-cost analytics

  • Detecting validator set updates and slashings

  • Building application-level explorers

Error Handling

Status Code
Error Message
Cause

404

Not found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?