I’m looking to migrate to the dynamic fields and dynamic object fields for a few projects, but the inaccessibility of the information about the dynamic fields from a dApp is holding me back. Is there any sense of timing on GitHub Issue #4967
Which I think it the answer to issue #3815
Also correct me if I’m wrong about these being the best ways to handle the retrieval of dynamic field information from a dApp. In my case I’m planning on storing the dynamic fields using a u64 so the retrieval is predictable (e.g. if I know the number of the item to be retrieved I can easily retrieve it).
The dry run work is in-progress, so let me bring this post to the attention of the person that’s working on that. The other option (also in-progress) is new RPC calls to fetch the dynamic fields on a given object. You can see the draft PR for that here:
This should allow you to get a paginated list of an object’s dynamic fields (so would require you to filter it down to the fields you were interested in by their key values after making the request).
If you are interested in fetching a single field value, dryRunMoveCall sounds better, but I just wanted to flag this other option as well.
FWIW I didn’t realize that I can call getObjectsOwnedByObject off of the JsonRpcProvider to get access to the dynamic objects stored in a table. I know that function call is being replaced, but in the meantime if others are confused about how to access dynamic objects from a dApp that function currently works.