-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for legacy world contracts in migration + support for pre-manifest migration #1928
Comments
I have a very dirty commit with the changes I've done to make it appear to work here: https://github.com/wraitii/dojo/tree/briq_upgrade_07_test |
Point 1: is this for
by default this is expected behaviour, user need to override the Point 5: similar to point 3
we have opened an issue (#1921) for this but since the class_hash used during the first deployment isn't stored anywhere i am not sure how to fetch it automatically Point 7: we noticed this before #1820 (comment) and it should be solved with #1629. But as a quick fix we can also compare them in lowercase, wdyt @glihm ? |
No,
Will look into that, is there documentation already ?
I'm guessing events as well then, unless you plan on changing that? |
we recently merged this: dojoengine/book#264, let us know if its not clear or you have any other questions.
yeah, we where thinking to add that info in the world contract itself but its still understand discussion |
With Currently the best migration possible is migrating data with specific systems. In the new world, the migrations will break less easily because:
|
Describe the bug
Still experiencing some issues with the briq contract migration from a Dojo v0.3 to Dojo v0.7
Namely:
ModelRegistered
struct was updated with new fields and the deserialisation of my events fails.executor
argument to the constructor was removed, but I have it in my deployment TX, thus the generated world address differs from the actual world address (my TX is https://starkscan.co/contract/0x059f31686991d7cac25a7d4844225b9647c89e3e1e2d03460dbc61e3fbfafc59#overview)original_class_hash
is set by default to the local class hash. This should probably be the remote class hash, if there is one, but it is furthermore broken: I have actually upgraded the world, so I would need to manually specify it.ERC1155Balance
, the snake-case iserc_1155_balance
which gets converted toErc1155Balance
, and so the comparison fails. I think the comparison should be done in lowercase.Points (1), (2), (6), (7) are going to remain problematic going forward, the rest should be fixed once I have a manifest set-up locally. It would be convenient to be able to "pull" the manifest first though.
To Reproduce
sozo migrate plan --world 0x1ea16366a82e211a9b9045725309a5080c0260d5caf45c58836fc61b42501f5 --name briq_protocol
Suggestion of fixes
Point (1): Should probably handle both in-code somehow. Dojo doesn't actually use addresses for now.
Point (2): I think there's no good solution, IMO just add an explicit
executor
argument to the manifest, and if present use it - this is legacy support. Alternatively, "trust" the user world-address.Points (3/4/5): not sure.
Point (6): Needs a parameter of some kind (at some point we discussed use-short-name?) or a parameter in the manifest of some kind.
Point (7): I suggest adding
to_lowercase
to WorldDiff L48 (model comparison)The text was updated successfully, but these errors were encountered: