Why `table` can't be retrived?

A table is created, but can’t get the object by id in explorer or graphql, why?

open sui explorer with 0xca930370aa2d65ee60de7358be0126a43266cc25a9a99b8ba6e2c60d30e38ce6, then copy id from table, try to retrieve the table. I thought any object with an uid can be retrieved, am I correct?

2 Likes

When an object is wrapped inside another it becomes part of the object-data and not directly accessible from the global-storage. The way to store something under an object and still have it accessible from global-storage is dynamic fields. The table itself uses dynamic fields for its entries.
This means although the wrapped table is not accessible by id in the explorer, its entries are.

1 Like

Thank you, I am able to retrieve all entries from a wrapped table using suix_getDynamicFields, but I couldn’t find any equivalent graphql query.

You should use the owner query instead of object: Example in testnet:

{
    owner(address: "0x6aa2467d2638f9234cb32ab8952e31ff59e002a4271c31dff94753dba23bdb26") {
        dynamicFields(first: 2) {
            pageInfo {
                hasNextPage
                endCursor
            }
            nodes {
                name {
                    json
                }
                value {
                    ... on MoveValue {
                        json
                    }
                }
            }
        }
    }
}