sui_getProtocolConfig - Sui
Example code for the sui_getProtocolConfig JSON-RPC method. Complete guide on how to use sui_getProtocolConfig JSON-RPC in GetBlock Web3 documentation.
This method returns the protocol configuration table for a given version number on the SUI network. Protocol configurations define network parameters, limits, and feature flags that govern blockchain behavior. This is useful for understanding network capabilities and constraints.
Parameters
version
BigInt_for_uint64<string>
No
Protocol version number (defaults to latest)
Request Example
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getProtocolConfig",
"params": [6]
}'const axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'sui_getProtocolConfig',
params: [6]
};
axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));import requests
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getProtocolConfig",
"params": [6]
}
response = requests.post("https://go.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())Response Example
{
"jsonrpc": "2.0",
"result": {
"minSupportedProtocolVersion": "1",
"maxSupportedProtocolVersion": "104",
"protocolVersion": "6",
"featureFlags": {},
"attributes": {}
},
"id": "getblock.io"
}Response Parameters
minSupportedProtocolVersion
string
Minimum version this node supports
maxSupportedProtocolVersion
string
Maximum version this node supports
protocolVersion
string
The queried version number
featureFlags
object
Map of feature flag names to enabled status
attributes
object
Protocol configuration attributes
Use Cases
Check network capabilities and limits
Validate protocol compatibility
Monitor protocol upgrades
Build version-aware applications
Error Handling
-32602
Invalid params - invalid version
-32603
Internal error - node issues
SDK Integration
Last updated
Was this helpful?