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

Parameter
Type
Required
Description

version

BigInt_for_uint64<string>

No

Protocol version number (defaults to latest)

Request Example

curl
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]
}'

Response Example

response.json
{
  "jsonrpc": "2.0",
  "result": {
    "minSupportedProtocolVersion": "1",
    "maxSupportedProtocolVersion": "104",
    "protocolVersion": "6",
    "featureFlags": {},
    "attributes": {}
  },
  "id": "getblock.io"
}

Response Parameters

Parameter
Type
Description

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

Error Code
Description

-32602

Invalid params - invalid version

-32603

Internal error - node issues

SDK Integration

Last updated

Was this helpful?