From 1db4a98cbe9a3f759c06b1a233f600e22348455c Mon Sep 17 00:00:00 2001 From: yys Date: Tue, 22 Sep 2020 18:27:43 +0900 Subject: [PATCH] allow gov msg to be grantable --- app/app.go | 1 + x/gov/internal/types/codec.go | 4 ++++ x/msgauth/client/cli/query.go | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index bbeac2cdc..a6bb2e80a 100644 --- a/app/app.go +++ b/app/app.go @@ -232,6 +232,7 @@ func NewTerraApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest app.msgauthKeeper = msgauth.NewKeeper(app.cdc, keys[msgauth.StoreKey], bApp.Router(), bank.MsgSend{}.Type(), market.MsgSwap{}.Type(), + gov.MsgVote{}.Type(), ) // register the evidence router diff --git a/x/gov/internal/types/codec.go b/x/gov/internal/types/codec.go index e83adc024..19ab1aa52 100644 --- a/x/gov/internal/types/codec.go +++ b/x/gov/internal/types/codec.go @@ -3,6 +3,8 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/gov" + + msgauthexported "github.com/terra-project/core/x/msgauth/exported" ) // ModuleCdc defines module codec @@ -30,4 +32,6 @@ func RegisterProposalTypeCodec(o interface{}, name string) { // TODO determine a good place to seal this codec func init() { RegisterCodec(ModuleCdc) + + msgauthexported.RegisterMsgAuthTypeCodec(gov.MsgVote{}, "gov/MsgVote") } diff --git a/x/msgauth/client/cli/query.go b/x/msgauth/client/cli/query.go index 19e388cfa..93061b451 100644 --- a/x/msgauth/client/cli/query.go +++ b/x/msgauth/client/cli/query.go @@ -90,7 +90,7 @@ func GetCmdQueryGrants(storeName string, cdc *codec.Codec) *cobra.Command { Long: strings.TrimSpace(` Query grant entries between a granter-grantee pair, -$ terracli query msgauth grant terra... terra... +$ terracli query msgauth grants terra... terra... `), RunE: func(cmd *cobra.Command, args []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc)