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

[Feature Request]: Migrate the old UpgradeModuleDaoProposal to daospace #100

Closed
jolestar opened this issue Aug 30, 2022 · 1 comment · Fixed by #94
Closed

[Feature Request]: Migrate the old UpgradeModuleDaoProposal to daospace #100

jolestar opened this issue Aug 30, 2022 · 1 comment · Fixed by #94
Labels
enhancement New feature or request

Comments

@jolestar
Copy link
Member

Feature Request

Describe the Feature Request

Migrate the old UpgradeModuleDaoProposal to DAOSpace.

  1. Migrate the PackageTxnManager::UpgradePlanCapability from UpgradeModuleDaoProposal to StarcoinDAO instance.
  2. Implement UpgradeModuleDaoProposal plugin for DAOSpace.

Describe Preferred Solution

Describe Alternatives

Related Code

Additional Context

If the feature request is approved, would you be willing to submit a PR?
Yes / No (Help can be provided if you need assistance submitting a PR)

@WGB5445
Copy link
Collaborator

WGB5445 commented Aug 31, 2022

我在 #94 中尝试移动 UpgradePlanCapabilityStarcoinDAO
增加 get_genesis_upgrade_cap,并只能在 DAOAccount 调用 :

public (friend) fun get_genesis_upgrade_cap<TokenT:store>():PackageTxnManager::UpgradePlanCapability acquires UpgradeModuleCapability{
        let UpgradeModuleCapability<TokenT>{
            cap
        } = move_from(Token::token_address<TokenT>());
        cap
    }

增加 upgrade_starcoin_dao ,并只能在 StarcoinDAO 调用:

    public (friend) fun upgrade_starcoin_dao(sender:signer): DAOAccountCap{
        let signer_cap = Account::remove_signer_capability(&sender);
        let dao_address = Signer::address_of(&sender);
        let upgrade_plan_cap = UpgradeModuleDaoProposal::get_genesis_upgrade_cap<STC>();
        move_to(&sender, DAOAccount{
            dao_address,
            signer_cap,
            upgrade_plan_cap,
        });
         DAOAccountCap{
            dao_address
        }
    }

@jolestar jolestar linked a pull request Sep 6, 2022 that will close this issue
7 tasks
@jolestar jolestar closed this as completed Sep 6, 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

Successfully merging a pull request may close this issue.

2 participants