Skip to main content

system_chain

Description#

Reports the human-readable name of the chain the node is serving. Use this to confirm you are connected to Astar mainnet versus Shiden or Shibuya before broadcasting extrinsics.

Parameters#

This method does not require any parameters.

Returns#

TypeDescription
stringChain name (for example Astar, Shiden, or Shibuya)

Request Example#

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

Response Example#

{
"jsonrpc": "2.0",
"result": "Astar",
"id": 1
}

Code Examples#

curl https://api-astar.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "system_chain",
"params": [],
"id": 1
}'