Description
Is your feature request related to a problem? Please describe.
The manifest is a file that is generated by sozo once the world has been migrated. The manifest contains all the resources (contracts/models/events) that have been deployed, the addresses, class hashes and ABIs.
However, currently the manifest if only generated one the world is migrated. Which implies that it can't be generated for a world already migrated.
An important thing to mention is that, in dojo, all addresses are deterministic, based on two values:
- The class hash of the world (which is directly linked to the Dojo's version).
- The seed chosen by the user in the
dojo_<PROFILE>.toml
.
Describe the solution you'd like
The purpose of this issue is to discuss what could be the best approach to access the manifest on demand.
Here are the considerations:
- If the manifest is generated, but something goes wrong during the migration, the manifest will not represent the actual onchain state of the world. But rather the "what would be" state, if migration is completed.
- Generating the manifest on demand is possible using the two values described earlier, and before a
sozo plan
command was used. Currently sozo has thesozo inspect
commands which actually pulls from the chain everything that is required to generate the manifest. We may add asozo inspect --output-manifest /tmp/manifest.json
option?
Additional context
The manifest data are defined here:
dojo/crates/dojo/world/src/diff/manifest.rs
Lines 16 to 21 in baf0ce9