Skip to content

Commit

Permalink
chore: register data module types with authz
Browse files Browse the repository at this point in the history
  • Loading branch information
aleem1314 committed Aug 2, 2022
1 parent fdcb556 commit 1127910
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions x/data/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ package data

import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy"
"github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec"
)

func RegisterTypes(registry types.InterfaceRegistry) {
Expand All @@ -26,5 +30,12 @@ var (
)

func init() {
RegisterLegacyAminoCodec(legacy.Cdc)
RegisterLegacyAminoCodec(amino)
cryptocodec.RegisterCrypto(amino)
sdk.RegisterLegacyAminoCodec(amino)

// Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
// used to properly serialize MsgGrant and MsgExec instances
RegisterLegacyAminoCodec(authzcodec.Amino)
}

0 comments on commit 1127910

Please sign in to comment.