EVM JSON-RPC
The EVM JSON-RPC API provides Ethereum-compatible access to Monolythium.
Endpoints
| Network | HTTP | WebSocket |
|---|---|---|
| Sprintnet | https://rpc.sprintnet.monolythium.com:8545 | wss://rpc.sprintnet.monolythium.com:8546 |
| Testnet | https://rpc.testnet.monolythium.com:8545 | wss://rpc.testnet.monolythium.com:8546 |
| Mainnet | https://rpc.monolythium.com:8545 | wss://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
| Method | Supported |
|---|---|
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
| Method | Supported |
|---|---|
net_version | ✅ |
net_listening | ✅ |
net_peerCount | ✅ |
web3 Namespace
| Method | Supported |
|---|---|
web3_clientVersion | ✅ |
web3_sha3 | ✅ |
debug Namespace
| Method | Supported |
|---|---|
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
| Code | Message |
|---|---|
| -32700 | Parse error |
| -32600 | Invalid request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32603 | Internal error |
| -32000 | Server 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"
Related
- RPC Endpoints - Detailed RPC guide
- Cosmos REST - REST API
- WebSocket - WebSocket details