post https://api.infstones.com/starknet/mainnet/
Get the details of the transaction given by the identified block and index in that block. If no transaction is found, null is returned.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK_PARAMETER | ✅ | String | "block_hash", "block_number", "latest", "pending" |
ID | ✅ | Integer | Index of the transaction. |
"params": [
{
"block_hash": "0x03b6581f3222ff1f79c0e9959462aef03bd464999e998292772a0c51da53f9b1"
},
1
]
Result
A transaction object.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_getTransactionByBlockIdAndIndex",
"params": [
{
"block_hash": "0x03b6581f3222ff1f79c0e9959462aef03bd464999e998292772a0c51da53f9b1"
},
1
],
"id": 1
}'
Return
{
"jsonrpc": "2.0",
"result": {
"type": "INVOKE",
"version": "0x0",
"transaction_hash": "0xbad8dd068c67cf88b18c816f8ecf578fa177f58d7af9cb8b955a26e3de1c6b",
"max_fee": "0x0",
"signature": [],
"nonce": "0x0",
"contract_address": "0x3071994c5c4d5505f0b081adf43cb84cc01604adce2473e114607ca75fa6085",
"entry_point_selector": "0x12ead94ae9d3f9d2bdb6b847cf255f1f398193a1f88884a0ae8e18f24a037b6",
"calldata": [
"0xe973f2bd1b8c9f7eda557e7afbd7fafea6720f67"
]
},
"id": 1
}