Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cosmos/ibc-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: notional-labs/ibc-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: minh/add-parse-msg
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 3 contributors

Commits on Nov 8, 2023

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    15724b1 View commit details

Commits on Nov 14, 2023

  1. gofumpt

    crodriguezvega committed Nov 14, 2023
    Copy the full SHA
    b2ac47d View commit details

Commits on Nov 20, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    55fcef3 View commit details
Showing with 19 additions and 0 deletions.
  1. +19 −0 testing/utils.go
19 changes: 19 additions & 0 deletions testing/utils.go
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ import (

"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"

abci "github.com/cometbft/cometbft/abci/types"
tmtypes "github.com/cometbft/cometbft/types"
)
@@ -33,3 +36,19 @@ func GenerateString(length uint) string {
}
return string(bytes)
}

// Parse out msg responses from a transaction result
func UnmarshalMsgResponse(cdc *codec.LegacyAmino, resp abci.ExecTxResult, msgs ...codec.ProtoMarshaler) error {
var txMsgData sdk.TxMsgData
if err := cdc.Unmarshal(resp.Data, &txMsgData); err != nil {
return err
}

for i, msg := range msgs {
if err := cdc.Unmarshal(txMsgData.MsgResponses[i].Value, msg); err != nil {
return err
}
}

return nil
}