InstantiateMsg
Last updated
Was this helpful?
Last updated
Was this helpful?
First, we will take a look at the InstantiateMsg. There are two adjustments we make:
Adding #[andr_instantiate]
We added the #[andr_instantiate] attribute to the InstantiateMsg struct. This macro automatically includes fields common to all ADOs, such as ADO owner and kernel address.
This inclusion is already found in the template by default.
Using AndrAddr Instead of String for Addresses
We replaced the standard String type for voter addresses with . In ADOs, you will almost always see AndrAddr used instead of String addresses. This means addresses can point to both:
• Human-readable addresses: e.g., cosmos1...
• VFS paths: e.g., /home/user/app/component
You can find more on AndrAddr implementations and methods .
The rest of the logic remains the same: