theta.GetBlock

This API returns the block being queried in json format.

Parameters

Object NameRequiredTypeDetail
hashStringthe block hash
include_eth_tx_hashesBooleanwhether to include the ETH tx hash of the smart contract transactions in the response
"params":[
    {
        "hash":"0x2a7620449a1e166f715cbdfd40c4d70c83bfe05c772929c627aedbc00aa961be", 
        "include_eth_tx_hashes":false
    }
]

Result

Result Fields

KeyTypeDetail
chain_idStringID of the chain
epochStringepoch of the block
heightStringheight of the block
parentStringhash of the parent block
transactions_hashStringroot hash of the transaction Merkle-Patricia trie
state_hashStringroot hash of the state Merkle-Patricia trie
timestampStringtimestamp when the block was proposed
proposerStringaddress of the proposer validator
hccObjecta commit made a majority of validators
childrenArraychildren blocks
statusIntegerstatus of the block (see the Block Status note below)
hashStringthe block hash
transactionsArrayjson representation of the transactions contained in the block (see the Transaction Fields note below)

Block Status

0: pending 
1: valid
2: invalid
3: committed
4: directly finalized
5: indirectly finalized
6: trusted (the first block in a verified snapshot is marked as trusted)

A block and all the transactions included in the block are considered Finalized by the validators if the block status is either 4, 5, or 6

Block status transitions:

+-------+          +-------+                          +-------------------+
|Pending+---+------>Invalid|                    +----->IndirectlyFinalized|
+-------+   |      +-------+                    |     +-------------------+
            |                                   |
            |      +-----+        +---------+   |     +-----------------+
            +------>Valid+-------->Committed+---+----->DirectlyFinalized|
                   +-----+        +---------+         +-----------------+

Transaction Fields

KeyTypeDetail
rawObjecttransaction details
typeIntegertype of the transaction (see the Transaction Types note below)
hashStringhash of the transaction
receiptObjectsmart contract Tx execution result
balance_changesObjectaccount balance changes due to smart contract Tx execution

Transaction Types

0: coinbase transaction, for validator/guardian reward
1: slash transaction, for slashing malicious actors
2: send transaction, for sending tokens among accounts
3: reserve fund transaction, for off-chain micropayment
4: release fund transaction, for off-chain micropayment
5: service payment transaction, for off-chain micropayment
6: split rule transaction, for the "split rule" special smart contract
7: smart contract transaction, for general purpose smart contract
8: deposit stake transaction, for depositing stake to validators/guardians
9: withdraw stake transaction, for withdrawing stake from validators/guardians

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"theta.GetBlock","params":[{"hash":"0x2a7620449a1e166f715cbdfd40c4d70c83bfe05c772929c627aedbc00aa961be","include_eth_tx_hashes":false}],"id":1}'

Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "chain_id": "mainnet",
        "epoch": "19430676",
        "height": "19337607",
        "parent": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
        "transactions_hash": "0x9933d98aad0032e37b0bcf929647ff8d53cccebef16ffbd23ea401519fcd7259",
        "state_hash": "0x1c60038aa4565085c51f7b3c6b5c3b90551e9bacd238636facb642fc34e73ef2",
        "timestamp": "1677189682",
        "proposer": "0x4b80a68a8469d33449eb101082e5500b932a23ce",
        "hcc": {
            "Votes": [
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x099e156352ab4de87a20801288edb7d753770db8",
                    "Signature": "0x4989b22685d5106475a8c96eca594fb72d5d4ea14de6a6cc3b73463fe5051f4d51bb07eed6c857b412b0f8feb483456c06fb83821afc513a932f129dc88cc4d201"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x15cc4c3f21417c392119054c8fe5895146e1a493",
                    "Signature": "0x8e72aca5da01dab78d3e212f4f90fc2e213106e2d8a6fb0127dbdbefa789d7a3625a1b8a1b04ed0a78dd8951cab0e55463eb34684256d9396a81034e62f39ba301"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x1786d878cb76a53f5950f41fed7d61617e12dfb5",
                    "Signature": "0xa78bbeb0d2eae4a30c7634619ff77f7586f9525ba8116f4278fc4e8ce1fc085615ef26fffdb478b0579e26aa17a445f6b1f86401b029fa3cfe96f64914d80e7900"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x2fce1787e67d5ec03e691d954600e44d0a38ce58",
                    "Signature": "0x789e471df473c2beb4fce416cd7463bc0b2efd4098eafaf9b80bf5f734dd2e3e537e56d29b7dd3914946d1b80af28d3737ca147760c900f89c92bbedab3ebf8300"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x3905663153b7f2ba8a21f020f87df6fcf13580c5",
                    "Signature": "0xf209d71ad42090c4ea886b122ca1c62c7457c0d81e2c185152264fb3556e3bc5679c324f89f73335f4bb6fd42402b4af17bf8b550810c3e98290f2cdc9f9924e01"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x3dd37990b722249f81375c3298eabe491d44944d",
                    "Signature": "0x89adaecdf4ba7afdc2f1e5e754ecbb45820fd802a5d5473ea308273085130a8945aef9bbcaa61b3965859aeeb8137461f8180d9c67a3c25e403b9013675c944901"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x4b80a68a8469d33449eb101082e5500b932a23ce",
                    "Signature": "0xb9265ea8be189d26eeed355133559afd8d92c37fc1b8cc89dfa1c9989d3395327fb5b92748ea45dcfed9ceb4791443ef0690a66be7e09a6ec66015d8d02a79c300"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x578f5ddd2221a94f095bc7c81ddf95ee9e0cb58f",
                    "Signature": "0x4a1cfe299ceb3001fc4b959a6c4d57f4fe7c9a23453d3cefaf210b89bc75e7a84efd6dd17805542ae55f3b33ef1c135b26aff8b2a96ea6c8260a31d4f764506100"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x6872b883464bfba456ab674bbef9824849db91e2",
                    "Signature": "0xc5d52967428d85b2d1690eef693b1237617cf827b8024a2bbb4d69b26cbad73220999bddfb65439c64c74429a52f89a4560e0f117179600270711553b274f21401"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0x80eab22e27d4b94511f5906484369b868d6552d2",
                    "Signature": "0x46aa407b247f534ecd5e887a3b4cbb18222a7a3598f14131f57ddec973bc2e634e20de0a673599bf0b0afb95f344425e7885f3bf291b5436d2216613a81a779600"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0xa144e6a98b967e585b214bfa7f6692af81987e5b",
                    "Signature": "0x04628f77c49e7750faa78d37570c4332cc925779a547b65b63d2a71067a37c71750fa7b3e7c528d5a2a8736239416c1e15a33b86f7cfbcd569b3f5320bb3753c00"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0xafcc901b0e8eac02f0e91bd12791888a0df8a252",
                    "Signature": "0x22703a76c132bfffd173e369628e889658d3642bc6f41dd7613ce6c2a465733d5943da91ccdb2d137b98caca901163fb2ac7dbf59b56adf85d8c54586056501d00"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0xc4e68435b0f12c6664377a961e7c459f414b6ef1",
                    "Signature": "0xcc733a4603dbb5784e3c5132b2d38ccbce612db235b80b76c4cfe043d404cec971ca067924ff2c32f766c798efc383e063e3cc31a3272a33df4d3a1427c0b2d200"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0xd21ffe1e260eb063d89365b9d16f8ec12558c6fd",
                    "Signature": "0xd7cd18f1249a9c12603f2734656533f16805ad443c39b50f76c7508be773868e7e9f8c9f917974316071be292dba37fde6ab1c2ae8adc41a1867ee42ef4ffadd00"
                },
                {
                    "Block": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe",
                    "Height": 19337606,
                    "Epoch": 19430675,
                    "ID": "0xe2408dff7a1f9bc247c803e43efa2f0a37b10ba6",
                    "Signature": "0x5453c571dcd50807a31987b791f261eee740e65e47db90cc850ab5a66b2ecb1328f2b908a0c6e1fb856d904a0943fcd81ce2d5a4343b8b539a7644cbc10256b901"
                }
            ],
            "BlockHash": "0xe7230fefee46db976337a53a262bec4951281df673ab98088187873da6f385fe"
        },
        "guardian_votes": null,
        "elite_edge_node_votes": null,
        "children": [
            "0x1e373a676f49b3f1592a1480b80afe63df84675006799b0a40b341c3267cb07b"
        ],
        "status": 4,
        "hash": "0x2a7620449a1e166f715cbdfd40c4d70c83bfe05c772929c627aedbc00aa961be",
        "transactions": [
            {
                "raw": {
                    "proposer": {
                        "address": "0x4b80a68a8469d33449eb101082e5500b932a23ce",
                        "coins": {
                            "thetawei": "0",
                            "tfuelwei": "0"
                        },
                        "sequence": "0",
                        "signature": "0xfd89957a57da267fcb01e90b1a1e7b855e2ad29607328056178125203e86ca175e35cb862ef73e614f57a25177204c4709f3e84f06765c772e92934e40ea598001"
                    },
                    "outputs": [],
                    "block_height": "19337606"
                },
                "type": 0,
                "hash": "0xd9b453bdece728217a6504e6d95a283fbc10a4c8f9f3cf7c6c25ed0069e4148d",
                "receipt": null,
                "balance_changes": null
            },
            {
                "raw": {
                    "from": {
                        "address": "0x1908ffa6b3734941fc02ca88b27a5a10eedc3236",
                        "coins": {
                            "thetawei": "0",
                            "tfuelwei": "0"
                        },
                        "sequence": "72",
                        "signature": "0xb4ab450091af5dcdc787459eba11d36d54d765160b6b454006f4a9b5765d3b1f59aa03c0abd8e918bbd389998e13407a9f52147885c284e791483fa18b3e706e00"
                    },
                    "to": {
                        "address": "0xb97c24d014cabdb8744f198a16918497effc36e5",
                        "coins": {
                            "thetawei": "0",
                            "tfuelwei": "0"
                        }
                    },
                    "gas_limit": "55098",
                    "gas_price": "4000000000000",
                    "data": "qQWcuwAAAAAAAAAAAAAAABkI/6azc0lB/ALKiLJ6WhDu3DI2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnCAHZRslAAA="
                },
                "type": 7,
                "hash": "0x2e189ad266b5bb55279a52422c32701ce1813d15fd39b6e086e6e4360060f31c",
                "receipt": {
                    "TxHash": "0x2e189ad266b5bb55279a52422c32701ce1813d15fd39b6e086e6e4360060f31c",
                    "Logs": [
                        {
                            "address": "0xb97c24d014cabdb8744f198a16918497effc36e5",
                            "topics": [
                                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                                "0x0000000000000000000000001908ffa6b3734941fc02ca88b27a5a10eedc3236",
                                "0x0000000000000000000000001908ffa6b3734941fc02ca88b27a5a10eedc3236"
                            ],
                            "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnCAHZRslAAA="
                        }
                    ],
                    "EvmRet": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=",
                    "ContractAddress": "0xb97c24d014cabdb8744f198a16918497effc36e5",
                    "GasUsed": 36732,
                    "EvmErr": ""
                },
                "balance_changes": {
                    "TxHash": "0x2e189ad266b5bb55279a52422c32701ce1813d15fd39b6e086e6e4360060f31c",
                    "BalanceChanges": [],
                    "EvmRet": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=",
                    "ContractAddress": "0xb97c24d014cabdb8744f198a16918497effc36e5",
                    "GasUsed": 36732,
                    "EvmErr": ""
                }
            }
        ]
    }
}
Language
Click Try It! to start a request and see the response here!