Skip to content
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

[TODO] UpgradePlanEventHolder init #141

Open
jolestar opened this issue Sep 21, 2022 · 1 comment
Open

[TODO] UpgradePlanEventHolder init #141

jolestar opened this issue Sep 21, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@jolestar
Copy link
Member

// TODO
// if UpgradePlanCapability was delegated to DAO or contract,
// it's hard to upgrade the address to claim an UpgradePlanEventHolder.
// Try to fix this!
if (exists<UpgradePlanEventHolder>(package_address)) {
let event_holder = borrow_global_mut<UpgradePlanEventHolder>(package_address);
Event::emit_event<UpgradePlanEvent>(&mut event_holder.upgrade_plan_event, UpgradePlanEvent {
package_address,
plan
});
}

@jolestar jolestar added the enhancement New feature or request label Sep 21, 2022
@jolestar jolestar added this to the v12 milestone Sep 21, 2022
@pause125
Copy link
Collaborator

I've tried the following way:

  1. In Account module, add a friend function to get a signer from address: public(friend) fun get_signer_of(account: address)
  2. Create a new script function in a new file PackageTxnManagerUpgrade.move for DAO to invoke, here is the commit

This may be a feasiable way, but the DAO has to upgrade contract.

@jolestar jolestar modified the milestones: v12, v13 Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants