-
Notifications
You must be signed in to change notification settings - Fork 189
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
feat(sozo): add ability to migrate the world #1698
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1698 +/- ##
==========================================
- Coverage 67.86% 67.62% -0.24%
==========================================
Files 304 305 +1
Lines 33172 33431 +259
==========================================
+ Hits 22512 22609 +97
- Misses 10660 10822 +162 ☔ View full report in Codecov by Sentry. |
2e60f08
to
ab6b0cb
Compare
As a note, the saya test is fixed on main. 👍 |
@lambda-0x I've made a test where:
|
@glihm would need to create an |
(will fix the conflicts once changes are reviewed) |
an important point to keep for documentation, the |
@lambda-0x it seems like if the world get back to the original class hash after being upgraded, it does not upgrade to ensure the class hash is restored.
We need a big refactoring on the code to organize the testing on all of that. 👍 |
crates/sozo/ops/src/migration/mod.rs
Outdated
if world.diff.local_class_hash != world.diff.original_class_hash | ||
&& world.diff.original_class_hash | ||
== world.diff.remote_class_hash.unwrap_or_default() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this condition and it's related to my previous comment.
To here, we want to actually upgrade anytime local class hash is different from the remote one, independently of the original class hash match.
} | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct UpgradeOutput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should see how to use that on the dojo contracts. Currently even if upgraded, we return a DeployOutput
struct only.
@lambda-0x would appreciate a double check if you have the bandwidth. 👍 |
@lambda-0x I'll merge for now, we should catch up for tests architecture once you're available. 👍 Related to #1684. |
fix: #1671
fix: DOJ-268
original_base_class_hash
forDojoContract
s