Skip to main content

Get Chain ID

Example Request

{
"jsonrpc": "2.0",
"method": "cartesi_getChainId",
"params": {},
"id": 1
}

The cartesi_getChainId method fetches the chain ID that the node is operating on.

Parameters

No parameters required.

Response

{
"jsonrpc": "2.0",
"result": {
"data": "0x1"
},
"id": 1
}

Response Fields

NameTypeDescription
datastringThe chain ID that the node is operating on (hex encoded)

Error Codes

CodeMessageDescription
-32603Internal errorAn internal error occurred
We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.