BNB Smart Chain

BNB Smart Chain

All Methods

This page enumerates every BNB Smart Chain JSON-RPC method TheRPC supports, grouped by namespace, with a short note on what each one is for and when you would call it against chainId 56. Click any method name to open its full documentation, where you will find the exact parameters and the response shape alongside runnable examples.

Core Methods (eth_)

The eth_ namespace carries the core functionality for working with BNB Smart Chain: reading balances and blocks, sending raw transactions, calling BEP-20 and PancakeSwap contracts, estimating gas, and subscribing to events. These are the methods most applications spend the bulk of their calls on.

Core Methods (eth_)

eth_blockNumber

Read the latest BNB Smart Chain block height via eth_blockNumber over TheRPC, where PoSA blocks land roughly every three seconds at chain ID 56.

eth_call

Run read-only BSC contract calls with eth_call over TheRPC — query PancakeSwap reserves or BEP-20 balances at chain ID 56 with no BNB spent.

eth_chainId

Use eth_chainId over TheRPC to confirm you are on BNB Smart Chain mainnet (0x38, decimal 56) or testnet (0x61, decimal 97) before signing.

eth_estimateGas

Simulate a BSC transaction with eth_estimateGas over TheRPC to size its gas limit before paying BNB, at chain ID 56 with no on-chain effect.

eth_feeHistory

Pull recent BSC base fees, gas-used ratios, and priority-fee percentiles with eth_feeHistory over TheRPC to build EIP-1559 fee strategies at chain ID 56.

eth_gasPrice

Fetch the node's suggested BSC legacy gas price in wei with eth_gasPrice over TheRPC, ideal for type-0 BNB transactions at chain ID 56.

eth_getBalance

Read an account's BNB balance at any block with eth_getBalance over TheRPC on BNB Smart Chain (chain ID 56), returned as hex wei.

eth_getBlockByHash

Fetch a BSC block by its 32-byte hash with eth_getBlockByHash over TheRPC at chain ID 56 — headers, transactions, and gas metrics in one call.

eth_getBlockByNumber

Fetch a BSC block by height or tag (latest, finalized) with eth_getBlockByNumber over TheRPC at chain ID 56 — the workhorse call for indexers.

eth_getBlockReceipts

Get every BSC transaction receipt in a block in one eth_getBlockReceipts call over TheRPC at chain ID 56 — ideal for BEP-20 log indexing.

eth_getBlockTransactionCountByHash

Count the transactions in a BSC block by its hash with eth_getBlockTransactionCountByHash over TheRPC at chain ID 56, without fetching the block.

eth_getBlockTransactionCountByNumber

Count transactions in a BNB Smart Chain block by height or tag with eth_getBlockTransactionCountByNumber. Track chain-56 congestion via TheRPC.

eth_getCode

Read deployed EVM bytecode at any BNB Smart Chain address with eth_getCode. Tell contracts from EOAs and verify deployments on chain 56 via TheRPC.

eth_getFilterChanges

Poll new logs, block hashes, or pending-tx hashes on BNB Smart Chain with eth_getFilterChanges. Drive incremental chain-56 indexing via TheRPC.

eth_getFilterLogs

Return every log matching an existing BNB Smart Chain log filter with eth_getFilterLogs, ignoring poll state. Load full history on chain 56 via TheRPC.

eth_getLogs

Fetch BEP-20 and DeFi event logs on BNB Smart Chain with eth_getLogs. One-shot filter queries for backfill indexing over chain 56 via TheRPC.

eth_getProof

Get account fields and Merkle-Patricia trie proofs on BNB Smart Chain with eth_getProof. Verify chain-56 state trustlessly for bridges via TheRPC.

eth_getStorageAt

Read the 32-byte value at any BNB Smart Chain contract storage slot with eth_getStorageAt. Inspect proxy and governance state on chain 56 via TheRPC.

eth_getTransactionByBlockHashAndIndex

Fetch a BNB Smart Chain transaction by block hash and index position with eth_getTransactionByBlockHashAndIndex. Enumerate chain-56 blocks via TheRPC.

eth_getTransactionByBlockNumberAndIndex

Fetch a BNB Smart Chain transaction by block height or tag and index with eth_getTransactionByBlockNumberAndIndex. Scan chain-56 blocks via TheRPC.

eth_getTransactionByHash

Retrieve a BNB Smart Chain transaction object by its hash with eth_getTransactionByHash. Confirm mining and decode input on chain 56 via TheRPC.

eth_getTransactionCount

Get the nonce of any BNB Smart Chain address with eth_getTransactionCount. Build and sequence transactions on chain 56 reliably via TheRPC.

eth_getTransactionReceipt

Fetch a mined BNB Smart Chain transaction receipt — status, gasUsed, effectiveGasPrice, BEP-20 logs, and contractAddress — over TheRPC JSON-RPC.

eth_getUncleByBlockHashAndIndex

Call eth_getUncleByBlockHashAndIndex on BNB Smart Chain. PoSA produces no uncles, so this Ethereum-compatibility shim always returns null on chain 56.

eth_getUncleByBlockNumberAndIndex

Query eth_getUncleByBlockNumberAndIndex on BNB Smart Chain by height. PoSA chain 56 mints no uncles, so this compatibility shim always returns null.

eth_getUncleCountByBlockHash

Count uncles for a BNB Smart Chain block by hash. PoSA chain 56 never forks siblings, so eth_getUncleCountByBlockHash always reports 0x0.

eth_getUncleCountByBlockNumber

Count uncles by block height on BNB Smart Chain. Under PoSA, chain 56 forks no siblings, so eth_getUncleCountByBlockNumber always returns 0x0.

eth_maxPriorityFeePerGas

Get a suggested BNB priority-fee tip per gas unit on BNB Smart Chain chain 56, for building EIP-1559 transactions over the TheRPC JSON-RPC endpoint.

eth_newBlockFilter

Create a server-side block filter on BNB Smart Chain chain 56 that collects new block hashes for polling with eth_getFilterChanges over TheRPC.

eth_newFilter

Register a server-side log filter on BNB Smart Chain chain 56 to poll BEP-20 and contract events incrementally with eth_getFilterChanges over TheRPC.

eth_newPendingTransactionFilter

Open a server-side mempool filter on BNB Smart Chain chain 56 to poll pending transaction hashes with eth_getFilterChanges over the TheRPC endpoint.

eth_sendRawTransaction

Broadcast a signed, RLP-encoded transaction to BNB Smart Chain chain 56 and receive its hash. Submit BNB transfers and BEP-20 calls via TheRPC.

eth_subscribe

Open a WebSocket push subscription on BNB Smart Chain chain 56 for newHeads, logs, or pending transactions over the wss TheRPC endpoint — no polling.

eth_syncing

Check BNB Smart Chain node sync status with eth_syncing: returns false when fully caught up to the PoSA head, else a progress object. ChainId 56.

eth_uninstallFilter

Remove a BNB Smart Chain server-side filter by ID with eth_uninstallFilter, freeing node memory. Works for log, block, and pending-tx filters on chainId 56.

eth_unsubscribe

Cancel a BNB Smart Chain WebSocket subscription by ID with eth_unsubscribe, halting newHeads or log pushes. WebSocket-only on chainId 56 via TheRPC.

Debug Methods (debug_)

The debug_ namespace exposes low-level introspection for analyzing BNB Smart Chain data in depth — replaying a transaction's execution, dumping state, and examining how a call traversed the EVM. These calls are heavier than core reads and are typically reserved for diagnostics and forensic analysis.

Debug Methods (debug_)

Trace Methods (trace_)

The trace_ namespace returns detailed execution traces for BNB Smart Chain transactions and whole blocks. Each trace exposes every internal call and value transfer plus each contract creation along the way. It is the go-to namespace for accounting software and indexers, and for anyone who needs to reconstruct exactly what a transaction did on chainId 56.

Trace Methods (trace_)

Network Methods (net_)

The net_ namespace reports network status and connection details for BNB Smart Chain — the network identifier, whether the node is actively listening, and the current peer count. These are lightweight health and identity checks rather than data queries.

Network Methods (net_)

Transaction Pool Methods (txpool_)

The txpool_ namespace lets you inspect the BNB Smart Chain pending transaction pool, meaning the queued and pending sends a node currently holds before they are mined. With roughly three-second blocks, this view is useful for mempool monitoring and fee estimation, plus watching for transactions that target a specific address.

Transaction Pool Methods (txpool_)

Web3 Utility Methods (web3_)

The web3_ namespace provides small utility helpers for general interaction with BNB Smart Chain, such as reporting the client version and computing a Keccak-256 hash of given data. They are simple building blocks rather than chain queries, handy for sanity checks and hashing inputs client-side.

Web3 Utility Methods (web3_)

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.