From 1127910c3e3439331b38d12d119cd2f0e1fde8aa Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Tue, 2 Aug 2022 14:59:18 +0530 Subject: [PATCH] chore: register data module types with authz --- x/data/codec.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/x/data/codec.go b/x/data/codec.go index 4fa99aa900..b7429e3c62 100644 --- a/x/data/codec.go +++ b/x/data/codec.go @@ -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) { @@ -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) }