Ethereum Interface (eth_)

Ethereum Interface (eth_) provides an Ethereum-compatible JSON-RPC layer that allows existing wallets, tools, and libraries to interact with Pod using familiar methods and conventions. It is designed to be drop-in compatible with standard Ethereum client workflows, allowing developers to use common tooling such as ethers.js, alloy.rs, and cast without modification.

The interface covers the transaction submission and receipt lifecycle, including balance and nonce discovery, read-only contract calls, log queries, and real-time subscriptions.

📝 This is a JSON-RPC 2.0 API. The request path is not important; the method to execute is defined by the method field in the request body. You can send all requests to /, and any path after / is optional and used only for documentation clarity.

Get Native Token Balance

post

Returns the native token balance for the specified address in the wallet.

Note: This returns the wallet balance, which is distinct from the orderbook contract balance. To query the balance deposited in the orderbook contract, call the getBalance function on the orderbook contract.

The block_number parameter is accepted for Ethereum compatibility but is ignored.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_getBalance
idintegerRequiredDefault: 1
Responses
chevron-right
200

Balance in wei (hex-encoded uint256)

application/json
post
/eth_getBalance
200

Balance in wei (hex-encoded uint256)

Get Chain ID

post

Returns the chain ID used for signing transactions (EIP-155).

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_chainId
idintegerRequiredDefault: 1
paramsarrayOptionalDefault: []
Responses
chevron-right
200

Chain ID (hex-encoded)

application/json
post
/eth_chainId
200

Chain ID (hex-encoded)

Get Transaction by Hash

post

Returns the transaction that matches the given hash, or null if not found.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_getTransactionByHash
idintegerRequiredDefault: 1
paramsstring[]Required

Parameters:

  1. transaction_hash (bytes32): The transaction hash to look up
Example: ["0xf74e07ff80dc54c7e894396954326fe13f07d176746a6a29d0ea34922b856402"]
Responses
chevron-right
200

Transaction object, or null if not found

application/json
post
/eth_getTransactionByHash
200

Transaction object, or null if not found

Get Transaction Count (Nonce)

post

Returns the transaction count (nonce) for the specified address. Required for transaction signing to prevent replay attacks. The nonce is the current transaction count for the address.

Pod-specific: The block_tag parameter is accepted for Ethereum compatibility but is ignored.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_getTransactionCount
idintegerRequiredDefault: 1
paramsarrayRequired

Parameters:

  1. address (address): The address to get nonce for
  2. block_tag (string): Block tag (accepted but ignored)
Example: ["0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28","latest"]
Responses
chevron-right
200

Nonce (hex-encoded uint256)

application/json
post
/eth_getTransactionCount
200

Nonce (hex-encoded uint256)

Send Raw Transaction (Fire-and-Forget)

post

Submits a signed EIP-1559 transaction to the network. Returns the transaction hash on success.

The transaction must be RLP-encoded and signed. Use this method to submit orderbook operations (deposits, withdrawals, order submissions, cancellations) to the orderbook contract.

For synchronous attestation feedback (successes/errors from validators), use pod_sendRawTransaction.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_sendRawTransaction
idintegerRequiredDefault: 1
paramsstring[]Required

Parameters:

  1. signed_tx (string): Signed RLP-encoded transaction data
Example: ["0x02f8..."]
Responses
chevron-right
200

Transaction hash

application/json
post
/eth_sendRawTransaction
200

Transaction hash

Execute Read-Only Call

post

Executes a new message call immediately without creating a transaction on the blockchain.

Use this method for read-only operations on the orderbook contract, such as:

  • getBalance(address token) - Get deposited balance for a token

  • getOrders(bytes32 orderbookId, bytes32[] txHashes) - Get order details by transaction hashes

Orderbook Contract Address: 0x000000000000000000000000000000000000C10B

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_call
idintegerRequiredDefault: 1
paramsarrayRequired

Parameters:

  1. transaction (object): Call object with to, data, and optionally from
  2. block_tag (string): Block tag (e.g., "latest")
Example: [{"to":"0x000000000000000000000000000000000000C10B","data":"0x..."},"latest"]
Responses
chevron-right
200

Return data (hex-encoded)

application/json
post
/eth_call
200

Return data (hex-encoded)

Get Transaction Receipt

post

Retrieves the transaction receipt including execution status and event logs.

Pod-specific: The receipt includes pod_metadata containing validator attestations for transaction finality verification.

Returns null if the transaction is not found or not yet processed.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_getTransactionReceipt
idintegerRequiredDefault: 1
paramsstring[]Required

Parameters:

  1. transaction_hash (bytes32): The transaction hash to look up
Example: ["0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"]
Responses
chevron-right
200

Transaction receipt with Pod-specific attestation data, or null if not found

application/json
post
/eth_getTransactionReceipt
200

Transaction receipt with Pod-specific attestation data, or null if not found

Estimate Gas

post

Estimates the gas required for a transaction.

Pod-specific behavior: If the transaction already specifies a gas value, returns that value. Otherwise, returns 21000 (standard transaction gas).

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_estimateGas
idintegerRequiredDefault: 1
paramsarrayRequired

Parameters:

  1. transaction (object): Transaction object with to, data, value, from, etc.
Example: [{"to":"0x000000000000000000000000000000000000C10B","value":"0x0"}]
Responses
chevron-right
200

Estimated gas (hex-encoded)

application/json
post
/eth_estimateGas
200

Estimated gas (hex-encoded)

Get Logs

post

Returns an array of log objects matching the given filter criteria.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_getLogs
idintegerRequiredDefault: 1
paramsarrayRequired

Parameters:

  1. filter (object): Filter object with address, topics, fromBlock, toBlock
Example: [{"address":"0x000000000000000000000000000000000000C10B","topics":[]}]
Responses
chevron-right
200

Array of log objects

application/json
post
/eth_getLogs
200

Array of log objects

Subscribe to Events (WebSocket)

post

Creates a subscription to receive real-time updates over WebSocket.

Pod-specific subscriptions:

  • pod_orderbook - Receive orderbook snapshots on each mutation

  • pod_orders - Receive order updates for specified orderbooks

Subscriptions follow the standard Ethereum eth_subscribe pattern:

  1. Subscribe with eth_subscribe → receive subscription ID

  2. Receive updates via eth_subscription notifications

  3. Cancel with eth_unsubscribe

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: eth_subscribe
idintegerRequiredDefault: 1
paramsarrayRequired

Parameters:

  1. subscription_type (string): Type of subscription (pod_orderbook, pod_orders, or newHeads)
  2. options (object): Subscription options. Use clob_ids (array of bytes32) to filter by orderbook; empty array = all orderbooks. Use depth for max price levels in orderbook snapshots.
Example: ["pod_orderbook",{"clob_ids":["0x0000000000000000000000000000000000000000000000000000000000000001"],"depth":50}]
Responses
chevron-right
200

Subscription ID for tracking and unsubscribing

application/json
post
/eth_subscribe
200

Subscription ID for tracking and unsubscribing

Last updated