post https://api.infstones.com/theta/mainnet/
Returns information about a transaction by block hash and transaction index position.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | A hex code of an integer that represents the hash of a block. |
TRANSACTION INDEX POSITION | ✅ | String | A hex code of an integer that represents the position of a transaction in the block. |
"params": [
"0x52d417b7a1f082651811d142e0e79540e88c8024935d39572773acef7219a5d5",
"0x0"
]
Result
A transaction object, or null
if no transaction was found.
Result Fields
Key | Type | Detail |
---|---|---|
blockHash | String | Hash of the block where this transaction was in. null if the transaction is pending. |
blockNumber | String | A hex code of an integer that represents the block number where this transaction was in. null if the transaction is pending. |
from | String | Address the transaction is sent from. |
gas | String | A hex code of an integer that represents the gas provided by the sender. |
gasPrice | String | A hex code of an integer that represents the gas price provided by the sender in Wei. |
hash | String | Hash of the transaction, 32 Bytes. |
input | String | The data send along with the transaction. |
nonce | String | A hex code of an integer that represents the number of transactions made by the sender prior to this one. |
r | String | ECDSA signature r. |
s | String | ECDSA signature s. |
to | String | Address the transaction is directed to. null if it's a contract creation transaction. |
transactionIndex | String | A hex code of an integer that represents the transactions index position in the block. null if the transaction is pending. |
v | String | ECDSA recovery id. |
value | String | Value transferred in Wei. |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0x52d417b7a1f082651811d142e0e79540e88c8024935d39572773acef7219a5d5","0x0"],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x52d417b7a1f082651811d142e0e79540e88c8024935d39572773acef7219a5d5",
"blockNumber": "0x128560b",
"from": "0x0000000000000000000000000000000000000000",
"to": null,
"gas": "0x0",
"gasPrice": "",
"hash": "0x897ee363740834c3c9803a341e5dbb775d4828a479bc79832760f991b937dd7e",
"nonce": "0x0",
"input": "",
"transactionIndex": "0x0",
"value": "",
"v": "0x0",
"r": "0x0000000000000000000000000000000000000000000000000000000000000000",
"s": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}