Skip to content
LogoLogo

JSON-RPC API

Method behavior and compatibility

View as Markdown

Radius exposes a JSON-RPC 2.0 API compatible with standard Ethereum tooling. This page documents methods that differ from Ethereum, methods requiring elevated access, pseudo-supported methods, and unsupported methods.

For integration guidance, see JSON-RPC overview.

Divergent methods

eth_blockNumber

Returns the current timestamp in milliseconds, encoded as a hex string.

Parameters: None

Returns: string — Current block number as a hex string.


eth_getBalance

Returns the account's native balance plus the full SBC ERC-20 token holdings converted to native currency at the current exchange rate, with no cap.

Parameters:

NameTypeDescription
addressstringAddress to query (20 bytes, hex encoded)
blockstringBlock tag (latest, pending, safe, finalized) or block number. Historical block numbers return error -32000.

Returns: string — Balance in wei as a hex string.


eth_getBlock, eth_getBlockByNumber, eth_getBlockByHash

Blocks are reconstructed on demand. Very recent reads are not guaranteed to be stable across repeated calls. eth_getBlockByHash returns null for hashes that do not correspond to a known block.

See Ethereum compatibility.


eth_call, eth_estimateGas

Dry-run execution skips sender balance validation unconditionally.

This means eth_call and eth_estimateGas do not fail solely because the from account lacks enough RUSD to pay for execution.

Turnstile simulation behavior: The Turnstile only fires during simulation when gas_price × gas_limit + value > 0. At an effective gas price of zero with no native value sent, zero Turnstile iterations run and balanceOf returns the unmodified balance. At a non-zero gas price, simulation applies the Turnstile deduction as normal.


eth_sendRawTransaction

If a submitted transaction is rejected with NonceTooHigh, Radius may queue it in a per-sender pending transaction pool instead of discarding it immediately.

  • Up to 30 queued transactions per sender
  • Up to 100 sender addresses tracked globally
  • Queued transactions are retried automatically by a background clearout loop
  • Replace-by-fee is supported for queued transactions

Transactions rejected by the pending pool return a distinct error message per rejection reason (gas price too low, duplicate nonce, replace-by-fee underpriced, and so on). Clients that parse the error message text to detect specific rejection reasons must match against the specific reason string returned.


eth_maxPriorityFeePerGas

Returns the current gas price. On Radius this equals eth_gasPrice — there is no separate priority-fee market.

Parameters: None

Returns: string — Gas price in wei as a hex string.


eth_getLogs

Two constraints differ from Ethereum:

Address filter required. Every query must include an address field. Omitting it returns error -33014.

Block range limit. The maximum range between fromBlock and toBlock is 1,000,000 units. Because Radius block numbers are millisecond timestamps (see eth_blockNumber), this covers ~16 minutes 40 seconds of wall time. Queries exceeding this return error -33002.

To query logs over a longer period, split the range into consecutive chunks of up to 1,000,000 and concatenate the results. For real-time event monitoring, use WebSocket eth_subscribe("logs") instead.

Extended methods

These methods are not part of the core Ethereum JSON-RPC specification but are supported by Radius. Some, such as eth_sendRawTransactionSync, implement a standard (EIP-7966); others (such as rad_* methods) are Radius-specific.

eth_sendRawTransactionSync

Submits a signed raw transaction and waits synchronously for the transaction receipt before returning. Implements EIP-7966.

Unlike eth_sendRawTransaction, which returns a transaction hash immediately and requires the client to poll for inclusion, eth_sendRawTransactionSync combines submission and receipt retrieval into a single RPC call. This avoids a separate receipt-polling step. The latency benefit depends on the workload, network connection, and polling interval.

What is distinctive on Radius is what the returned receipt represents. Because Radius has instant finality, the sync receipt is both fast and final (~100 ms, no reorg). On a typical L2 the equivalent sync receipt reflects only transaction inclusion and can still be reorganized until it settles on L1.

This is especially useful for latency-sensitive applications such as x402 payment flows, where on-chain settlement is on the critical path of an HTTP request-response cycle.

Parameters:

PositionTypeDescriptionRequired
1stringSigned, RLP-encoded transaction hex dataYes
2numberMaximum wait time in millisecondsNo

If no timeout is provided, the node's configured default is used (recommended: 2 000 ms). The timeout cannot exceed the node-configured maximum.

Returns: Transaction receipt object (same structure as eth_getTransactionReceipt) on success.

Method-specific error codes:

CodeTypeDescriptiondata field
4TimeoutTransaction was added to the mempool but not processed within timeoutTransaction hash
5Unknown/QueuedTransaction was not added to the mempoolTransaction hash
6Nonce gapTransaction rejected due to a nonce gapExpected nonce (hex)

On error code 6, the data field contains the expected nonce as a hex string directly, so the caller can immediately resubmit with the correct nonce without making a separate eth_getTransactionCount call.

On error code 4, the data field contains the transaction hash. The transaction was accepted into the mempool — the caller can continue monitoring via eth_getTransactionReceipt.

Example request:

{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": ["0xf86c808504a817c80082520894ab..."],
  "id": 1
}

Example success response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "gasUsed": "0x5208",
    "status": "0x1",
    "logs": []
  }
}

Example timeout response (error code 4):

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": 4,
    "message": "The transaction was added to the mempool but wasn't processed within the designated timeout interval.",
    "data": "0x1234abcd..."
  }
}

Methods requiring elevated RPC access

eth_subscribe

Creates a WebSocket subscription for real-time logs. Radius supports logs only.

newHeads and newPendingTransactions are not available.

Parameters:

NameTypeDescription
typestringSubscription type (for example, logs)
filterobjectLog filter object

Returns: string — Subscription ID.

Pseudo-supported methods

These methods return defaults and do not return errors. Most applications should not rely on them.

eth_accounts

Always returns an empty array. Radius does not manage accounts.

Parameters: None

Returns: array — []


eth_feeHistory

Returns a static response. Radius uses fixed pricing instead of fee-market history.

Parameters: See Ethereum JSON-RPC specification

Returns: object


eth_mining

Always returns true.

Parameters: None

Returns: boolean


eth_syncing

Always returns false.

Parameters: None

Returns: boolean


eth_hashrate

Always returns 0x0.

Parameters: None

Returns: string


eth_uninstallFilter

Always returns true. Filters are not persisted.

Parameters:

NameTypeDescription
filterIdstringFilter ID

Returns: boolean


net_listening

Always returns false. Radius does not use peer-to-peer networking.

Parameters: None

Returns: boolean


net_peerCount

Always returns 0x0. Radius does not use peer-to-peer networking.

Parameters: None

Returns: string

Unsupported methods

Radius returns errors for these methods:

  • eth_coinbase
  • eth_getBlockReceipts
  • eth_getFilterChanges
  • eth_getFilterLogs
  • eth_getProof
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_getWork
  • eth_newBlockFilter
  • eth_newFilter
  • eth_newPendingTransactionFilter
  • eth_sign
  • eth_simulateV1
  • eth_submitWork
  • trace_block
  • trace_callMany
  • trace_filter
  • trace_transaction

Error codes

Radius uses standard JSON-RPC 2.0 error codes:

CodeMessageDescription
-32700Parse errorInvalid JSON
-32600Invalid requestInvalid request object
-32601Method not foundMethod does not exist
-32602Invalid paramsInvalid method parameters
-32603Internal errorInternal JSON-RPC error
3Execution revertedContract execution reverted

Radius-specific error codes:

CodeMessageDescription
-33002Block range too wideeth_getLogs range exceeds 1,000,000 units (~16 min 40 sec)
-33014Address filter requiredeth_getLogs called without an address field