Skip to content

fix: replace deprecated codec.ProtoMarshaler interface with proto.Message #8366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Testing API

* [\#8366](https://github.com/cosmos/ibc-go/pull/8366) - Replaced the deprecated `codec.ProtoMarshaler` interface with `proto.Message`.
* [\#8371](https://github.com/cosmos/ibc-go/pull/8371) e2e: Create only necessary number of chains for e2e suite.
* [\#8375](https://github.com/cosmos/ibc-go/pull/8375) feat: parse IBC v2 packets from ABCI events

Expand Down
2 changes: 1 addition & 1 deletion e2e/testsuite/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
}

// UnmarshalMsgResponses attempts to unmarshal the tx msg responses into the provided message types.
func UnmarshalMsgResponses(txResp sdk.TxResponse, msgs ...codec.ProtoMarshaler) error {
func UnmarshalMsgResponses(txResp sdk.TxResponse, msgs ...proto.Message) error {

Check warning on line 94 in e2e/testsuite/codec.go

View check run for this annotation

Codecov / codecov/patch

e2e/testsuite/codec.go#L94

Added line #L94 was not covered by tests
cdc := Codec()
bz, err := hex.DecodeString(txResp.Data)
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion testing/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

"github.com/cosmos/gogoproto/proto"

abci "github.com/cometbft/cometbft/abci/types"
cmttypes "github.com/cometbft/cometbft/types"
)
Expand Down Expand Up @@ -65,7 +67,7 @@ func GenerateString(length uint) string {
}

// UnmarshalMsgResponses parse out msg responses from a transaction result
func UnmarshalMsgResponses(cdc codec.Codec, data []byte, msgs ...codec.ProtoMarshaler) error {
func UnmarshalMsgResponses(cdc codec.Codec, data []byte, msgs ...proto.Message) error {
var txMsgData sdk.TxMsgData
if err := cdc.Unmarshal(data, &txMsgData); err != nil {
return err
Expand Down
Loading