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

feat: introduce censorship into x/foundation #912

Merged
merged 15 commits into from
Mar 14, 2023
Prev Previous commit
Next Next commit
Add amino test on MsgUpdateCensorship
  • Loading branch information
0Tech committed Feb 23, 2023
commit 544d6a834ff664c1dc6163d733734481c70dced9
10 changes: 10 additions & 0 deletions x/foundation/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,16 @@ func TestMsgSubmitProposalAminoJSON(t *testing.T) {
},
fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateMembers\",\"value\":{\"authority\":\"%s\",\"member_updates\":[{\"address\":\"%s\"}]}}],\"metadata\":\"MsgUpdateMembers\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), addrs[1].String(), proposer.String()),
},
"MsgUpdateCensorship": {
&foundation.MsgUpdateCensorship{
Authority: addrs[0].String(),
Censorship: foundation.Censorship{
MsgTypeUrl: sdk.MsgTypeURL((*foundation.MsgWithdrawFromTreasury)(nil)),
Authority: foundation.CensorshipAuthorityGovernance,
},
},
fmt.Sprintf("{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgSubmitProposal\",\"value\":{\"exec\":1,\"messages\":[{\"type\":\"lbm-sdk/MsgUpdateCensorship\",\"value\":{\"authority\":\"%s\",\"censorship\":{\"authority\":1,\"msg_type_url\":\"/lbm.foundation.v1.MsgWithdrawFromTreasury\"}}}],\"metadata\":\"MsgUpdateCensorship\",\"proposers\":[\"%s\"]}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}", addrs[0].String(), proposer.String()),
},
"MsgRevoke": {
&foundation.MsgRevoke{
Authority: addrs[0].String(),
Expand Down