Somnia

This section provides information specific to the Somnia blockchain.

Go to RPC Go to Subgraphs

Sending Requests

We host one JSON-RPC API endpoint for Somnia Testnet:

  • Archival Node: This node provides access to the entire blockchain history, starting from genesis, as is. API is fully compatible with the Ethereum JSON-RPC API. Only POST endpoints are supported.

Querying the Subgraph

Chain.Love Indexing on Somnia supports both testnet and mainnet networks.

Currently, you can query your subgraphs by name only: https://proxy.somnia.chain.love/subgraphs/name/<SUBGRAPH_NAME>.

# Assuming the subgraph name is `somnia-testnet/PrayDotFun`
curl -X POST \
 -H "Content-Type: application/json" \
 -d '{"query":"query MyQuery {\r\n  userScores(first: 10) {\r\n    id\r\n  }\r\n}","variables":{}}' \
 "https://proxy.somnia.chain.love/subgraphs/name/somnia-testnet/PrayDotFun"

Note that the HTTP path of the query URL is /subgraphs/name/<SUBGRAPH_NAME>, different from the format used on Astar.

Last updated