-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add gov proposal handler for acl #33
Conversation
@@ -0,0 +1,22 @@ | |||
{ |
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.
nice
|
||
func HandleMsgUpdateResourceDependencyMappingProposal(ctx sdk.Context, k *keeper.Keeper, p *types.MsgUpdateResourceDependencyMappingProposal) error { | ||
for _, resourceDepMapping := range p.MessageDependencyMapping { | ||
k.SetResourceDependencyMapping(ctx, resourceDepMapping) |
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.
do we do any checks over resourceDepMapping
?
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.
Mainly just the proto serialization checks -- all the fields that are not free form are ENUMs so the proto serialization should also cover those cases
Adding a handler for handling gov proposals from CLI in order to update the dependency mappings for access control module. Will follow up with another PR to handle deletes ### Testing Ran these commands and see that the dep mapping updated ``` seid tx staking delegate seivaloper1r9syjw4kdpjr8a6v38qmvn4dmmrnl869kmgsvr 59999000001341816640usei --from brando --chain-id sei-chain -b block -y --fees 2000usei seid tx gov submit-proposal update-resource-dependency-mapping ../brando/acl-gov.json --from brando --fees=10000000usei --gas=5000000 --chain-id sei-chain -b block seid tx gov deposit 1 10000000usei --chain-id sei-chain --from brando --fees=10000000usei --gas=5000000 -b block -y seid tx gov vote 1 yes --chain-id sei-chain --from brando -b block -y --fees=10000000usei ``` ![image](https://user-images.githubusercontent.com/18161326/193750113-35b13a6d-d1a5-45e8-a15b-256cd2584ff7.png)
Adding a handler for handling gov proposals from CLI in order to update the dependency mappings for access control module. Will follow up with another PR to handle deletes
Testing
Ran these commands and see that the dep mapping updated