Skip to main content

EVM JSON-RPC

The EVM JSON-RPC API provides Ethereum-compatible access to Monolythium.

Endpoints

NetworkHTTPWebSocket
Sprintnethttps://rpc.sprintnet.monolythium.com:8545wss://rpc.sprintnet.monolythium.com:8546
Testnethttps://rpc.testnet.monolythium.com:8545wss://rpc.testnet.monolythium.com:8546
Mainnethttps://rpc.monolythium.com:8545wss://rpc.monolythium.com:8546

Request Format

{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}

Core Methods

Chain Information

# Get chain ID
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

# Get block number
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

Account Methods

# Get balance
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...","latest"],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

# Get transaction count (nonce)
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x...","latest"],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

Transaction Methods

# Send raw transaction
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

# Get transaction receipt
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x..."],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

Contract Methods

# Call contract (read-only)
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x...","data":"0x..."},"latest"],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

# Estimate gas
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"to":"0x...","data":"0x..."}],"id":1}' \
https://rpc.sprintnet.monolythium.com:8545

Supported Methods

eth Namespace

MethodSupported
eth_chainId
eth_blockNumber
eth_getBalance
eth_getStorageAt
eth_getTransactionCount
eth_getCode
eth_sendRawTransaction
eth_call
eth_estimateGas
eth_getBlockByNumber
eth_getBlockByHash
eth_getTransactionByHash
eth_getTransactionReceipt
eth_getLogs
eth_feeHistory
eth_gasPrice

net Namespace

MethodSupported
net_version
net_listening
net_peerCount

web3 Namespace

MethodSupported
web3_clientVersion
web3_sha3

debug Namespace

MethodSupported
debug_traceTransaction
debug_traceBlockByNumber
debug_traceBlockByHash

WebSocket Subscriptions

// Subscribe to new blocks
{"jsonrpc":"2.0","method":"eth_subscribe","params":["newHeads"],"id":1}

// Subscribe to logs
{"jsonrpc":"2.0","method":"eth_subscribe","params":["logs",{"address":"0x..."}],"id":1}

// Unsubscribe
{"jsonrpc":"2.0","method":"eth_unsubscribe","params":["0x...subscription_id..."],"id":1}

Error Codes

CodeMessage
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32000Server error

Configuration

Enable EVM RPC in your node:

# app.toml
[json-rpc]
enable = true
address = "0.0.0.0:8545"
ws-address = "0.0.0.0:8546"
api = "eth,net,web3,txpool,debug"