suix_getDynamicFields - Sui

Example code for the suix_getDynamicFields JSON-RPC method. Complete guide on how to use suix_getDynamicFields JSON-RPC in GetBlock Web3 documentation.

This method returns the list of dynamic fields owned by an object on the SUI network. Dynamic fields allow objects to store key-value pairs that can be added or removed at runtime, enabling flexible data structures like maps and tables in Move.

Parameters

Parameter
Type
Required
Description

parent_object_id

ObjectID

Yes

The parent object ID

cursor

ObjectID

No

Pagination cursor

limit

uint

No

Maximum items per page

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": "suix_getDynamicFields",
  "params": [
    "0x5612581eba57ebe7e594b809ccceec2be4dac6ff6945d49b3ecc043d049611f6",
    null,
    10
  ]
}'

Response Example

Response Parameters

Parameter
Type
Description

name

object

Dynamic field name (type and value)

type

string

DynamicField or DynamicObject

objectType

string

Full type of the field object

objectId

string

Object ID of the field

version

number

Object version

digest

string

Object digest

Use Cases

  • Enumerate map or table contents

  • Browse object attachments

  • Query dynamic storage

  • Build data explorers

Error Handling

Error Code
Description

-32602

Invalid params - malformed object ID

-32603

Internal error - node issues

SDK Integration

Last updated

Was this helpful?