Open davcrypto opened 1 year ago
Threshold decision policy
// policy.json for create group policy
{
"@type": "/cosmos.group.v1.ThresholdDecisionPolicy",
"threshold": "1",
"windows": {
"voting_period": "120h",
"min_execution_period": "0s"
}
}
Percentage decision policy
// policy.json for create group policy
{
"@type": "/cosmos.group.v1.PercentageDecisionPolicy",
"percentage": "0.5",
"windows": {
"voting_period": "120h",
"min_execution_period": "0s"
}
}
// Policy
/cosmos.group.v1.MsgCreateGroupWithPolicy
/cosmos.group.v1.MsgCreateGroupPolicy
/cosmos.group.v1.MsgUpdateGroupDecisionPolicy
/cosmos.group.v1.MsgUpdateGroupPolicyMetadata
/cosmos.group.v1.ThresholdDecisionPolicy
/cosmos.group.v1.PercentageDecisionPolicy
// Manage group
/cosmos.group.v1.MsgCreateGroup
/cosmos.group.v1.MsgUpdateGroupMembers
/cosmos.group.v1.MsgUpdateGroupAdmin
/cosmos.group.v1.MsgUpdateGroupPolicyAdmin
/cosmos.group.v1.MsgUpdateGroupMetadata
/cosmos.group.v1.MsgLeaveGroup
// Proposal and voting
/cosmos.group.v1.MsgSubmitProposal
/cosmos.group.v1.MsgWithdrawProposal
/cosmos.group.v1.MsgVote
/cosmos.group.v1.MsgExec
The pattern that is recommended is to have a single master group policy for a given group, and then to create separate group policies with different decision policies and delegate the desired permissions from the master account to those "sub-accounts" using the x/authz module.
ref: https://docs.cosmos.network/v0.46/modules/group/03_messages.html