Skip to main content

Overview

Nexis Network is fully compatible with the Ethereum JSON-RPC API, based on the Optimism stack. This means you can use standard Ethereum tools and libraries to interact with Nexis. Endpoints:
  • Mainnet: https://rpc.nex-t1.ai
  • Testnet: https://testnet-rpc.nex-t1.ai
  • WebSocket (Testnet): wss://testnet-ws.nex-t1.ai
Key Features:
  • Full Ethereum JSON-RPC compatibility
  • Optimism-specific methods for L2 functionality
  • WebSocket support for real-time event subscriptions
  • Archive node support for historical state queries
  • Debug and trace methods for development

Standard Ethereum Methods

eth_blockNumber

Get the latest block number. Parameters: None Returns:
  • QUANTITY - Integer block number (hex-encoded)
Example:

eth_getBalance

Get the balance of an account. Parameters:
  1. DATA, 20 bytes - Address to check
  2. QUANTITY|TAG - Block number (hex), or “latest”, “earliest”, “pending”
Returns:
  • QUANTITY - Balance in wei (hex-encoded)
Example:

eth_getBlockByNumber

Get block information by block number. Parameters:
  1. QUANTITY|TAG - Block number or “latest”, “earliest”, “pending”
  2. BOOLEAN - If true, returns full transaction objects; if false, only hashes
Returns:
  • Object - Block object with fields:
    • number - Block number
    • hash - Block hash
    • parentHash - Parent block hash
    • timestamp - Block timestamp (Unix)
    • transactions - Array of transaction hashes or objects
    • gasUsed - Gas used in this block
    • gasLimit - Gas limit for this block
    • And more…
Example:

eth_getTransactionByHash

Get transaction information by transaction hash. Parameters:
  1. DATA, 32 bytes - Transaction hash
Returns:
  • Object - Transaction object or null if not found
Example:

eth_getTransactionReceipt

Get transaction receipt (result of execution). Parameters:
  1. DATA, 32 bytes - Transaction hash
Returns:
  • Object - Receipt object with:
    • status - 1 for success, 0 for failure
    • blockNumber - Block number
    • gasUsed - Gas used by this transaction
    • logs - Array of log objects (events)
    • contractAddress - Address of created contract (if applicable)
Example:

eth_sendRawTransaction

Submit a signed transaction to the network. Parameters:
  1. DATA - Signed transaction data (RLP-encoded)
Returns:
  • DATA, 32 bytes - Transaction hash
Example:

eth_call

Execute a contract function call without creating a transaction (read-only). Parameters:
  1. Object - Transaction call object:
    • to - Contract address
    • data - Encoded function call data
    • (optional) from, gas, gasPrice, value
  2. QUANTITY|TAG - Block number or “latest”
Returns:
  • DATA - Return value of the executed contract method
Example:

eth_estimateGas

Estimate gas required for a transaction. Parameters:
  1. Object - Transaction object (same as eth_call)
Returns:
  • QUANTITY - Estimated gas amount
Example:

eth_gasPrice

Get current gas price. Parameters: None Returns:
  • QUANTITY - Current gas price in wei
Example:
JavaScript

eth_getTransactionCount

Get the number of transactions sent from an address (nonce). Parameters:
  1. DATA, 20 bytes - Address
  2. QUANTITY|TAG - Block number or “latest”, “pending”
Returns:
  • QUANTITY - Transaction count (nonce)
Example:
JavaScript

eth_getLogs

Get logs matching a filter. Parameters:
  1. Object - Filter options:
    • fromBlock - Starting block (number or “latest”)
    • toBlock - Ending block
    • address - Contract address(es)
    • topics - Array of topics (event signatures)
Returns:
  • Array - Log objects
Example:

eth_chainId

Get the chain ID of the network. Parameters: None Returns:
  • QUANTITY - Chain ID
Example:
JavaScript

Optimism-Specific Methods

Nexis Network inherits Optimism functionality for L2 operations.

optimism_syncStatus

Get sync status of the node. Parameters: None Returns:
  • Object - Sync status information
Example:
cURL

optimism_outputAtBlock

Get the output root at a specific L2 block. Parameters:
  1. QUANTITY - L2 block number
Returns:
  • Object - Output information
Example:
cURL

WebSocket Methods

eth_subscribe

Subscribe to real-time events. Subscription Types:
  • newHeads - New block headers
  • logs - New logs matching a filter
  • newPendingTransactions - New pending transactions
  • syncing - Sync status changes
Example:

eth_unsubscribe

Unsubscribe from a subscription. Parameters:
  1. DATA - Subscription ID
Returns:
  • BOOLEAN - True if successful

Debug and Trace Methods

Available on archive nodes for development and debugging.

debug_traceTransaction

Get detailed execution trace of a transaction. Parameters:
  1. DATA - Transaction hash
  2. Object - Tracer options
Returns:
  • Object - Trace result
Example:
cURL

debug_traceBlockByNumber

Trace all transactions in a block. Parameters:
  1. QUANTITY - Block number
  2. Object - Tracer options
Returns:
  • Array - Array of trace results

Admin Methods

Administrative methods for node operators.

admin_startSequencer

Start the sequencer (for Nexis node operators). Parameters: None Returns:
  • BOOLEAN - Success status

admin_stopSequencer

Stop the sequencer. Parameters: None Returns:
  • BOOLEAN - Success status

Error Codes

Standard JSON-RPC error codes: Example Error Response:

Rate Limits

Rate Limit Headers:
Rate Limit Error:

Best Practices

  • Reuse HTTP connections with keep-alive
  • Use WebSocket for real-time subscriptions
  • Implement connection pooling for high throughput
  • Handle reconnection with exponential backoff
  • Always check for error field in responses
  • Implement retry logic for transient errors
  • Log errors with request context
  • Handle rate limits gracefully
  • Batch requests when possible (eth_batch)
  • Cache responses for immutable data (old blocks)
  • Use appropriate block tags (latest vs finalized)
  • Filter logs efficiently with precise topics
  • Use HTTPS endpoints only
  • Never expose API keys in client code
  • Validate all user input before RPC calls
  • Implement request signing for write operations

Complete Integration Example


Additional Resources

Ethereum JSON-RPC Spec

Official Ethereum JSON-RPC specification

Optimism RPC Docs

Optimism-specific RPC methods

ethers.js Documentation

ethers.js library documentation

web3.py Documentation

web3.py library documentation