chain_getRuntimeVersion - Midnight
Example code for the chain_getRuntimeVersion JSON-RPC method. Complete guide on how to use chain_getRuntimeVersion JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request Example
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "chain_getRuntimeVersion",
"params": [],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "chain_getRuntimeVersion",
"params": [],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data, null, 2)))
.catch(error => console.log(error));Response Example
{
"jsonrpc": "2.0",
"result": {
"specName": "midnight",
"implName": "midnight",
"authoringVersion": 1,
"specVersion": 22000,
"implVersion": 0,
"apis": [
[
"0xf78b278be53f454c",
2
],
[
"0x279a32908e96410d",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0xdd718d5cc53262d4",
1
],
[
"0xa897625b130086bd",
1
],
[
"0xfbc577b9d747efd6",
1
],
[
"0xdf6acb689907609b",
5
],
[
"0x49eaaf1b548a0cb0",
5
],
[
"0x393b2599ea57bca2",
1
],
[
"0xa0c89371ec56244c",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0x2a5e924655399e60",
1
],
[
"0x37e397fc7c91f5e4",
2
],
[
"0xc3c222f40af6f42b",
1
],
[
"0x22a0eaa81c05f0d3",
1
],
[
"0x0093e736d7484c30",
1
],
[
"0xd9bc84ac3bfb8a0c",
1
],
[
"0xd2bc9897eed08f15",
3
],
[
"0x40fe3ad401f8959a",
6
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xc7805fd5ec973a86",
1
],
[
"0x19dba14093498f16",
2
],
[
"0x7d699da8a672e867",
5
],
[
"0x91d5df18b0d2cf58",
2
]
],
"transactionVersion": 2,
"systemVersion": 1,
"stateVersion": 1
},
"id": "getblock.io"
}
Response Parameters
Field
Type
Description
Use Cases
Error Handling
Status Code
Error Message
Cause
SDK Integration
Last updated
Was this helpful?