-
Notifications
You must be signed in to change notification settings - Fork 20
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(contract): add a burn function to destroy unused old sites #291
base: main
Are you sure you want to change the base?
feat(contract): add a burn function to destroy unused old sites #291
Conversation
We had forgot to fix this one. The test should fail since at least one range bound should have been defined.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
CodSpeed Performance ReportMerging #291 will not alter performanceComparing Summary
|
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.
Thank you @Tzal3x ! Just a couple of suggestions
@@ -202,4 +202,15 @@ module walrus_site::site { | |||
let routes = df::borrow_mut(&mut site.id, ROUTES_FIELD); | |||
routes_remove(routes, route) | |||
} | |||
|
|||
/// Deletes a site object. |
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.
Question: Can we expose a function to delete everything?
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.
Everything meaning the dynamic fields? I looked into it, and I couldn't find a way to get all the dynamic fields on the contract level. 😬 So this seems to be unavoidable. Related thread: https://mysten-labs.slack.com/archives/C068VUPSG02/p1730982934293609.
test_new_range_no_bounds_defined
should fail since at least one range bound should have been defined.The
site-builder
will be updated when there will also be adelete
argument support where both the blobs on walrus and the sui objects of a site will be deleted.Warning: The burn function should be called after the
site-builder
has deleted all dynamic fields (resources and routes) attached to the site! Otherwise, deleting an object that has dynamic fields still defined on it renders them all inaccessible to future transactions!