post https://api.infstones.com/bsc/mainnet/
Returns information about a transaction for a given hash.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
TRANSACTION HASH | ✅ | String | Hash of a transaction. |
"params": [
"0xbaa43749a760929b27aa445ee724b58f3418cbe90286ce4e42d5eaa4e1727c27"
]
Result
A transaction object, or null
when 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. |
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_getTransactionByHash","params": ["0xbaa43749a760929b27aa445ee724b58f3418cbe90286ce4e42d5eaa4e1727c27"],"id":1}'
Return
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0xc4e9cc03ac26ffef240fc549761d5efb7d2e559910de8d5e45a4c921f4633bb4",
"blockNumber": "0xf97a55",
"from": "0x6121073b15531c0b0c33d46d62c8ff058d78002d",
"gas": "0x493e0",
"gasPrice": "0x2f4b7b3c0",
"hash": "0xbaa43749a760929b27aa445ee724b58f3418cbe90286ce4e42d5eaa4e1727c27",
"input": "0xaf974aca000000000000000000000000c75b3d693ab0736107c99baa1b62436d14158882000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000306b0e4b7e3d847000000000000000000000000000000000000000000000017c15eecbcc29e24abc",
"nonce": "0x816f",
"r": "0xbea4ea5f2a6f73ea347e84505f2fe2329375e0f30f2344a64537b7866f54c29",
"s": "0x54212ffcfe43877dcfd002e4710da887eff434b21f5596a54d1ee4e17d6fbeca",
"to": "0xc1b3cf34c0d3e829e47488f44879555c6beadfcd",
"transactionIndex": "0x1",
"type": "0x0",
"v": "0x93",
"value": "0x0"
}
}