Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsopBNBJSON-RPC APINode Methods

rpc_modules - opBNB RPC Method

Inspect which JSON-RPC namespaces are enabled on your opBNB endpoint. Useful for capability checks, client diagnostics, and RPC feature discovery.

opBNB RPC endpoint: endpoint URLs, plans and pricing.

Returns the enabled JSON-RPC namespaces exposed by the connected opBNB endpoint together with their version strings.

Non-standard method. rpc_modules is a client-introspection RPC that is commonly available on Geth-compatible stacks, but it is not part of the core Ethereum Execution API method set. Availability varies by client and operator policy.

Why opBNB? Build on Binance's high-performance L2 processing 100M+ daily transactions with the lowest L2 gas fees with sub-$0.0001 gas fees, 5-10K TPS, sub-second block times via Volta/Maxwell upgrades, and OP Stack architecture.

When to Use This Method

rpc_modules is useful for GameFi developers, high-frequency dApp builders, and teams requiring BNB Chain integration:

  • Capability Discovery - Detect whether namespaces like debug, trace, txpool, or erigon are exposed before attempting those calls
  • Client Diagnostics - Verify what the serving node has enabled when debugging environment-specific issues
  • Infrastructure Audits - Compare public and private endpoints to confirm which RPC surfaces are intentionally exposed
  • Runtime Feature Gating - Adjust tooling behavior dynamically based on the actual namespaces available on a node

Best Practices

  • Call at startup to determine which features are available on a node
  • Module availability varies by node client and provider configuration
  • Use to gate feature access in applications before attempting unsupported calls
  • This is a non-standard method; some endpoints may not expose it
JSON-RPC request
{
  "jsonrpc": "2.0",
  "method": "rpc_modules",
  "params": [],
  "id": 1
}

Code Examples

Error Handling

Error CodeMessageDescription
-32601Method not foundThe client or endpoint does not expose rpc_modules
-32603Internal errorThe node rejected or failed to process the request

Related Methods

  • web3_clientVersion - Inspect the client software version string
  • debug_traceTransaction - Debug namespace example
  • trace_transaction - Trace namespace example

eth_protocolVersion

Get the current Ethereum protocol version on opBNB. Useful for client compatibility checks and identifying version-gated features.

eth_mining

Check the legacy eth_mining compatibility method on opBNB. Public endpoints often return a client-specific unsupported-method response instead of a boolean.

On this page

When to Use This MethodBest PracticesCode ExamplesError HandlingRelated Methods