Post
Share your knowledge.
How to use objects owned by other objects in with dynamic object field Move module?
I'm currently studying the Sui documentation and I encountered the concept of objects owned by other objects, which is implemented through the dynamic object field Move module. I'm seeking a clear explanation of how these objects should be used in the context of Sui move. Additionally, any recommendations for relevant documentation or discussions on this topic would be greatly appreciated. Thank you in advance for your assistance!
- Move
- Move Module
Answers
2It's essential to note that Sui Move objects have a maximum size limit of 250KB, and attempting to create a larger object will result in a transaction being aborted. To ensure that your objects comply with this restriction, be cautious of ever-growing vector-backed collections.
As a helpful tool to streamline the management of key pairs, you might find the "linked_table" feature beneficial. You can explore this functionality by visiting the following link;
If you have further questions or need assistance with a different approach, feel free to ask them here;
In Sui, the concept of objects owned by other objects is a key part of the framework's object Move model. This is implemented through the Dynamic Object Field Move module, which allows for the creation of objects that can own and manage other objects.
The Dynamic Object Field Move module provides a DynamicObjectField
struct that represents a field in an object that can hold a reference to another object. This field can be of any type that implements the Object trait, which means it can hold a reference to any other object.
Here's a simplified example of how you might use the DynamicObjectField
in Sui Move:
use sui::DynamicObjectField;
use sui::Object;
struct MyObject {
field: DynamicObjectField<MyOtherObject>,
}
impl Object for MyObject {
// Implementation of Object trait methods...
}
In this example, MyObject
has a field field that can hold a reference to an instance of MyOtherObject
. This is a simplified example, and in a real-world scenario, you would likely have more complex object structures with multiple fields.
The Dynamic Object Field module also provides methods for managing the objects that a field holds. For example, you can use the set method to set the object that a field holds, and the get method to retrieve the object.
Unfortunately, the search results provided do not contain specific information about the Dynamic Object Field Move module or how it is used in Sui. I recommend checking out the Sui documentation and community resources for more detailed information.
In addition, you might find the following resources helpful:
- The Sui GitHub repository is a great place to start. It contains the source code for Sui, as well as examples and tests that can help you understand how the framework works.
- The Sui documentation provides a comprehensive overview of the framework, including tutorials and guides that can help you get started with using Sui.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.

- ... SUIderiss+5
- ... SUIRamirez+5
- ... SUIElvin CLONE +5
- ... SUI
- ... SUI
- ... SUI
- ... SUIBritain+2