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

[Feature] Allow gov msg to be grantable #407

Merged
merged 1 commit into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions x/gov/internal/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
}
2 changes: 1 addition & 1 deletion x/msgauth/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down