From 5123fbaad61b18a1b16c9d75caa72bbb8ba2dac6 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Sat, 24 Jun 2023 23:39:59 +0200 Subject: [PATCH] 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{