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_blockNumberRead 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_callRun 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_chainIdUse eth_chainId over TheRPC to confirm you are on BNB Smart Chain mainnet (0x38, decimal 56) or testnet (0x61, decimal 97) before signing.
eth_estimateGasSimulate 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_feeHistoryPull 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_gasPriceFetch 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_getBalanceRead 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_getBlockByHashFetch 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_getBlockByNumberFetch a BSC block by height or tag (latest, finalized) with eth_getBlockByNumber over TheRPC at chain ID 56 — the workhorse call for indexers.
eth_getBlockReceiptsGet 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_getBlockTransactionCountByHashCount the transactions in a BSC block by its hash with eth_getBlockTransactionCountByHash over TheRPC at chain ID 56, without fetching the block.
eth_getBlockTransactionCountByNumberCount transactions in a BNB Smart Chain block by height or tag with eth_getBlockTransactionCountByNumber. Track chain-56 congestion via TheRPC.
eth_getCodeRead 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_getFilterChangesPoll new logs, block hashes, or pending-tx hashes on BNB Smart Chain with eth_getFilterChanges. Drive incremental chain-56 indexing via TheRPC.
eth_getFilterLogsReturn 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_getLogsFetch 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_getProofGet account fields and Merkle-Patricia trie proofs on BNB Smart Chain with eth_getProof. Verify chain-56 state trustlessly for bridges via TheRPC.
eth_getStorageAtRead 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_getTransactionByBlockHashAndIndexFetch a BNB Smart Chain transaction by block hash and index position with eth_getTransactionByBlockHashAndIndex. Enumerate chain-56 blocks via TheRPC.
eth_getTransactionByBlockNumberAndIndexFetch a BNB Smart Chain transaction by block height or tag and index with eth_getTransactionByBlockNumberAndIndex. Scan chain-56 blocks via TheRPC.
eth_getTransactionByHashRetrieve a BNB Smart Chain transaction object by its hash with eth_getTransactionByHash. Confirm mining and decode input on chain 56 via TheRPC.
eth_getTransactionCountGet the nonce of any BNB Smart Chain address with eth_getTransactionCount. Build and sequence transactions on chain 56 reliably via TheRPC.
eth_getTransactionReceiptFetch a mined BNB Smart Chain transaction receipt — status, gasUsed, effectiveGasPrice, BEP-20 logs, and contractAddress — over TheRPC JSON-RPC.
eth_getUncleByBlockHashAndIndexCall eth_getUncleByBlockHashAndIndex on BNB Smart Chain. PoSA produces no uncles, so this Ethereum-compatibility shim always returns null on chain 56.
eth_getUncleByBlockNumberAndIndexQuery eth_getUncleByBlockNumberAndIndex on BNB Smart Chain by height. PoSA chain 56 mints no uncles, so this compatibility shim always returns null.
eth_getUncleCountByBlockHashCount uncles for a BNB Smart Chain block by hash. PoSA chain 56 never forks siblings, so eth_getUncleCountByBlockHash always reports 0x0.
eth_getUncleCountByBlockNumberCount uncles by block height on BNB Smart Chain. Under PoSA, chain 56 forks no siblings, so eth_getUncleCountByBlockNumber always returns 0x0.
eth_maxPriorityFeePerGasGet 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_newBlockFilterCreate a server-side block filter on BNB Smart Chain chain 56 that collects new block hashes for polling with eth_getFilterChanges over TheRPC.
eth_newFilterRegister 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_newPendingTransactionFilterOpen a server-side mempool filter on BNB Smart Chain chain 56 to poll pending transaction hashes with eth_getFilterChanges over the TheRPC endpoint.
eth_sendRawTransactionBroadcast 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_subscribeOpen a WebSocket push subscription on BNB Smart Chain chain 56 for newHeads, logs, or pending transactions over the wss TheRPC endpoint — no polling.
eth_syncingCheck 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_uninstallFilterRemove 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_unsubscribeCancel 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_)
debug_getBadBlocksList invalid BSC blocks a node rejected since startup with debug_getBadBlocks over the BNB Smart Chain JSON-RPC endpoint (chain ID 56) for consensus checks.
debug_storageRangeAtPage through a BSC contract's raw storage slots at a chosen transaction with debug_storageRangeAt over the BNB Smart Chain JSON-RPC endpoint (chain ID 56).
debug_traceBlockReplay an RLP-encoded BSC block at opcode level with debug_traceBlock over the BNB Smart Chain JSON-RPC endpoint (chain ID 56), tracing every transaction.
debug_traceBlockByHashTrace a BSC block pinned by its 32-byte hash at opcode level with debug_traceBlockByHash over the BNB Smart Chain JSON-RPC endpoint (chain ID 56) for reorgs.
debug_traceBlockByNumberTrace every transaction in a BSC block by number or tag at opcode level using debug_traceBlockByNumber over the BNB Smart Chain JSON-RPC endpoint (chain ID 56).
debug_traceCallTrace a simulated BSC call at opcode level without broadcasting via debug_traceCall over the BNB Smart Chain JSON-RPC endpoint (chain ID 56) to debug reverts.
debug_traceTransactionReplay a mined BSC transaction at opcode level with debug_traceTransaction over the BNB Smart Chain JSON-RPC endpoint (chain ID 56) to debug reverts and gas.
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_)
trace_blockGet call-tree traces for every transaction in a BSC block with trace_block over the BNB Smart Chain JSON-RPC endpoint (chain ID 56).
trace_callSimulate a BSC call and get a Parity-style call tree, VM trace, and state diff with trace_call over the BNB Smart Chain endpoint (chain ID 56).
trace_filterSearch BSC traces by address and block range with trace_filter over the BNB Smart Chain JSON-RPC endpoint (chain ID 56) to index calls and trace fund flows.
trace_replayBlockTransactionsReplay all BSC transactions in a block for call trees, VM traces, and state diffs with trace_replayBlockTransactions over the BNB Smart Chain (chain ID 56).
trace_replayTransactionReplay a BSC transaction for its call tree, VM trace, and state diff with trace_replayTransaction over the BNB Smart Chain endpoint (chain ID 56).
trace_transactionGet the Parity-style call tree of a BSC transaction with trace_transaction over the BNB Smart Chain endpoint (chain ID 56) to trace internal transfers.
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_)
net_listeningUse net_listening to check whether a BNB Smart Chain node is accepting incoming peer-to-peer connections. Returns a simple boolean on chainId 56 via TheRPC.
net_peerCountRead how many P2P peers a BNB Smart Chain node has with net_peerCount, returned as a hex integer. Gauge node connectivity on chainId 56 through TheRPC.
net_versionnet_version returns the BNB Smart Chain network ID as a decimal string "56" (testnet "97"). Confirm a node is on the right BSC network through TheRPC.
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_)
txpool_inspecttxpool_inspect returns a readable summary of pending and queued transactions in a BNB Smart Chain mempool, keyed by sender and nonce. Geth-family, chainId 56.
txpool_statustxpool_status returns the pending and queued transaction counts of a BNB Smart Chain mempool as hex integers, a light congestion gauge. Geth-family, chainId 56.
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_)
web3_clientVersionweb3_clientVersion returns the version string of the software running a BNB Smart Chain node, typically a geth-family build. Identify node builds on chainId 56.
web3_sha3web3_sha3 computes the Keccak-256 hash of hex data on BNB Smart Chain, the function behind BEP-20 event topics and selectors. Keccak-256, not NIST SHA3-256.