BNB Smart Chain
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
BNB Smart Chain
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Within any BNB Smart Chain block, transactions are stored in a fixed order, and eth_getTransactionByBlockHashAndIndex reaches one of them by its position. Give the method a 32-byte block hash plus a zero-based hex index and it returns that single transaction object, or null when the block or slot does not exist. Because BNB Smart Chain pays its validators in BNB and finalizes blocks in around three seconds under PoSA, addressing a transaction by block hash pins it to one specific, immutable block. Route the lookup through https://bsc.therpc.io/YOUR_API_KEY on chain ID 56.
0x0 until the method returns null.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Oui | The hash of the block containing the transaction. |
| 2 | transactionIndex | string (hex) | Oui | Zero-based position of the transaction within the block. |
| Type | Description |
|---|---|
| object | null | Same transaction object as eth_getTransactionByHash. Returns null if block or index not found. |
Try it live in the BNB Smart Chain playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block hash or transaction index is malformed. |
"0x0" — passing a bare integer 0 will be rejected as malformed.null back rather than an error, so guard against the null before reading fields.Paramètres
0x-prefixed 32-byte block hash
0x-prefixed hex integer (e.g. "0x0" for the first transaction)