Starcoin support upgrade module by DAO.
- compile the module which you want to upgrade.
- unlock your account.
starcoin% account unlock <account address>
- submit upgrade module proposal with your account.
starcoin% dev module-proposal -s <account address> -m <module path> -v <version>
- query proposal state.
starcoin% dev call --module-address <module address> --module-name Dao --func-name proposal_state -t 0x1::STC::STC -t 0x1::UpgradeModuleDaoProposal::UpgradeModule --arg <proposal address> --arg <proposal id>
- anyone can vote proposal when the proposal state is ACTIVE.
starcoin% dev execute-function -s <account address> -b --function 0x1::DaoVoteScripts::cast_vote -t 0x1::STC::STC -t 0x1::UpgradeModuleDaoProposal::UpgradeModule --arg <proposal address> --arg <proposal id> --arg <agree> --arg <votes>u128
- anyone can queue proposal when the proposal state is AGREED.
starcoin% dev module-queue -s <account address> -a <proposal address> -i <proposal id>
- anyone can submit plan when the proposal state is QUEUED.
starcoin% dev module-plan -s <account address> -a <proposal address> -i <proposal id>
- anyone can upgrade the module when the proposal state is EXECUTABLE.
starcoin% dev module-exe -s <account address> -m <module path>