From c9d13c7f6ada0472782d730de3cf8b4438934f42 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 30 May 2023 16:54:13 +0300 Subject: [PATCH 001/121] feat(ica): added EncodingJson to supported encodings --- modules/apps/27-interchain-accounts/types/metadata.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/metadata.go b/modules/apps/27-interchain-accounts/types/metadata.go index ee986a006f9..f9b61b81a15 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.go +++ b/modules/apps/27-interchain-accounts/types/metadata.go @@ -10,6 +10,8 @@ import ( const ( // EncodingProtobuf defines the protocol buffers proto3 encoding format EncodingProtobuf = "proto3" + // EncodingJSON defines the JSON encoding format + EncodingJSON = "json" // TxTypeSDKMultiMsg defines the multi message transaction type supported by the Cosmos SDK TxTypeSDKMultiMsg = "sdk_multi_msg" @@ -141,7 +143,7 @@ func isSupportedEncoding(encoding string) bool { // getSupportedEncoding returns a string slice of supported encoding formats func getSupportedEncoding() []string { - return []string{EncodingProtobuf} + return []string{EncodingProtobuf, EncodingJSON} } // isSupportedTxType returns true if the provided transaction type is supported, otherwise false From fc7b2d132d67ea0a299f97462daf4baaa0a75d02 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 30 May 2023 18:43:02 +0300 Subject: [PATCH 002/121] imp(ica): changed the type of cdc to Codec in ica/host --- modules/apps/27-interchain-accounts/host/keeper/keeper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index c8f806486d6..0f77dedff68 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -23,7 +23,7 @@ import ( // Keeper defines the IBC interchain accounts host keeper type Keeper struct { storeKey storetypes.StoreKey - cdc codec.BinaryCodec + cdc codec.Codec legacySubspace paramtypes.Subspace ics4Wrapper porttypes.ICS4Wrapper @@ -42,7 +42,7 @@ type Keeper struct { // NewKeeper creates a new interchain accounts host Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, accountKeeper icatypes.AccountKeeper, scopedKeeper exported.ScopedKeeper, msgRouter icatypes.MessageRouter, authority string, From 65bca55e292da428e968fbf5e25ee041cb999e55 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 30 May 2023 18:43:31 +0300 Subject: [PATCH 003/121] imp(ica): changed the type of cdc to Codec in ica/controller --- .../apps/27-interchain-accounts/controller/keeper/keeper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index ceeffaa5737..ffaa6c43259 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -25,7 +25,7 @@ import ( // Keeper defines the IBC interchain accounts controller keeper type Keeper struct { storeKey storetypes.StoreKey - cdc codec.BinaryCodec + cdc codec.Codec paramSpace paramtypes.Subspace ics4Wrapper porttypes.ICS4Wrapper @@ -39,7 +39,7 @@ type Keeper struct { // NewKeeper creates a new interchain accounts controller Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, scopedKeeper exported.ScopedKeeper, msgRouter icatypes.MessageRouter, ) Keeper { From 3b19ac340534fce81894dfc304371e4135cf8474 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 01:08:01 +0300 Subject: [PATCH 004/121] imp(ica.test): added a test cases for EncodingJSON --- .../types/metadata_test.go | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/metadata_test.go b/modules/apps/27-interchain-accounts/types/metadata_test.go index c0274368e07..fc9502b7b1e 100644 --- a/modules/apps/27-interchain-accounts/types/metadata_test.go +++ b/modules/apps/27-interchain-accounts/types/metadata_test.go @@ -45,7 +45,7 @@ func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { false, }, { - "unequal encoding format", + "unequal and invalid encoding format", func() { metadata.Encoding = "invalid-encoding-format" @@ -55,6 +55,17 @@ func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { }, false, }, + { + "unequal encoding format", + func() { + metadata.Encoding = types.EncodingJSON + + versionBytes, err := types.ModuleCdc.MarshalJSON(&metadata) + suite.Require().NoError(err) + previousVersion = string(versionBytes) + }, + false, + }, { "unequal transaction type", func() { @@ -152,6 +163,20 @@ func (suite *TypesTestSuite) TestValidateControllerMetadata() { }, true, }, + { + "success with EncodingJSON", + func() { + metadata = types.Metadata{ + Version: types.Version, + ControllerConnectionId: ibctesting.FirstConnectionID, + HostConnectionId: ibctesting.FirstConnectionID, + Address: TestOwnerAddress, + Encoding: types.EncodingJSON, + TxType: types.TxTypeSDKMultiMsg, + } + }, + true, + }, { "unsupported encoding format", func() { @@ -293,6 +318,20 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { }, true, }, + { + "success with EncodingJSON", + func() { + metadata = types.Metadata{ + Version: types.Version, + ControllerConnectionId: ibctesting.FirstConnectionID, + HostConnectionId: ibctesting.FirstConnectionID, + Address: TestOwnerAddress, + Encoding: types.EncodingJSON, + TxType: types.TxTypeSDKMultiMsg, + } + }, + true, + }, { "unsupported encoding format", func() { From ba73e124ac4cbe643058ebe4b626a9592b2d4156 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 01:13:03 +0300 Subject: [PATCH 005/121] imp(ica): created invalid encoding err --- modules/apps/27-interchain-accounts/types/errors.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/apps/27-interchain-accounts/types/errors.go b/modules/apps/27-interchain-accounts/types/errors.go index 06989327dfb..28930a6a26c 100644 --- a/modules/apps/27-interchain-accounts/types/errors.go +++ b/modules/apps/27-interchain-accounts/types/errors.go @@ -23,4 +23,5 @@ var ( ErrInvalidTimeoutTimestamp = errorsmod.Register(ModuleName, 17, "timeout timestamp must be in the future") ErrInvalidCodec = errorsmod.Register(ModuleName, 18, "codec is not supported") ErrInvalidAccountReopening = errorsmod.Register(ModuleName, 19, "invalid account reopening") + ErrUnsupportedEncoding = errorsmod.Register(ModuleName, 20, "encoding is not supported") ) From d5f02cf0ee7364bcb3fbe20b366e1965aa954b20 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:06:40 +0300 Subject: [PATCH 006/121] feat(ica)!: first prototype of json supporting DeserializeCosmosTx --- .../27-interchain-accounts/types/codec.go | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index b0ba7b8902b..fe231e8b86f 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -1,12 +1,16 @@ package types import ( + "bytes" + "encoding/json" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" ) // ModuleCdc references the global interchain accounts module codec. Note, the codec @@ -56,28 +60,55 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, // DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes // into a slice of sdk.Msg's. Only the ProtoCodec is supported for message // deserialization. -func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte) ([]sdk.Msg, error) { +func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([]sdk.Msg, error) { // only ProtoCodec is supported if _, ok := cdc.(*codec.ProtoCodec); !ok { return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") } var cosmosTx CosmosTx - if err := cdc.Unmarshal(data, &cosmosTx); err != nil { - return nil, err - } + var msgs []sdk.Msg + + switch encoding { + case EncodingProtobuf: + if err := cdc.Unmarshal(data, &cosmosTx); err != nil { + return nil, err + } - msgs := make([]sdk.Msg, len(cosmosTx.Messages)) + msgs = make([]sdk.Msg, len(cosmosTx.Messages)) - for i, protoAny := range cosmosTx.Messages { - var msg sdk.Msg + for i, protoAny := range cosmosTx.Messages { + var msg sdk.Msg - err := cdc.UnpackAny(protoAny, &msg) + err := cdc.UnpackAny(protoAny, &msg) + if err != nil { + return nil, err + } + + msgs[i] = msg + } + case EncodingJSON: + interfaceRegistry := cdc.(*codec.ProtoCodec).InterfaceRegistry() + // this cosmosTx is not the same as the one in the protobuf case + // its Any needs to be unpacked using json instead of protobuf + err := json.Unmarshal(data, &cosmosTx) if err != nil { return nil, err } - msgs[i] = msg + msgs = make([]sdk.Msg, len(cosmosTx.Messages)) + + for i, jsonAny := range cosmosTx.Messages { + message, err := interfaceRegistry.Resolve(jsonAny.TypeUrl) + if err != nil { + return nil, err + } + jsonpb.Unmarshal(bytes.NewReader(jsonAny.Value), message) + + msgs[i] = message.(sdk.Msg) + } + default: + return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) } return msgs, nil From 836dbb79aa5abdaecb80db31f98d5099dc69fc06 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:09:35 +0300 Subject: [PATCH 007/121] docs(ica): updated godoc of DeserializeCosmosTx --- modules/apps/27-interchain-accounts/types/codec.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index fe231e8b86f..45b11a20900 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -58,12 +58,11 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, } // DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes -// into a slice of sdk.Msg's. Only the ProtoCodec is supported for message -// deserialization. +// into a slice of sdk.Msg's. func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([]sdk.Msg, error) { - // only ProtoCodec is supported + // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec is supported for receiving messages on the host chain") } var cosmosTx CosmosTx From 57dfd22daf82ef297f8c1681bc2abdb01e10d85c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:11:00 +0300 Subject: [PATCH 008/121] docs(ica): added comments to DeserializeCosmosTx --- modules/apps/27-interchain-accounts/types/codec.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 45b11a20900..c4b8d21356d 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -87,6 +87,8 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs[i] = msg } case EncodingJSON: + // This case does not rely on cdc to unpack the Any. + // cdc is only used to access the interface registry. interfaceRegistry := cdc.(*codec.ProtoCodec).InterfaceRegistry() // this cosmosTx is not the same as the one in the protobuf case // its Any needs to be unpacked using json instead of protobuf From 90907d736cece7e6cbd25ead98e5d74a7e75a231 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:13:14 +0300 Subject: [PATCH 009/121] fix(ica.test): fixed tests for DeserializeCosmosTx --- .../apps/27-interchain-accounts/types/codec_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 1df2dd4d66a..88d7db42f12 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -37,7 +37,7 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } -func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { +func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { testCases := []struct { name string msgs []proto.Message @@ -110,7 +110,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs) suite.Require().NoError(err, tc.name) - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) if tc.expPass { suite.Require().NoError(err, tc.name) } else { @@ -129,11 +129,11 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { suite.Require().NotEmpty(bz) // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) suite.Require().Error(err) // unregistered type // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid")) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingProtobuf) suite.Require().Error(err) suite.Require().Empty(msgs) } @@ -141,7 +141,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { // unregistered bytes causes amino to panic. // test that DeserializeCosmosTx gracefully returns an error on // unsupported amino codec. -func (suite *TypesTestSuite) TestDeserializeAndSerializeCosmosTxWithAmino() { +func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() { cdc := codec.NewLegacyAmino() marshaler := codec.NewAminoCodec(cdc) @@ -149,7 +149,7 @@ func (suite *TypesTestSuite) TestDeserializeAndSerializeCosmosTxWithAmino() { suite.Require().Error(err) suite.Require().Empty(msgs) - bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}) + bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}, types.EncodingProtobuf) suite.Require().Error(err) suite.Require().Empty(bz) } From 4af1a8394c243c53569ee9db39e65580492c3b85 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:26:40 +0300 Subject: [PATCH 010/121] fix(ica): fixed 'OnRecvPacket' in relay.go --- .../apps/27-interchain-accounts/host/keeper/relay.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index aa61d7004b7..fbf900efd7a 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -22,9 +22,19 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byt return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain account packet data") } + appVersion, found := k.GetAppVersion(ctx, packet.DestinationPort, packet.DestinationChannel) + if !found { + return nil, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", packet.DestinationPort, packet.DestinationChannel) + } + var metadata icatypes.Metadata + if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(appVersion), &metadata); err != nil { + // UnmarshalJSON errors are indeterminate and therefore are not wrapped and included in failed acks + return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata") + } + switch data.Type { case icatypes.EXECUTE_TX: - msgs, err := icatypes.DeserializeCosmosTx(k.cdc, data.Data) + msgs, err := icatypes.DeserializeCosmosTx(k.cdc, data.Data, metadata.Encoding) if err != nil { return nil, errorsmod.Wrapf(err, "failed to deserialize interchain account transaction") } From e16a5756cf1cadee0272e1492ea657e87da24dff Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:30:32 +0300 Subject: [PATCH 011/121] fix(ica): fixed unhandled error --- modules/apps/27-interchain-accounts/types/codec.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index c4b8d21356d..c9f9042fddf 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -94,6 +94,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ // its Any needs to be unpacked using json instead of protobuf err := json.Unmarshal(data, &cosmosTx) if err != nil { + // TODO: not sure if this err is indeterminate return nil, err } @@ -104,7 +105,11 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ if err != nil { return nil, err } - jsonpb.Unmarshal(bytes.NewReader(jsonAny.Value), message) + err = jsonpb.Unmarshal(bytes.NewReader(jsonAny.Value), message) + if err != nil { + // TODO: not sure if this err is indeterminate + return nil, err + } msgs[i] = message.(sdk.Msg) } From c4b246a044dac5e511cb2f3d9da72b8d8511a493 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:32:29 +0300 Subject: [PATCH 012/121] style(ica): made DeserializeCosmosTx more compact --- modules/apps/27-interchain-accounts/types/codec.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index c9f9042fddf..1938fc7de1d 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -92,8 +92,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ interfaceRegistry := cdc.(*codec.ProtoCodec).InterfaceRegistry() // this cosmosTx is not the same as the one in the protobuf case // its Any needs to be unpacked using json instead of protobuf - err := json.Unmarshal(data, &cosmosTx) - if err != nil { + if err := json.Unmarshal(data, &cosmosTx); err != nil { // TODO: not sure if this err is indeterminate return nil, err } @@ -105,8 +104,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ if err != nil { return nil, err } - err = jsonpb.Unmarshal(bytes.NewReader(jsonAny.Value), message) - if err != nil { + if err = jsonpb.Unmarshal(bytes.NewReader(jsonAny.Value), message); err != nil { // TODO: not sure if this err is indeterminate return nil, err } From d08d06641ca5b9af1be2e341247947d79ed30b92 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:37:23 +0300 Subject: [PATCH 013/121] fix(ica/host.cli.test): fixed a cli test --- modules/apps/27-interchain-accounts/host/client/cli/tx_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go index b8a617e224e..62ea6afbedb 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go @@ -120,7 +120,8 @@ func TestGeneratePacketData(t *testing.T) { require.Equal(t, tc.memo, packetData.Memo) data := packetData.Data - messages, err := icatypes.DeserializeCosmosTx(cdc, data) + // cli tx commands always use protobuf encoding + messages, err := icatypes.DeserializeCosmosTx(cdc, data, icatypes.EncodingProtobuf) require.NoError(t, err) require.NotNil(t, messages) From 882fa52c5cf8a4df445f75a0a5983b1656137d3f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:38:51 +0300 Subject: [PATCH 014/121] style(ica): ran gofumpt --- modules/apps/27-interchain-accounts/types/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/errors.go b/modules/apps/27-interchain-accounts/types/errors.go index 28930a6a26c..328e9be1d27 100644 --- a/modules/apps/27-interchain-accounts/types/errors.go +++ b/modules/apps/27-interchain-accounts/types/errors.go @@ -23,5 +23,5 @@ var ( ErrInvalidTimeoutTimestamp = errorsmod.Register(ModuleName, 17, "timeout timestamp must be in the future") ErrInvalidCodec = errorsmod.Register(ModuleName, 18, "codec is not supported") ErrInvalidAccountReopening = errorsmod.Register(ModuleName, 19, "invalid account reopening") - ErrUnsupportedEncoding = errorsmod.Register(ModuleName, 20, "encoding is not supported") + ErrUnsupportedEncoding = errorsmod.Register(ModuleName, 20, "encoding is not supported") ) From 2eb410a5433e24e29ce19ac0ed10d751f90b7fc9 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 02:43:57 +0300 Subject: [PATCH 015/121] style(ica): changed err message --- modules/apps/27-interchain-accounts/types/codec.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 1938fc7de1d..e89ee9eb3d9 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -57,12 +57,11 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, return bz, nil } -// DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes -// into a slice of sdk.Msg's. +// DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes into a slice of sdk.Msg's. func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([]sdk.Msg, error) { // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec is supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") } var cosmosTx CosmosTx From 19c7dc5f5ac4510d9ca3678b772f4253fc27ad7f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 03:36:28 +0300 Subject: [PATCH 016/121] feat(ica): first prototype of SerializeCosmosTx is implemented --- .../27-interchain-accounts/types/codec.go | 48 +++++++++++++++---- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index e89ee9eb3d9..d849cbd7f01 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -30,7 +30,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are // packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx // bytes are returned. Only the ProtoCodec is supported for serializing messages. -func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, err error) { +func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding string) ([]byte, error) { // only ProtoCodec is supported if _, ok := cdc.(*codec.ProtoCodec); !ok { return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") @@ -38,20 +38,48 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, msgAnys := make([]*codectypes.Any, len(msgs)) - for i, msg := range msgs { - msgAnys[i], err = codectypes.NewAnyWithValue(msg) + var bz []byte + var err error + + switch encoding { + case EncodingProtobuf: + for i, msg := range msgs { + msgAnys[i], err = codectypes.NewAnyWithValue(msg) + if err != nil { + return nil, err + } + } + + cosmosTx := &CosmosTx{ + Messages: msgAnys, + } + + bz, err = cdc.Marshal(cosmosTx) if err != nil { return nil, err } - } + case EncodingJSON: + for i, msg := range msgs { + jsonValue, err := cdc.(*codec.ProtoCodec).MarshalInterfaceJSON(msg) + if err != nil { + return nil, err + } + msgAnys[i] = &codectypes.Any{ + TypeUrl: "/" + proto.MessageName(msg), + Value: jsonValue, + } - cosmosTx := &CosmosTx{ - Messages: msgAnys, - } + cosmosTx := &CosmosTx{ + Messages: msgAnys, + } - bz, err = cdc.Marshal(cosmosTx) - if err != nil { - return nil, err + bz, err = json.Marshal(cosmosTx) + if err != nil { + return nil, err + } + } + default: + return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) } return bz, nil From 66fe43d5478118e546e714962a78d055c622ecce Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 10:56:07 +0300 Subject: [PATCH 017/121] fix(ica): fixed codec tests --- modules/apps/27-interchain-accounts/types/codec_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 88d7db42f12..5a9cbbecff0 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -107,7 +107,7 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingProtobuf) suite.Require().NoError(err, tc.name) msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) @@ -124,7 +124,7 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { } // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingProtobuf) suite.Require().NoError(err) suite.Require().NotEmpty(bz) @@ -145,7 +145,7 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() cdc := codec.NewLegacyAmino() marshaler := codec.NewAminoCodec(cdc) - msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}) + msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}, types.EncodingProtobuf) suite.Require().Error(err) suite.Require().Empty(msgs) From 345febf2881943070217074cdd6f9be1db55e96c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:10:48 +0300 Subject: [PATCH 018/121] fix(ica/host.test): fix test --- modules/apps/27-interchain-accounts/host/ibc_module_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/ibc_module_test.go b/modules/apps/27-interchain-accounts/host/ibc_module_test.go index f8737c300a2..b580eaa5de4 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -443,7 +443,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: amount, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -652,7 +652,7 @@ func (suite *InterchainAccountsTestSuite) TestControlAccountAfterChannelClose() Amount: tokenAmt, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ From 3d5f1c0961a315d0705ede945e717e38746e659d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:14:37 +0300 Subject: [PATCH 019/121] fix(ica/host.test): fix test --- .../host/keeper/relay_test.go | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 6e07e58715f..4d6b0fa05b1 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -18,6 +18,7 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ) +// TODO: add json tests func (suite *KeeperTestSuite) TestOnRecvPacket() { var ( path *ibctesting.Path @@ -56,7 +57,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -83,7 +84,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -111,7 +112,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -145,7 +146,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -180,7 +181,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Proposer: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -222,7 +223,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -248,7 +249,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Depositor: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -274,7 +275,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { WithdrawAddress: suite.chainB.SenderAccount.GetAddress().String(), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -313,7 +314,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { TimeoutTimestamp: uint64(0), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -333,7 +334,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { func() { msg := &banktypes.MsgSendResponse{} - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -372,7 +373,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { { "invalid packet type - UNSPECIFIED", func() { - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -389,7 +390,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { func() { path.EndpointA.ChannelConfig.PortID = "invalid-port-id" - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -410,7 +411,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -431,7 +432,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ From e0cde18ac5404c5bf7e64e9756bf8ddc9a1eabcc Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:15:21 +0300 Subject: [PATCH 020/121] fix(ica/host.cli): cli always uses protobuf --- modules/apps/27-interchain-accounts/host/client/cli/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx.go b/modules/apps/27-interchain-accounts/host/client/cli/tx.go index 8d74f1ce66c..a4143a50b98 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx.go @@ -129,7 +129,7 @@ func convertBytesIntoProtoMessages(cdc *codec.ProtoCodec, msgBytes []byte) ([]pr // generateIcaPacketDataFromProtoMessages generates ica packet data as bytes from a given set of proto encoded sdk messages and a memo. func generateIcaPacketDataFromProtoMessages(cdc *codec.ProtoCodec, sdkMessages []proto.Message, memo string) ([]byte, error) { - icaPacketDataBytes, err := icatypes.SerializeCosmosTx(cdc, sdkMessages) + icaPacketDataBytes, err := icatypes.SerializeCosmosTx(cdc, sdkMessages, icatypes.EncodingProtobuf) if err != nil { return nil, err } From 9834a20dec9a06ac8a81c64150d9369610c19f0c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:16:11 +0300 Subject: [PATCH 021/121] nil(ica/host.test): removed unneeded comment --- modules/apps/27-interchain-accounts/host/keeper/relay_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 4d6b0fa05b1..e368b22a8d2 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -18,7 +18,6 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ) -// TODO: add json tests func (suite *KeeperTestSuite) TestOnRecvPacket() { var ( path *ibctesting.Path From 318f5912b301d2cb4245c51d7766c2255444bd2c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:17:12 +0300 Subject: [PATCH 022/121] fix(ica/controller.test): fix test --- .../apps/27-interchain-accounts/controller/types/msgs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go index e5afa00c93e..40a9aeac12c 100644 --- a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go +++ b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go @@ -142,7 +142,7 @@ func TestMsgSendTxValidateBasic(t *testing.T) { Amount: ibctesting.TestCoins, } - data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{msgBankSend}) + data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) require.NoError(t, err) packetData := icatypes.InterchainAccountPacketData{ @@ -178,7 +178,7 @@ func TestMsgSendTxGetSigners(t *testing.T) { Amount: ibctesting.TestCoins, } - data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{msgBankSend}) + data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) require.NoError(t, err) packetData := icatypes.InterchainAccountPacketData{ From b8208fd9f881b20d5a8c8dcaaa0e9c0b7a1580db Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:20:20 +0300 Subject: [PATCH 023/121] fix(ica/controller.test): fix test --- .../27-interchain-accounts/controller/keeper/relay_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go b/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go index c16af788923..d898ba21fa4 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go @@ -35,7 +35,7 @@ func (suite *KeeperTestSuite) TestSendTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData = icatypes.InterchainAccountPacketData{ @@ -64,7 +64,7 @@ func (suite *KeeperTestSuite) TestSendTx() { }, } - data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), msgsBankSend) + data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), msgsBankSend, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData = icatypes.InterchainAccountPacketData{ @@ -122,7 +122,7 @@ func (suite *KeeperTestSuite) TestSendTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData = icatypes.InterchainAccountPacketData{ From f7ccaf68e3c65ab7799228afe37a3d2eb4f6019b Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:20:41 +0300 Subject: [PATCH 024/121] fix(ica/controller.test): fix test --- .../27-interchain-accounts/controller/keeper/msg_server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go index 44585b2eea4..2b262a6e9ec 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go @@ -168,7 +168,7 @@ func (suite *KeeperTestSuite) TestSubmitTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{icaMsg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{icaMsg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ From cc3e29342a0e457259640250a20fcfb04fac8ff6 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 31 May 2023 11:21:28 +0300 Subject: [PATCH 025/121] fix(fee.test): fix test --- modules/apps/29-fee/ica_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/29-fee/ica_test.go b/modules/apps/29-fee/ica_test.go index 090533cb875..c7187abc65a 100644 --- a/modules/apps/29-fee/ica_test.go +++ b/modules/apps/29-fee/ica_test.go @@ -143,7 +143,7 @@ func (suite *FeeTestSuite) TestFeeInterchainAccounts() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ From ed1edf9b94e541eef6bc32e0834813a8a1427c5b Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 11:00:07 +0300 Subject: [PATCH 026/121] nit: temporary save commit --- .../27-interchain-accounts/types/codec.go | 17 ++- .../types/codec_test.go | 105 ++++++++++++++++++ 2 files changed, 117 insertions(+), 5 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index d849cbd7f01..28e7e7fde27 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -36,13 +36,12 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") } - msgAnys := make([]*codectypes.Any, len(msgs)) - var bz []byte var err error switch encoding { case EncodingProtobuf: + msgAnys := make([]*codectypes.Any, len(msgs)) for i, msg := range msgs { msgAnys[i], err = codectypes.NewAnyWithValue(msg) if err != nil { @@ -59,17 +58,25 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, err } case EncodingJSON: + type JsonAny struct { + TypeUrl string `json:"type_url,omitempty"` + Value []byte `json:"value,omitempty"` + } + type JsonCosmosTx struct { + Messages []*JsonAny `json:"messages,omitempty"` + } + msgAnys := make([]*JsonAny, len(msgs)) for i, msg := range msgs { - jsonValue, err := cdc.(*codec.ProtoCodec).MarshalInterfaceJSON(msg) + jsonValue, err := cdc.(*codec.ProtoCodec).MarshalJSON(msg) if err != nil { return nil, err } - msgAnys[i] = &codectypes.Any{ + msgAnys[i] = &JsonAny{ TypeUrl: "/" + proto.MessageName(msg), Value: jsonValue, } - cosmosTx := &CosmosTx{ + cosmosTx := JsonCosmosTx{ Messages: msgAnys, } diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 5a9cbbecff0..df060e11dac 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -138,6 +138,111 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { suite.Require().Empty(msgs) } +func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { + testCases := []struct { + name string + msgs []proto.Message + expPass bool + }{ + { + "single msg", + []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + }, + true, + }, + { + "multiple msgs, same types", + []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), + }, + }, + true, + }, + { + "multiple msgs, different types", + []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &govtypes.MsgSubmitProposal{ + InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Proposer: TestOwnerAddress, + }, + }, + true, + }, + { + "unregistered msg type", + []proto.Message{ + &mockSdkMsg{}, + }, + false, + }, + { + "multiple unregistered msg types", + []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + if tc.expPass { + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingJSON) + suite.Require().NoError(err, tc.name) + + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) + suite.Require().NoError(err, tc.name) + + for i, msg := range msgs { + suite.Require().Equal(tc.msgs[i], msg) + } + } else { + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingJSON) + suite.Require().Error(err, tc.name) + + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) + suite.Require().Error(err, tc.name) + } + }) + } + + // test serializing non sdk.Msg type + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingProtobuf) + suite.Require().NoError(err) + suite.Require().NotEmpty(bz) + + // test deserializing unknown bytes + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) + suite.Require().Error(err) // unregistered type + + // test deserializing unknown bytes + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingProtobuf) + suite.Require().Error(err) + suite.Require().Empty(msgs) +} + // unregistered bytes causes amino to panic. // test that DeserializeCosmosTx gracefully returns an error on // unsupported amino codec. From ae13295d9c4b91e0548fb9978ec75f7d20041120 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 15:01:22 +0300 Subject: [PATCH 027/121] fix(ica): fixed json serde tests not passing --- .../27-interchain-accounts/types/codec.go | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 28e7e7fde27..5e74329079f 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -27,6 +27,17 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations((*authtypes.GenesisAccount)(nil), &InterchainAccount{}) } +// JsonAny is used to serialize and deserialize messages in the Any type for json encoding. +type JsonAny struct { + TypeUrl string `json:"type_url,omitempty"` + Value []byte `json:"value,omitempty"` +} + +// JsonCosmosTx is used to serialize and deserialize messages in the CosmosTx type for json encoding. +type JsonCosmosTx struct { + Messages []*JsonAny `json:"messages,omitempty"` +} + // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are // packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx // bytes are returned. Only the ProtoCodec is supported for serializing messages. @@ -58,13 +69,6 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, err } case EncodingJSON: - type JsonAny struct { - TypeUrl string `json:"type_url,omitempty"` - Value []byte `json:"value,omitempty"` - } - type JsonCosmosTx struct { - Messages []*JsonAny `json:"messages,omitempty"` - } msgAnys := make([]*JsonAny, len(msgs)) for i, msg := range msgs { jsonValue, err := cdc.(*codec.ProtoCodec).MarshalJSON(msg) @@ -99,11 +103,11 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") } - var cosmosTx CosmosTx var msgs []sdk.Msg switch encoding { case EncodingProtobuf: + var cosmosTx CosmosTx if err := cdc.Unmarshal(data, &cosmosTx); err != nil { return nil, err } @@ -121,6 +125,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs[i] = msg } case EncodingJSON: + var cosmosTx JsonCosmosTx // This case does not rely on cdc to unpack the Any. // cdc is only used to access the interface registry. interfaceRegistry := cdc.(*codec.ProtoCodec).InterfaceRegistry() From 88fe02b574970f1c50e3166dd966d2469dd1275c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 15:29:25 +0300 Subject: [PATCH 028/121] fix(ica): fix panic if message does not implement sdk.Msg --- .../27-interchain-accounts/types/codec.go | 6 ++++- .../types/codec_test.go | 23 ++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 5e74329079f..9d2beae44e2 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -148,7 +148,11 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return nil, err } - msgs[i] = message.(sdk.Msg) + msg, ok := message.(sdk.Msg) + if !ok { + return nil, errorsmod.Wrapf(ErrUnsupported, "message %T does not implement sdk.Msg", message) + } + msgs[i] = msg } default: return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index df060e11dac..70129ce0e7f 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -208,37 +208,32 @@ func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { + bz, errSerialize := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingJSON) + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) if tc.expPass { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingJSON) - suite.Require().NoError(err, tc.name) - - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) - suite.Require().NoError(err, tc.name) - + suite.Require().NoError(errSerialize, tc.name) + suite.Require().NoError(errDeserialize, tc.name) for i, msg := range msgs { suite.Require().Equal(tc.msgs[i], msg) } } else { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingJSON) - suite.Require().Error(err, tc.name) - - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) - suite.Require().Error(err, tc.name) + suite.Require().Error(errSerialize, tc.name) + suite.Require().Error(errDeserialize, tc.name) } }) } // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingProtobuf) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingJSON) suite.Require().NoError(err) suite.Require().NotEmpty(bz) // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) suite.Require().Error(err) // unregistered type // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingProtobuf) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingJSON) suite.Require().Error(err) suite.Require().Empty(msgs) } From a42145b7829355c87c347a31aafba2dfdef95d25 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 16:18:25 +0300 Subject: [PATCH 029/121] imp(ica): improved json serde functions --- .../27-interchain-accounts/types/codec.go | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 9d2beae44e2..7979c2d0450 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -1,7 +1,6 @@ package types import ( - "bytes" "encoding/json" errorsmod "cosmossdk.io/errors" @@ -10,7 +9,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/gogoproto/proto" - "github.com/gogo/protobuf/jsonpb" ) // ModuleCdc references the global interchain accounts module codec. Note, the codec @@ -42,9 +40,9 @@ type JsonCosmosTx struct { // packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx // bytes are returned. Only the ProtoCodec is supported for serializing messages. func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding string) ([]byte, error) { - // only ProtoCodec is supported + // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") } var bz []byte @@ -126,26 +124,19 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ } case EncodingJSON: var cosmosTx JsonCosmosTx - // This case does not rely on cdc to unpack the Any. - // cdc is only used to access the interface registry. - interfaceRegistry := cdc.(*codec.ProtoCodec).InterfaceRegistry() - // this cosmosTx is not the same as the one in the protobuf case - // its Any needs to be unpacked using json instead of protobuf if err := json.Unmarshal(data, &cosmosTx); err != nil { - // TODO: not sure if this err is indeterminate - return nil, err + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") } msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { - message, err := interfaceRegistry.Resolve(jsonAny.TypeUrl) + message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(jsonAny.TypeUrl) if err != nil { return nil, err } - if err = jsonpb.Unmarshal(bytes.NewReader(jsonAny.Value), message); err != nil { - // TODO: not sure if this err is indeterminate - return nil, err + if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(jsonAny.Value, message); err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } msg, ok := message.(sdk.Msg) From 200b282619b880e33506eb437ba47398a4eafda3 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 16:22:40 +0300 Subject: [PATCH 030/121] style(ica): pleased the linter --- .../27-interchain-accounts/types/codec.go | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 7979c2d0450..3d41b8d71e6 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -25,15 +25,15 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations((*authtypes.GenesisAccount)(nil), &InterchainAccount{}) } -// JsonAny is used to serialize and deserialize messages in the Any type for json encoding. -type JsonAny struct { - TypeUrl string `json:"type_url,omitempty"` +// JSONAny is used to serialize and deserialize messages in the Any type for json encoding. +type JSONAny struct { + TypeURL string `json:"type_url,omitempty"` Value []byte `json:"value,omitempty"` } -// JsonCosmosTx is used to serialize and deserialize messages in the CosmosTx type for json encoding. -type JsonCosmosTx struct { - Messages []*JsonAny `json:"messages,omitempty"` +// JSONCosmosTx is used to serialize and deserialize messages in the CosmosTx type for json encoding. +type JSONCosmosTx struct { + Messages []*JSONAny `json:"messages,omitempty"` } // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are @@ -67,18 +67,18 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, err } case EncodingJSON: - msgAnys := make([]*JsonAny, len(msgs)) + msgAnys := make([]*JSONAny, len(msgs)) for i, msg := range msgs { jsonValue, err := cdc.(*codec.ProtoCodec).MarshalJSON(msg) if err != nil { return nil, err } - msgAnys[i] = &JsonAny{ - TypeUrl: "/" + proto.MessageName(msg), + msgAnys[i] = &JSONAny{ + TypeURL: "/" + proto.MessageName(msg), Value: jsonValue, } - cosmosTx := JsonCosmosTx{ + cosmosTx := JSONCosmosTx{ Messages: msgAnys, } @@ -123,7 +123,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs[i] = msg } case EncodingJSON: - var cosmosTx JsonCosmosTx + var cosmosTx JSONCosmosTx if err := json.Unmarshal(data, &cosmosTx); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") } @@ -131,7 +131,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { - message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(jsonAny.TypeUrl) + message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(jsonAny.TypeURL) if err != nil { return nil, err } From 9602b477175310f1526530f37a178a68634c5f79 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 16:23:22 +0300 Subject: [PATCH 031/121] style(ica): ran gofumpt --- modules/apps/27-interchain-accounts/types/codec.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 3d41b8d71e6..3ee9cab187f 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -57,11 +57,11 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, err } } - + cosmosTx := &CosmosTx{ Messages: msgAnys, } - + bz, err = cdc.Marshal(cosmosTx) if err != nil { return nil, err @@ -74,8 +74,8 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, err } msgAnys[i] = &JSONAny{ - TypeURL: "/" + proto.MessageName(msg), - Value: jsonValue, + TypeURL: "/" + proto.MessageName(msg), + Value: jsonValue, } cosmosTx := JSONCosmosTx{ From f3d987923ed52865c158112304f9ae5a0e825a82 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 16:41:53 +0300 Subject: [PATCH 032/121] fix(e2e): fix compilation errors by adding icatypes.EncodingProtobuf arg to serde functions --- e2e/tests/interchain_accounts/base_test.go | 8 ++++---- e2e/tests/interchain_accounts/gov_test.go | 2 +- e2e/tests/interchain_accounts/groups_test.go | 2 +- e2e/tests/interchain_accounts/incentivized_test.go | 4 ++-- e2e/tests/interchain_accounts/localhost_test.go | 6 +++--- e2e/tests/upgrades/upgrade_test.go | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index fbfdc886797..c31e1b63880 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -97,7 +97,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -189,7 +189,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -295,7 +295,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -370,7 +370,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 2f572c35596..2daa2be095d 100644 --- a/e2e/tests/interchain_accounts/gov_test.go +++ b/e2e/tests/interchain_accounts/gov_test.go @@ -90,7 +90,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration() } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index bf1f524f413..de24999cddb 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -162,7 +162,7 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 21af9b137dc..2d3dc532e0a 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -140,7 +140,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -309,7 +309,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index 8977f2267bf..f76079ac137 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -140,7 +140,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost( } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -297,7 +297,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -425,7 +425,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index fd972e100e6..0c8ec12be96 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -408,7 +408,7 @@ func (s *UpgradeTestSuite) TestV5ToV6ChainUpgrade() { Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), } - data, err := icatypes.SerializeCosmosTx(testsuite.Codec(), []proto.Message{msgSend}) + data, err := icatypes.SerializeCosmosTx(testsuite.Codec(), []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ From a0485f2a79787c5da94b15b3b8c804d6cc18646b Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 23:28:03 +0300 Subject: [PATCH 033/121] feat(ica.test): added important wip test for deserializing directly from cosmwasm --- .../types/codec_test.go | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 70129ce0e7f..9249e7cc284 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -37,6 +37,102 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } +func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { + var cwBytes []byte + var protoMessages []proto.Message + testCases := []struct { + name string + malleate func() + // msgs []proto.Message + expPass bool + }{ + { + "single msg", + func() { + // These bytes are serialized in cosmwasm + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + } + }, + true, + }, + // { + // "multiple msgs, same types", + // nil, + // []proto.Message{ + // &banktypes.MsgSend{ + // FromAddress: TestOwnerAddress, + // ToAddress: TestOwnerAddress, + // Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + // }, + // &banktypes.MsgSend{ + // FromAddress: TestOwnerAddress, + // ToAddress: TestOwnerAddress, + // Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), + // }, + // }, + // true, + // }, + // { + // "multiple msgs, different types", + // nil, + // []proto.Message{ + // &banktypes.MsgSend{ + // FromAddress: TestOwnerAddress, + // ToAddress: TestOwnerAddress, + // Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + // }, + // &govtypes.MsgSubmitProposal{ + // InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + // Proposer: TestOwnerAddress, + // }, + // }, + // true, + // }, + // { + // "unregistered msg type", + // nil, + // []proto.Message{ + // &mockSdkMsg{}, + // }, + // false, + // }, + // { + // "multiple unregistered msg types", + // nil, + // []proto.Message{ + // &mockSdkMsg{}, + // &mockSdkMsg{}, + // &mockSdkMsg{}, + // }, + // false, + // }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + tc.malleate() + // println("cwBytes: ", string(cwBytes)) + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, cwBytes, types.EncodingJSON) + if tc.expPass { + suite.Require().NoError(errDeserialize, tc.name) + for i, msg := range msgs { + suite.Require().Equal(protoMessages[i], msg) + } + } else { + suite.Require().Error(errDeserialize, tc.name) + } + }) + } +} + func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { testCases := []struct { name string From 7bc2f41f2984b748071a23d17c99241c4f3e9d9d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 1 Jun 2023 23:43:25 +0300 Subject: [PATCH 034/121] imp(ica.test): added a new test case to cw codec unit test --- .../types/codec_test.go | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 9249e7cc284..dcd716cdc92 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -61,23 +61,26 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { }, true, }, - // { - // "multiple msgs, same types", - // nil, - // []proto.Message{ - // &banktypes.MsgSend{ - // FromAddress: TestOwnerAddress, - // ToAddress: TestOwnerAddress, - // Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - // }, - // &banktypes.MsgSend{ - // FromAddress: TestOwnerAddress, - // ToAddress: TestOwnerAddress, - // Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), - // }, - // }, - // true, - // }, + { + "multiple msgs, same types", + func() { + // These bytes are serialized in cosmwasm + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 48, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), + }, + } + }, + true, + }, // { // "multiple msgs, different types", // nil, From 8869b7a4d99d592044e6e36a4f60c8ce0e328752 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 00:41:07 +0300 Subject: [PATCH 035/121] imp(ica): added another test case --- .../types/codec_test.go | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index dcd716cdc92..4572dedae2c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -81,22 +81,25 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { }, true, }, - // { - // "multiple msgs, different types", - // nil, - // []proto.Message{ - // &banktypes.MsgSend{ - // FromAddress: TestOwnerAddress, - // ToAddress: TestOwnerAddress, - // Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - // }, - // &govtypes.MsgSubmitProposal{ - // InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - // Proposer: TestOwnerAddress, - // }, - // }, - // true, - // }, + { + "multiple msgs, different types", + func() { + // These bytes are serialized in cosmwasm + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 103, 111, 118, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 117, 98, 109, 105, 116, 80, 114, 111, 112, 111, 115, 97, 108, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 49, 50, 53, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &govtypes.MsgSubmitProposal{ + InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Proposer: TestOwnerAddress, + }, + } + }, + true, + }, // { // "unregistered msg type", // nil, From 79877393ea9fb7cfe016b50e5172bb1e05760f97 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 00:57:43 +0300 Subject: [PATCH 036/121] imp(ica.test): added another test case --- .../27-interchain-accounts/types/codec_test.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 4572dedae2c..f8411abef25 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -100,14 +100,16 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { }, true, }, - // { - // "unregistered msg type", - // nil, - // []proto.Message{ - // &mockSdkMsg{}, - // }, - // false, - // }, + { + "unregistered msg type", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &mockSdkMsg{}, + } + }, + false, + }, // { // "multiple unregistered msg types", // nil, From fb15e553e728b1cb36ab2941e81f4a385101c3a9 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 01:03:31 +0300 Subject: [PATCH 037/121] imp(ica.test): added another test case --- .../types/codec_test.go | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index f8411abef25..d74c04eaa60 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -110,16 +110,18 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { }, false, }, - // { - // "multiple unregistered msg types", - // nil, - // []proto.Message{ - // &mockSdkMsg{}, - // &mockSdkMsg{}, - // &mockSdkMsg{}, - // }, - // false, - // }, + { + "multiple unregistered msg types", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, + } + }, + false, + }, } for _, tc := range testCases { From cb183230f7834ae84a26f603f50f782c517560cd Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 01:08:26 +0300 Subject: [PATCH 038/121] style(ica.test): improved test style --- .../types/codec_test.go | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index d74c04eaa60..6654db3eb6c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -47,9 +47,8 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { expPass bool }{ { - "single msg", + "success: single msg from cosmwasm", func() { - // These bytes are serialized in cosmwasm cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ @@ -62,9 +61,8 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { true, }, { - "multiple msgs, same types", + "success: multiple msgs, same types from cosmwasm", func() { - // These bytes are serialized in cosmwasm cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 48, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ @@ -82,9 +80,8 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { true, }, { - "multiple msgs, different types", + "success: multiple msgs, different types from cosmwasm", func() { - // These bytes are serialized in cosmwasm cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 103, 111, 118, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 117, 98, 109, 105, 116, 80, 114, 111, 112, 111, 115, 97, 108, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 49, 50, 53, 93, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ @@ -101,7 +98,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { true, }, { - "unregistered msg type", + "failure: unregistered msg type from cosmwasm", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 93, 125} protoMessages = []proto.Message{ @@ -111,7 +108,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { false, }, { - "multiple unregistered msg types", + "failure: multiple unregistered msg types from cosmwasm", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 93, 125} protoMessages = []proto.Message{ @@ -129,7 +126,6 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { suite.Run(tc.name, func() { tc.malleate() - // println("cwBytes: ", string(cwBytes)) msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, cwBytes, types.EncodingJSON) if tc.expPass { suite.Require().NoError(errDeserialize, tc.name) @@ -150,7 +146,7 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { expPass bool }{ { - "single msg", + "success: single msg, proto encoded", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -161,7 +157,7 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { true, }, { - "multiple msgs, same types", + "success: multiple msgs, same types, proto encoded", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -177,7 +173,7 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { true, }, { - "multiple msgs, different types", + "success: multiple msgs, different types, proto encoded", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -192,14 +188,14 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { true, }, { - "unregistered msg type", + "failure: unregistered msg type, proto encoded", []proto.Message{ &mockSdkMsg{}, }, false, }, { - "multiple unregistered msg types", + "failure: multiple unregistered msg types, proto encoded", []proto.Message{ &mockSdkMsg{}, &mockSdkMsg{}, @@ -251,7 +247,7 @@ func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { expPass bool }{ { - "single msg", + "success: single msg, json encoded", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -262,7 +258,7 @@ func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { true, }, { - "multiple msgs, same types", + "success: multiple msgs, same types, json encoded", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -278,7 +274,7 @@ func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { true, }, { - "multiple msgs, different types", + "success: multiple msgs, different types, json encoded", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -293,14 +289,14 @@ func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { true, }, { - "unregistered msg type", + "failure: unregistered msg type, json encoded", []proto.Message{ &mockSdkMsg{}, }, false, }, { - "multiple unregistered msg types", + "failure: multiple unregistered msg types, json encoded", []proto.Message{ &mockSdkMsg{}, &mockSdkMsg{}, From fef38717a9de6ec5b71e941864916ea8688267fa Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 01:08:55 +0300 Subject: [PATCH 039/121] style(ica.test): improved test style --- modules/apps/27-interchain-accounts/types/codec_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 6654db3eb6c..0795c289072 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -43,7 +43,6 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { testCases := []struct { name string malleate func() - // msgs []proto.Message expPass bool }{ { From 4b8c62fedf1e95da6c5a7e421f277d2be400099b Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 01:09:56 +0300 Subject: [PATCH 040/121] style(ica.test): ran gofumpt --- modules/apps/27-interchain-accounts/types/codec_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 0795c289072..e1467db785c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -41,9 +41,9 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { var cwBytes []byte var protoMessages []proto.Message testCases := []struct { - name string + name string malleate func() - expPass bool + expPass bool }{ { "success: single msg from cosmwasm", @@ -114,7 +114,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { &mockSdkMsg{}, &mockSdkMsg{}, &mockSdkMsg{}, - } + } }, false, }, From 9ed13d8b04b9f33cf6e1d82e6d9d921557f424da Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 11:33:00 +0300 Subject: [PATCH 041/121] imp(ica.test): added json encoding version string for testing --- .../27-interchain-accounts/host/keeper/keeper_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 71854cbbe16..ef153e4c341 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -27,6 +27,15 @@ var ( Encoding: icatypes.EncodingProtobuf, TxType: icatypes.TxTypeSDKMultiMsg, })) + + // TestJSONVersion defines a reusable interchainaccounts version string that uses JSON encoding for testing purposes + TestJSONVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: ibctesting.FirstConnectionID, + HostConnectionId: ibctesting.FirstConnectionID, + Encoding: icatypes.EncodingJSON, + TxType: icatypes.TxTypeSDKMultiMsg, + })) ) type KeeperTestSuite struct { From e5d6c68115abdecc6ec91ebdab7bcbb8a82c4e2d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 11:36:07 +0300 Subject: [PATCH 042/121] imp(ica.test): added new 'NewJSONICAPath' function --- .../host/keeper/keeper_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index ef153e4c341..2b643d35e36 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -68,6 +68,18 @@ func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { return path } +func NewJSONICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { + path := ibctesting.NewPath(chainA, chainB) + path.EndpointA.ChannelConfig.PortID = icatypes.HostPortID + path.EndpointB.ChannelConfig.PortID = icatypes.HostPortID + path.EndpointA.ChannelConfig.Order = channeltypes.ORDERED + path.EndpointB.ChannelConfig.Order = channeltypes.ORDERED + path.EndpointA.ChannelConfig.Version = TestJSONVersion + path.EndpointB.ChannelConfig.Version = TestJSONVersion + + return path +} + // SetupICAPath invokes the InterchainAccounts entrypoint and subsequent channel handshake handlers func SetupICAPath(path *ibctesting.Path, owner string) error { if err := RegisterInterchainAccount(path.EndpointA, owner); err != nil { From 483937d4783a85034abc539799ff57919c0a9752 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 12:12:15 +0300 Subject: [PATCH 043/121] imp(ica.test): added encoding field to ica test setup functions --- .../host/keeper/keeper_test.go | 59 +++++++++++-------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 2b643d35e36..8e24ccae686 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -56,33 +56,32 @@ func (suite *KeeperTestSuite) SetupTest() { suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3)) } -func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { +func NewICAPath(chainA, chainB *ibctesting.TestChain, encoding string) *ibctesting.Path { path := ibctesting.NewPath(chainA, chainB) - path.EndpointA.ChannelConfig.PortID = icatypes.HostPortID - path.EndpointB.ChannelConfig.PortID = icatypes.HostPortID - path.EndpointA.ChannelConfig.Order = channeltypes.ORDERED - path.EndpointB.ChannelConfig.Order = channeltypes.ORDERED - path.EndpointA.ChannelConfig.Version = TestVersion - path.EndpointB.ChannelConfig.Version = TestVersion - return path -} + var version string + switch encoding { + case icatypes.EncodingProtobuf: + version = TestVersion + case icatypes.EncodingJSON: + version = TestJSONVersion + default: + panic("unsupported encoding") + } -func NewJSONICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { - path := ibctesting.NewPath(chainA, chainB) path.EndpointA.ChannelConfig.PortID = icatypes.HostPortID path.EndpointB.ChannelConfig.PortID = icatypes.HostPortID path.EndpointA.ChannelConfig.Order = channeltypes.ORDERED path.EndpointB.ChannelConfig.Order = channeltypes.ORDERED - path.EndpointA.ChannelConfig.Version = TestJSONVersion - path.EndpointB.ChannelConfig.Version = TestJSONVersion + path.EndpointA.ChannelConfig.Version = version + path.EndpointB.ChannelConfig.Version = version return path } // SetupICAPath invokes the InterchainAccounts entrypoint and subsequent channel handshake handlers -func SetupICAPath(path *ibctesting.Path, owner string) error { - if err := RegisterInterchainAccount(path.EndpointA, owner); err != nil { +func SetupICAPath(path *ibctesting.Path, owner string, encoding string) error { + if err := RegisterInterchainAccount(path.EndpointA, owner, encoding); err != nil { return err } @@ -98,7 +97,7 @@ func SetupICAPath(path *ibctesting.Path, owner string) error { } // RegisterInterchainAccount is a helper function for starting the channel handshake -func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) error { +func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string, encoding string) error { portID, err := icatypes.NewControllerPortID(owner) if err != nil { return err @@ -106,7 +105,17 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, TestVersion); err != nil { + var version string + switch encoding { + case icatypes.EncodingProtobuf: + version = TestVersion + case icatypes.EncodingJSON: + version = TestJSONVersion + default: + return icatypes.ErrUnsupportedEncoding + } + + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, version); err != nil { return err } @@ -127,10 +136,10 @@ func TestKeeperTestSuite(t *testing.T) { func (suite *KeeperTestSuite) TestGetInterchainAccountAddress() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) counterpartyPortID := path.EndpointA.ChannelConfig.PortID @@ -152,10 +161,10 @@ func (suite *KeeperTestSuite) TestGetAllActiveChannels() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) suite.chainB.GetSimApp().ICAHostKeeper.SetActiveChannelID(suite.chainB.GetContext(), ibctesting.FirstConnectionID, expectedPortID, expectedChannelID) @@ -186,10 +195,10 @@ func (suite *KeeperTestSuite) TestGetAllInterchainAccounts() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) interchainAccAddr, exists := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) @@ -218,10 +227,10 @@ func (suite *KeeperTestSuite) TestGetAllInterchainAccounts() { func (suite *KeeperTestSuite) TestIsActiveChannel() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) isActive := suite.chainB.GetSimApp().ICAHostKeeper.IsActiveChannel(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) From 99fb8e8994edbd58339f2cc43f5764da95a6bdbe Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 12:15:19 +0300 Subject: [PATCH 044/121] fix(ica.test): fixed test setups using the new encoding field --- .../host/keeper/genesis_test.go | 4 ++-- .../host/keeper/handshake_test.go | 14 +++++++------- .../host/keeper/relay_test.go | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go index 8e9893be333..cb61fb861fe 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go @@ -109,10 +109,10 @@ func (suite *KeeperTestSuite) TestGenesisParams() { func (suite *KeeperTestSuite) TestExportGenesis() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) interchainAccAddr, exists := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) diff --git a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go index 4712aac2c5a..8639048a3d6 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go @@ -30,7 +30,7 @@ func (suite *KeeperTestSuite) openAndCloseChannel(path *ibctesting.Path) { suite.Require().NoError(err) path.EndpointA.ChannelID = "" - err = RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) + err = RegisterInterchainAccount(path.EndpointA, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) // bump channel sequence as these test mock core IBC behaviour on ChanOpenTry @@ -274,10 +274,10 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { suite.Run(tc.name, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) + err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) // set the channel id on host @@ -354,10 +354,10 @@ func (suite *KeeperTestSuite) TestOnChanOpenConfirm() { suite.Run(tc.name, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) + err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) err = path.EndpointB.ChanOpenTry() @@ -397,10 +397,10 @@ func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { suite.Run(tc.name, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) tc.malleate() // malleate mutates test data diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index e368b22a8d2..4464a252899 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -18,7 +18,7 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ) -func (suite *KeeperTestSuite) TestOnRecvPacket() { +func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { var ( path *ibctesting.Path packetData []byte @@ -454,10 +454,10 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) suite.Require().NoError(err) portID, err := icatypes.NewControllerPortID(TestOwnerAddress) From 1ee1fa70fb66265f39a0a253cf3a6cb31a99a2e5 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 12:25:04 +0300 Subject: [PATCH 045/121] feat(ica.test): added json test case --- .../host/keeper/relay_test.go | 155 +++++++++--------- 1 file changed, 79 insertions(+), 76 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 4464a252899..4edbba13da1 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -18,7 +18,8 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ) -func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { +func (suite *KeeperTestSuite) TestOnRecvPacket() { + testedEncodings := []string{icatypes.EncodingProtobuf, icatypes.EncodingJSON} var ( path *ibctesting.Path packetData []byte @@ -26,12 +27,12 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { testCases := []struct { msg string - malleate func() + malleate func(encoding string) expPass bool }{ { "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -56,7 +57,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -73,7 +74,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes banktypes.MsgSend", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -83,7 +84,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -100,7 +101,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes stakingtypes.MsgDelegate", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -111,7 +112,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -128,7 +129,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes stakingtypes.MsgDelegate and stakingtypes.MsgUndelegate sequentially", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -145,7 +146,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -162,7 +163,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgSubmitProposal", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -180,7 +181,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Proposer: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -197,7 +198,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgVote", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -222,7 +223,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -239,7 +240,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes disttypes.MsgFundCommunityPool", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -248,7 +249,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { Depositor: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -265,7 +266,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes disttypes.MsgSetWithdrawAddress", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -274,7 +275,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { WithdrawAddress: suite.chainB.SenderAccount.GetAddress().String(), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -291,7 +292,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "interchain account successfully executes transfertypes.MsgTransfer", - func() { + func(encoding string) { transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort @@ -313,7 +314,7 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { TimeoutTimestamp: uint64(0), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -330,10 +331,10 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "unregistered sdk.Msg", - func() { + func(encoding string) { msg := &banktypes.MsgSendResponse{} - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -350,14 +351,14 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "cannot unmarshal interchain account packet data", - func() { + func(encoding string) { packetData = []byte{} }, false, }, { "cannot deserialize interchain account packet data messages", - func() { + func(encoding string) { data := []byte("invalid packet data") icaPacketData := icatypes.InterchainAccountPacketData{ @@ -371,8 +372,8 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "invalid packet type - UNSPECIFIED", - func() { - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) + func(encoding string) { + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -386,10 +387,10 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "unauthorised: interchain account not found for controller port ID", - func() { + func(encoding string) { path.EndpointA.ChannelConfig.PortID = "invalid-port-id" - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -403,14 +404,14 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "unauthorised: message type not allowed", // NOTE: do not update params to explicitly force the error - func() { + func(encoding string) { msg := &banktypes.MsgSend{ FromAddress: suite.chainB.SenderAccount.GetAddress().String(), ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -424,14 +425,14 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, { "unauthorised: signer address is not the interchain account associated with the controller portID", - func() { + func(encoding string) { msg := &banktypes.MsgSend{ FromAddress: suite.chainB.SenderAccount.GetAddress().String(), // unexpected signer ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -448,57 +449,59 @@ func (suite *KeeperTestSuite) TestProtoOnRecvPacket() { }, } - for _, tc := range testCases { - tc := tc + for _, encoding := range testedEncodings { + for _, tc := range testCases { + tc := tc - suite.Run(tc.msg, func() { - suite.SetupTest() // reset + suite.Run(tc.msg, func() { + suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) - suite.coordinator.SetupConnections(path) + path = NewICAPath(suite.chainA, suite.chainB, encoding) + suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) - suite.Require().NoError(err) - - portID, err := icatypes.NewControllerPortID(TestOwnerAddress) - suite.Require().NoError(err) - - // Get the address of the interchain account stored in state during handshake step - storedAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID) - suite.Require().True(found) - - icaAddr, err := sdk.AccAddressFromBech32(storedAddr) - suite.Require().NoError(err) - - // Check if account is created - interchainAccount := suite.chainB.GetSimApp().AccountKeeper.GetAccount(suite.chainB.GetContext(), icaAddr) - suite.Require().Equal(interchainAccount.GetAddress().String(), storedAddr) - - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) - - tc.malleate() // malleate mutates test data + err := SetupICAPath(path, TestOwnerAddress, encoding) + suite.Require().NoError(err) - packet := channeltypes.NewPacket( - packetData, - suite.chainA.SenderAccount.GetSequence(), - path.EndpointA.ChannelConfig.PortID, - path.EndpointA.ChannelID, - path.EndpointB.ChannelConfig.PortID, - path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), - 0, - ) + portID, err := icatypes.NewControllerPortID(TestOwnerAddress) + suite.Require().NoError(err) - txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + // Get the address of the interchain account stored in state during handshake step + storedAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID) + suite.Require().True(found) - if tc.expPass { + icaAddr, err := sdk.AccAddressFromBech32(storedAddr) suite.Require().NoError(err) - suite.Require().NotNil(txResponse) - } else { - suite.Require().Error(err) - suite.Require().Nil(txResponse) - } - }) + + // Check if account is created + interchainAccount := suite.chainB.GetSimApp().AccountKeeper.GetAccount(suite.chainB.GetContext(), icaAddr) + suite.Require().Equal(interchainAccount.GetAddress().String(), storedAddr) + + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) + + tc.malleate(encoding) // malleate mutates test data + + packet := channeltypes.NewPacket( + packetData, + suite.chainA.SenderAccount.GetSequence(), + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + clienttypes.NewHeight(1, 100), + 0, + ) + + txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(txResponse) + } else { + suite.Require().Error(err) + suite.Require().Nil(txResponse) + } + }) + } } } From 550a3141e55cc077d692f0f016f6491ac68f5c8e Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 13:23:07 +0300 Subject: [PATCH 046/121] style(ica.test): ran gofumpt --- modules/apps/27-interchain-accounts/host/keeper/keeper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 8e24ccae686..94714dad9bf 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -114,7 +114,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string, enco default: return icatypes.ErrUnsupportedEncoding } - + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, version); err != nil { return err } From 53aeadd34be7553d41691d05a2eea4c911cd8192 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 15:01:22 +0300 Subject: [PATCH 047/121] feat(ica.test): got two cases of cosmwasm tests working in relay --- .../host/keeper/relay_test.go | 457 ++++++++++++++++++ 1 file changed, 457 insertions(+) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 4edbba13da1..57e8f1f2585 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -3,6 +3,7 @@ package keeper_test import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -18,6 +19,452 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ) +func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { + var ( + path *ibctesting.Path + packetData []byte + ) + var ( + cwWalletOne = "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" + cwWalletTwo = "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" + ) + + testCases := []struct { + msg string + malleate func(encoding string) + expPass bool + }{ + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func(encoding string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + // msg := &govtypes.MsgVote{ + // ProposalId: govtypes.DefaultStartingProposalID, + // Voter: cwWalletOne, + // Option: govtypes.OptionYes, + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes banktypes.MsgSend from cosmwasm", + func(encoding string) { + msg := &banktypes.MsgSend{ + FromAddress: cwWalletOne, + ToAddress: cwWalletTwo, + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + // { + // "interchain account successfully executes stakingtypes.MsgDelegate and stakingtypes.MsgUndelegate sequentially", + // func(encoding string) { + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // validatorAddr := (sdk.ValAddress)(suite.chainB.Vals.Validators[0].Address) + // msgDelegate := &stakingtypes.MsgDelegate{ + // DelegatorAddress: interchainAccountAddr, + // ValidatorAddress: validatorAddr.String(), + // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + // } + + // msgUndelegate := &stakingtypes.MsgUndelegate{ + // DelegatorAddress: interchainAccountAddr, + // ValidatorAddress: validatorAddr.String(), + // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msgDelegate), sdk.MsgTypeURL(msgUndelegate)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, + // { + // "interchain account successfully executes govtypes.MsgSubmitProposal", + // func(encoding string) { + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // testProposal := &govtypes.TextProposal{ + // Title: "IBC Gov Proposal", + // Description: "tokens for all!", + // } + + // protoAny, err := codectypes.NewAnyWithValue(testProposal) + // suite.Require().NoError(err) + + // msg := &govtypes.MsgSubmitProposal{ + // Content: protoAny, + // InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + // Proposer: interchainAccountAddr, + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, + // { + // "interchain account successfully executes govtypes.MsgVote", + // func(encoding string) { + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // // Populate the gov keeper in advance with an active proposal + // testProposal := &govtypes.TextProposal{ + // Title: "IBC Gov Proposal", + // Description: "tokens for all!", + // } + + // proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + // suite.Require().NoError(err) + + // proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) + // suite.Require().NoError(err) + + // suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + // suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + // msg := &govtypes.MsgVote{ + // ProposalId: govtypes.DefaultStartingProposalID, + // Voter: interchainAccountAddr, + // Option: govtypes.OptionYes, + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, + // { + // "interchain account successfully executes disttypes.MsgFundCommunityPool", + // func(encoding string) { + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // msg := &disttypes.MsgFundCommunityPool{ + // Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + // Depositor: interchainAccountAddr, + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, + // { + // "interchain account successfully executes disttypes.MsgSetWithdrawAddress", + // func(encoding string) { + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // msg := &disttypes.MsgSetWithdrawAddress{ + // DelegatorAddress: interchainAccountAddr, + // WithdrawAddress: suite.chainB.SenderAccount.GetAddress().String(), + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, + // { + // "interchain account successfully executes transfertypes.MsgTransfer", + // func(encoding string) { + // transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) + // transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort + // transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort + // transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version + // transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version + + // suite.coordinator.Setup(transferPath) + + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // msg := &transfertypes.MsgTransfer{ + // SourcePort: transferPath.EndpointA.ChannelConfig.PortID, + // SourceChannel: transferPath.EndpointA.ChannelID, + // Token: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)), + // Sender: interchainAccountAddr, + // Receiver: suite.chainA.SenderAccount.GetAddress().String(), + // TimeoutHeight: clienttypes.NewHeight(1, 100), + // TimeoutTimestamp: uint64(0), + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, + // { + // "unregistered sdk.Msg", + // func(encoding string) { + // msg := &banktypes.MsgSendResponse{} + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{"/" + proto.MessageName(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // false, + // }, + // { + // "cannot unmarshal interchain account packet data", + // func(encoding string) { + // packetData = []byte{} + // }, + // false, + // }, + // { + // "cannot deserialize interchain account packet data messages", + // func(encoding string) { + // data := []byte("invalid packet data") + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + // }, + // false, + // }, + // { + // "invalid packet type - UNSPECIFIED", + // func(encoding string) { + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.UNSPECIFIED, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + // }, + // false, + // }, + // { + // "unauthorised: interchain account not found for controller port ID", + // func(encoding string) { + // path.EndpointA.ChannelConfig.PortID = "invalid-port-id" + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + // }, + // false, + // }, + // { + // "unauthorised: message type not allowed", // NOTE: do not update params to explicitly force the error + // func(encoding string) { + // msg := &banktypes.MsgSend{ + // FromAddress: suite.chainB.SenderAccount.GetAddress().String(), + // ToAddress: suite.chainB.SenderAccount.GetAddress().String(), + // Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + // }, + // false, + // }, + // { + // "unauthorised: signer address is not the interchain account associated with the controller portID", + // func(encoding string) { + // msg := &banktypes.MsgSend{ + // FromAddress: suite.chainB.SenderAccount.GetAddress().String(), // unexpected signer + // ToAddress: suite.chainB.SenderAccount.GetAddress().String(), + // Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // false, + // }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.msg, func() { + suite.SetupTest() // reset + + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) + suite.coordinator.SetupConnections(path) + + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) + suite.Require().NoError(err) + + portID, err := icatypes.NewControllerPortID(TestOwnerAddress) + suite.Require().NoError(err) + + // Set the address of the interchain account stored in state during handshake step for cosmwasm testing + suite.setICAWallet( suite.chainB.GetContext(), portID, cwWalletOne) + + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) + + tc.malleate(icatypes.EncodingJSON) // malleate mutates test data + + packet := channeltypes.NewPacket( + packetData, + suite.chainA.SenderAccount.GetSequence(), + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + clienttypes.NewHeight(1, 100), + 0, + ) + + txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(txResponse) + } else { + suite.Require().Error(err) + suite.Require().Nil(txResponse) + } + }) + } +} + func (suite *KeeperTestSuite) TestOnRecvPacket() { testedEncodings := []string{icatypes.EncodingProtobuf, icatypes.EncodingJSON} var ( @@ -519,3 +966,13 @@ func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amou suite.Require().NotEmpty(res) suite.Require().NoError(err) } + +// This function is used to predetermine the address of the interchain account for testing +func (suite *KeeperTestSuite) setICAWallet(ctx sdk.Context, portID string, address string) { + icaAddr, err := sdk.AccAddressFromBech32(address) + suite.Require().NoError(err) + interchainAccount := authtypes.NewBaseAccountWithAddress(icaAddr) + suite.chainB.GetSimApp().ICAHostKeeper.SetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID, address) + suite.chainB.GetSimApp().AccountKeeper.SetAccount(suite.chainB.GetContext(), interchainAccount) + suite.Require().Equal(interchainAccount.GetAddress().String(), icaAddr.String()) +} \ No newline at end of file From 2dc24bdb4421ce8eed4a07c629df9a9910240174 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 15:03:40 +0300 Subject: [PATCH 048/121] style(ica.test): ran gofumpt --- .../host/keeper/relay_test.go | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 57e8f1f2585..a7af6f51562 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -419,50 +419,50 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // }, } - for _, tc := range testCases { - tc := tc + for _, tc := range testCases { + tc := tc - suite.Run(tc.msg, func() { - suite.SetupTest() // reset + suite.Run(tc.msg, func() { + suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) - suite.coordinator.SetupConnections(path) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) + suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) - suite.Require().NoError(err) + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) + suite.Require().NoError(err) - portID, err := icatypes.NewControllerPortID(TestOwnerAddress) - suite.Require().NoError(err) + portID, err := icatypes.NewControllerPortID(TestOwnerAddress) + suite.Require().NoError(err) - // Set the address of the interchain account stored in state during handshake step for cosmwasm testing - suite.setICAWallet( suite.chainB.GetContext(), portID, cwWalletOne) + // Set the address of the interchain account stored in state during handshake step for cosmwasm testing + suite.setICAWallet(suite.chainB.GetContext(), portID, cwWalletOne) - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) - tc.malleate(icatypes.EncodingJSON) // malleate mutates test data + tc.malleate(icatypes.EncodingJSON) // malleate mutates test data - packet := channeltypes.NewPacket( - packetData, - suite.chainA.SenderAccount.GetSequence(), - path.EndpointA.ChannelConfig.PortID, - path.EndpointA.ChannelID, - path.EndpointB.ChannelConfig.PortID, - path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), - 0, - ) + packet := channeltypes.NewPacket( + packetData, + suite.chainA.SenderAccount.GetSequence(), + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + clienttypes.NewHeight(1, 100), + 0, + ) - txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) - if tc.expPass { - suite.Require().NoError(err) - suite.Require().NotNil(txResponse) - } else { - suite.Require().Error(err) - suite.Require().Nil(txResponse) - } - }) - } + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(txResponse) + } else { + suite.Require().Error(err) + suite.Require().Nil(txResponse) + } + }) + } } func (suite *KeeperTestSuite) TestOnRecvPacket() { @@ -975,4 +975,4 @@ func (suite *KeeperTestSuite) setICAWallet(ctx sdk.Context, portID string, addre suite.chainB.GetSimApp().ICAHostKeeper.SetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID, address) suite.chainB.GetSimApp().AccountKeeper.SetAccount(suite.chainB.GetContext(), interchainAccount) suite.Require().Equal(interchainAccount.GetAddress().String(), icaAddr.String()) -} \ No newline at end of file +} From f033903433d8e0a3ed082f021b82442ffcb541c0 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 23:24:43 +0300 Subject: [PATCH 049/121] feat(ica): started progress on recursive handling of Anys --- .../apps/27-interchain-accounts/types/codec.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 3ee9cab187f..c1a9db525d1 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -2,6 +2,7 @@ package types import ( "encoding/json" + "reflect" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -135,6 +136,20 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ if err != nil { return nil, err } + // Check if message has Any fields + val := reflect.ValueOf(&message).Elem() + for i := 0; i < val.NumField(); i++ { + field := val.Field(i) + fieldType := field.Type() + + if fieldType == reflect.TypeOf(codectypes.Any{}) { + newValue := processAnyField() + + // Set back the new value + field.Set(reflect.ValueOf(newValue)) + } + } + if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(jsonAny.Value, message); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } From 509b625109d11b03809dc2da14828211b126aad3 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 2 Jun 2023 23:25:18 +0300 Subject: [PATCH 050/121] imp(ica.test): added a new test case for ica json encoding, this fails --- .../host/keeper/relay_test.go | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index a7af6f51562..0b77c4b6914 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -131,41 +131,41 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // }, // true, // }, - // { - // "interchain account successfully executes govtypes.MsgSubmitProposal", - // func(encoding string) { - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) + { + "interchain account successfully executes govtypes.MsgSubmitProposal", + func(encoding string) { + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } - // testProposal := &govtypes.TextProposal{ - // Title: "IBC Gov Proposal", - // Description: "tokens for all!", - // } + println("testProposal: ", proto.MessageName(testProposal)) - // protoAny, err := codectypes.NewAnyWithValue(testProposal) - // suite.Require().NoError(err) + protoAny, err := codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) - // msg := &govtypes.MsgSubmitProposal{ - // Content: protoAny, - // InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), - // Proposer: interchainAccountAddr, - // } + msg := &govtypes.MsgSubmitProposal{ + Content: protoAny, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: cwWalletOne, + } - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } - // packetData = icaPacketData.GetBytes() + // packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, // { // "interchain account successfully executes govtypes.MsgVote", // func(encoding string) { From 3daf6e274ef8260499aeb5856e08b00ec854c0ec Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sat, 3 Jun 2023 21:35:43 +0300 Subject: [PATCH 051/121] feat(ica): achieved total json serialization (excluding any lists) --- .../host/keeper/relay_test.go | 8 +- .../27-interchain-accounts/types/codec.go | 92 ++++++++++++++++++- 2 files changed, 92 insertions(+), 8 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 0b77c4b6914..53a6906b8e7 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -26,7 +26,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { ) var ( cwWalletOne = "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - cwWalletTwo = "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" + // cwWalletTwo = "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" ) testCases := []struct { @@ -34,6 +34,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { malleate func(encoding string) expPass bool }{ + /* { "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", func(encoding string) { @@ -131,6 +132,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // }, // true, // }, + */ { "interchain account successfully executes govtypes.MsgSubmitProposal", func(encoding string) { @@ -158,9 +160,9 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // Data: data, // } - // packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + // packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index c1a9db525d1..2ed7e90bcb8 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -3,6 +3,7 @@ package types import ( "encoding/json" "reflect" + "strings" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -132,25 +133,45 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { + var jsonMap map[string]interface{} + if err := json.Unmarshal(jsonAny.Value, &jsonMap); err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") + } message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(jsonAny.TypeURL) if err != nil { - return nil, err + return nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", jsonAny.TypeURL) } // Check if message has Any fields - val := reflect.ValueOf(&message).Elem() + val := reflect.ValueOf(message).Elem() for i := 0; i < val.NumField(); i++ { field := val.Field(i) fieldType := field.Type() + fieldJSONName := val.Type().Field(i).Tag.Get("json") + // Remove ,omitempty if it's present + fieldJSONName = strings.Split(fieldJSONName, ",")[0] - if fieldType == reflect.TypeOf(codectypes.Any{}) { - newValue := processAnyField() + if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { + // TODO: Make sure none of these panic. + subJsonAnyMap := jsonMap[fieldJSONName].(map[string]interface{}) + newValue, err := processAnyField(cdc, subJsonAnyMap) + if err != nil { + return nil, err + } // Set back the new value field.Set(reflect.ValueOf(newValue)) + // Remove this field from jsonMap + delete(jsonMap, fieldJSONName) } } + + // Marshal the map back to a byte slice + modifiedJsonAnyValue, err := json.Marshal(jsonMap) + if err != nil { + return nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") + } - if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(jsonAny.Value, message); err != nil { + if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJsonAnyValue, message); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } @@ -166,3 +187,64 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return msgs, nil } + +func processAnyField(cdc codec.BinaryCodec, jsonAnyMap map[string]interface{}) (*codectypes.Any, error) { + // get the type_url field + typeURL := jsonAnyMap["type_url"].(string) + // get uninitialized proto.Message + message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(typeURL) + if err != nil { + return nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", typeURL) + } + + // get the value field + valueInterfaceSlice, ok := jsonAnyMap["value"].([]interface{}) + if !ok { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert value to []interface{}") + } + valueByteSlice := make([]byte, len(valueInterfaceSlice)) + for i, v := range valueInterfaceSlice { + valueByte := byte(v.(float64)) + valueByteSlice[i] = valueByte + } + var jsonMap map[string]interface{} + if err := json.Unmarshal(valueByteSlice, &jsonMap); err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") + } + + // Check if message has Any fields + val := reflect.ValueOf(message).Elem() + for i := 0; i < val.NumField(); i++ { + field := val.Field(i) + fieldType := field.Type() + fieldJSONName := val.Type().Field(i).Tag.Get("json") + // Remove ,omitempty if it's present + fieldJSONName = strings.Split(fieldJSONName, ",")[0] + + if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { + // TODO: Make sure none of these panic. + subJsonAnyMap := jsonMap[fieldJSONName].(map[string]interface{}) + protoAny, err := processAnyField(cdc, subJsonAnyMap) + if err != nil { + return nil, err + } + + // Set back the new value + field.Set(reflect.ValueOf(protoAny)) + // Remove this field from jsonAnyMap + delete(jsonMap, fieldJSONName) + } + } + + // Marshal the map back to a byte slice + modifiedJsonAnyValue, err := json.Marshal(jsonMap) + if err != nil { + return nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") + } + + if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJsonAnyValue, message); err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the json message") + } + + return codectypes.NewAnyWithValue(message) +} \ No newline at end of file From 1e8cbe37f680365189ba65107d0fa77d69e6e7e1 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 4 Jun 2023 00:09:45 +0300 Subject: [PATCH 052/121] refactor(ica): made function shorter and removed duplicated code --- .../27-interchain-accounts/types/codec.go | 91 +++++++------------ 1 file changed, 34 insertions(+), 57 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 2ed7e90bcb8..ac79381c31a 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -133,45 +133,8 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { - var jsonMap map[string]interface{} - if err := json.Unmarshal(jsonAny.Value, &jsonMap); err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") - } - message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(jsonAny.TypeURL) - if err != nil { - return nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", jsonAny.TypeURL) - } - // Check if message has Any fields - val := reflect.ValueOf(message).Elem() - for i := 0; i < val.NumField(); i++ { - field := val.Field(i) - fieldType := field.Type() - fieldJSONName := val.Type().Field(i).Tag.Get("json") - // Remove ,omitempty if it's present - fieldJSONName = strings.Split(fieldJSONName, ",")[0] - - if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { - // TODO: Make sure none of these panic. - subJsonAnyMap := jsonMap[fieldJSONName].(map[string]interface{}) - newValue, err := processAnyField(cdc, subJsonAnyMap) - if err != nil { - return nil, err - } - - // Set back the new value - field.Set(reflect.ValueOf(newValue)) - // Remove this field from jsonMap - delete(jsonMap, fieldJSONName) - } - } - - // Marshal the map back to a byte slice - modifiedJsonAnyValue, err := json.Marshal(jsonMap) + _, message, err := processJsonAny(cdc, jsonAny) if err != nil { - return nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") - } - - if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJsonAnyValue, message); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } @@ -188,28 +151,21 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return msgs, nil } -func processAnyField(cdc codec.BinaryCodec, jsonAnyMap map[string]interface{}) (*codectypes.Any, error) { +func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { // get the type_url field - typeURL := jsonAnyMap["type_url"].(string) + typeURL := jsonAny.TypeURL // get uninitialized proto.Message message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(typeURL) if err != nil { - return nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", typeURL) + return nil, nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", typeURL) } // get the value field - valueInterfaceSlice, ok := jsonAnyMap["value"].([]interface{}) - if !ok { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert value to []interface{}") - } - valueByteSlice := make([]byte, len(valueInterfaceSlice)) - for i, v := range valueInterfaceSlice { - valueByte := byte(v.(float64)) - valueByteSlice[i] = valueByte - } + + value := jsonAny.Value var jsonMap map[string]interface{} - if err := json.Unmarshal(valueByteSlice, &jsonMap); err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") + if err := json.Unmarshal(value, &jsonMap); err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") } // Check if message has Any fields @@ -224,9 +180,25 @@ func processAnyField(cdc codec.BinaryCodec, jsonAnyMap map[string]interface{}) ( if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { // TODO: Make sure none of these panic. subJsonAnyMap := jsonMap[fieldJSONName].(map[string]interface{}) - protoAny, err := processAnyField(cdc, subJsonAnyMap) + subJsonAnyTypeURL := subJsonAnyMap["type_url"].(string) + valueInterfaceSlice, ok := subJsonAnyMap["value"].([]interface{}) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert value to []interface{}") + } + + valueByteSlice := make([]byte, len(valueInterfaceSlice)) + for i, v := range valueInterfaceSlice { + valueByte := byte(v.(float64)) + valueByteSlice[i] = valueByte + } + subJsonAny := &JSONAny{ + TypeURL: subJsonAnyTypeURL, + Value: valueByteSlice, + } + + protoAny, _, err := processJsonAny(cdc, subJsonAny) if err != nil { - return nil, err + return nil, nil, err } // Set back the new value @@ -239,12 +211,17 @@ func processAnyField(cdc codec.BinaryCodec, jsonAnyMap map[string]interface{}) ( // Marshal the map back to a byte slice modifiedJsonAnyValue, err := json.Marshal(jsonMap) if err != nil { - return nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") + return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") } if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJsonAnyValue, message); err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the json message") + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the json message") + } + + result, err := codectypes.NewAnyWithValue(message) + if err != nil { + return nil, nil, errorsmod.Wrapf(err, "cannot pack the message into Any") } - return codectypes.NewAnyWithValue(message) + return result, message, nil } \ No newline at end of file From 2d500346573eac045aa8d8f2b377229541eeffa3 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 4 Jun 2023 00:12:34 +0300 Subject: [PATCH 053/121] style(ica): ran gofumpt --- .../host/keeper/relay_test.go | 182 +++++++++--------- .../27-interchain-accounts/types/codec.go | 12 +- 2 files changed, 96 insertions(+), 98 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 53a6906b8e7..20bbecf0915 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -24,10 +24,8 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { path *ibctesting.Path packetData []byte ) - var ( - cwWalletOne = "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - // cwWalletTwo = "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" - ) + cwWalletOne := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" + // cwWalletTwo = "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" testCases := []struct { msg string @@ -35,103 +33,103 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { expPass bool }{ /* - { - "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func(encoding string) { - // Populate the gov keeper in advance with an active proposal - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) - suite.Require().NoError(err) + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func(encoding string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) + suite.Require().NoError(err) - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) - suite.Require().NoError(err) + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) + suite.Require().NoError(err) - suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - // msg := &govtypes.MsgVote{ - // ProposalId: govtypes.DefaultStartingProposalID, - // Voter: cwWalletOne, - // Option: govtypes.OptionYes, - // } + // msg := &govtypes.MsgVote{ + // ProposalId: govtypes.DefaultStartingProposalID, + // Voter: cwWalletOne, + // Option: govtypes.OptionYes, + // } - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{"*"}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, }, - true, - }, - { - "interchain account successfully executes banktypes.MsgSend from cosmwasm", - func(encoding string) { - msg := &banktypes.MsgSend{ - FromAddress: cwWalletOne, - ToAddress: cwWalletTwo, - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), - } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + { + "interchain account successfully executes banktypes.MsgSend from cosmwasm", + func(encoding string) { + msg := &banktypes.MsgSend{ + FromAddress: cwWalletOne, + ToAddress: cwWalletTwo, + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, }, - true, - }, - // { - // "interchain account successfully executes stakingtypes.MsgDelegate and stakingtypes.MsgUndelegate sequentially", - // func(encoding string) { - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) - - // validatorAddr := (sdk.ValAddress)(suite.chainB.Vals.Validators[0].Address) - // msgDelegate := &stakingtypes.MsgDelegate{ - // DelegatorAddress: interchainAccountAddr, - // ValidatorAddress: validatorAddr.String(), - // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - // } - - // msgUndelegate := &stakingtypes.MsgUndelegate{ - // DelegatorAddress: interchainAccountAddr, - // ValidatorAddress: validatorAddr.String(), - // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msgDelegate), sdk.MsgTypeURL(msgUndelegate)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, + // { + // "interchain account successfully executes stakingtypes.MsgDelegate and stakingtypes.MsgUndelegate sequentially", + // func(encoding string) { + // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + // suite.Require().True(found) + + // validatorAddr := (sdk.ValAddress)(suite.chainB.Vals.Validators[0].Address) + // msgDelegate := &stakingtypes.MsgDelegate{ + // DelegatorAddress: interchainAccountAddr, + // ValidatorAddress: validatorAddr.String(), + // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + // } + + // msgUndelegate := &stakingtypes.MsgUndelegate{ + // DelegatorAddress: interchainAccountAddr, + // ValidatorAddress: validatorAddr.String(), + // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + // } + + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, encoding) + // suite.Require().NoError(err) + + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } + + // packetData = icaPacketData.GetBytes() + + // params := types.NewParams(true, []string{sdk.MsgTypeURL(msgDelegate), sdk.MsgTypeURL(msgUndelegate)}) + // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + // }, + // true, + // }, */ { "interchain account successfully executes govtypes.MsgSubmitProposal", diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index ac79381c31a..1dd73dcec4a 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -183,19 +183,19 @@ func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p subJsonAnyTypeURL := subJsonAnyMap["type_url"].(string) valueInterfaceSlice, ok := subJsonAnyMap["value"].([]interface{}) if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert value to []interface{}") + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert value to []interface{}") } valueByteSlice := make([]byte, len(valueInterfaceSlice)) for i, v := range valueInterfaceSlice { - valueByte := byte(v.(float64)) - valueByteSlice[i] = valueByte + valueByte := byte(v.(float64)) + valueByteSlice[i] = valueByte } subJsonAny := &JSONAny{ TypeURL: subJsonAnyTypeURL, Value: valueByteSlice, } - + protoAny, _, err := processJsonAny(cdc, subJsonAny) if err != nil { return nil, nil, err @@ -213,7 +213,7 @@ func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p if err != nil { return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") } - + if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJsonAnyValue, message); err != nil { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the json message") } @@ -224,4 +224,4 @@ func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p } return result, message, nil -} \ No newline at end of file +} From 86e540797bfea70cdaf18a4a82396e789fb29709 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 4 Jun 2023 13:23:05 +0300 Subject: [PATCH 054/121] imp(ica): added more err handling code --- .../host/keeper/relay_test.go | 23 +++++++++-- .../27-interchain-accounts/types/codec.go | 38 +++++++++++++------ 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 20bbecf0915..aaf5661fb0d 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "encoding/json" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -619,11 +621,26 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Description: "tokens for all!", } - protoAny, err := codectypes.NewAnyWithValue(testProposal) - suite.Require().NoError(err) + var err error + var content *codectypes.Any + switch encoding { + case icatypes.EncodingProtobuf: + content, err = codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) + case icatypes.EncodingJSON: + typeUrl := "/cosmos.gov.v1beta1.TextProposal" + value, err := json.Marshal(testProposal) + suite.Require().NoError(err) + content = &codectypes.Any{ + TypeUrl: typeUrl, + Value: value, + } + default: + suite.Require().FailNow("invalid encoding") + } msg := &govtypes.MsgSubmitProposal{ - Content: protoAny, + Content: content, InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), Proposer: interchainAccountAddr, } diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 1dd73dcec4a..6e557804e1f 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -133,7 +133,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { - _, message, err := processJsonAny(cdc, jsonAny) + _, message, err := extractJsonAny(cdc, jsonAny) if err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } @@ -151,7 +151,8 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return msgs, nil } -func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { +// extractJsonAny converts JSONAny to (proto)Any and extracts the proto.Message (recursively). +func extractJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { // get the type_url field typeURL := jsonAny.TypeURL // get uninitialized proto.Message @@ -160,8 +161,6 @@ func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p return nil, nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", typeURL) } - // get the value field - value := jsonAny.Value var jsonMap map[string]interface{} if err := json.Unmarshal(value, &jsonMap); err != nil { @@ -178,25 +177,42 @@ func processJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p fieldJSONName = strings.Split(fieldJSONName, ",")[0] if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { - // TODO: Make sure none of these panic. - subJsonAnyMap := jsonMap[fieldJSONName].(map[string]interface{}) - subJsonAnyTypeURL := subJsonAnyMap["type_url"].(string) - valueInterfaceSlice, ok := subJsonAnyMap["value"].([]interface{}) + // get the any field + subJsonAnyMap, ok := jsonMap[fieldJSONName].(map[string]interface{}) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert any to map[string]interface{}") + } + // get the type_url field + subJsonAnyTypeURL, ok := subJsonAnyMap["type_url"].(string) if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert value to []interface{}") + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert 'type_url' to string") } + // get the value field + valueInterfaceSlice, ok := subJsonAnyMap["value"].([]interface{}) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert 'value' to []interface{}") + } valueByteSlice := make([]byte, len(valueInterfaceSlice)) for i, v := range valueInterfaceSlice { - valueByte := byte(v.(float64)) + floatVal, ok := v.(float64) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "value is not a float64") + } + if floatVal < 0 || floatVal > 255 { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "value %v is out of range for a byte", floatVal) + } + valueByte := byte(floatVal) valueByteSlice[i] = valueByte } + + // Create the JSONAny subJsonAny := &JSONAny{ TypeURL: subJsonAnyTypeURL, Value: valueByteSlice, } - protoAny, _, err := processJsonAny(cdc, subJsonAny) + protoAny, _, err := extractJsonAny(cdc, subJsonAny) if err != nil { return nil, nil, err } From da2801aff73e1df7dffb1c41138dfa997632f383 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 4 Jun 2023 13:49:58 +0300 Subject: [PATCH 055/121] refactor(ica): made deserialize code shorter --- .../27-interchain-accounts/types/codec.go | 35 +++++-------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 6e557804e1f..5f759921df8 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -180,36 +180,17 @@ func extractJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p // get the any field subJsonAnyMap, ok := jsonMap[fieldJSONName].(map[string]interface{}) if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert any to map[string]interface{}") - } - // get the type_url field - subJsonAnyTypeURL, ok := subJsonAnyMap["type_url"].(string) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert 'type_url' to string") - } - - // get the value field - valueInterfaceSlice, ok := subJsonAnyMap["value"].([]interface{}) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert 'value' to []interface{}") - } - valueByteSlice := make([]byte, len(valueInterfaceSlice)) - for i, v := range valueInterfaceSlice { - floatVal, ok := v.(float64) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "value is not a float64") - } - if floatVal < 0 || floatVal > 255 { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "value %v is out of range for a byte", floatVal) - } - valueByte := byte(floatVal) - valueByteSlice[i] = valueByte + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") } // Create the JSONAny - subJsonAny := &JSONAny{ - TypeURL: subJsonAnyTypeURL, - Value: valueByteSlice, + jsonBytes, err := json.Marshal(subJsonAnyMap) + if err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") + } + subJsonAny := &JSONAny{} + if err = json.Unmarshal(jsonBytes, subJsonAny); err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") } protoAny, _, err := extractJsonAny(cdc, subJsonAny) From 5785d0278af5bbfc073fcee49925a140096218f7 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 4 Jun 2023 13:59:42 +0300 Subject: [PATCH 056/121] style(ica): made linter a bit more happy --- .../host/keeper/relay_test.go | 4 ++-- .../27-interchain-accounts/types/codec.go | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index aaf5661fb0d..bc60ddf4d4a 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -628,11 +628,11 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { content, err = codectypes.NewAnyWithValue(testProposal) suite.Require().NoError(err) case icatypes.EncodingJSON: - typeUrl := "/cosmos.gov.v1beta1.TextProposal" + typeURL := "/cosmos.gov.v1beta1.TextProposal" value, err := json.Marshal(testProposal) suite.Require().NoError(err) content = &codectypes.Any{ - TypeUrl: typeUrl, + TypeUrl: typeURL, Value: value, } default: diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 5f759921df8..8523a3e8f8a 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -133,7 +133,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { - _, message, err := extractJsonAny(cdc, jsonAny) + _, message, err := extractJSONAny(cdc, jsonAny) if err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } @@ -151,8 +151,8 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return msgs, nil } -// extractJsonAny converts JSONAny to (proto)Any and extracts the proto.Message (recursively). -func extractJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { +// extractJSONAny converts JSONAny to (proto)Any and extracts the proto.Message (recursively). +func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { // get the type_url field typeURL := jsonAny.TypeURL // get uninitialized proto.Message @@ -178,22 +178,22 @@ func extractJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { // get the any field - subJsonAnyMap, ok := jsonMap[fieldJSONName].(map[string]interface{}) + subJSONAnyMap, ok := jsonMap[fieldJSONName].(map[string]interface{}) if !ok { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") } // Create the JSONAny - jsonBytes, err := json.Marshal(subJsonAnyMap) + jsonBytes, err := json.Marshal(subJSONAnyMap) if err != nil { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") } - subJsonAny := &JSONAny{} - if err = json.Unmarshal(jsonBytes, subJsonAny); err != nil { + subJSONAny := &JSONAny{} + if err = json.Unmarshal(jsonBytes, subJSONAny); err != nil { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") } - protoAny, _, err := extractJsonAny(cdc, subJsonAny) + protoAny, _, err := extractJSONAny(cdc, subJSONAny) if err != nil { return nil, nil, err } @@ -206,13 +206,13 @@ func extractJsonAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p } // Marshal the map back to a byte slice - modifiedJsonAnyValue, err := json.Marshal(jsonMap) + modifiedJSONAnyValue, err := json.Marshal(jsonMap) if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json map back to bytes") + return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json back to bytes") } - if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJsonAnyValue, message); err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the json message") + if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJSONAnyValue, message); err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal modified json to message") } result, err := codectypes.NewAnyWithValue(message) From 3f389eaa833a911b55e2bc3847ee3ecb7f696a36 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 4 Jun 2023 21:02:25 +0300 Subject: [PATCH 057/121] fix(ica.test): fixed one codec test case --- .../types/codec_test.go | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index e1467db785c..a3e63f8d903 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/gogoproto/proto" "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" @@ -81,16 +81,17 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: multiple msgs, different types from cosmwasm", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 103, 111, 118, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 117, 98, 109, 105, 116, 80, 114, 111, 112, 111, 115, 97, 108, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 49, 50, 53, 93, 125, 93, 125} + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 49, 48, 49, 44, 49, 48, 51, 44, 57, 55, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 53, 44, 49, 48, 48, 44, 57, 55, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 49, 50, 53, 93, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), }, - &govtypes.MsgSubmitProposal{ - InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - Proposer: TestOwnerAddress, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), }, } }, @@ -179,9 +180,10 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { ToAddress: TestOwnerAddress, Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), }, - &govtypes.MsgSubmitProposal{ - InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - Proposer: TestOwnerAddress, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), }, }, true, @@ -280,9 +282,10 @@ func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { ToAddress: TestOwnerAddress, Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), }, - &govtypes.MsgSubmitProposal{ - InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - Proposer: TestOwnerAddress, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), }, }, true, From e5d982ee2a1d573896ff5b7578a90ceac4d210de Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 13:53:31 +0300 Subject: [PATCH 058/121] feat(ica): added []Any handling code --- .../host/keeper/relay_test.go | 39 +++++++++---------- .../27-interchain-accounts/types/codec.go | 36 ++++++++++++++++- testing/codec.go | 37 ++++++++++++++++++ 3 files changed, 91 insertions(+), 21 deletions(-) create mode 100644 testing/codec.go diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index bc60ddf4d4a..e740ac3a9b2 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -1,8 +1,6 @@ package keeper_test import ( - "encoding/json" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -621,33 +619,34 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Description: "tokens for all!", } - var err error - var content *codectypes.Any + content, err := codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) + + msg := &govtypes.MsgSubmitProposal{ + Content: content, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: interchainAccountAddr, + } + + var data []byte switch encoding { case icatypes.EncodingProtobuf: - content, err = codectypes.NewAnyWithValue(testProposal) + data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) case icatypes.EncodingJSON: - typeURL := "/cosmos.gov.v1beta1.TextProposal" - value, err := json.Marshal(testProposal) + protoAny, err := codectypes.NewAnyWithValue(msg) suite.Require().NoError(err) - content = &codectypes.Any{ - TypeUrl: typeURL, - Value: value, - } + // this also doesn't work + _, data, err = ibctesting.ToJSONAny(suite.chainA.GetSimApp().AppCodec(), protoAny) + suite.Require().NoError(err) + suite.Require().NotNil(data) + // THIS IS NOT HOW SERIALIZE SHOULD BE USED + // data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) default: suite.Require().FailNow("invalid encoding") } - msg := &govtypes.MsgSubmitProposal{ - Content: content, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), - Proposer: interchainAccountAddr, - } - - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - suite.Require().NoError(err) - icaPacketData := icatypes.InterchainAccountPacketData{ Type: icatypes.EXECUTE_TX, Data: data, diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 8523a3e8f8a..a91b79f4f31 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -202,13 +202,47 @@ func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p field.Set(reflect.ValueOf(protoAny)) // Remove this field from jsonAnyMap delete(jsonMap, fieldJSONName) + } else if fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)) { + sliceSubJSONAnyMap, ok := jsonMap[fieldJSONName].([]interface{}) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []interface{}") + } + + protoAnys := make([]*codectypes.Any, len(sliceSubJSONAnyMap)) + + for i, subJSONAnyInterface := range sliceSubJSONAnyMap { + subJSONAnyMap, ok := subJSONAnyInterface.(map[string]interface{}) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") + } + + // Create the JSONAny + jsonBytes, err := json.Marshal(subJSONAnyMap) + if err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") + } + subJSONAny := &JSONAny{} + if err = json.Unmarshal(jsonBytes, subJSONAny); err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") + } + + protoAny, _, err := extractJSONAny(cdc, subJSONAny) + if err != nil { + return nil, nil, err + } + + protoAnys[i] = protoAny + } + + field.Set(reflect.ValueOf(protoAnys)) + delete(jsonMap, fieldJSONName) } } // Marshal the map back to a byte slice modifiedJSONAnyValue, err := json.Marshal(jsonMap) if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json back to bytes") + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal modified json back to bytes") } if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJSONAnyValue, message); err != nil { diff --git a/testing/codec.go b/testing/codec.go new file mode 100644 index 00000000000..b3d4f62dc0b --- /dev/null +++ b/testing/codec.go @@ -0,0 +1,37 @@ +package ibctesting + +import ( + "encoding/json" + + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/gogoproto/proto" + + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" +) + +// toJSONAny converts (proto)Any to JSONAny and extracts the json bytes (recursively). +func ToJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*icatypes.JSONAny, []byte, error) { + var message proto.Message + + cdc.UnpackAny(protoAny, &message) + + // Marshal the map back to a byte slice. This function marshalls recursively. + JSONAnyValue, err := cdc.(*codec.ProtoCodec).MarshalInterfaceJSON(message) + if err != nil { + return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified message to bytes") + } + + result := &icatypes.JSONAny{ + TypeURL: protoAny.TypeUrl, + Value: JSONAnyValue, + } + + bytes, err := json.Marshal(result) + if err != nil { + return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json back to bytes") + } + + return result, bytes, nil +} \ No newline at end of file From 3bde3dc534e640f208d842668f2a2067b552b500 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 14:06:28 +0300 Subject: [PATCH 059/121] fix(ica): added more safety --- modules/apps/27-interchain-accounts/types/codec.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index a91b79f4f31..9b8d0e41c5e 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -172,7 +172,10 @@ func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p for i := 0; i < val.NumField(); i++ { field := val.Field(i) fieldType := field.Type() - fieldJSONName := val.Type().Field(i).Tag.Get("json") + fieldJSONName, ok := val.Type().Field(i).Tag.Lookup("json") + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot get the json tag of the field") + } // Remove ,omitempty if it's present fieldJSONName = strings.Split(fieldJSONName, ",")[0] From db4fd5b6117d48add718e40f616adbe58190db96 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 14:28:45 +0300 Subject: [PATCH 060/121] nit: deleted testing codec.go --- testing/codec.go | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 testing/codec.go diff --git a/testing/codec.go b/testing/codec.go deleted file mode 100644 index b3d4f62dc0b..00000000000 --- a/testing/codec.go +++ /dev/null @@ -1,37 +0,0 @@ -package ibctesting - -import ( - "encoding/json" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/gogoproto/proto" - - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" -) - -// toJSONAny converts (proto)Any to JSONAny and extracts the json bytes (recursively). -func ToJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*icatypes.JSONAny, []byte, error) { - var message proto.Message - - cdc.UnpackAny(protoAny, &message) - - // Marshal the map back to a byte slice. This function marshalls recursively. - JSONAnyValue, err := cdc.(*codec.ProtoCodec).MarshalInterfaceJSON(message) - if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified message to bytes") - } - - result := &icatypes.JSONAny{ - TypeURL: protoAny.TypeUrl, - Value: JSONAnyValue, - } - - bytes, err := json.Marshal(result) - if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json back to bytes") - } - - return result, bytes, nil -} \ No newline at end of file From 14b3f0da5b00d75b7a8df66a6ccb21eefd1321d9 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 16:11:27 +0300 Subject: [PATCH 061/121] feat(ica): all works --- .../host/keeper/relay_test.go | 11 +- .../27-interchain-accounts/types/codec.go | 109 +++++++++++++++--- 2 files changed, 95 insertions(+), 25 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index e740ac3a9b2..43d0e808f6a 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -634,15 +634,10 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) case icatypes.EncodingJSON: - protoAny, err := codectypes.NewAnyWithValue(msg) - suite.Require().NoError(err) - // this also doesn't work - _, data, err = ibctesting.ToJSONAny(suite.chainA.GetSimApp().AppCodec(), protoAny) - suite.Require().NoError(err) - suite.Require().NotNil(data) - // THIS IS NOT HOW SERIALIZE SHOULD BE USED - // data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // protoAny, err := codectypes.NewAnyWithValue(msg) // suite.Require().NoError(err) + data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + suite.Require().NoError(err) default: suite.Require().FailNow("invalid encoding") } diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 9b8d0e41c5e..1e48a62b858 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -71,23 +71,24 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str case EncodingJSON: msgAnys := make([]*JSONAny, len(msgs)) for i, msg := range msgs { - jsonValue, err := cdc.(*codec.ProtoCodec).MarshalJSON(msg) + protoAny, err := codectypes.NewAnyWithValue(msg) if err != nil { return nil, err } - msgAnys[i] = &JSONAny{ - TypeURL: "/" + proto.MessageName(msg), - Value: jsonValue, - } - - cosmosTx := JSONCosmosTx{ - Messages: msgAnys, - } - - bz, err = json.Marshal(cosmosTx) + jsonAny, _, err := toJSONAny(cdc, protoAny) if err != nil { return nil, err } + msgAnys[i] = jsonAny + } + + cosmosTx := &JSONCosmosTx{ + Messages: msgAnys, + } + + bz, err = json.Marshal(cosmosTx) + if err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal cosmosTx with json") } default: return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) @@ -133,14 +134,14 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ msgs = make([]sdk.Msg, len(cosmosTx.Messages)) for i, jsonAny := range cosmosTx.Messages { - _, message, err := extractJSONAny(cdc, jsonAny) + _, message, err := fromJSONAny(cdc, jsonAny) if err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) } msg, ok := message.(sdk.Msg) if !ok { - return nil, errorsmod.Wrapf(ErrUnsupported, "message %T does not implement sdk.Msg", message) + return nil, errorsmod.Wrapf(ErrUnknownDataType, "message %T does not implement sdk.Msg", message) } msgs[i] = msg } @@ -151,8 +152,8 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return msgs, nil } -// extractJSONAny converts JSONAny to (proto)Any and extracts the proto.Message (recursively). -func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { +// fromJSONAny converts JSONAny to (proto)Any and extracts the proto.Message (recursively). +func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { // get the type_url field typeURL := jsonAny.TypeURL // get uninitialized proto.Message @@ -196,7 +197,7 @@ func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") } - protoAny, _, err := extractJSONAny(cdc, subJSONAny) + protoAny, _, err := fromJSONAny(cdc, subJSONAny) if err != nil { return nil, nil, err } @@ -229,7 +230,7 @@ func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") } - protoAny, _, err := extractJSONAny(cdc, subJSONAny) + protoAny, _, err := fromJSONAny(cdc, subJSONAny) if err != nil { return nil, nil, err } @@ -259,3 +260,77 @@ func extractJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, p return result, message, nil } + +// toJSONAny converts (proto)Any to JSONAny and extracts the json bytes (recursively). +func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byte, error) { + var message proto.Message + + cdc.UnpackAny(protoAny, &message) + + messageMap := make(map[string]interface{}) + + val := reflect.ValueOf(message).Elem() + for i := 0; i < val.NumField(); i++ { + field := val.Field(i) + fieldType := field.Type() + fieldJSONName, ok := val.Type().Field(i).Tag.Lookup("json") + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot get the json tag of the field") + } + // Remove ,omitempty if it's present + fieldJSONName = strings.Split(fieldJSONName, ",")[0] + + if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { + + subProtoAny, ok := field.Interface().(*codectypes.Any) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to *codectypes.Any") + } + + subJSONAny, _, err := toJSONAny(cdc, subProtoAny) + if err != nil { + return nil, nil, err + } + + messageMap[fieldJSONName] = subJSONAny + } else if fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)) { + subProtoAnys, ok := field.Interface().([]*codectypes.Any) + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []*codectypes.Any") + } + + subJSONAnys := make([]*JSONAny, len(subProtoAnys)) + + for i, subProtoAny := range subProtoAnys { + subJSONAny, _, err := toJSONAny(cdc, subProtoAny) + if err != nil { + return nil, nil, err + } + + subJSONAnys[i] = subJSONAny + } + + messageMap[fieldJSONName] = subJSONAnys + } else { + messageMap[fieldJSONName] = field.Interface() + } + } + + // Marshal the map back to a byte slice. This function marshalls recursively. + JSONAnyValue, err := json.Marshal(messageMap) + if err != nil { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal modified message to bytes") + } + + result := &JSONAny{ + TypeURL: protoAny.TypeUrl, + Value: JSONAnyValue, + } + + bytes, err := json.Marshal(result) + if err != nil { + return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json back to bytes") + } + + return result, bytes, nil +} \ No newline at end of file From 12b20ec4396b4d759972a854b48b2ad140c51fbd Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 16:12:16 +0300 Subject: [PATCH 062/121] style(ica): ran gofumpt --- modules/apps/27-interchain-accounts/types/codec.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 1e48a62b858..2489b43eff4 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -208,17 +208,17 @@ func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, prot delete(jsonMap, fieldJSONName) } else if fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)) { sliceSubJSONAnyMap, ok := jsonMap[fieldJSONName].([]interface{}) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []interface{}") - } + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []interface{}") + } protoAnys := make([]*codectypes.Any, len(sliceSubJSONAnyMap)) for i, subJSONAnyInterface := range sliceSubJSONAnyMap { subJSONAnyMap, ok := subJSONAnyInterface.(map[string]interface{}) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") - } + if !ok { + return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") + } // Create the JSONAny jsonBytes, err := json.Marshal(subJSONAnyMap) @@ -333,4 +333,4 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt } return result, bytes, nil -} \ No newline at end of file +} From e2ad1a152bc0f06da0713924a6269e9f0d369b4f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 16:21:45 +0300 Subject: [PATCH 063/121] style(ica): made linter happy --- modules/apps/27-interchain-accounts/types/codec.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 2489b43eff4..bd2e7bb23fc 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -265,7 +265,10 @@ func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, prot func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byte, error) { var message proto.Message - cdc.UnpackAny(protoAny, &message) + err := cdc.UnpackAny(protoAny, &message) + if err != nil { + return nil, nil, err + } messageMap := make(map[string]interface{}) @@ -280,8 +283,8 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt // Remove ,omitempty if it's present fieldJSONName = strings.Split(fieldJSONName, ",")[0] - if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { - + switch { + case fieldType == reflect.TypeOf((*codectypes.Any)(nil)): subProtoAny, ok := field.Interface().(*codectypes.Any) if !ok { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to *codectypes.Any") @@ -293,7 +296,7 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt } messageMap[fieldJSONName] = subJSONAny - } else if fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)) { + case fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)): subProtoAnys, ok := field.Interface().([]*codectypes.Any) if !ok { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []*codectypes.Any") @@ -311,7 +314,7 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt } messageMap[fieldJSONName] = subJSONAnys - } else { + default: messageMap[fieldJSONName] = field.Interface() } } From 437fd25cdb6d7020a0f1db1b16375b418618d11c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 16:56:23 +0300 Subject: [PATCH 064/121] refactor(ica): reduced code duplication --- .../27-interchain-accounts/types/codec.go | 49 ++++++++----------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index bd2e7bb23fc..a8bed738bed 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -168,6 +168,25 @@ func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, prot return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") } + jsonAnyMapHandler := func(subJSONAnyMap map[string]interface{}) (*codectypes.Any, error) { + // Create the JSONAny + jsonBytes, err := json.Marshal(subJSONAnyMap) + if err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") + } + subJSONAny := &JSONAny{} + if err = json.Unmarshal(jsonBytes, subJSONAny); err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") + } + + protoAny, _, err := fromJSONAny(cdc, subJSONAny) + if err != nil { + return nil, err + } + + return protoAny, nil + } + // Check if message has Any fields val := reflect.ValueOf(message).Elem() for i := 0; i < val.NumField(); i++ { @@ -187,17 +206,7 @@ func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, prot return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") } - // Create the JSONAny - jsonBytes, err := json.Marshal(subJSONAnyMap) - if err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") - } - subJSONAny := &JSONAny{} - if err = json.Unmarshal(jsonBytes, subJSONAny); err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") - } - - protoAny, _, err := fromJSONAny(cdc, subJSONAny) + protoAny, err := jsonAnyMapHandler(subJSONAnyMap) if err != nil { return nil, nil, err } @@ -213,31 +222,18 @@ func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, prot } protoAnys := make([]*codectypes.Any, len(sliceSubJSONAnyMap)) - for i, subJSONAnyInterface := range sliceSubJSONAnyMap { subJSONAnyMap, ok := subJSONAnyInterface.(map[string]interface{}) if !ok { return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") } - // Create the JSONAny - jsonBytes, err := json.Marshal(subJSONAnyMap) - if err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") - } - subJSONAny := &JSONAny{} - if err = json.Unmarshal(jsonBytes, subJSONAny); err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") - } - - protoAny, _, err := fromJSONAny(cdc, subJSONAny) + protoAny, err := jsonAnyMapHandler(subJSONAnyMap) if err != nil { return nil, nil, err } - protoAnys[i] = protoAny } - field.Set(reflect.ValueOf(protoAnys)) delete(jsonMap, fieldJSONName) } @@ -294,7 +290,6 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt if err != nil { return nil, nil, err } - messageMap[fieldJSONName] = subJSONAny case fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)): subProtoAnys, ok := field.Interface().([]*codectypes.Any) @@ -303,7 +298,6 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt } subJSONAnys := make([]*JSONAny, len(subProtoAnys)) - for i, subProtoAny := range subProtoAnys { subJSONAny, _, err := toJSONAny(cdc, subProtoAny) if err != nil { @@ -312,7 +306,6 @@ func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byt subJSONAnys[i] = subJSONAny } - messageMap[fieldJSONName] = subJSONAnys default: messageMap[fieldJSONName] = field.Interface() From f73270259c40c2b9232fd49f81d2fe7d879edb34 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 17:02:35 +0300 Subject: [PATCH 065/121] nit(ica): uncommented some test cases --- modules/apps/27-interchain-accounts/host/keeper/relay_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 43d0e808f6a..749994e912a 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -25,14 +25,13 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { packetData []byte ) cwWalletOne := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - // cwWalletTwo = "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" + cwWalletTwo := "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" testCases := []struct { msg string malleate func(encoding string) expPass bool }{ - /* { "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", func(encoding string) { @@ -130,7 +129,6 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // }, // true, // }, - */ { "interchain account successfully executes govtypes.MsgSubmitProposal", func(encoding string) { From 95ccad3511c9a6c4dc84c22f1ddaa050915a005d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 5 Jun 2023 20:42:14 +0300 Subject: [PATCH 066/121] imp(ica.test): added more test cases --- .../host/keeper/relay_test.go | 153 ++++++++---------- 1 file changed, 63 insertions(+), 90 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 749994e912a..257d7e5cc45 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -95,58 +95,22 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, true, }, - // { - // "interchain account successfully executes stakingtypes.MsgDelegate and stakingtypes.MsgUndelegate sequentially", - // func(encoding string) { - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) - - // validatorAddr := (sdk.ValAddress)(suite.chainB.Vals.Validators[0].Address) - // msgDelegate := &stakingtypes.MsgDelegate{ - // DelegatorAddress: interchainAccountAddr, - // ValidatorAddress: validatorAddr.String(), - // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - // } - - // msgUndelegate := &stakingtypes.MsgUndelegate{ - // DelegatorAddress: interchainAccountAddr, - // ValidatorAddress: validatorAddr.String(), - // Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msgDelegate), sdk.MsgTypeURL(msgUndelegate)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, { "interchain account successfully executes govtypes.MsgSubmitProposal", func(encoding string) { - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - println("testProposal: ", proto.MessageName(testProposal)) + // testProposal := &govtypes.TextProposal{ + // Title: "IBC Gov Proposal", + // Description: "tokens for all!", + // } - protoAny, err := codectypes.NewAnyWithValue(testProposal) - suite.Require().NoError(err) + // protoAny, err := codectypes.NewAnyWithValue(testProposal) + // suite.Require().NoError(err) - msg := &govtypes.MsgSubmitProposal{ - Content: protoAny, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), - Proposer: cwWalletOne, - } + // msg := &govtypes.MsgSubmitProposal{ + // Content: protoAny, + // InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + // Proposer: cwWalletOne, + // } // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) // suite.Require().NoError(err) @@ -158,54 +122,63 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - // packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, true, }, - // { - // "interchain account successfully executes govtypes.MsgVote", - // func(encoding string) { - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) + { + "interchain account successfully executes govtypes.MsgVote", + func(encoding string) { + interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + suite.Require().True(found) - // // Populate the gov keeper in advance with an active proposal - // testProposal := &govtypes.TextProposal{ - // Title: "IBC Gov Proposal", - // Description: "tokens for all!", - // } + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } - // proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) - // suite.Require().NoError(err) + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) - // proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) - // suite.Require().NoError(err) + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) + suite.Require().NoError(err) - // suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - // suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - // msg := &govtypes.MsgVote{ - // ProposalId: govtypes.DefaultStartingProposalID, - // Voter: interchainAccountAddr, - // Option: govtypes.OptionYes, - // } + // msg := &govtypes.MsgVote{ + // ProposalId: govtypes.DefaultStartingProposalID, + // Voter: interchainAccountAddr, + // Option: govtypes.OptionYes, + // } - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) + // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + // suite.Require().NoError(err) - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } + // icaPacketData := icatypes.InterchainAccountPacketData{ + // Type: icatypes.EXECUTE_TX, + // Data: data, + // } - // packetData = icaPacketData.GetBytes() + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", + func(encoding string) { + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, // { // "interchain account successfully executes disttypes.MsgFundCommunityPool", // func(encoding string) { @@ -317,13 +290,13 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // }, // false, // }, - // { - // "cannot unmarshal interchain account packet data", - // func(encoding string) { - // packetData = []byte{} - // }, - // false, - // }, + { + "cannot unmarshal interchain account packet data", + func(encoding string) { + packetData = []byte{} + }, + false, + }, // { // "cannot deserialize interchain account packet data messages", // func(encoding string) { @@ -435,7 +408,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // Set the address of the interchain account stored in state during handshake step for cosmwasm testing suite.setICAWallet(suite.chainB.GetContext(), portID, cwWalletOne) - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000)))) tc.malleate(icatypes.EncodingJSON) // malleate mutates test data From ea3792d8b6e614b3e38cf1d1628083de7223da43 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 6 Jun 2023 10:58:30 +0300 Subject: [PATCH 067/121] feat(ica.test): finished test cases --- .../host/keeper/relay_test.go | 337 +++--------------- 1 file changed, 50 insertions(+), 287 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 257d7e5cc45..93369d3a32a 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -25,7 +25,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { packetData []byte ) cwWalletOne := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - cwWalletTwo := "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" + // cwWalletTwo := "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" testCases := []struct { msg string @@ -50,20 +50,6 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - // msg := &govtypes.MsgVote{ - // ProposalId: govtypes.DefaultStartingProposalID, - // Voter: cwWalletOne, - // Option: govtypes.OptionYes, - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{"*"}) @@ -74,52 +60,16 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "interchain account successfully executes banktypes.MsgSend from cosmwasm", func(encoding string) { - msg := &banktypes.MsgSend{ - FromAddress: cwWalletOne, - ToAddress: cwWalletTwo, - Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), - } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, true, }, { - "interchain account successfully executes govtypes.MsgSubmitProposal", + "interchain account successfully executes govtypes.MsgSubmitProposal from cosmwasm", func(encoding string) { - // testProposal := &govtypes.TextProposal{ - // Title: "IBC Gov Proposal", - // Description: "tokens for all!", - // } - - // protoAny, err := codectypes.NewAnyWithValue(testProposal) - // suite.Require().NoError(err) - - // msg := &govtypes.MsgSubmitProposal{ - // Content: protoAny, - // InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), - // Proposer: cwWalletOne, - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) @@ -128,7 +78,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes govtypes.MsgVote", + "interchain account successfully executes govtypes.MsgVote from cosmwasm", func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -148,20 +98,6 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - // msg := &govtypes.MsgVote{ - // ProposalId: govtypes.DefaultStartingProposalID, - // Voter: interchainAccountAddr, - // Option: govtypes.OptionYes, - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) @@ -170,224 +106,62 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", + "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially from cosmwasm", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, true, }, - // { - // "interchain account successfully executes disttypes.MsgFundCommunityPool", - // func(encoding string) { - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) - - // msg := &disttypes.MsgFundCommunityPool{ - // Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), - // Depositor: interchainAccountAddr, - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, - // { - // "interchain account successfully executes disttypes.MsgSetWithdrawAddress", - // func(encoding string) { - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) - - // msg := &disttypes.MsgSetWithdrawAddress{ - // DelegatorAddress: interchainAccountAddr, - // WithdrawAddress: suite.chainB.SenderAccount.GetAddress().String(), - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, - // { - // "interchain account successfully executes transfertypes.MsgTransfer", - // func(encoding string) { - // transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) - // transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort - // transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort - // transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version - // transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version - - // suite.coordinator.Setup(transferPath) - - // interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - // suite.Require().True(found) - - // msg := &transfertypes.MsgTransfer{ - // SourcePort: transferPath.EndpointA.ChannelConfig.PortID, - // SourceChannel: transferPath.EndpointA.ChannelID, - // Token: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)), - // Sender: interchainAccountAddr, - // Receiver: suite.chainA.SenderAccount.GetAddress().String(), - // TimeoutHeight: clienttypes.NewHeight(1, 100), - // TimeoutTimestamp: uint64(0), - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // true, - // }, - // { - // "unregistered sdk.Msg", - // func(encoding string) { - // msg := &banktypes.MsgSendResponse{} - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{"/" + proto.MessageName(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // false, - // }, { - "cannot unmarshal interchain account packet data", + "interchain account successfully executes transfertypes.MsgTransfer from cosmwasm", func(encoding string) { - packetData = []byte{} + transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) + transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version + transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version + + suite.coordinator.Setup(transferPath) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "unregistered sdk.Msg from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 56, 50, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{"/" + proto.MessageName((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "message type not allowed banktypes.MsgSend from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "unauthorised: signer address is not the interchain account associated with the controller portID", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, false, }, - // { - // "cannot deserialize interchain account packet data messages", - // func(encoding string) { - // data := []byte("invalid packet data") - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - // }, - // false, - // }, - // { - // "invalid packet type - UNSPECIFIED", - // func(encoding string) { - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.UNSPECIFIED, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - // }, - // false, - // }, - // { - // "unauthorised: interchain account not found for controller port ID", - // func(encoding string) { - // path.EndpointA.ChannelConfig.PortID = "invalid-port-id" - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - // }, - // false, - // }, - // { - // "unauthorised: message type not allowed", // NOTE: do not update params to explicitly force the error - // func(encoding string) { - // msg := &banktypes.MsgSend{ - // FromAddress: suite.chainB.SenderAccount.GetAddress().String(), - // ToAddress: suite.chainB.SenderAccount.GetAddress().String(), - // Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - // }, - // false, - // }, - // { - // "unauthorised: signer address is not the interchain account associated with the controller portID", - // func(encoding string) { - // msg := &banktypes.MsgSend{ - // FromAddress: suite.chainB.SenderAccount.GetAddress().String(), // unexpected signer - // ToAddress: suite.chainB.SenderAccount.GetAddress().String(), - // Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), - // } - - // data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - // suite.Require().NoError(err) - - // icaPacketData := icatypes.InterchainAccountPacketData{ - // Type: icatypes.EXECUTE_TX, - // Data: data, - // } - - // packetData = icaPacketData.GetBytes() - - // params := types.NewParams(true, []string{sdk.MsgTypeURL(msg)}) - // suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - // }, - // false, - // }, } for _, tc := range testCases { @@ -599,19 +373,8 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Proposer: interchainAccountAddr, } - var data []byte - switch encoding { - case icatypes.EncodingProtobuf: - data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - suite.Require().NoError(err) - case icatypes.EncodingJSON: - // protoAny, err := codectypes.NewAnyWithValue(msg) - // suite.Require().NoError(err) - data, err = icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) - suite.Require().NoError(err) - default: - suite.Require().FailNow("invalid encoding") - } + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) + suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ Type: icatypes.EXECUTE_TX, From 4f3e7d6cc50effa8e611895e2fa7545b66fdb58c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 6 Jun 2023 11:00:12 +0300 Subject: [PATCH 068/121] style(ica.test): reorganized test cases --- .../host/keeper/relay_test.go | 382 +++++++++--------- 1 file changed, 191 insertions(+), 191 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 93369d3a32a..64a2dcb7eef 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -19,197 +19,6 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ) -func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { - var ( - path *ibctesting.Path - packetData []byte - ) - cwWalletOne := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - // cwWalletTwo := "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" - - testCases := []struct { - msg string - malleate func(encoding string) - expPass bool - }{ - { - "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func(encoding string) { - // Populate the gov keeper in advance with an active proposal - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) - suite.Require().NoError(err) - - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) - suite.Require().NoError(err) - - suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{"*"}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes banktypes.MsgSend from cosmwasm", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes govtypes.MsgSubmitProposal from cosmwasm", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes govtypes.MsgVote from cosmwasm", - func(encoding string) { - interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - suite.Require().True(found) - - // Populate the gov keeper in advance with an active proposal - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) - suite.Require().NoError(err) - - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) - suite.Require().NoError(err) - - suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially from cosmwasm", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes transfertypes.MsgTransfer from cosmwasm", - func(encoding string) { - transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) - transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort - transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort - transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version - transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version - - suite.coordinator.Setup(transferPath) - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "unregistered sdk.Msg from cosmwasm", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 56, 50, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{"/" + proto.MessageName((*banktypes.MsgSend)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - false, - }, - { - "message type not allowed banktypes.MsgSend from cosmwasm", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - false, - }, - { - "unauthorised: signer address is not the interchain account associated with the controller portID", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - suite.Run(tc.msg, func() { - suite.SetupTest() // reset - - path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) - suite.coordinator.SetupConnections(path) - - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) - suite.Require().NoError(err) - - portID, err := icatypes.NewControllerPortID(TestOwnerAddress) - suite.Require().NoError(err) - - // Set the address of the interchain account stored in state during handshake step for cosmwasm testing - suite.setICAWallet(suite.chainB.GetContext(), portID, cwWalletOne) - - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000)))) - - tc.malleate(icatypes.EncodingJSON) // malleate mutates test data - - packet := channeltypes.NewPacket( - packetData, - suite.chainA.SenderAccount.GetSequence(), - path.EndpointA.ChannelConfig.PortID, - path.EndpointA.ChannelID, - path.EndpointB.ChannelConfig.PortID, - path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), - 0, - ) - - txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) - - if tc.expPass { - suite.Require().NoError(err) - suite.Require().NotNil(txResponse) - } else { - suite.Require().Error(err) - suite.Require().Nil(txResponse) - } - }) - } -} - func (suite *KeeperTestSuite) TestOnRecvPacket() { testedEncodings := []string{icatypes.EncodingProtobuf, icatypes.EncodingJSON} var ( @@ -697,6 +506,197 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { } } +func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { + var ( + path *ibctesting.Path + packetData []byte + ) + cwWalletOne := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" + // cwWalletTwo := "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" + + testCases := []struct { + msg string + malleate func(encoding string) + expPass bool + }{ + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func(encoding string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes banktypes.MsgSend from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgVote from cosmwasm", + func(encoding string) { + interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + suite.Require().True(found) + + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes transfertypes.MsgTransfer from cosmwasm", + func(encoding string) { + transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) + transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version + transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version + + suite.coordinator.Setup(transferPath) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "unregistered sdk.Msg from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 56, 50, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{"/" + proto.MessageName((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "message type not allowed banktypes.MsgSend from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "unauthorised: signer address is not the interchain account associated with the controller portID", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.msg, func() { + suite.SetupTest() // reset + + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) + suite.coordinator.SetupConnections(path) + + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) + suite.Require().NoError(err) + + portID, err := icatypes.NewControllerPortID(TestOwnerAddress) + suite.Require().NoError(err) + + // Set the address of the interchain account stored in state during handshake step for cosmwasm testing + suite.setICAWallet(suite.chainB.GetContext(), portID, cwWalletOne) + + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000)))) + + tc.malleate(icatypes.EncodingJSON) // malleate mutates test data + + packet := channeltypes.NewPacket( + packetData, + suite.chainA.SenderAccount.GetSequence(), + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + clienttypes.NewHeight(1, 100), + 0, + ) + + txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(txResponse) + } else { + suite.Require().Error(err) + suite.Require().Nil(txResponse) + } + }) + } +} + func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amount sdk.Coins) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(ctx, ibctesting.FirstConnectionID, portID) suite.Require().True(found) From 32e91e93269dfb495c3f435d1e02acf640499e6d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 6 Jun 2023 11:10:53 +0300 Subject: [PATCH 069/121] refactor(ica.test): combined the two test cases into one --- .../types/codec_test.go | 152 ++++-------------- 1 file changed, 27 insertions(+), 125 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index a3e63f8d903..1b90a8cee4e 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -139,7 +139,8 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { } } -func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { +func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { + testedEncodings := []string{types.EncodingProtobuf, types.EncodingJSON} testCases := []struct { name string msgs []proto.Message @@ -206,140 +207,41 @@ func (suite *TypesTestSuite) TestProtoSerializeAndDeserializeCosmosTx() { }, } - for _, tc := range testCases { - tc := tc - - suite.Run(tc.name, func() { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingProtobuf) - suite.Require().NoError(err, tc.name) + for _, encoding := range testedEncodings { + for _, tc := range testCases { + tc := tc - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) - if tc.expPass { + suite.Run(tc.name, func() { + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, encoding) suite.Require().NoError(err, tc.name) - } else { - suite.Require().Error(err, tc.name) - } - - for i, msg := range msgs { - suite.Require().Equal(tc.msgs[i], msg) - } - }) - } - - // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingProtobuf) - suite.Require().NoError(err) - suite.Require().NotEmpty(bz) - - // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingProtobuf) - suite.Require().Error(err) // unregistered type - - // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingProtobuf) - suite.Require().Error(err) - suite.Require().Empty(msgs) -} - -func (suite *TypesTestSuite) TestJsonSerializeAndDeserializeCosmosTx() { - testCases := []struct { - name string - msgs []proto.Message - expPass bool - }{ - { - "success: single msg, json encoded", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - }, - true, - }, - { - "success: multiple msgs, same types, json encoded", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), - }, - }, - true, - }, - { - "success: multiple msgs, different types, json encoded", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - &stakingtypes.MsgDelegate{ - DelegatorAddress: TestOwnerAddress, - ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - }, - }, - true, - }, - { - "failure: unregistered msg type, json encoded", - []proto.Message{ - &mockSdkMsg{}, - }, - false, - }, - { - "failure: multiple unregistered msg types, json encoded", - []proto.Message{ - &mockSdkMsg{}, - &mockSdkMsg{}, - &mockSdkMsg{}, - }, - false, - }, - } - for _, tc := range testCases { - tc := tc + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, encoding) + if tc.expPass { + suite.Require().NoError(err, tc.name) + } else { + suite.Require().Error(err, tc.name) + } - suite.Run(tc.name, func() { - bz, errSerialize := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, types.EncodingJSON) - msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) - if tc.expPass { - suite.Require().NoError(errSerialize, tc.name) - suite.Require().NoError(errDeserialize, tc.name) for i, msg := range msgs { suite.Require().Equal(tc.msgs[i], msg) } - } else { - suite.Require().Error(errSerialize, tc.name) - suite.Require().Error(errDeserialize, tc.name) - } - }) - } + }) + } - // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingJSON) - suite.Require().NoError(err) - suite.Require().NotEmpty(bz) + // test serializing non sdk.Msg type + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}, encoding) + suite.Require().NoError(err) + suite.Require().NotEmpty(bz) - // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, types.EncodingJSON) - suite.Require().Error(err) // unregistered type + // test deserializing unknown bytes + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, encoding) + suite.Require().Error(err) // unregistered type - // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingJSON) - suite.Require().Error(err) - suite.Require().Empty(msgs) + // test deserializing unknown bytes + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid"), types.EncodingProtobuf) + suite.Require().Error(err) + suite.Require().Empty(msgs) + } } // unregistered bytes causes amino to panic. From f9bab4c46a5b6caba5528f87aa2735e71e64ae5d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 6 Jun 2023 11:11:57 +0300 Subject: [PATCH 070/121] style(ica.test): ran gofumpt --- .../host/keeper/relay_test.go | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 64a2dcb7eef..008250f9f7f 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -519,41 +519,41 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { malleate func(encoding string) expPass bool }{ - { - "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func(encoding string) { - // Populate the gov keeper in advance with an active proposal - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) - suite.Require().NoError(err) + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func(encoding string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) - suite.Require().NoError(err) + proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) + suite.Require().NoError(err) - suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{"*"}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, - { - "interchain account successfully executes banktypes.MsgSend from cosmwasm", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, + true, + }, + { + "interchain account successfully executes banktypes.MsgSend from cosmwasm", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, + true, + }, { "interchain account successfully executes govtypes.MsgSubmitProposal from cosmwasm", func(encoding string) { From 6bd1b4704b3085675972b79a994cff0386aa7ed2 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 6 Jun 2023 12:23:12 +0300 Subject: [PATCH 071/121] style(ica.test): renamed wallet address --- .../27-interchain-accounts/host/keeper/relay_test.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 008250f9f7f..4af543b4596 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -511,8 +511,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { path *ibctesting.Path packetData []byte ) - cwWalletOne := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - // cwWalletTwo := "cosmos1uu38gkyed0dte5f9xk20p8wcppulsjt90s7f8h" + interchainAccountAddr := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" testCases := []struct { msg string @@ -528,10 +527,10 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { Description: "tokens for all!", } - proposalMsg, err := govv1.NewLegacyContent(testProposal, cwWalletOne) + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) suite.Require().NoError(err) - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(cwWalletOne)) + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(interchainAccountAddr)) suite.Require().NoError(err) suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) @@ -567,9 +566,6 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "interchain account successfully executes govtypes.MsgVote from cosmwasm", func(encoding string) { - interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) - suite.Require().True(found) - // Populate the gov keeper in advance with an active proposal testProposal := &govtypes.TextProposal{ Title: "IBC Gov Proposal", @@ -667,7 +663,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.Require().NoError(err) // Set the address of the interchain account stored in state during handshake step for cosmwasm testing - suite.setICAWallet(suite.chainB.GetContext(), portID, cwWalletOne) + suite.setICAWallet(suite.chainB.GetContext(), portID, interchainAccountAddr) suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000)))) From e7eabe5d7940c41b6cc17e7bea9d71cd51b5c98f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 7 Jun 2023 13:18:12 +0300 Subject: [PATCH 072/121] fix(ica.test): fixed test case names --- .../apps/27-interchain-accounts/types/codec_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 1b90a8cee4e..f6dacdc9b36 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -147,7 +147,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { expPass bool }{ { - "success: single msg, proto encoded", + "success: single msg", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -158,7 +158,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { true, }, { - "success: multiple msgs, same types, proto encoded", + "success: multiple msgs, same types", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -174,7 +174,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { true, }, { - "success: multiple msgs, different types, proto encoded", + "success: multiple msgs, different types", []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -190,14 +190,14 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { true, }, { - "failure: unregistered msg type, proto encoded", + "failure: unregistered msg type", []proto.Message{ &mockSdkMsg{}, }, false, }, { - "failure: multiple unregistered msg types, proto encoded", + "failure: multiple unregistered msg types", []proto.Message{ &mockSdkMsg{}, &mockSdkMsg{}, From 67d02f0a6fca2046c5d3a58936d34b4174e1d58d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 7 Jun 2023 13:47:46 +0300 Subject: [PATCH 073/121] imp(ica.test): added more test cases --- .../types/codec_test.go | 146 ++++++++++++++---- 1 file changed, 115 insertions(+), 31 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index f6dacdc9b36..d8f3d9b4968 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -2,8 +2,11 @@ package types_test import ( "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/gogoproto/proto" @@ -141,67 +144,146 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { testedEncodings := []string{types.EncodingProtobuf, types.EncodingJSON} + var msgs []proto.Message testCases := []struct { name string - msgs []proto.Message + malleate func() expPass bool }{ { "success: single msg", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + } }, true, }, { "success: multiple msgs, same types", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), - }, + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), + }, + } }, true, }, { "success: multiple msgs, different types", - []proto.Message{ - &banktypes.MsgSend{ + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + }, + } + }, + true, + }, + { + "success: msg with nested any", + func() { + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + content, err := codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) + + msgs = []proto.Message{ + &govtypes.MsgSubmitProposal{ + Content: content, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: TestOwnerAddress, + }, + } + }, + true, + }, + { + "success: msg with nested array of any", + func() { + sendMsg := &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - &stakingtypes.MsgDelegate{ + } + sendAny, err := codectypes.NewAnyWithValue(sendMsg) + suite.Require().NoError(err) + + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + content, err := codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) + legacyPropMsg := &govtypes.MsgSubmitProposal{ + Content: content, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: TestOwnerAddress, + } + legacyPropAny, err := codectypes.NewAnyWithValue(legacyPropMsg) + suite.Require().NoError(err) + + delegateMsg := &stakingtypes.MsgDelegate{ DelegatorAddress: TestOwnerAddress, ValidatorAddress: TestOwnerAddress, Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - }, + } + delegateAny, err := codectypes.NewAnyWithValue(delegateMsg) + suite.Require().NoError(err) + + messages := []*codectypes.Any{sendAny, legacyPropAny, delegateAny} + + propMsg := &govtypesv1.MsgSubmitProposal{ + Messages: messages, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: TestOwnerAddress, + Metadata: "", + Title: "New IBC Gov Proposal", + Summary: "more tokens for all!", + } + + msgs = []proto.Message{propMsg} }, true, }, { "failure: unregistered msg type", - []proto.Message{ - &mockSdkMsg{}, + func() { + msgs = []proto.Message{ + &mockSdkMsg{}, + } }, false, }, { "failure: multiple unregistered msg types", - []proto.Message{ - &mockSdkMsg{}, - &mockSdkMsg{}, - &mockSdkMsg{}, + func() { + msgs = []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, + } }, false, }, @@ -212,7 +294,9 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs, encoding) + tc.malleate() + + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, msgs, encoding) suite.Require().NoError(err, tc.name) msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, encoding) @@ -223,7 +307,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { } for i, msg := range msgs { - suite.Require().Equal(tc.msgs[i], msg) + suite.Require().Equal(msgs[i], msg) } }) } From ae8aa60ea02fb7457c728d19f6456d39c982b9b9 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 7 Jun 2023 13:50:44 +0300 Subject: [PATCH 074/121] style(ica.test): ran gofumpt --- .../apps/27-interchain-accounts/types/codec_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index d8f3d9b4968..fa3612dad25 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -146,9 +146,9 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { testedEncodings := []string{types.EncodingProtobuf, types.EncodingJSON} var msgs []proto.Message testCases := []struct { - name string + name string malleate func() - expPass bool + expPass bool }{ { "success: single msg", @@ -255,12 +255,12 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { messages := []*codectypes.Any{sendAny, legacyPropAny, delegateAny} propMsg := &govtypesv1.MsgSubmitProposal{ - Messages: messages, + Messages: messages, InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), Proposer: TestOwnerAddress, - Metadata: "", - Title: "New IBC Gov Proposal", - Summary: "more tokens for all!", + Metadata: "", + Title: "New IBC Gov Proposal", + Summary: "more tokens for all!", } msgs = []proto.Message{propMsg} From 2d01c88050f83bfe46b321a895bcf9f1d780cd57 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 7 Jun 2023 14:12:32 +0300 Subject: [PATCH 075/121] test(ica): added more codec test cases --- .../types/codec_test.go | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index fa3612dad25..61adda0c18c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -122,6 +122,13 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { }, false, }, + { + "failure: empty bytes", + func() { + cwBytes = []byte{} + }, + false, + }, } for _, tc := range testCases { @@ -267,6 +274,13 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { }, true, }, + { + "success: empty messages", + func() { + msgs = []proto.Message{} + }, + true, + }, { "failure: unregistered msg type", func() { @@ -287,6 +301,45 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { }, false, }, + { + "failure: nested unregistered msg", + func() { + mockMsg := &mockSdkMsg{} + mockAny, err := codectypes.NewAnyWithValue(mockMsg) + suite.Require().NoError(err) + + msgs = []proto.Message{ + &govtypes.MsgSubmitProposal{ + Content: mockAny, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: TestOwnerAddress, + }, + } + }, + false, + }, + { + "failure: nested array of unregistered msg", + func() { + mockMsg := &mockSdkMsg{} + mockAny, err := codectypes.NewAnyWithValue(mockMsg) + suite.Require().NoError(err) + + messages := []*codectypes.Any{mockAny, mockAny, mockAny} + + propMsg := &govtypesv1.MsgSubmitProposal{ + Messages: messages, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + Proposer: TestOwnerAddress, + Metadata: "", + Title: "New IBC Gov Proposal", + Summary: "more tokens for all!", + } + + msgs = []proto.Message{propMsg} + }, + false, + }, } for _, encoding := range testedEncodings { @@ -343,3 +396,29 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() suite.Require().Error(err) suite.Require().Empty(bz) } + +func (suite *TypesTestSuite) TestUnsupportedEncodingType() { + // Test serialize + msgs := []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + } + _, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, msgs, "unsupported") + suite.Require().Error(err) + + // Test deserialize + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + } + data, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, msgs, types.EncodingProtobuf) + suite.Require().NoError(err) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, data, "unsupported") + suite.Require().Error(err) +} \ No newline at end of file From 1bd9af73ae7f723f9296c2a242b07f020ddeb504 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 7 Jun 2023 14:34:45 +0300 Subject: [PATCH 076/121] style(ica.test): ran gofumpt --- modules/apps/27-interchain-accounts/types/codec_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 61adda0c18c..66470b11b5d 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -125,7 +125,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "failure: empty bytes", func() { - cwBytes = []byte{} + cwBytes = []byte{} }, false, }, @@ -421,4 +421,4 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { suite.Require().NoError(err) _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, data, "unsupported") suite.Require().Error(err) -} \ No newline at end of file +} From 59d9c2e287257e979e770d2adc2093dbef44c4c9 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 7 Jun 2023 14:48:49 +0300 Subject: [PATCH 077/121] feat(ica): removed JSONAny and JSONCosmosTx types --- .../27-interchain-accounts/types/codec.go | 201 +----------------- 1 file changed, 8 insertions(+), 193 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index a8bed738bed..c929fc3330e 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -2,8 +2,6 @@ package types import ( "encoding/json" - "reflect" - "strings" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -27,17 +25,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations((*authtypes.GenesisAccount)(nil), &InterchainAccount{}) } -// JSONAny is used to serialize and deserialize messages in the Any type for json encoding. -type JSONAny struct { - TypeURL string `json:"type_url,omitempty"` - Value []byte `json:"value,omitempty"` -} - -// JSONCosmosTx is used to serialize and deserialize messages in the CosmosTx type for json encoding. -type JSONCosmosTx struct { - Messages []*JSONAny `json:"messages,omitempty"` -} - // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are // packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx // bytes are returned. Only the ProtoCodec is supported for serializing messages. @@ -75,11 +62,18 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str if err != nil { return nil, err } + jsonAny, _, err := toJSONAny(cdc, protoAny) if err != nil { return nil, err } - msgAnys[i] = jsonAny + + jsonBytes, err := json.Marshal(jsonAny) + if err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal jsonAny with json") + } + + msgAnys[i] = (*json.RawMessage)(&jsonBytes) } cosmosTx := &JSONCosmosTx{ @@ -151,182 +145,3 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return msgs, nil } - -// fromJSONAny converts JSONAny to (proto)Any and extracts the proto.Message (recursively). -func fromJSONAny(cdc codec.BinaryCodec, jsonAny *JSONAny) (*codectypes.Any, proto.Message, error) { - // get the type_url field - typeURL := jsonAny.TypeURL - // get uninitialized proto.Message - message, err := cdc.(*codec.ProtoCodec).InterfaceRegistry().Resolve(typeURL) - if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot resolve this typeURL to a proto.Message: %s", typeURL) - } - - value := jsonAny.Value - var jsonMap map[string]interface{} - if err := json.Unmarshal(value, &jsonMap); err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal value to json") - } - - jsonAnyMapHandler := func(subJSONAnyMap map[string]interface{}) (*codectypes.Any, error) { - // Create the JSONAny - jsonBytes, err := json.Marshal(subJSONAnyMap) - if err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal the any field to bytes") - } - subJSONAny := &JSONAny{} - if err = json.Unmarshal(jsonBytes, subJSONAny); err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the any field with json") - } - - protoAny, _, err := fromJSONAny(cdc, subJSONAny) - if err != nil { - return nil, err - } - - return protoAny, nil - } - - // Check if message has Any fields - val := reflect.ValueOf(message).Elem() - for i := 0; i < val.NumField(); i++ { - field := val.Field(i) - fieldType := field.Type() - fieldJSONName, ok := val.Type().Field(i).Tag.Lookup("json") - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot get the json tag of the field") - } - // Remove ,omitempty if it's present - fieldJSONName = strings.Split(fieldJSONName, ",")[0] - - if fieldType == reflect.TypeOf((*codectypes.Any)(nil)) { - // get the any field - subJSONAnyMap, ok := jsonMap[fieldJSONName].(map[string]interface{}) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") - } - - protoAny, err := jsonAnyMapHandler(subJSONAnyMap) - if err != nil { - return nil, nil, err - } - - // Set back the new value - field.Set(reflect.ValueOf(protoAny)) - // Remove this field from jsonAnyMap - delete(jsonMap, fieldJSONName) - } else if fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)) { - sliceSubJSONAnyMap, ok := jsonMap[fieldJSONName].([]interface{}) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []interface{}") - } - - protoAnys := make([]*codectypes.Any, len(sliceSubJSONAnyMap)) - for i, subJSONAnyInterface := range sliceSubJSONAnyMap { - subJSONAnyMap, ok := subJSONAnyInterface.(map[string]interface{}) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to map[string]interface{}") - } - - protoAny, err := jsonAnyMapHandler(subJSONAnyMap) - if err != nil { - return nil, nil, err - } - protoAnys[i] = protoAny - } - field.Set(reflect.ValueOf(protoAnys)) - delete(jsonMap, fieldJSONName) - } - } - - // Marshal the map back to a byte slice - modifiedJSONAnyValue, err := json.Marshal(jsonMap) - if err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal modified json back to bytes") - } - - if err = cdc.(*codec.ProtoCodec).UnmarshalJSON(modifiedJSONAnyValue, message); err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal modified json to message") - } - - result, err := codectypes.NewAnyWithValue(message) - if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot pack the message into Any") - } - - return result, message, nil -} - -// toJSONAny converts (proto)Any to JSONAny and extracts the json bytes (recursively). -func toJSONAny(cdc codec.BinaryCodec, protoAny *codectypes.Any) (*JSONAny, []byte, error) { - var message proto.Message - - err := cdc.UnpackAny(protoAny, &message) - if err != nil { - return nil, nil, err - } - - messageMap := make(map[string]interface{}) - - val := reflect.ValueOf(message).Elem() - for i := 0; i < val.NumField(); i++ { - field := val.Field(i) - fieldType := field.Type() - fieldJSONName, ok := val.Type().Field(i).Tag.Lookup("json") - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot get the json tag of the field") - } - // Remove ,omitempty if it's present - fieldJSONName = strings.Split(fieldJSONName, ",")[0] - - switch { - case fieldType == reflect.TypeOf((*codectypes.Any)(nil)): - subProtoAny, ok := field.Interface().(*codectypes.Any) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the any field to *codectypes.Any") - } - - subJSONAny, _, err := toJSONAny(cdc, subProtoAny) - if err != nil { - return nil, nil, err - } - messageMap[fieldJSONName] = subJSONAny - case fieldType.Kind() == reflect.Slice && fieldType.Elem() == reflect.TypeOf((*codectypes.Any)(nil)): - subProtoAnys, ok := field.Interface().([]*codectypes.Any) - if !ok { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot assert the slice of any field to []*codectypes.Any") - } - - subJSONAnys := make([]*JSONAny, len(subProtoAnys)) - for i, subProtoAny := range subProtoAnys { - subJSONAny, _, err := toJSONAny(cdc, subProtoAny) - if err != nil { - return nil, nil, err - } - - subJSONAnys[i] = subJSONAny - } - messageMap[fieldJSONName] = subJSONAnys - default: - messageMap[fieldJSONName] = field.Interface() - } - } - - // Marshal the map back to a byte slice. This function marshalls recursively. - JSONAnyValue, err := json.Marshal(messageMap) - if err != nil { - return nil, nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal modified message to bytes") - } - - result := &JSONAny{ - TypeURL: protoAny.TypeUrl, - Value: JSONAnyValue, - } - - bytes, err := json.Marshal(result) - if err != nil { - return nil, nil, errorsmod.Wrapf(err, "cannot marshal modified json back to bytes") - } - - return result, bytes, nil -} From e65765690a18b88c25699894eec0be87c7b0abc8 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 8 Jun 2023 11:46:23 +0300 Subject: [PATCH 078/121] feat(ica): implemented json encoding using module codec --- .../27-interchain-accounts/types/codec.go | 94 +++++-------------- 1 file changed, 25 insertions(+), 69 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index c929fc3330e..042be5d00e3 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -1,8 +1,6 @@ package types import ( - "encoding/json" - errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -37,50 +35,27 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str var bz []byte var err error - switch encoding { - case EncodingProtobuf: - msgAnys := make([]*codectypes.Any, len(msgs)) - for i, msg := range msgs { - msgAnys[i], err = codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - } + msgAnys := make([]*codectypes.Any, len(msgs)) - cosmosTx := &CosmosTx{ - Messages: msgAnys, + for i, msg := range msgs { + msgAnys[i], err = codectypes.NewAnyWithValue(msg) + if err != nil { + return nil, err } + } + cosmosTx := &CosmosTx{ + Messages: msgAnys, + } + + switch encoding { + case EncodingProtobuf: bz, err = cdc.Marshal(cosmosTx) if err != nil { return nil, err } case EncodingJSON: - msgAnys := make([]*JSONAny, len(msgs)) - for i, msg := range msgs { - protoAny, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - jsonAny, _, err := toJSONAny(cdc, protoAny) - if err != nil { - return nil, err - } - - jsonBytes, err := json.Marshal(jsonAny) - if err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal jsonAny with json") - } - - msgAnys[i] = (*json.RawMessage)(&jsonBytes) - } - - cosmosTx := &JSONCosmosTx{ - Messages: msgAnys, - } - - bz, err = json.Marshal(cosmosTx) + bz, err = cdc.(*codec.ProtoCodec).MarshalJSON(cosmosTx) if err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal cosmosTx with json") } @@ -98,49 +73,30 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") } - var msgs []sdk.Msg + var cosmosTx CosmosTx switch encoding { case EncodingProtobuf: - var cosmosTx CosmosTx if err := cdc.Unmarshal(data, &cosmosTx); err != nil { return nil, err } - - msgs = make([]sdk.Msg, len(cosmosTx.Messages)) - - for i, protoAny := range cosmosTx.Messages { - var msg sdk.Msg - - err := cdc.UnpackAny(protoAny, &msg) - if err != nil { - return nil, err - } - - msgs[i] = msg - } case EncodingJSON: - var cosmosTx JSONCosmosTx - if err := json.Unmarshal(data, &cosmosTx); err != nil { + if err := cdc.(*codec.ProtoCodec).UnmarshalJSON(data, &cosmosTx); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") } + default: + return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) + } - msgs = make([]sdk.Msg, len(cosmosTx.Messages)) - - for i, jsonAny := range cosmosTx.Messages { - _, message, err := fromJSONAny(cdc, jsonAny) - if err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal the %d-th json message: %s", i, string(jsonAny.Value)) - } + msgs := make([]sdk.Msg, len(cosmosTx.Messages)) - msg, ok := message.(sdk.Msg) - if !ok { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "message %T does not implement sdk.Msg", message) - } - msgs[i] = msg + for i, protoAny := range cosmosTx.Messages { + var msg sdk.Msg + err := cdc.UnpackAny(protoAny, &msg) + if err != nil { + return nil, err } - default: - return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) + msgs[i] = msg } return msgs, nil From 92648d8a7aa6e0dfb1f12a67ac926a1eb2a7d140 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 8 Jun 2023 11:49:59 +0300 Subject: [PATCH 079/121] fix(ica.test): tests now match the new codec implementation --- .../27-interchain-accounts/types/codec_test.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 66470b11b5d..526a1c08bf4 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -51,7 +51,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: single msg from cosmwasm", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 93, 125} + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -65,7 +65,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: multiple msgs, same types from cosmwasm", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 48, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 93, 125} + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -75,7 +75,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(200))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), }, } }, @@ -84,7 +84,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: multiple msgs, different types from cosmwasm", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 48, 44, 57, 55, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 49, 48, 49, 44, 49, 48, 51, 44, 57, 55, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 53, 44, 49, 48, 48, 44, 57, 55, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 49, 50, 53, 93, 125, 93, 125} + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -103,7 +103,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "failure: unregistered msg type from cosmwasm", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 93, 125} + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} protoMessages = []proto.Message{ &mockSdkMsg{}, } @@ -113,7 +113,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "failure: multiple unregistered msg types from cosmwasm", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 44, 123, 34, 116, 121, 112, 101, 95, 117, 114, 108, 34, 58, 34, 47, 109, 111, 99, 107, 46, 77, 115, 103, 77, 111, 99, 107, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 91, 49, 50, 51, 44, 49, 50, 53, 93, 125, 93, 125} + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} protoMessages = []proto.Message{ &mockSdkMsg{}, &mockSdkMsg{}, @@ -350,7 +350,11 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { tc.malleate() bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, msgs, encoding) - suite.Require().NoError(err, tc.name) + if encoding == types.EncodingJSON && !tc.expPass { + suite.Require().Error(err, tc.name) + } else { + suite.Require().NoError(err, tc.name) + } msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, encoding) if tc.expPass { From d52962d6422441fefee549d8a69f135a09ddff20 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 8 Jun 2023 13:16:32 +0300 Subject: [PATCH 080/121] fix(ica.test): fixed the tests to the new implementation --- .../host/keeper/relay_test.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 4af543b4596..1eaf197cdd3 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -536,7 +536,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{"*"}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -546,7 +546,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "interchain account successfully executes banktypes.MsgSend from cosmwasm", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -556,7 +556,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "interchain account successfully executes govtypes.MsgSubmitProposal from cosmwasm", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -581,7 +581,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -591,7 +591,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially from cosmwasm", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 54, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, @@ -608,7 +608,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.coordinator.Setup(transferPath) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 52, 53, 44, 52, 57, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 57, 57, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 49, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 49, 48, 44, 49, 49, 55, 44, 49, 48, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 50, 44, 51, 52, 44, 53, 56, 44, 52, 56, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -618,9 +618,9 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "unregistered sdk.Msg from cosmwasm", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 56, 50, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{"/" + proto.MessageName((*banktypes.MsgSend)(nil))}) + params := types.NewParams(true, []string{"*"}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, false, @@ -628,7 +628,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "message type not allowed banktypes.MsgSend from cosmwasm", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 51, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 53, 51, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -638,7 +638,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { { "unauthorised: signer address is not the interchain account associated with the controller portID", func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 55, 44, 49, 49, 52, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 57, 55, 44, 49, 48, 56, 44, 49, 49, 55, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 53, 55, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 53, 51, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 53, 51, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 48, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 53, 51, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 54, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 52, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 49, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 54, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 51, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 50, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 55, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 56, 44, 53, 55, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 57, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 53, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 52, 56, 44, 52, 52, 44, 52, 57, 44, 52, 57, 44, 53, 52, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 51, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 53, 50, 44, 53, 55, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 50, 44, 53, 54, 44, 52, 52, 44, 53, 49, 44, 53, 50, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 52, 52, 44, 53, 55, 44, 53, 49, 44, 52, 52, 44, 52, 57, 44, 53, 48, 44, 53, 51, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) From 172879dcb1dcc5b94098bdbca968b4b5252cf68a Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 8 Jun 2023 19:58:02 +0300 Subject: [PATCH 081/121] style(ica.test): reorgenized the order of tests so that git diff makes sense --- .../types/codec_test.go | 218 +++++++++--------- 1 file changed, 109 insertions(+), 109 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 526a1c08bf4..8b4d1757e96 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -40,115 +40,6 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } -func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { - var cwBytes []byte - var protoMessages []proto.Message - testCases := []struct { - name string - malleate func() - expPass bool - }{ - { - "success: single msg from cosmwasm", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - } - }, - true, - }, - { - "success: multiple msgs, same types from cosmwasm", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - } - }, - true, - }, - { - "success: multiple msgs, different types from cosmwasm", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), - }, - &stakingtypes.MsgDelegate{ - DelegatorAddress: TestOwnerAddress, - ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), - }, - } - }, - true, - }, - { - "failure: unregistered msg type from cosmwasm", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} - protoMessages = []proto.Message{ - &mockSdkMsg{}, - } - }, - false, - }, - { - "failure: multiple unregistered msg types from cosmwasm", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} - protoMessages = []proto.Message{ - &mockSdkMsg{}, - &mockSdkMsg{}, - &mockSdkMsg{}, - } - }, - false, - }, - { - "failure: empty bytes", - func() { - cwBytes = []byte{} - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - suite.Run(tc.name, func() { - tc.malleate() - msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, cwBytes, types.EncodingJSON) - if tc.expPass { - suite.Require().NoError(errDeserialize, tc.name) - for i, msg := range msgs { - suite.Require().Equal(protoMessages[i], msg) - } - } else { - suite.Require().Error(errDeserialize, tc.name) - } - }) - } -} - func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { testedEncodings := []string{types.EncodingProtobuf, types.EncodingJSON} var msgs []proto.Message @@ -401,6 +292,115 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() suite.Require().Empty(bz) } +func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { + var cwBytes []byte + var protoMessages []proto.Message + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success: single msg from cosmwasm", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + } + }, + true, + }, + { + "success: multiple msgs, same types from cosmwasm", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + } + }, + true, + }, + { + "success: multiple msgs, different types from cosmwasm", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + }, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + }, + } + }, + true, + }, + { + "failure: unregistered msg type from cosmwasm", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} + protoMessages = []proto.Message{ + &mockSdkMsg{}, + } + }, + false, + }, + { + "failure: multiple unregistered msg types from cosmwasm", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} + protoMessages = []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, + } + }, + false, + }, + { + "failure: empty bytes", + func() { + cwBytes = []byte{} + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + tc.malleate() + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, cwBytes, types.EncodingJSON) + if tc.expPass { + suite.Require().NoError(errDeserialize, tc.name) + for i, msg := range msgs { + suite.Require().Equal(protoMessages[i], msg) + } + } else { + suite.Require().Error(errDeserialize, tc.name) + } + }) + } +} + func (suite *TypesTestSuite) TestUnsupportedEncodingType() { // Test serialize msgs := []proto.Message{ From 3b5b872c2a33770b05a4fabb5177e86b6762ed00 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 17:50:28 +0200 Subject: [PATCH 082/121] imp(ica/controller): controller codec need not be codec.Codec --- modules/apps/27-interchain-accounts/controller/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index ffaa6c43259..534e2dd5bb3 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -25,7 +25,7 @@ import ( // Keeper defines the IBC interchain accounts controller keeper type Keeper struct { storeKey storetypes.StoreKey - cdc codec.Codec + cdc codec.BinaryCodec paramSpace paramtypes.Subspace ics4Wrapper porttypes.ICS4Wrapper From ade40de699ee581ab5c72073fab528d55b8987fc Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 17:58:01 +0200 Subject: [PATCH 083/121] imp(ica): replaced BinaryCodec with Codec --- modules/apps/27-interchain-accounts/types/codec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 042be5d00e3..c316a36ffde 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -67,7 +67,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str } // DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes into a slice of sdk.Msg's. -func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([]sdk.Msg, error) { +func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.Msg, error) { // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") @@ -81,7 +81,7 @@ func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([ return nil, err } case EncodingJSON: - if err := cdc.(*codec.ProtoCodec).UnmarshalJSON(data, &cosmosTx); err != nil { + if err := cdc.UnmarshalJSON(data, &cosmosTx); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") } default: From 12b556c3e9a1023ae1e381d88a1eba18153da1f1 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 19:28:55 +0200 Subject: [PATCH 084/121] test(ica): fixed codec test --- .../apps/27-interchain-accounts/types/codec_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 8b4d1757e96..aa72797d284 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -247,15 +247,21 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { suite.Require().NoError(err, tc.name) } - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, encoding) + deserializedMsgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz, encoding) if tc.expPass { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) } - for i, msg := range msgs { - suite.Require().Equal(msgs[i], msg) + if tc.expPass { + for i, msg := range msgs { + // Here I went with this because when unmarshaled with json, the anys have private fields + // and cached values that are not equal to the original message. + // I couldn't get suite.Require().EqualExportedValues() didn't work. + // proto.Equal() doesn't work because it doesn't know how to compare math.Int. + suite.Require().Equal(proto.CompactTextString(msg), proto.CompactTextString(deserializedMsgs[i])) + } } }) } From 5e530b847c6562a3ea4025f413e54aa73473098c Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 19:30:21 +0200 Subject: [PATCH 085/121] docs(ica.test): codec comment updated --- modules/apps/27-interchain-accounts/types/codec_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index aa72797d284..766ea675a1c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -258,8 +258,8 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { for i, msg := range msgs { // Here I went with this because when unmarshaled with json, the anys have private fields // and cached values that are not equal to the original message. - // I couldn't get suite.Require().EqualExportedValues() didn't work. - // proto.Equal() doesn't work because it doesn't know how to compare math.Int. + // I couldn't get suite.Require().EqualExportedValues() to work. + // proto.Equal() doesn't work because it doesn't know how to compare sdk's math.Int. suite.Require().Equal(proto.CompactTextString(msg), proto.CompactTextString(deserializedMsgs[i])) } } From 575220c7ba99f90da26ef302a28e0238411c37ae Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 22:16:54 +0200 Subject: [PATCH 086/121] docs(ica.test): updated comments --- .../27-interchain-accounts/types/codec_test.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 766ea675a1c..89b97a99580 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -256,10 +256,16 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { if tc.expPass { for i, msg := range msgs { - // Here I went with this because when unmarshaled with json, the anys have private fields - // and cached values that are not equal to the original message. - // I couldn't get suite.Require().EqualExportedValues() to work. - // proto.Equal() doesn't work because it doesn't know how to compare sdk's math.Int. + // We're using proto.CompactTextString() for comparison instead of suite.Require().Equal() or proto.Equal() + // for two main reasons: + // + // 1. When deserializing from JSON, the `Any` type has private fields and cached values + // that do not match the original message, causing equality checks to fail. + // + // 2. proto.Equal() does not have built-in support for comparing sdk's math.Int types. + // + // Using proto.CompactTextString() mitigates these issues by focusing on serialized string representation, + // rather than internal details of the types. suite.Require().Equal(proto.CompactTextString(msg), proto.CompactTextString(deserializedMsgs[i])) } } From dbaed631dbf24dfd2957681aa205de77f7136a5f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 22:27:35 +0200 Subject: [PATCH 087/121] style(ica.test): removed 'from cosmwasm' from test case name as it is aparent from test name --- .../host/keeper/relay_test.go | 14 +++++++------- .../27-interchain-accounts/types/codec_test.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 1eaf197cdd3..1e6ccd532ea 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -544,7 +544,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes banktypes.MsgSend from cosmwasm", + "interchain account successfully executes banktypes.MsgSend", func(encoding string) { packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} @@ -554,7 +554,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes govtypes.MsgSubmitProposal from cosmwasm", + "interchain account successfully executes govtypes.MsgSubmitProposal", func(encoding string) { packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} @@ -564,7 +564,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes govtypes.MsgVote from cosmwasm", + "interchain account successfully executes govtypes.MsgVote", func(encoding string) { // Populate the gov keeper in advance with an active proposal testProposal := &govtypes.TextProposal{ @@ -589,7 +589,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially from cosmwasm", + "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", func(encoding string) { packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) @@ -598,7 +598,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "interchain account successfully executes transfertypes.MsgTransfer from cosmwasm", + "interchain account successfully executes transfertypes.MsgTransfer", func(encoding string) { transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort @@ -616,7 +616,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { true, }, { - "unregistered sdk.Msg from cosmwasm", + "unregistered sdk.Msg", func(encoding string) { packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} @@ -626,7 +626,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { false, }, { - "message type not allowed banktypes.MsgSend from cosmwasm", + "message type not allowed banktypes.MsgSend", func(encoding string) { packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 89b97a99580..dbb8a7fde3c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -313,7 +313,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { expPass bool }{ { - "success: single msg from cosmwasm", + "success: single msg", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} protoMessages = []proto.Message{ @@ -327,7 +327,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { true, }, { - "success: multiple msgs, same types from cosmwasm", + "success: multiple msgs, same types", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} protoMessages = []proto.Message{ @@ -346,7 +346,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { true, }, { - "success: multiple msgs, different types from cosmwasm", + "success: multiple msgs, different types", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} protoMessages = []proto.Message{ @@ -365,7 +365,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { true, }, { - "failure: unregistered msg type from cosmwasm", + "failure: unregistered msg type", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} protoMessages = []proto.Message{ @@ -375,7 +375,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { false, }, { - "failure: multiple unregistered msg types from cosmwasm", + "failure: multiple unregistered msg types", func() { cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} protoMessages = []proto.Message{ From b8b41acd301cdace4c2cfa30970148a8735225fd Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 14 Jun 2023 22:29:15 +0200 Subject: [PATCH 088/121] style(ica.test): ran gofumpt --- .../types/codec_test.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index dbb8a7fde3c..1bbec00511b 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -256,16 +256,16 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { if tc.expPass { for i, msg := range msgs { - // We're using proto.CompactTextString() for comparison instead of suite.Require().Equal() or proto.Equal() - // for two main reasons: - // - // 1. When deserializing from JSON, the `Any` type has private fields and cached values - // that do not match the original message, causing equality checks to fail. - // - // 2. proto.Equal() does not have built-in support for comparing sdk's math.Int types. - // - // Using proto.CompactTextString() mitigates these issues by focusing on serialized string representation, - // rather than internal details of the types. + // We're using proto.CompactTextString() for comparison instead of suite.Require().Equal() or proto.Equal() + // for two main reasons: + // + // 1. When deserializing from JSON, the `Any` type has private fields and cached values + // that do not match the original message, causing equality checks to fail. + // + // 2. proto.Equal() does not have built-in support for comparing sdk's math.Int types. + // + // Using proto.CompactTextString() mitigates these issues by focusing on serialized string representation, + // rather than internal details of the types. suite.Require().Equal(proto.CompactTextString(msg), proto.CompactTextString(deserializedMsgs[i])) } } From 1767dcc8706be2399632b4c07d602992c05849cb Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sat, 17 Jun 2023 16:28:36 +0200 Subject: [PATCH 089/121] fix: fix merge error --- .../types/codec_test.go | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index d4e4378200f..c74664668d5 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -51,28 +51,32 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { }{ { "single msg", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + } }, true, }, { "multiple msgs, same types", - []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(200))), - }, + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(200))), + }, + } }, true, }, @@ -83,12 +87,12 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, &stakingtypes.MsgDelegate{ DelegatorAddress: TestOwnerAddress, ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), }, } }, @@ -107,7 +111,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { msgs = []proto.Message{ &govtypes.MsgSubmitProposal{ Content: content, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), Proposer: TestOwnerAddress, }, } @@ -120,7 +124,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { sendMsg := &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), } sendAny, err := codectypes.NewAnyWithValue(sendMsg) suite.Require().NoError(err) @@ -133,7 +137,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { suite.Require().NoError(err) legacyPropMsg := &govtypes.MsgSubmitProposal{ Content: content, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), Proposer: TestOwnerAddress, } legacyPropAny, err := codectypes.NewAnyWithValue(legacyPropMsg) @@ -142,7 +146,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { delegateMsg := &stakingtypes.MsgDelegate{ DelegatorAddress: TestOwnerAddress, ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), } delegateAny, err := codectypes.NewAnyWithValue(delegateMsg) suite.Require().NoError(err) From b169aa74f6d98d9bda25f105a2bc61567348c6d1 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sat, 17 Jun 2023 16:30:56 +0200 Subject: [PATCH 090/121] deps(ica): replaced sdk.NewInt with sdkmath.NewInt --- .../host/keeper/relay_test.go | 4 ++-- .../types/codec_test.go | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 2118754f065..f09d4942fe3 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -478,7 +478,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { interchainAccount := suite.chainB.GetSimApp().AccountKeeper.GetAccount(suite.chainB.GetContext(), icaAddr) suite.Require().Equal(interchainAccount.GetAddress().String(), storedAddr) - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000)))) + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10000)))) tc.malleate(encoding) // malleate mutates test data @@ -666,7 +666,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { // Set the address of the interchain account stored in state during handshake step for cosmwasm testing suite.setICAWallet(suite.chainB.GetContext(), portID, interchainAccountAddr) - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000)))) + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000)))) tc.malleate(icatypes.EncodingJSON) // malleate mutates test data diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index c74664668d5..9b48051e61f 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -155,7 +155,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { propMsg := &govtypesv1.MsgSubmitProposal{ Messages: messages, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), Proposer: TestOwnerAddress, Metadata: "", Title: "New IBC Gov Proposal", @@ -203,7 +203,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { msgs = []proto.Message{ &govtypes.MsgSubmitProposal{ Content: mockAny, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), Proposer: TestOwnerAddress, }, } @@ -221,7 +221,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { propMsg := &govtypesv1.MsgSubmitProposal{ Messages: messages, - InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000))), + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), Proposer: TestOwnerAddress, Metadata: "", Title: "New IBC Gov Proposal", @@ -321,7 +321,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, } }, @@ -335,12 +335,12 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, } }, @@ -354,12 +354,12 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, &stakingtypes.MsgDelegate{ DelegatorAddress: TestOwnerAddress, ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), }, } }, @@ -420,7 +420,7 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, } _, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, msgs, "unsupported") @@ -431,7 +431,7 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, } data, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, msgs, types.EncodingProtobuf) From 5cd75c9e7967cc539c953a24fc26ccf7fffecce9 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sat, 17 Jun 2023 16:32:07 +0200 Subject: [PATCH 091/121] style(ica): ran 'gofumpt' --- modules/apps/27-interchain-accounts/host/keeper/relay_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index f09d4942fe3..3c796eb1fa2 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -478,7 +478,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { interchainAccount := suite.chainB.GetSimApp().AccountKeeper.GetAccount(suite.chainB.GetContext(), icaAddr) suite.Require().Equal(interchainAccount.GetAddress().String(), storedAddr) - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10000)))) + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10000)))) tc.malleate(encoding) // malleate mutates test data From 5123fbaad61b18a1b16c9d75caa72bbb8ba2dac6 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sat, 24 Jun 2023 23:39:59 +0200 Subject: [PATCH 092/121] imp(ica): removed redundant cosmwasm tests --- .../host/keeper/relay_test.go | 198 ------------------ .../types/codec_test.go | 109 ---------- 2 files changed, 307 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index e88e3b69e93..28f6bc030b6 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -7,7 +7,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -509,193 +508,6 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { } } -func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { - var ( - path *ibctesting.Path - packetData []byte - ) - interchainAccountAddr := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" - - testCases := []struct { - msg string - malleate func(encoding string) - expPass bool - }{ - { - "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func(encoding string) { - // Populate the gov keeper in advance with an active proposal - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) - suite.Require().NoError(err) - - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(interchainAccountAddr)) - suite.Require().NoError(err) - - suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{"*"}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes banktypes.MsgSend", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes govtypes.MsgSubmitProposal", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes govtypes.MsgVote", - func(encoding string) { - // Populate the gov keeper in advance with an active proposal - testProposal := &govtypes.TextProposal{ - Title: "IBC Gov Proposal", - Description: "tokens for all!", - } - - proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) - suite.Require().NoError(err) - - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) - suite.Require().NoError(err) - - suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) - suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "interchain account successfully executes transfertypes.MsgTransfer", - func(encoding string) { - transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) - transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort - transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort - transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version - transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version - - suite.coordinator.Setup(transferPath) - - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 52, 53, 44, 52, 57, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 57, 57, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 49, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 49, 48, 44, 49, 49, 55, 44, 49, 48, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 50, 44, 51, 52, 44, 53, 56, 44, 52, 56, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - true, - }, - { - "unregistered sdk.Msg", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{"*"}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - false, - }, - { - "message type not allowed banktypes.MsgSend", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - false, - }, - { - "unauthorised: signer address is not the interchain account associated with the controller portID", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} - - params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) - suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - suite.Run(tc.msg, func() { - suite.SetupTest() // reset - - path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) - suite.coordinator.SetupConnections(path) - - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) - suite.Require().NoError(err) - - portID, err := icatypes.NewControllerPortID(TestOwnerAddress) - suite.Require().NoError(err) - - // Set the address of the interchain account stored in state during handshake step for cosmwasm testing - suite.setICAWallet(suite.chainB.GetContext(), portID, interchainAccountAddr) - - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000)))) - - tc.malleate(icatypes.EncodingJSON) // malleate mutates test data - - packet := channeltypes.NewPacket( - packetData, - suite.chainA.SenderAccount.GetSequence(), - path.EndpointA.ChannelConfig.PortID, - path.EndpointA.ChannelID, - path.EndpointB.ChannelConfig.PortID, - path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), - 0, - ) - - txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) - - if tc.expPass { - suite.Require().NoError(err) - suite.Require().NotNil(txResponse) - } else { - suite.Require().Error(err) - suite.Require().Nil(txResponse) - } - }) - } -} - func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amount sdk.Coins) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(ctx, ibctesting.FirstConnectionID, portID) suite.Require().True(found) @@ -710,13 +522,3 @@ func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amou suite.Require().NotEmpty(res) suite.Require().NoError(err) } - -// This function is used to predetermine the address of the interchain account for testing -func (suite *KeeperTestSuite) setICAWallet(ctx sdk.Context, portID string, address string) { - icaAddr, err := sdk.AccAddressFromBech32(address) - suite.Require().NoError(err) - interchainAccount := authtypes.NewBaseAccountWithAddress(icaAddr) - suite.chainB.GetSimApp().ICAHostKeeper.SetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID, address) - suite.chainB.GetSimApp().AccountKeeper.SetAccount(suite.chainB.GetContext(), interchainAccount) - suite.Require().Equal(interchainAccount.GetAddress().String(), icaAddr.String()) -} diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 7955607aec3..2653c2de473 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -307,115 +307,6 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() suite.Require().Empty(bz) } -func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { - var cwBytes []byte - var protoMessages []proto.Message - testCases := []struct { - name string - malleate func() - expPass bool - }{ - { - "success: single msg", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - } - }, - true, - }, - { - "success: multiple msgs, same types", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - } - }, - true, - }, - { - "success: multiple msgs, different types", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - &stakingtypes.MsgDelegate{ - DelegatorAddress: TestOwnerAddress, - ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), - }, - } - }, - true, - }, - { - "failure: unregistered msg type", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} - protoMessages = []proto.Message{ - &mockSdkMsg{}, - } - }, - false, - }, - { - "failure: multiple unregistered msg types", - func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} - protoMessages = []proto.Message{ - &mockSdkMsg{}, - &mockSdkMsg{}, - &mockSdkMsg{}, - } - }, - false, - }, - { - "failure: empty bytes", - func() { - cwBytes = []byte{} - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - suite.Run(tc.name, func() { - tc.malleate() - msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, cwBytes, types.EncodingJSON) - if tc.expPass { - suite.Require().NoError(errDeserialize, tc.name) - for i, msg := range msgs { - suite.Require().Equal(protoMessages[i], msg) - } - } else { - suite.Require().Error(errDeserialize, tc.name) - } - }) - } -} - func (suite *TypesTestSuite) TestUnsupportedEncodingType() { // Test serialize msgs := []proto.Message{ From e893d21cdfbcac1d2fe621de5fb7b6a9ca9bc8a5 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 26 Jun 2023 11:58:27 +0200 Subject: [PATCH 093/121] revert: "imp(ica): removed redundant cosmwasm tests" This reverts commit 5123fbaad61b18a1b16c9d75caa72bbb8ba2dac6. --- .../host/keeper/relay_test.go | 198 ++++++++++++++++++ .../types/codec_test.go | 109 ++++++++++ 2 files changed, 307 insertions(+) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 28f6bc030b6..e88e3b69e93 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -7,6 +7,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -508,6 +509,193 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { } } +func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { + var ( + path *ibctesting.Path + packetData []byte + ) + interchainAccountAddr := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" + + testCases := []struct { + msg string + malleate func(encoding string) + expPass bool + }{ + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func(encoding string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(interchainAccountAddr)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes banktypes.MsgSend", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgVote", + func(encoding string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes transfertypes.MsgTransfer", + func(encoding string) { + transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) + transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version + transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version + + suite.coordinator.Setup(transferPath) + + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 52, 53, 44, 52, 57, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 57, 57, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 49, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 49, 48, 44, 49, 49, 55, 44, 49, 48, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 50, 44, 51, 52, 44, 53, 56, 44, 52, 56, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "unregistered sdk.Msg", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "message type not allowed banktypes.MsgSend", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "unauthorised: signer address is not the interchain account associated with the controller portID", + func(encoding string) { + packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.msg, func() { + suite.SetupTest() // reset + + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) + suite.coordinator.SetupConnections(path) + + err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) + suite.Require().NoError(err) + + portID, err := icatypes.NewControllerPortID(TestOwnerAddress) + suite.Require().NoError(err) + + // Set the address of the interchain account stored in state during handshake step for cosmwasm testing + suite.setICAWallet(suite.chainB.GetContext(), portID, interchainAccountAddr) + + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000)))) + + tc.malleate(icatypes.EncodingJSON) // malleate mutates test data + + packet := channeltypes.NewPacket( + packetData, + suite.chainA.SenderAccount.GetSequence(), + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + clienttypes.NewHeight(1, 100), + 0, + ) + + txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(txResponse) + } else { + suite.Require().Error(err) + suite.Require().Nil(txResponse) + } + }) + } +} + func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amount sdk.Coins) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(ctx, ibctesting.FirstConnectionID, portID) suite.Require().True(found) @@ -522,3 +710,13 @@ func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amou suite.Require().NotEmpty(res) suite.Require().NoError(err) } + +// This function is used to predetermine the address of the interchain account for testing +func (suite *KeeperTestSuite) setICAWallet(ctx sdk.Context, portID string, address string) { + icaAddr, err := sdk.AccAddressFromBech32(address) + suite.Require().NoError(err) + interchainAccount := authtypes.NewBaseAccountWithAddress(icaAddr) + suite.chainB.GetSimApp().ICAHostKeeper.SetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID, address) + suite.chainB.GetSimApp().AccountKeeper.SetAccount(suite.chainB.GetContext(), interchainAccount) + suite.Require().Equal(interchainAccount.GetAddress().String(), icaAddr.String()) +} diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 2653c2de473..7955607aec3 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -307,6 +307,115 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() suite.Require().Empty(bz) } +func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { + var cwBytes []byte + var protoMessages []proto.Message + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success: single msg", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + } + }, + true, + }, + { + "success: multiple msgs, same types", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + } + }, + true, + }, + { + "success: multiple msgs, different types", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} + protoMessages = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), + }, + } + }, + true, + }, + { + "failure: unregistered msg type", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} + protoMessages = []proto.Message{ + &mockSdkMsg{}, + } + }, + false, + }, + { + "failure: multiple unregistered msg types", + func() { + cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} + protoMessages = []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, + } + }, + false, + }, + { + "failure: empty bytes", + func() { + cwBytes = []byte{} + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + tc.malleate() + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, cwBytes, types.EncodingJSON) + if tc.expPass { + suite.Require().NoError(errDeserialize, tc.name) + for i, msg := range msgs { + suite.Require().Equal(protoMessages[i], msg) + } + } else { + suite.Require().Error(errDeserialize, tc.name) + } + }) + } +} + func (suite *TypesTestSuite) TestUnsupportedEncodingType() { // Test serialize msgs := []proto.Message{ From 2581cc1847e3feb9f36cfcf40ba060369620becf Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 26 Jun 2023 12:14:17 +0200 Subject: [PATCH 094/121] imp(ica.test): made codec_test human readable --- .../types/codec_test.go | 51 ++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 7955607aec3..2368f9d23df 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -307,7 +307,7 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() suite.Require().Empty(bz) } -func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { +func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { var cwBytes []byte var protoMessages []proto.Message testCases := []struct { @@ -318,7 +318,16 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: single msg", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} + cwBytes = []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "bananas", "amount": "100" }] + } + ] + }`) protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -332,7 +341,22 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: multiple msgs, same types", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 93, 125} + cwBytes = []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "bananas", "amount": "100" }] + }, + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "bananas", "amount": "100" }] + } + ] + }`) protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -351,7 +375,22 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "success: multiple msgs, different types", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 98, 97, 110, 107, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 83, 101, 110, 100, 34, 44, 34, 102, 114, 111, 109, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 116, 111, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 91, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 98, 97, 110, 97, 110, 97, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 34, 125, 93, 125, 44, 123, 34, 64, 116, 121, 112, 101, 34, 58, 34, 47, 99, 111, 115, 109, 111, 115, 46, 115, 116, 97, 107, 105, 110, 103, 46, 118, 49, 98, 101, 116, 97, 49, 46, 77, 115, 103, 68, 101, 108, 101, 103, 97, 116, 101, 34, 44, 34, 100, 101, 108, 101, 103, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 118, 97, 108, 105, 100, 97, 116, 111, 114, 95, 97, 100, 100, 114, 101, 115, 115, 34, 58, 34, 99, 111, 115, 109, 111, 115, 49, 55, 100, 116, 108, 48, 109, 106, 116, 51, 116, 55, 55, 107, 112, 117, 104, 103, 50, 101, 100, 113, 122, 106, 112, 115, 122, 117, 108, 119, 104, 103, 122, 117, 106, 57, 108, 106, 115, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 123, 34, 100, 101, 110, 111, 109, 34, 58, 34, 115, 116, 97, 107, 101, 34, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 53, 48, 48, 48, 34, 125, 125, 93, 125} + cwBytes = []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "bananas", "amount": "100" }] + }, + { + "@type": "/cosmos.staking.v1beta1.MsgDelegate", + "delegator_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "validator_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": { "denom": "stake", "amount": "5000" } + } + ] + }`) protoMessages = []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -370,7 +409,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "failure: unregistered msg type", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 93, 125} + cwBytes = []byte(`{"messages":[{}]}`) protoMessages = []proto.Message{ &mockSdkMsg{}, } @@ -380,7 +419,7 @@ func (suite *TypesTestSuite) TestCosmwasmDeserializeCosmosTx() { { "failure: multiple unregistered msg types", func() { - cwBytes = []byte{123, 34, 109, 101, 115, 115, 97, 103, 101, 115, 34, 58, 91, 123, 125, 44, 123, 125, 44, 123, 125, 93, 125} + cwBytes = []byte(`{"messages":[{},{},{}]}`) protoMessages = []proto.Message{ &mockSdkMsg{}, &mockSdkMsg{}, From a06a882919d907da8a95b0fad77fe41f7ab93af6 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 26 Jun 2023 13:26:31 +0200 Subject: [PATCH 095/121] imp(ica.test): made relay_test human readable --- .../host/keeper/relay_test.go | 214 +++++++++++++++--- 1 file changed, 180 insertions(+), 34 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index e88e3b69e93..f84181f0a24 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -1,13 +1,15 @@ package keeper_test import ( + "fmt" + "strings" + "github.com/cosmos/gogoproto/proto" sdkmath "cosmossdk.io/math" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -509,7 +511,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { } } -func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { +func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { var ( path *ibctesting.Path packetData []byte @@ -518,12 +520,12 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { testCases := []struct { msg string - malleate func(encoding string) + malleate func(icaAddress string) expPass bool }{ { "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func(encoding string) { + func(icaAddress string) { // Populate the gov keeper in advance with an active proposal testProposal := &govtypes.TextProposal{ Title: "IBC Gov Proposal", @@ -539,7 +541,24 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgVote", + "voter": "`+ icaAddress +`", + "proposal_id": 1, + "option": 1 + } + ] + }`) + // this is the way cosmwasm encodes byte arrays by default + // golang doesn't use this encoding by default, but it can still deserialize: + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{"*"}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -548,8 +567,23 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "interchain account successfully executes banktypes.MsgSend", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "`+ icaAddress +`", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "stake", "amount": "100" }] + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -558,8 +592,27 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgSubmitProposal", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", + "content": { + "@type": "/cosmos.gov.v1beta1.TextProposal", + "title": "IBC Gov Proposal", + "description": "tokens for all!" + }, + "initial_deposit": [{ "denom": "stake", "amount": "5000" }], + "proposer": "`+ icaAddress +`" + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -568,7 +621,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgVote", - func(encoding string) { + func(icaAddress string) { // Populate the gov keeper in advance with an active proposal testProposal := &govtypes.TextProposal{ Title: "IBC Gov Proposal", @@ -584,7 +637,22 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgVote", + "voter": "`+ icaAddress +`", + "proposal_id": 1, + "option": 1 + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -593,8 +661,40 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 49, 55, 44, 57, 56, 44, 49, 48, 57, 44, 49, 48, 53, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 56, 52, 44, 49, 48, 49, 44, 49, 50, 48, 44, 49, 49, 54, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 56, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 55, 51, 44, 54, 54, 44, 54, 55, 44, 51, 50, 44, 55, 49, 44, 49, 49, 49, 44, 49, 49, 56, 44, 51, 50, 44, 56, 48, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 53, 44, 57, 57, 44, 49, 49, 52, 44, 49, 48, 53, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 51, 50, 44, 49, 48, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 50, 44, 57, 55, 44, 49, 48, 56, 44, 49, 48, 56, 44, 51, 51, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 48, 53, 44, 49, 49, 48, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 53, 51, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 54, 56, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 52, 52, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 49, 48, 51, 44, 49, 49, 49, 44, 49, 49, 56, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 54, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 56, 44, 49, 49, 49, 44, 49, 49, 54, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 56, 44, 57, 53, 44, 49, 48, 53, 44, 49, 48, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 49, 44, 49, 49, 50, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", + "content": { + "@type": "/cosmos.gov.v1beta1.TextProposal", + "title": "IBC Gov Proposal", + "description": "tokens for all!" + }, + "initial_deposit": [{ "denom": "stake", "amount": "5000" }], + "proposer": "`+ icaAddress +`" + }, + { + "@type": "/cosmos.gov.v1beta1.MsgDeposit", + "proposal_id": 1, + "depositor": "`+ icaAddress +`", + "amount": [{ "denom": "stake", "amount": "10000000" }] + }, + { + "@type": "/cosmos.gov.v1beta1.MsgVote", + "voter": "`+ icaAddress +`", + "proposal_id": 1, + "option": 1 + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) }, @@ -602,7 +702,7 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "interchain account successfully executes transfertypes.MsgTransfer", - func(encoding string) { + func(icaAddress string) { transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort @@ -611,7 +711,26 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { suite.coordinator.Setup(transferPath) - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 49, 48, 53, 44, 57, 56, 44, 57, 57, 44, 52, 54, 44, 57, 55, 44, 49, 49, 50, 44, 49, 49, 50, 44, 49, 48, 56, 44, 49, 48, 53, 44, 57, 57, 44, 57, 55, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 49, 49, 53, 44, 52, 54, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 52, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 49, 49, 50, 44, 49, 49, 49, 44, 49, 49, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 53, 44, 49, 48, 50, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 52, 44, 57, 57, 44, 49, 48, 49, 44, 57, 53, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 48, 52, 44, 57, 55, 44, 49, 49, 48, 44, 49, 49, 48, 44, 49, 48, 49, 44, 49, 48, 56, 44, 52, 53, 44, 52, 57, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 49, 48, 55, 44, 49, 48, 49, 44, 49, 49, 48, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 53, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 57, 57, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 49, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 49, 50, 51, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 49, 48, 44, 49, 49, 55, 44, 49, 48, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 52, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 52, 44, 51, 52, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 56, 44, 49, 48, 53, 44, 49, 49, 53, 44, 49, 48, 53, 44, 49, 49, 49, 44, 49, 49, 48, 44, 57, 53, 44, 49, 48, 52, 44, 49, 48, 49, 44, 49, 48, 53, 44, 49, 48, 51, 44, 49, 48, 52, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 49, 50, 53, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 54, 44, 57, 53, 44, 49, 49, 54, 44, 49, 48, 53, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 50, 44, 51, 52, 44, 53, 56, 44, 52, 56, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/ibc.applications.transfer.v1.MsgTransfer", + "source_port": "transfer", + "source_channel": "channel-1", + "token": { "denom": "stake", "amount": "100" }, + "sender": "`+ icaAddress +`", + "receiver": "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk", + "timeout_height": { "revision_number": 1, "revision_height": 100 }, + "timeout_timestamp": 0 + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -620,8 +739,14 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "unregistered sdk.Msg", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + func(icaAddress string) { + msgBytes := []byte(`{"messages":[{}]}`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{"*"}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -630,8 +755,23 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "message type not allowed banktypes.MsgSend", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "`+ icaAddress +`", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "stake", "amount": "100" }] + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -640,8 +780,23 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { }, { "unauthorised: signer address is not the interchain account associated with the controller portID", - func(encoding string) { - packetData = []byte{123, 34, 116, 121, 112, 101, 34, 58, 49, 44, 34, 100, 97, 116, 97, 34, 58, 91, 49, 50, 51, 44, 51, 52, 44, 49, 48, 57, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 57, 55, 44, 49, 48, 51, 44, 49, 48, 49, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 54, 52, 44, 49, 49, 54, 44, 49, 50, 49, 44, 49, 49, 50, 44, 49, 48, 49, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 55, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 54, 44, 57, 56, 44, 57, 55, 44, 49, 49, 48, 44, 49, 48, 55, 44, 52, 54, 44, 49, 49, 56, 44, 52, 57, 44, 57, 56, 44, 49, 48, 49, 44, 49, 49, 54, 44, 57, 55, 44, 52, 57, 44, 52, 54, 44, 55, 55, 44, 49, 49, 53, 44, 49, 48, 51, 44, 56, 51, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 48, 48, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 48, 50, 44, 49, 49, 52, 44, 49, 49, 49, 44, 49, 48, 57, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 53, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 48, 56, 44, 52, 56, 44, 49, 48, 57, 44, 49, 48, 54, 44, 49, 49, 54, 44, 53, 49, 44, 49, 49, 54, 44, 53, 53, 44, 53, 53, 44, 49, 48, 55, 44, 49, 49, 50, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 48, 51, 44, 53, 48, 44, 49, 48, 49, 44, 49, 48, 48, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 54, 44, 49, 49, 50, 44, 49, 49, 53, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 48, 52, 44, 49, 48, 51, 44, 49, 50, 50, 44, 49, 49, 55, 44, 49, 48, 54, 44, 53, 55, 44, 49, 48, 56, 44, 49, 48, 54, 44, 49, 49, 53, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 49, 49, 54, 44, 49, 49, 49, 44, 57, 53, 44, 57, 55, 44, 49, 48, 48, 44, 49, 48, 48, 44, 49, 49, 52, 44, 49, 48, 49, 44, 49, 49, 53, 44, 49, 49, 53, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 57, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 53, 44, 52, 57, 44, 53, 51, 44, 49, 49, 55, 44, 49, 48, 56, 44, 49, 49, 52, 44, 49, 48, 50, 44, 53, 49, 44, 53, 52, 44, 49, 48, 48, 44, 53, 50, 44, 49, 49, 57, 44, 49, 48, 48, 44, 49, 49, 54, 44, 49, 49, 52, 44, 49, 49, 54, 44, 49, 49, 51, 44, 49, 50, 50, 44, 49, 48, 55, 44, 49, 48, 51, 44, 57, 55, 44, 57, 55, 44, 49, 49, 48, 44, 53, 55, 44, 49, 50, 49, 44, 49, 48, 56, 44, 49, 49, 57, 44, 49, 49, 55, 44, 49, 48, 52, 44, 49, 49, 53, 44, 53, 53, 44, 49, 48, 55, 44, 53, 53, 44, 49, 49, 51, 44, 49, 50, 50, 44, 53, 53, 44, 53, 51, 44, 53, 49, 44, 49, 49, 55, 44, 49, 48, 55, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 57, 49, 44, 49, 50, 51, 44, 51, 52, 44, 49, 48, 48, 44, 49, 48, 49, 44, 49, 49, 48, 44, 49, 49, 49, 44, 49, 48, 57, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 49, 49, 53, 44, 49, 49, 54, 44, 57, 55, 44, 49, 48, 55, 44, 49, 48, 49, 44, 51, 52, 44, 52, 52, 44, 51, 52, 44, 57, 55, 44, 49, 48, 57, 44, 49, 49, 49, 44, 49, 49, 55, 44, 49, 49, 48, 44, 49, 49, 54, 44, 51, 52, 44, 53, 56, 44, 51, 52, 44, 52, 57, 44, 52, 56, 44, 52, 56, 44, 51, 52, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 44, 57, 51, 44, 49, 50, 53, 93, 125} + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "`+ ibctesting.InvalidID +`", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "stake", "amount": "100" }] + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString +` + }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) @@ -665,12 +820,13 @@ func (suite *KeeperTestSuite) TestCosmwasmOnRecvPacket() { portID, err := icatypes.NewControllerPortID(TestOwnerAddress) suite.Require().NoError(err) - // Set the address of the interchain account stored in state during handshake step for cosmwasm testing - suite.setICAWallet(suite.chainB.GetContext(), portID, interchainAccountAddr) + // Get the address of the interchain account stored in state during handshake step + icaAddress, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID) + suite.Require().True(found) suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000)))) - tc.malleate(icatypes.EncodingJSON) // malleate mutates test data + tc.malleate(icaAddress) // malleate mutates test data packet := channeltypes.NewPacket( packetData, @@ -710,13 +866,3 @@ func (suite *KeeperTestSuite) fundICAWallet(ctx sdk.Context, portID string, amou suite.Require().NotEmpty(res) suite.Require().NoError(err) } - -// This function is used to predetermine the address of the interchain account for testing -func (suite *KeeperTestSuite) setICAWallet(ctx sdk.Context, portID string, address string) { - icaAddr, err := sdk.AccAddressFromBech32(address) - suite.Require().NoError(err) - interchainAccount := authtypes.NewBaseAccountWithAddress(icaAddr) - suite.chainB.GetSimApp().ICAHostKeeper.SetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID, address) - suite.chainB.GetSimApp().AccountKeeper.SetAccount(suite.chainB.GetContext(), interchainAccount) - suite.Require().Equal(interchainAccount.GetAddress().String(), icaAddr.String()) -} From 1bb2c9f001a464eb64d1e86897005c82df5f27fe Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 26 Jun 2023 13:28:30 +0200 Subject: [PATCH 096/121] style(ica.test): ran 'golanci-lint run --fix' --- .../host/keeper/relay_test.go | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index f84181f0a24..8996ba70bba 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -545,7 +545,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "messages": [ { "@type": "/cosmos.gov.v1beta1.MsgVote", - "voter": "`+ icaAddress +`", + "voter": "` + icaAddress + `", "proposal_id": 1, "option": 1 } @@ -557,7 +557,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{"*"}) @@ -572,7 +572,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "messages": [ { "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "`+ icaAddress +`", + "from_address": "` + icaAddress + `", "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", "amount": [{ "denom": "stake", "amount": "100" }] } @@ -582,7 +582,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) @@ -603,7 +603,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "description": "tokens for all!" }, "initial_deposit": [{ "denom": "stake", "amount": "5000" }], - "proposer": "`+ icaAddress +`" + "proposer": "` + icaAddress + `" } ] }`) @@ -611,7 +611,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) @@ -641,7 +641,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "messages": [ { "@type": "/cosmos.gov.v1beta1.MsgVote", - "voter": "`+ icaAddress +`", + "voter": "` + icaAddress + `", "proposal_id": 1, "option": 1 } @@ -651,7 +651,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) @@ -672,17 +672,17 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "description": "tokens for all!" }, "initial_deposit": [{ "denom": "stake", "amount": "5000" }], - "proposer": "`+ icaAddress +`" + "proposer": "` + icaAddress + `" }, { "@type": "/cosmos.gov.v1beta1.MsgDeposit", "proposal_id": 1, - "depositor": "`+ icaAddress +`", + "depositor": "` + icaAddress + `", "amount": [{ "denom": "stake", "amount": "10000000" }] }, { "@type": "/cosmos.gov.v1beta1.MsgVote", - "voter": "`+ icaAddress +`", + "voter": "` + icaAddress + `", "proposal_id": 1, "option": 1 } @@ -692,7 +692,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) @@ -718,7 +718,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "source_port": "transfer", "source_channel": "channel-1", "token": { "denom": "stake", "amount": "100" }, - "sender": "`+ icaAddress +`", + "sender": "` + icaAddress + `", "receiver": "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk", "timeout_height": { "revision_number": 1, "revision_height": 100 }, "timeout_timestamp": 0 @@ -729,7 +729,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) @@ -745,7 +745,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{"*"}) @@ -760,7 +760,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "messages": [ { "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "`+ icaAddress +`", + "from_address": "` + icaAddress + `", "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", "amount": [{ "denom": "stake", "amount": "100" }] } @@ -770,7 +770,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) @@ -785,7 +785,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { "messages": [ { "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "`+ ibctesting.InvalidID +`", + "from_address": "` + ibctesting.InvalidID + `", "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", "amount": [{ "denom": "stake", "amount": "100" }] } @@ -795,7 +795,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { packetData = []byte(`{ "type": 1, - "data":` + byteArrayString +` + "data":` + byteArrayString + ` }`) params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) From 10d79dbbcd36774a68134e9b1f77fd2285fa6b93 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 17:45:45 +0200 Subject: [PATCH 097/121] imp(ica/host): created 'GetAppMetadata' function --- .../host/keeper/keeper.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 9234117c4fe..21dbfb7e0f4 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -4,6 +4,8 @@ import ( "fmt" "strings" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,6 +20,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" "github.com/cosmos/ibc-go/v7/modules/core/exported" ) @@ -106,6 +109,22 @@ func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string return k.ics4Wrapper.GetAppVersion(ctx, portID, channelID) } +// GetAppMetadata retrieves the interchain accounts metadata from the store associated with the provided portID and channelID +func (k Keeper) GetAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { + appVersion, found := k.GetAppVersion(ctx, portID, channelID) + if !found { + return icatypes.Metadata{}, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", portID, channelID) + } + + var metadata icatypes.Metadata + if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(appVersion), &metadata); err != nil { + // UnmarshalJSON errors are indeterminate and therefore are not wrapped and included in failed acks + return icatypes.Metadata{}, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata") + } + + return metadata, nil +} + // GetActiveChannelID retrieves the active channelID from the store keyed by the provided connectionID and portID func (k Keeper) GetActiveChannelID(ctx sdk.Context, connectionID, portID string) (string, bool) { store := ctx.KVStore(k.storeKey) From 2955eb95873e09b966c9f12dfd0ddc33284332b0 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 17:47:03 +0200 Subject: [PATCH 098/121] refactor(ica/host): used GetAppMetadata function --- .../apps/27-interchain-accounts/host/keeper/relay.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index 4131e9ef722..d620c32fbd1 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -24,14 +24,9 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byt return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain account packet data") } - appVersion, found := k.GetAppVersion(ctx, packet.DestinationPort, packet.DestinationChannel) - if !found { - return nil, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", packet.DestinationPort, packet.DestinationChannel) - } - var metadata icatypes.Metadata - if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(appVersion), &metadata); err != nil { - // UnmarshalJSON errors are indeterminate and therefore are not wrapped and included in failed acks - return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata") + metadata, err := k.GetAppMetadata(ctx, packet.DestinationPort, packet.DestinationChannel) + if err != nil { + return nil, err } switch data.Type { From 3ae45fadb5aa4f1b4374a5892c164296e36953a8 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 17:51:38 +0200 Subject: [PATCH 099/121] imp(ica.test): removed unneeded encoding argument --- .../host/keeper/genesis_test.go | 2 +- .../host/keeper/handshake_test.go | 8 +++--- .../host/keeper/keeper_test.go | 26 ++++++------------- .../host/keeper/relay_test.go | 4 +-- 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go index cb61fb861fe..3a24e8555dd 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go @@ -112,7 +112,7 @@ func (suite *KeeperTestSuite) TestExportGenesis() { path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) interchainAccAddr, exists := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) diff --git a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go index 7c629530137..c6984fe3181 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go @@ -32,7 +32,7 @@ func (suite *KeeperTestSuite) openAndCloseChannel(path *ibctesting.Path) { suite.Require().NoError(err) path.EndpointA.ChannelID = "" - err = RegisterInterchainAccount(path.EndpointA, TestOwnerAddress, icatypes.EncodingProtobuf) + err = RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) suite.Require().NoError(err) // bump channel sequence as these test mock core IBC behaviour on ChanOpenTry @@ -279,7 +279,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress, icatypes.EncodingProtobuf) + err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) suite.Require().NoError(err) // set the channel id on host @@ -359,7 +359,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenConfirm() { path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress, icatypes.EncodingProtobuf) + err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) suite.Require().NoError(err) err = path.EndpointB.ChanOpenTry() @@ -402,7 +402,7 @@ func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) tc.malleate() // malleate mutates test data diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 94714dad9bf..5edbc372ca8 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -80,8 +80,8 @@ func NewICAPath(chainA, chainB *ibctesting.TestChain, encoding string) *ibctesti } // SetupICAPath invokes the InterchainAccounts entrypoint and subsequent channel handshake handlers -func SetupICAPath(path *ibctesting.Path, owner string, encoding string) error { - if err := RegisterInterchainAccount(path.EndpointA, owner, encoding); err != nil { +func SetupICAPath(path *ibctesting.Path, owner string) error { + if err := RegisterInterchainAccount(path.EndpointA, owner); err != nil { return err } @@ -97,7 +97,7 @@ func SetupICAPath(path *ibctesting.Path, owner string, encoding string) error { } // RegisterInterchainAccount is a helper function for starting the channel handshake -func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string, encoding string) error { +func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) error { portID, err := icatypes.NewControllerPortID(owner) if err != nil { return err @@ -105,17 +105,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string, enco channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - var version string - switch encoding { - case icatypes.EncodingProtobuf: - version = TestVersion - case icatypes.EncodingJSON: - version = TestJSONVersion - default: - return icatypes.ErrUnsupportedEncoding - } - - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, version); err != nil { + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, endpoint.ChannelConfig.Version); err != nil { return err } @@ -139,7 +129,7 @@ func (suite *KeeperTestSuite) TestGetInterchainAccountAddress() { path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) counterpartyPortID := path.EndpointA.ChannelConfig.PortID @@ -164,7 +154,7 @@ func (suite *KeeperTestSuite) TestGetAllActiveChannels() { path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) suite.chainB.GetSimApp().ICAHostKeeper.SetActiveChannelID(suite.chainB.GetContext(), ibctesting.FirstConnectionID, expectedPortID, expectedChannelID) @@ -198,7 +188,7 @@ func (suite *KeeperTestSuite) TestGetAllInterchainAccounts() { path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) interchainAccAddr, exists := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) @@ -230,7 +220,7 @@ func (suite *KeeperTestSuite) TestIsActiveChannel() { path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingProtobuf) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) isActive := suite.chainB.GetSimApp().ICAHostKeeper.IsActiveChannel(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 8996ba70bba..c6dab50d51c 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -465,7 +465,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { path = NewICAPath(suite.chainA, suite.chainB, encoding) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, encoding) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) portID, err := icatypes.NewControllerPortID(TestOwnerAddress) @@ -814,7 +814,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) suite.coordinator.SetupConnections(path) - err := SetupICAPath(path, TestOwnerAddress, icatypes.EncodingJSON) + err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) portID, err := icatypes.NewControllerPortID(TestOwnerAddress) From 0813c59404fc1d28976b00fd3767ceae46f00541 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 17:54:03 +0200 Subject: [PATCH 100/121] imp(ica): removed ErrUnsupportedEncoding --- modules/apps/27-interchain-accounts/types/codec.go | 4 ++-- modules/apps/27-interchain-accounts/types/errors.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 3422f280603..9ac58b0a60e 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -62,7 +62,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal cosmosTx with json") } default: - return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) + return nil, errorsmod.Wrapf(ErrInvalidCodec, "unsupported encoding format %s", encoding) } return bz, nil @@ -87,7 +87,7 @@ func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.M return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") } default: - return nil, errorsmod.Wrapf(ErrUnsupportedEncoding, "encoding type %s is not supported", encoding) + return nil, errorsmod.Wrapf(ErrInvalidCodec, "unsupported encoding format %s", encoding) } msgs := make([]sdk.Msg, len(cosmosTx.Messages)) diff --git a/modules/apps/27-interchain-accounts/types/errors.go b/modules/apps/27-interchain-accounts/types/errors.go index 328e9be1d27..06989327dfb 100644 --- a/modules/apps/27-interchain-accounts/types/errors.go +++ b/modules/apps/27-interchain-accounts/types/errors.go @@ -23,5 +23,4 @@ var ( ErrInvalidTimeoutTimestamp = errorsmod.Register(ModuleName, 17, "timeout timestamp must be in the future") ErrInvalidCodec = errorsmod.Register(ModuleName, 18, "codec is not supported") ErrInvalidAccountReopening = errorsmod.Register(ModuleName, 19, "invalid account reopening") - ErrUnsupportedEncoding = errorsmod.Register(ModuleName, 20, "encoding is not supported") ) From 6b7ac18b399eface3b9cab1f263028154ac8ec86 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 17:55:47 +0200 Subject: [PATCH 101/121] imp(ica.test): used suite chainB height instead of clienttypes.NewHeight(1, 100) --- .../apps/27-interchain-accounts/host/keeper/relay_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index c6dab50d51c..4baa903cf50 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -19,7 +19,6 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) @@ -316,7 +315,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Token: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100)), Sender: interchainAccountAddr, Receiver: suite.chainA.SenderAccount.GetAddress().String(), - TimeoutHeight: clienttypes.NewHeight(1, 100), + TimeoutHeight: suite.chainB.GetTimeoutHeight(), TimeoutTimestamp: uint64(0), } @@ -493,7 +492,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), + suite.chainB.GetTimeoutHeight(), 0, ) @@ -835,7 +834,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), + suite.chainB.GetTimeoutHeight(), 0, ) From 30dfe0fd897477e293e9794c2219d33447f68db3 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 17:58:59 +0200 Subject: [PATCH 102/121] imp(ica.test): add nil check for unsupported encoding --- modules/apps/27-interchain-accounts/types/codec_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 1f5d3edfe88..7fb1d0f324d 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -464,8 +464,10 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, } - _, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, "unsupported") + + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, "unsupported") suite.Require().Error(err) + suite.Require().Nil(bz) // Test deserialize msgs = []proto.Message{ @@ -475,8 +477,10 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, } + data, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, types.EncodingProtobuf) suite.Require().NoError(err) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, "unsupported") suite.Require().Error(err) } From f4112e73d9b3ebaca4d882927d9966ce4b290242 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 18:05:30 +0200 Subject: [PATCH 103/121] imp(ica.test): added a empty/nil checks --- .../27-interchain-accounts/types/codec_test.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 7fb1d0f324d..3495622ef8d 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -281,11 +281,12 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { suite.Require().NotEmpty(bz) // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, encoding) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, encoding) suite.Require().Error(err) // unregistered type + suite.Require().Empty(msgs) // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid"), types.EncodingProtobuf) + msgs, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid"), encoding) suite.Require().Error(err) suite.Require().Empty(msgs) } @@ -469,15 +470,6 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { suite.Require().Error(err) suite.Require().Nil(bz) - // Test deserialize - msgs = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - } - data, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, types.EncodingProtobuf) suite.Require().NoError(err) From 45bb7a7dfcb3a49d2c364029253527adb8f607ec Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 18:08:59 +0200 Subject: [PATCH 104/121] style(ica.test): renamed version variable to TestVersionWithJSONEncoding --- .../apps/27-interchain-accounts/host/keeper/keeper_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 5edbc372ca8..9a1ef73c0cb 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "fmt" "testing" "github.com/stretchr/testify/suite" @@ -29,7 +30,7 @@ var ( })) // TestJSONVersion defines a reusable interchainaccounts version string that uses JSON encoding for testing purposes - TestJSONVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ + TestVersionWithJSONEncoding = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, HostConnectionId: ibctesting.FirstConnectionID, @@ -64,9 +65,9 @@ func NewICAPath(chainA, chainB *ibctesting.TestChain, encoding string) *ibctesti case icatypes.EncodingProtobuf: version = TestVersion case icatypes.EncodingJSON: - version = TestJSONVersion + version = TestVersionWithJSONEncoding default: - panic("unsupported encoding") + panic(fmt.Sprintf("unsupported encoding type: %s", encoding)) } path.EndpointA.ChannelConfig.PortID = icatypes.HostPortID From 9a87ceef21cbf48322390cacae137383dcdffcbe Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 18:14:55 +0200 Subject: [PATCH 105/121] imp(ica): wrapped some errors --- modules/apps/27-interchain-accounts/types/codec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 9ac58b0a60e..46bcefde683 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -54,7 +54,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str case EncodingProtobuf: bz, err = cdc.Marshal(cosmosTx) if err != nil { - return nil, err + return nil, errorsmod.Wrapf(err, "cannot marshal cosmosTx with protobuf") } case EncodingJSON: bz, err = cdc.(*codec.ProtoCodec).MarshalJSON(cosmosTx) @@ -80,7 +80,7 @@ func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.M switch encoding { case EncodingProtobuf: if err := cdc.Unmarshal(data, &cosmosTx); err != nil { - return nil, err + return nil, errorsmod.Wrapf(err, "cannot unmarshal cosmosTx with protobuf") } case EncodingJSON: if err := cdc.UnmarshalJSON(data, &cosmosTx); err != nil { From 048bedd062aaeeb58a153c60dcfe087b810cad14 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 27 Jun 2023 18:15:54 +0200 Subject: [PATCH 106/121] style(ica): ran 'golanci-lint run --fix' --- modules/apps/27-interchain-accounts/host/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 21dbfb7e0f4..31fef2ddc19 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -115,7 +115,7 @@ func (k Keeper) GetAppMetadata(ctx sdk.Context, portID, channelID string) (icaty if !found { return icatypes.Metadata{}, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", portID, channelID) } - + var metadata icatypes.Metadata if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(appVersion), &metadata); err != nil { // UnmarshalJSON errors are indeterminate and therefore are not wrapped and included in failed acks From 635a87801f8ca1f5290f0e0f3999d1f7ded0733e Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 20:52:30 +0200 Subject: [PATCH 107/121] style(ica)!: renamed EncodingJSON to EncodingProto3JSON --- .../27-interchain-accounts/host/keeper/keeper_test.go | 4 ++-- .../27-interchain-accounts/host/keeper/relay_test.go | 4 ++-- modules/apps/27-interchain-accounts/types/codec.go | 4 ++-- .../apps/27-interchain-accounts/types/codec_test.go | 6 +++--- modules/apps/27-interchain-accounts/types/metadata.go | 6 +++--- .../apps/27-interchain-accounts/types/metadata_test.go | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 9a1ef73c0cb..314bbf58fd6 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -34,7 +34,7 @@ var ( Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, HostConnectionId: ibctesting.FirstConnectionID, - Encoding: icatypes.EncodingJSON, + Encoding: icatypes.EncodingProto3JSON, TxType: icatypes.TxTypeSDKMultiMsg, })) ) @@ -64,7 +64,7 @@ func NewICAPath(chainA, chainB *ibctesting.TestChain, encoding string) *ibctesti switch encoding { case icatypes.EncodingProtobuf: version = TestVersion - case icatypes.EncodingJSON: + case icatypes.EncodingProto3JSON: version = TestVersionWithJSONEncoding default: panic(fmt.Sprintf("unsupported encoding type: %s", encoding)) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 4baa903cf50..d76fe3e5cae 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -24,7 +24,7 @@ import ( ) func (suite *KeeperTestSuite) TestOnRecvPacket() { - testedEncodings := []string{icatypes.EncodingProtobuf, icatypes.EncodingJSON} + testedEncodings := []string{icatypes.EncodingProtobuf, icatypes.EncodingProto3JSON} var ( path *ibctesting.Path packetData []byte @@ -810,7 +810,7 @@ func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingJSON) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProto3JSON) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 46bcefde683..2e489b7c526 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -56,7 +56,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str if err != nil { return nil, errorsmod.Wrapf(err, "cannot marshal cosmosTx with protobuf") } - case EncodingJSON: + case EncodingProto3JSON: bz, err = cdc.(*codec.ProtoCodec).MarshalJSON(cosmosTx) if err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal cosmosTx with json") @@ -82,7 +82,7 @@ func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.M if err := cdc.Unmarshal(data, &cosmosTx); err != nil { return nil, errorsmod.Wrapf(err, "cannot unmarshal cosmosTx with protobuf") } - case EncodingJSON: + case EncodingProto3JSON: if err := cdc.UnmarshalJSON(data, &cosmosTx); err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") } diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 3495622ef8d..50d56f15f6f 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -44,7 +44,7 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { } func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { - testedEncodings := []string{types.EncodingProtobuf, types.EncodingJSON} + testedEncodings := []string{types.EncodingProtobuf, types.EncodingProto3JSON} var msgs []proto.Message testCases := []struct { name string @@ -244,7 +244,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { tc.malleate() bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, encoding) - if encoding == types.EncodingJSON && !tc.expPass { + if encoding == types.EncodingProto3JSON && !tc.expPass { suite.Require().Error(err, tc.name) } else { suite.Require().NoError(err, tc.name) @@ -443,7 +443,7 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { suite.Run(tc.name, func() { tc.malleate() - msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, cwBytes, types.EncodingJSON) + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, cwBytes, types.EncodingProto3JSON) if tc.expPass { suite.Require().NoError(errDeserialize, tc.name) for i, msg := range msgs { diff --git a/modules/apps/27-interchain-accounts/types/metadata.go b/modules/apps/27-interchain-accounts/types/metadata.go index 09cae632058..3df2028d9b1 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.go +++ b/modules/apps/27-interchain-accounts/types/metadata.go @@ -11,8 +11,8 @@ import ( const ( // EncodingProtobuf defines the protocol buffers proto3 encoding format EncodingProtobuf = "proto3" - // EncodingJSON defines the JSON encoding format - EncodingJSON = "json" + // EncodingProto3JSON defines the proto3 JSON encoding format + EncodingProto3JSON = "proto3json" // TxTypeSDKMultiMsg defines the multi message transaction type supported by the Cosmos SDK TxTypeSDKMultiMsg = "sdk_multi_msg" @@ -144,7 +144,7 @@ func isSupportedEncoding(encoding string) bool { // getSupportedEncoding returns a string slice of supported encoding formats func getSupportedEncoding() []string { - return []string{EncodingProtobuf, EncodingJSON} + return []string{EncodingProtobuf, EncodingProto3JSON} } // isSupportedTxType returns true if the provided transaction type is supported, otherwise false diff --git a/modules/apps/27-interchain-accounts/types/metadata_test.go b/modules/apps/27-interchain-accounts/types/metadata_test.go index fc9502b7b1e..04ef4342e9f 100644 --- a/modules/apps/27-interchain-accounts/types/metadata_test.go +++ b/modules/apps/27-interchain-accounts/types/metadata_test.go @@ -58,7 +58,7 @@ func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { { "unequal encoding format", func() { - metadata.Encoding = types.EncodingJSON + metadata.Encoding = types.EncodingProto3JSON versionBytes, err := types.ModuleCdc.MarshalJSON(&metadata) suite.Require().NoError(err) @@ -164,14 +164,14 @@ func (suite *TypesTestSuite) TestValidateControllerMetadata() { true, }, { - "success with EncodingJSON", + "success with EncodingProto3JSON", func() { metadata = types.Metadata{ Version: types.Version, ControllerConnectionId: ibctesting.FirstConnectionID, HostConnectionId: ibctesting.FirstConnectionID, Address: TestOwnerAddress, - Encoding: types.EncodingJSON, + Encoding: types.EncodingProto3JSON, TxType: types.TxTypeSDKMultiMsg, } }, @@ -319,14 +319,14 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { true, }, { - "success with EncodingJSON", + "success with EncodingProto3JSON", func() { metadata = types.Metadata{ Version: types.Version, ControllerConnectionId: ibctesting.FirstConnectionID, HostConnectionId: ibctesting.FirstConnectionID, Address: TestOwnerAddress, - Encoding: types.EncodingJSON, + Encoding: types.EncodingProto3JSON, TxType: types.TxTypeSDKMultiMsg, } }, From cb5d44dc619fa10d86c8cb2f1e9ab394bde42aa0 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 20:54:54 +0200 Subject: [PATCH 108/121] docs(ica): improved godocs --- modules/apps/27-interchain-accounts/types/codec.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 2e489b7c526..7e41596bea0 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -26,8 +26,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { } // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are -// packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx -// bytes are returned. Only the ProtoCodec is supported for serializing messages. +// packed into Any's and inserted into the Messages field of a CosmosTx. The CosmosTx is marshaled +// depending on the encoding type passed in. The marshaled bytes are returned. Only the ProtoCodec +// is supported for serializing messages. Both protobuf and proto3 JSON are supported. func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding string) ([]byte, error) { // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { @@ -69,6 +70,9 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str } // DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes into a slice of sdk.Msg's. +// The transaction bytes are unmarshaled depending on the encoding type passed in. The sdk.Msg's are +// unpacked from Any's and returned. Only the ProtoCodec is supported for serializing messages. Both +// protobuf and proto3 JSON are supported. func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.Msg, error) { // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { From 4408877a96143f78d3584b543b79fc209a58bb3e Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 20:58:37 +0200 Subject: [PATCH 109/121] imp(ica): passing codec instead of binary codec --- .../apps/27-interchain-accounts/controller/keeper/keeper.go | 4 ++-- .../controller/keeper/msg_server_test.go | 2 +- modules/apps/27-interchain-accounts/host/ibc_module_test.go | 2 +- modules/apps/27-interchain-accounts/types/codec.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index 9aa172a6f15..2c98ce3f9b1 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -27,7 +27,7 @@ import ( // Keeper defines the IBC interchain accounts controller keeper type Keeper struct { storeKey storetypes.StoreKey - cdc codec.BinaryCodec + cdc codec.Codec legacySubspace paramtypes.Subspace ics4Wrapper porttypes.ICS4Wrapper channelKeeper icatypes.ChannelKeeper @@ -44,7 +44,7 @@ type Keeper struct { // NewKeeper creates a new interchain accounts controller Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, scopedKeeper exported.ScopedKeeper, msgRouter icatypes.MessageRouter, authority string, ) Keeper { diff --git a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go index 7960af5b01b..08d3fd4ce5c 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go @@ -171,7 +171,7 @@ func (suite *KeeperTestSuite) TestSubmitTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{icaMsg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{icaMsg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/host/ibc_module_test.go b/modules/apps/27-interchain-accounts/host/ibc_module_test.go index 3ad31f13012..35687bbdc1b 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -446,7 +446,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: amount, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 7e41596bea0..bfd94c9c61b 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -29,7 +29,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { // packed into Any's and inserted into the Messages field of a CosmosTx. The CosmosTx is marshaled // depending on the encoding type passed in. The marshaled bytes are returned. Only the ProtoCodec // is supported for serializing messages. Both protobuf and proto3 JSON are supported. -func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding string) ([]byte, error) { +func SerializeCosmosTx(cdc codec.Codec, msgs []proto.Message, encoding string) ([]byte, error) { // ProtoCodec must be supported if _, ok := cdc.(*codec.ProtoCodec); !ok { return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") @@ -58,7 +58,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str return nil, errorsmod.Wrapf(err, "cannot marshal cosmosTx with protobuf") } case EncodingProto3JSON: - bz, err = cdc.(*codec.ProtoCodec).MarshalJSON(cosmosTx) + bz, err = cdc.MarshalJSON(cosmosTx) if err != nil { return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal cosmosTx with json") } From 7a66bebd12921d05a2d33f0a2aa668108fbfb589 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 21:07:50 +0200 Subject: [PATCH 110/121] style(ica): improved error messages and godocs --- .../apps/27-interchain-accounts/types/codec.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index bfd94c9c61b..68d19fb0db3 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -27,12 +27,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are // packed into Any's and inserted into the Messages field of a CosmosTx. The CosmosTx is marshaled -// depending on the encoding type passed in. The marshaled bytes are returned. Only the ProtoCodec +// depending on the encoding type passed in. The marshaled bytes are returned. Only the ProtoCodec // is supported for serializing messages. Both protobuf and proto3 JSON are supported. func SerializeCosmosTx(cdc codec.Codec, msgs []proto.Message, encoding string) ([]byte, error) { - // ProtoCodec must be supported + // this is a defensive check to ensure only the ProtoCodec is used for message serialization if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "only the ProtoCodec may be used for receiving messages on the host chain") } var bz []byte @@ -55,12 +55,12 @@ func SerializeCosmosTx(cdc codec.Codec, msgs []proto.Message, encoding string) ( case EncodingProtobuf: bz, err = cdc.Marshal(cosmosTx) if err != nil { - return nil, errorsmod.Wrapf(err, "cannot marshal cosmosTx with protobuf") + return nil, errorsmod.Wrapf(err, "cannot marshal CosmosTx with protobuf") } case EncodingProto3JSON: bz, err = cdc.MarshalJSON(cosmosTx) if err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal cosmosTx with json") + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal CosmosTx with proto3 json") } default: return nil, errorsmod.Wrapf(ErrInvalidCodec, "unsupported encoding format %s", encoding) @@ -74,9 +74,9 @@ func SerializeCosmosTx(cdc codec.Codec, msgs []proto.Message, encoding string) ( // unpacked from Any's and returned. Only the ProtoCodec is supported for serializing messages. Both // protobuf and proto3 JSON are supported. func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.Msg, error) { - // ProtoCodec must be supported + // this is a defensive check to ensure only the ProtoCodec is used for message deserialization if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "ProtoCodec must be supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "only the ProtoCodec may be used for receiving messages on the host chain") } var cosmosTx CosmosTx @@ -84,11 +84,11 @@ func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.M switch encoding { case EncodingProtobuf: if err := cdc.Unmarshal(data, &cosmosTx); err != nil { - return nil, errorsmod.Wrapf(err, "cannot unmarshal cosmosTx with protobuf") + return nil, errorsmod.Wrapf(err, "cannot unmarshal CosmosTx with protobuf") } case EncodingProto3JSON: if err := cdc.UnmarshalJSON(data, &cosmosTx); err != nil { - return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal cosmosTx with json") + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal CosmosTx with proto3 json") } default: return nil, errorsmod.Wrapf(ErrInvalidCodec, "unsupported encoding format %s", encoding) From 85eb9464600a890615ef985e3f8cc8f5668ec93f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 21:18:23 +0200 Subject: [PATCH 111/121] docs(ica.test): improved godocs for tests --- modules/apps/27-interchain-accounts/types/codec_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 50d56f15f6f..e268184d26f 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -43,6 +43,12 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } +// TestSerializeAndDeserializeCosmosTx tests the SerializeCosmosTx and DeserializeCosmosTx functions +// for all supported encoding types. +// +// expPass set to false means that: +// - the test case is expected to fail on deserialization for protobuf encoding. +// - the test case is expected to fail on serialization for proto3 json encoding. func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { testedEncodings := []string{types.EncodingProtobuf, types.EncodingProto3JSON} var msgs []proto.Message From ab72e95eca07d2a48d8030844bcba9baa1da56ac Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 21:21:42 +0200 Subject: [PATCH 112/121] imp(ica.test): improved unsupported encoding test case slightly --- modules/apps/27-interchain-accounts/types/codec_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index e268184d26f..8b6c884f658 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -481,4 +481,8 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, "unsupported") suite.Require().Error(err) + + // verify that protobuf encoding still works otherwise: + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, types.EncodingProtobuf) + suite.Require().NoError(err) } From 3b4e3893e644870be20ba5f5ca7d045d2ec8e7e4 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 21:34:01 +0200 Subject: [PATCH 113/121] style(ica.test): test style improvements --- .../types/codec_test.go | 182 ++++++++---------- 1 file changed, 84 insertions(+), 98 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 8b6c884f658..dec3f2aa6ae 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -315,131 +315,119 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() } func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { - var cwBytes []byte - var protoMessages []proto.Message testCases := []struct { - name string - malleate func() - expPass bool + name string + jsonBytes []byte + expMsgs []proto.Message + expPass bool }{ { "success: single msg", - func() { - cwBytes = []byte(`{ - "messages": [ - { - "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "amount": [{ "denom": "bananas", "amount": "100" }] - } - ] - }`) - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - } + []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] + } + ] + }`), + []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, }, true, }, { "success: multiple msgs, same types", - func() { - cwBytes = []byte(`{ - "messages": [ - { - "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "amount": [{ "denom": "bananas", "amount": "100" }] - }, - { - "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "amount": [{ "denom": "bananas", "amount": "100" }] - } - ] - }`) - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] }, - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - }, - } + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] + } + ] + }`), + []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, }, true, }, { "success: multiple msgs, different types", - func() { - cwBytes = []byte(`{ - "messages": [ - { - "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "amount": [{ "denom": "bananas", "amount": "100" }] - }, - { - "@type": "/cosmos.staking.v1beta1.MsgDelegate", - "delegator_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "validator_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", - "amount": { "denom": "stake", "amount": "5000" } - } - ] - }`) - protoMessages = []proto.Message{ - &banktypes.MsgSend{ - FromAddress: TestOwnerAddress, - ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] }, - &stakingtypes.MsgDelegate{ - DelegatorAddress: TestOwnerAddress, - ValidatorAddress: TestOwnerAddress, - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), - }, - } + { + "@type": "/cosmos.staking.v1beta1.MsgDelegate", + "delegator_address": "` + TestOwnerAddress + `", + "validator_address": "` + TestOwnerAddress + `", + "amount": { "denom": "stake", "amount": "5000" } + } + ] + }`), + []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), + }, }, true, }, { "failure: unregistered msg type", - func() { - cwBytes = []byte(`{"messages":[{}]}`) - protoMessages = []proto.Message{ - &mockSdkMsg{}, - } + []byte(`{"messages":[{}]}`), + []proto.Message{ + &mockSdkMsg{}, }, false, }, { "failure: multiple unregistered msg types", - func() { - cwBytes = []byte(`{"messages":[{},{},{}]}`) - protoMessages = []proto.Message{ - &mockSdkMsg{}, - &mockSdkMsg{}, - &mockSdkMsg{}, - } + []byte(`{"messages":[{},{},{}]}`), + []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, }, false, }, { "failure: empty bytes", - func() { - cwBytes = []byte{} - }, + []byte{}, + nil, false, }, } @@ -448,12 +436,11 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { - tc.malleate() - msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, cwBytes, types.EncodingProto3JSON) + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.jsonBytes, types.EncodingProto3JSON) if tc.expPass { suite.Require().NoError(errDeserialize, tc.name) for i, msg := range msgs { - suite.Require().Equal(protoMessages[i], msg) + suite.Require().Equal(tc.expMsgs[i], msg) } } else { suite.Require().Error(errDeserialize, tc.name) @@ -463,7 +450,6 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { } func (suite *TypesTestSuite) TestUnsupportedEncodingType() { - // Test serialize msgs := []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, From 5b7c7093053e8ac18699e19f78597fd11d89b2b8 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 21:57:42 +0200 Subject: [PATCH 114/121] imp(ica.test): added expError to some codec tests --- .../types/codec_test.go | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index dec3f2aa6ae..232a1fa43ae 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -306,11 +306,11 @@ func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() marshaler := codec.NewAminoCodec(cdc) msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}, types.EncodingProtobuf) - suite.Require().Error(err) + suite.Require().ErrorIs(err, types.ErrInvalidCodec) suite.Require().Empty(msgs) bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}, types.EncodingProtobuf) - suite.Require().Error(err) + suite.Require().ErrorIs(err, types.ErrInvalidCodec) suite.Require().Empty(bz) } @@ -319,7 +319,7 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { name string jsonBytes []byte expMsgs []proto.Message - expPass bool + expError error }{ { "success: single msg", @@ -340,7 +340,7 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, }, - true, + nil, }, { "success: multiple msgs, same types", @@ -372,7 +372,7 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, }, - true, + nil, }, { "success: multiple msgs, different types", @@ -404,7 +404,7 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), }, }, - true, + nil, }, { "failure: unregistered msg type", @@ -412,7 +412,7 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { []proto.Message{ &mockSdkMsg{}, }, - false, + types.ErrUnknownDataType, }, { "failure: multiple unregistered msg types", @@ -422,13 +422,13 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { &mockSdkMsg{}, &mockSdkMsg{}, }, - false, + types.ErrUnknownDataType, }, { "failure: empty bytes", []byte{}, nil, - false, + types.ErrUnknownDataType, }, } @@ -437,13 +437,13 @@ func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { suite.Run(tc.name, func() { msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.jsonBytes, types.EncodingProto3JSON) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(errDeserialize, tc.name) for i, msg := range msgs { suite.Require().Equal(tc.expMsgs[i], msg) } } else { - suite.Require().Error(errDeserialize, tc.name) + suite.Require().ErrorIs(errDeserialize, tc.expError, tc.name) } }) } @@ -459,14 +459,14 @@ func (suite *TypesTestSuite) TestUnsupportedEncodingType() { } bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, "unsupported") - suite.Require().Error(err) + suite.Require().ErrorIs(err, types.ErrInvalidCodec) suite.Require().Nil(bz) data, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, types.EncodingProtobuf) suite.Require().NoError(err) _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, "unsupported") - suite.Require().Error(err) + suite.Require().ErrorIs(err, types.ErrInvalidCodec) // verify that protobuf encoding still works otherwise: _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, types.EncodingProtobuf) From b4cbe2831f60adc459842cc4fc47b695bc871ef5 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 22:56:34 +0200 Subject: [PATCH 115/121] imp(ica.test): added more error type checks to codec tests --- .../types/codec_test.go | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 232a1fa43ae..671221bf744 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -51,6 +51,10 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { // - the test case is expected to fail on serialization for proto3 json encoding. func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { testedEncodings := []string{types.EncodingProtobuf, types.EncodingProto3JSON} + // each test case will have a corresponding expected errors in case of failures: + expSerializeErrorStrings := make([]string, len(testedEncodings)) + expDeserializeErrorStrings := make([]string, len(testedEncodings)) + var msgs []proto.Message testCases := []struct { name string @@ -187,6 +191,9 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { msgs = []proto.Message{ &mockSdkMsg{}, } + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, false, }, @@ -198,6 +205,9 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { &mockSdkMsg{}, &mockSdkMsg{}, } + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, false, }, @@ -215,6 +225,9 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { Proposer: TestOwnerAddress, }, } + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, false, }, @@ -237,12 +250,15 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { } msgs = []proto.Message{propMsg} + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, false, }, } - for _, encoding := range testedEncodings { + for i, encoding := range testedEncodings { for _, tc := range testCases { tc := tc @@ -252,6 +268,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, encoding) if encoding == types.EncodingProto3JSON && !tc.expPass { suite.Require().Error(err, tc.name) + suite.Require().Contains(err.Error(), expSerializeErrorStrings[1], tc.name) } else { suite.Require().NoError(err, tc.name) } @@ -261,6 +278,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().Contains(err.Error(), expDeserializeErrorStrings[i], tc.name) } if tc.expPass { @@ -289,11 +307,13 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { // test deserializing unknown bytes msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, encoding) suite.Require().Error(err) // unregistered type + suite.Require().Contains(err.Error(), expDeserializeErrorStrings[i]) suite.Require().Empty(msgs) // test deserializing unknown bytes msgs, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid"), encoding) suite.Require().Error(err) + suite.Require().Contains(err.Error(), expDeserializeErrorStrings[i]) suite.Require().Empty(msgs) } } From 7e2b84110a0946fe33958d564376deb1d5f6088f Mon Sep 17 00:00:00 2001 From: srdtrk Date: Wed, 28 Jun 2023 22:58:06 +0200 Subject: [PATCH 116/121] style(ica.test): ran 'golangci-lint run --fix' --- modules/apps/27-interchain-accounts/types/codec_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 671221bf744..e120c393c16 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -191,7 +191,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { msgs = []proto.Message{ &mockSdkMsg{}, } - + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, @@ -205,7 +205,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { &mockSdkMsg{}, &mockSdkMsg{}, } - + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, @@ -225,7 +225,7 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { Proposer: TestOwnerAddress, }, } - + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} }, From 985632f4ee25cf8d5bbc9da5aff8b4388194f3e0 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 29 Jun 2023 00:05:45 +0200 Subject: [PATCH 117/121] imp(ica/host.test): added 'TestMetadataNotFound' --- .../host/keeper/keeper_test.go | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 314bbf58fd6..1d3a53e508e 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) @@ -241,6 +242,25 @@ func (suite *KeeperTestSuite) TestSetInterchainAccountAddress() { suite.Require().Equal(expectedAccAddr, retrievedAddr) } +func (suite *KeeperTestSuite) TestMetadataNotFound() { + suite.SetupTest() + + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) + suite.coordinator.SetupConnections(path) + + err := SetupICAPath(path, TestOwnerAddress) + suite.Require().NoError(err) + + var ( + invalidPortID = "invalid-port" + invalidChannelID = "invalid-channel" + ) + + _, err = suite.chainB.GetSimApp().ICAHostKeeper.GetAppMetadata(suite.chainB.GetContext(), invalidPortID, invalidChannelID) + suite.Require().ErrorIs(err, ibcerrors.ErrNotFound) + suite.Require().Contains(err.Error(), fmt.Sprintf("app version not found for port %s and channel %s", invalidPortID, invalidChannelID)) +} + func (suite *KeeperTestSuite) TestParams() { expParams := types.DefaultParams() From b771d3f8b85e86236c0981129b60a0ffc6351b28 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 29 Jun 2023 00:30:53 +0200 Subject: [PATCH 118/121] imp(ica/host.test): reduce test size --- .../27-interchain-accounts/host/keeper/keeper_test.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 1d3a53e508e..afa3839a61c 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -243,20 +243,12 @@ func (suite *KeeperTestSuite) TestSetInterchainAccountAddress() { } func (suite *KeeperTestSuite) TestMetadataNotFound() { - suite.SetupTest() - - path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) - suite.coordinator.SetupConnections(path) - - err := SetupICAPath(path, TestOwnerAddress) - suite.Require().NoError(err) - var ( invalidPortID = "invalid-port" invalidChannelID = "invalid-channel" ) - _, err = suite.chainB.GetSimApp().ICAHostKeeper.GetAppMetadata(suite.chainB.GetContext(), invalidPortID, invalidChannelID) + _, err := suite.chainB.GetSimApp().ICAHostKeeper.GetAppMetadata(suite.chainB.GetContext(), invalidPortID, invalidChannelID) suite.Require().ErrorIs(err, ibcerrors.ErrNotFound) suite.Require().Contains(err.Error(), fmt.Sprintf("app version not found for port %s and channel %s", invalidPortID, invalidChannelID)) } From 68db856250c8d56dd16db0793c199a6168087229 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sun, 2 Jul 2023 14:21:01 +0200 Subject: [PATCH 119/121] docs(ica/host.test): updated godocs for test --- modules/apps/27-interchain-accounts/host/keeper/keeper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index afa3839a61c..b8b91e83df8 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -30,7 +30,7 @@ var ( TxType: icatypes.TxTypeSDKMultiMsg, })) - // TestJSONVersion defines a reusable interchainaccounts version string that uses JSON encoding for testing purposes + // TestVersionWithJSONEncoding defines a reusable interchainaccounts version string that uses JSON encoding for testing purposes TestVersionWithJSONEncoding = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, From 6a7c8f9f32dffb6a604ba42f06f62b40dac67c4b Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 3 Jul 2023 15:16:19 +0200 Subject: [PATCH 120/121] docs(ica/host): improved godoc --- modules/apps/27-interchain-accounts/host/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 31fef2ddc19..b508b7a1b9f 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -109,7 +109,7 @@ func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string return k.ics4Wrapper.GetAppVersion(ctx, portID, channelID) } -// GetAppMetadata retrieves the interchain accounts metadata from the store associated with the provided portID and channelID +// GetAppMetadata retrieves the interchain accounts channel metadata from the store associated with the provided portID and channelID func (k Keeper) GetAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { appVersion, found := k.GetAppVersion(ctx, portID, channelID) if !found { From 9010228e72c1beb246e7803f79b4912af33d140d Mon Sep 17 00:00:00 2001 From: srdtrk Date: Mon, 3 Jul 2023 15:42:50 +0200 Subject: [PATCH 121/121] imp(ica/host): made GetAppMetadata private --- .../host/keeper/export_test.go | 16 ++++++++++++++++ .../27-interchain-accounts/host/keeper/keeper.go | 2 +- .../27-interchain-accounts/host/keeper/relay.go | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 modules/apps/27-interchain-accounts/host/keeper/export_test.go diff --git a/modules/apps/27-interchain-accounts/host/keeper/export_test.go b/modules/apps/27-interchain-accounts/host/keeper/export_test.go new file mode 100644 index 00000000000..03c13e894d5 --- /dev/null +++ b/modules/apps/27-interchain-accounts/host/keeper/export_test.go @@ -0,0 +1,16 @@ +package keeper + +/* + This file is to allow for unexported functions to be accessible to the testing package. +*/ + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" +) + +// GetAppMetadata is a wrapper around getAppMetadata to allow the function to be directly called in tests. +func (k Keeper) GetAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { + return k.getAppMetadata(ctx, portID, channelID) +} diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index b508b7a1b9f..467d88b9792 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -110,7 +110,7 @@ func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string } // GetAppMetadata retrieves the interchain accounts channel metadata from the store associated with the provided portID and channelID -func (k Keeper) GetAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { +func (k Keeper) getAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { appVersion, found := k.GetAppVersion(ctx, portID, channelID) if !found { return icatypes.Metadata{}, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", portID, channelID) diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index d620c32fbd1..74dd7c6f832 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -24,7 +24,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byt return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain account packet data") } - metadata, err := k.GetAppMetadata(ctx, packet.DestinationPort, packet.DestinationChannel) + metadata, err := k.getAppMetadata(ctx, packet.DestinationPort, packet.DestinationChannel) if err != nil { return nil, err }