BNB Smart Chain
eth_sendRawTransaction
BNB Smart Chain is chain ID 56, and every transaction on it spends BNB for gas. eth_sendRawTransaction is the call that actually puts one on the wire. Sign a transaction client-side, serialize it, then send the resulting RLP-encoded blob to https://bsc.therpc.io/YOUR_API_KEY. The method broadcasts that fully signed transaction to the network and returns its 32-byte hash. That hash is your handle for tracking the transaction while PoSA validators pick it up and seal it into a block within a few seconds. One caveat: the hash confirms acceptance into the mempool, not on-chain success.
Use cases
- Push a BNB transfer onto chain 56 after signing it offline in a cold wallet or hardware signer.
- Deploy a BEP-20 contract by leaving
toempty and packing the compiled bytecode into thedatafield of the signed transaction. - Trigger a contract write, say a BEP-20
transferor a PancakeSwap router swap, by broadcasting the signed call.
Parameters
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | signedTransaction | string | Yes | The serialized signed transaction. Build and sign it client-side with a library (e.g. ethers, viem, web3.js); never send a private key to the node. |
Response
| Type | Description |
|---|---|
| string | 32-byte transaction hash (0x-prefixed). The transaction is now in the mempool but not yet confirmed. |
Example request
Try it live in the BNB Smart Chain playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32000 | nonce too low | The nonce in the signed transaction is lower than the sender's current on-chain nonce. |
-32000 | insufficient funds for gas * price + value | The sender does not have enough native-token balance to cover gas cost and the transferred value. |
-32000 | replacement transaction underpriced | Tried to replace a pending transaction (same nonce) but the new fee is not high enough (typically requires ≥10% bump). |
Common pitfalls
- The returned hash only proves the node took the transaction into its mempool, not that it is confirmed; poll
eth_getTransactionReceiptto watch for inclusion in a block. - A successful broadcast does not guarantee on-chain success. A receipt carrying
status: "0x0"means the transaction was mined but reverted, and your BNB gas was still burned. - Pull a fresh nonce with
eth_getTransactionCountright before signing; a stale nonce collides with another pending transaction and gets rejected.
Supported networks
- Mainnet — Chain ID: 56
- Testnet — Chain ID: 97
See also
Parameters
0x-prefixed hex string of the RLP-encoded signed transaction