block_results - Cosmos

block_results. Master the retrieval of transaction and block results

block_results - Cosmos [Value: 20CU]
Retrieves the transaction and block results
Use cases

Use cases

  • Analyze transactions and events within a specific block
  • Validate block execution results
  • Monitor changes to the validator set
Constraints

Constraints

  • Inconsistencies during chain reorganization
  • Potential performance issues with large blocks
  • Limited historical data availability
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --location 'https://cosmos-hub.drpc.org' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "block_results",
    "params": [
        20431584
    ],
    "id": 1
}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "height": "20431584",
    "txs_results": [
      {
        "code": 0,
        "data": "0A080A06726573756C74",
        "log": "Msg 0: ",
        "info": "",
        "gas_wanted": "200000",
        "gas_used": "76400",
        "events": [
          {
            "type": "transfer",
            "attributes": [
              {
                "key": "recipient",
                "value": "cosmos1xqyqszkn5lxsxgwk4rhdz5x4a4n7ynw83mp92d"
              },
              {
                "key": "sender",
                "value": "cosmos1xhxjm4lkfg4szg6rgfj3f8csz40l80cdg0v3nl"
              }
            ]
          }
        ]
      }
    ],
    "begin_block_events": [
      {
        "type": "mint",
        "attributes": [
          {
            "key": "amount",
            "value": "18640.370000000000000000"
          }
        ]
      }
    ],
    "end_block_events": [
      {
        "type": "validator_set_updates",
        "attributes": []
      }
    ],
    "validator_updates": [],
    "consensus_param_updates": {},
    "evidence": []
  },
  "id": 1
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersobject
object
querystring
The query string used to search for blocks. The query should follow the Tendermint query format (e.g., 'tx.height=5').
pageinteger
The page number of the result set to retrieve. Used for pagination.
per_pageinteger
The number of blocks to return per page. Used for pagination.
order_bystring
The order in which results should be returned. Accepts 'asc' for ascending and 'desc' for descending order.

Response

200
Contains the results of processing a block, including information about transactions

Response params

object
idinteger
jsonrpcstring
resultobject
object
heightstring
The height of the block in the blockchain.
txs_resultsarray
The results of executing the transactions in the block.
object
codeinteger
The response code of the transaction.
datastring
Any data returned from the transaction execution.
logstring
The log output of the transaction execution.
infostring
Additional information about the transaction execution.
gas_wantedstring
The amount of gas requested for the transaction.
gas_usedstring
The amount of gas actually used by the transaction.
eventsarray
A list of events triggered by the transaction execution.
object
typestring
The type of event triggered.
attributesarray
Attributes associated with the event.
object
keystring
The key of the attribute.
valuestring
The value of the attribute.
codespacestring
The namespace for the error code, if any.
begin_block_eventsarray
Events triggered at the beginning of the block.
object
typestring
The type of event triggered at the beginning of the block.
attributesarray
Attributes associated with the event.
object
keystring
The key of the attribute.
valuestring
The value of the attribute.
end_block_eventsarray
Events triggered at the end of the block.
object
typestring
The type of event triggered at the end of the block.
attributesarray
Attributes associated with the event.
object
keystring
The key of the attribute.
valuestring
The value of the attribute.
validator_updatesarray
List of updates to the validators.
object
pub_keyobject
The public key of the validator.
object
typestring
The type of the public key.
valuestring
The value of the public key.
powerstring
The power of the validator.
consensus_param_updatesobject
Updates to the consensus parameters.
object
blockobject
Updates to the block parameters.
object
max_bytesstring
The maximum size of a block in bytes.
max_gasstring
The maximum amount of gas allowed in a block.
evidenceobject
Updates to the evidence parameters.
object
max_age_num_blocksstring
The maximum age of evidence in terms of blocks.
max_age_durationstring
The maximum age of evidence in terms of time duration.
validatorobject
Updates to the validator parameters.
object
pub_key_typesarray
The list of public key types allowed for validators.
amountstring
The amount of coins transferred or involved in the block.