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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion e2e/testsuite/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func codecAndEncodingConfig() (*codec.ProtoCodec, testutil.TestEncodingConfig) {
}

// 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 {
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