BNB Smart Chain
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
A transaction hash is the canonical handle for any payment or contract call on BNB Smart Chain, and eth_getTransactionByHash turns that handle back into the full object: sender, recipient, BNB value, gas fields, input calldata, signature, and the block it landed in. The hash is the same value bscscan.com shows on its explorer pages, so you can copy one straight across. Point the query at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56; a still-pending or unknown transaction comes back with null block fields or null outright, which is how you tell mined from unmined.
blockNumber is no longer null.input calldata against an ABI to discover which contract function the transaction invoked and with what arguments.from address and BNB value to verify an incoming payment matches what your application expected.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | Sim | The hash of the transaction to retrieve. |
| Tipo | Descrição |
|---|---|
| object | null | Transaction object containing: hash, nonce, blockHash, blockNumber, transactionIndex, from, to (null for contract creation), value (hex wei), gas, gasPrice / maxFeePerGas / maxPriorityFeePerGas, input, type, accessList (type-1/2), chainId, v, r, s. Returns null if not found or still pending (blockHa |
Try it live in the BNB Smart Chain playground.
| Código | Mensagem | Causa |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed or not 32 bytes. |
status field to learn whether execution reverted.blockHash, blockNumber, and transactionIndex all set to null.null, so always null-check the response before you reach into its fields.Parâmetros
0x-prefixed 32-byte transaction hash