Docs
Supported ChainsSonicJSON-RPC APINode Methods

rpc_modules - Sonic RPC Method

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

Returns the enabled JSON-RPC namespaces exposed by the connected Sonic 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 Sonic? Build on the world's fastest EVM chain with 720ms finality, $1.2B+ TVL, and 1,534% growth since launch with 720ms transaction finality, 10K TPS, 90% fee sharing via FeeM, Fantom heritage with Andre Cronje leadership.

When to Use This Method

rpc_modules is useful for DeFi developers, high-frequency trading builders, and teams requiring sub-second finality:

  • 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

Request Parameters

Request

This method accepts no parameters.

Response Body

Response
resultObject

Object whose keys are enabled namespaces and whose values are version strings

Error Responses

Errors
Error Response-32601

Code Examples

Bash
curl -X POST https://api-sonic-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "rpc_modules",
    "params": [],
    "id": 1
  }'

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