Skip to content

EVM JSON-RPC

sanect exposes a standard EVM JSON-RPC at the root of the node's public domain:

NetworkEndpointChain ID
Mainnethttps://rpc.sanect.com/7628 (0x1dcc)
Mainnet archivehttps://archive.sanect.com/7628 (0x1dcc)
Testnethttps://rpc.testnet.sanect.com/76287 (0x129ef)

It's HTTP POST with Content-Type: application/json (any EVM library handles this transparently). The WebSocket endpoints are at wss://rpc.sanect.com/ws (mainnet) and wss://rpc.testnet.sanect.com/ws (testnet).

Enabled namespaces

The node starts with --json-rpc.api eth,txpool,net,web3,debug, so:

NamespaceUse
eththe standard Ethereum methods (eth_chainId, eth_blockNumber, eth_sendRawTransaction, …)
netnet_version, net_listening, net_peerCount
web3web3_clientVersion, web3_sha3
txpooltxpool_status, txpool_inspect
debugdebug_traceTransaction etc. — used by indexers like Blockscout

What's intentionally not on: personal (key management — clients keep keys client-side) and admin/miner (operator-only).

Examples

Identity

bash
# Mainnet
curl -s -X POST https://rpc.sanect.com/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# -> {"jsonrpc":"2.0","id":1,"result":"0x1dcc"}        # 7628

# Testnet
curl -s -X POST https://rpc.testnet.sanect.com/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# -> {"jsonrpc":"2.0","id":1,"result":"0x129ef"}       # 76287

curl -s -X POST https://rpc.sanect.com/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}'
# -> {"jsonrpc":"2.0","id":1,"result":"7628"}

Latest block

bash
curl -s -X POST https://rpc.sanect.com/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Balance

bash
curl -s -X POST https://rpc.sanect.com/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...","latest"],"id":1}'

From JavaScript (ethers v6)

js
import { JsonRpcProvider } from "ethers";

// Mainnet
const provider = new JsonRpcProvider("https://rpc.sanect.com/");
console.log(await provider.getBlockNumber());
console.log((await provider.getNetwork()).chainId);    // 7628n

// Testnet
const testnet = new JsonRpcProvider("https://rpc.testnet.sanect.com/");
console.log((await testnet.getNetwork()).chainId);     // 76287n

From Python (web3.py)

python
from web3 import Web3

# Mainnet
w3 = Web3(Web3.HTTPProvider("https://rpc.sanect.com/"))
print(w3.eth.chain_id)        # 7628
print(w3.eth.block_number)

# Testnet
w3_test = Web3(Web3.HTTPProvider("https://rpc.testnet.sanect.com/"))
print(w3_test.eth.chain_id)   # 76287

Foundry

bash
# Mainnet
forge create MyContract \
  --rpc-url https://rpc.sanect.com/ \
  --private-key 0x... \
  --chain 7628

# Testnet
forge create MyContract \
  --rpc-url https://rpc.testnet.sanect.com/ \
  --private-key 0x... \
  --chain 76287

What's not available

  • ots_* (Erigon's Otterscan methods) — sanect runs cosmos/evm, not Erigon. Use Blockscout for the explorer (see blockscout/README.md in the repo), not Otterscan.
  • Archive history older than the configured pruning window on the primary RPC node. For full historical state, use the archive RPC at https://archive.sanect.com/ (mainnet, PRUNING=nothing, serves state from Block #1).

See also