Skip to content
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

Use Protobuf-encoded memo field in ICS-20 packet #12

Draft
wants to merge 2 commits into
base: v7.2.1
Choose a base branch
from
Draft
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 modules/apps/29-fee/keeper/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) TestDistributeFeeEvent() {
msgTransfer := transfertypes.NewMsgTransfer(
path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID,
sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(),
clienttypes.NewHeight(1, 100), 0, "",
clienttypes.NewHeight(1, 100), 0, []byte(""),
)

res, err := suite.chainA.SendMsgs(msgPayPacketFee, msgTransfer)
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (suite *FeeTestSuite) TestFeeTransfer() {

msgs := []sdk.Msg{
types.NewMsgPayPacketFee(fee, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, suite.chainA.SenderAccount.GetAddress().String(), nil),
transfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coin, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 100), 0, ""),
transfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coin, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 100), 0, []byte("")),
}
res, err := suite.chainA.SendMsgs(msgs...)
suite.Require().NoError(err) // message committed
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`),
}

msg := types.NewMsgTransfer(
srcPort, srcChannel, coin, sender, receiver, timeoutHeight, timeoutTimestamp, memo,
srcPort, srcChannel, coin, sender, receiver, timeoutHeight, timeoutTimestamp, []byte(memo),
)
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
Expand Down
12 changes: 6 additions & 6 deletions modules/apps/transfer/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (im IBCModule) OnRecvPacket(

var data types.FungibleTokenPacketData
var ackErr error
if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil {
if err := types.ModuleCdc.Unmarshal(packet.GetData(), &data); err != nil {
ackErr = sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot unmarshal ICS-20 transfer packet data")
ack = channeltypes.NewErrorAcknowledgement(ackErr)
}
Expand All @@ -194,7 +194,7 @@ func (im IBCModule) OnRecvPacket(
sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver),
sdk.NewAttribute(types.AttributeKeyDenom, data.Denom),
sdk.NewAttribute(types.AttributeKeyAmount, data.Amount),
sdk.NewAttribute(types.AttributeKeyMemo, data.Memo),
// sdk.NewAttribute(types.AttributeKeyMemo, string(data.Memo)),
sdk.NewAttribute(types.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())),
}

Expand Down Expand Up @@ -225,7 +225,7 @@ func (im IBCModule) OnAcknowledgementPacket(
return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet acknowledgement: %v", err)
}
var data types.FungibleTokenPacketData
if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil {
if err := types.ModuleCdc.Unmarshal(packet.GetData(), &data); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet data: %s", err.Error())
}

Expand All @@ -241,7 +241,7 @@ func (im IBCModule) OnAcknowledgementPacket(
sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver),
sdk.NewAttribute(types.AttributeKeyDenom, data.Denom),
sdk.NewAttribute(types.AttributeKeyAmount, data.Amount),
sdk.NewAttribute(types.AttributeKeyMemo, data.Memo),
// sdk.NewAttribute(types.AttributeKeyMemo, string(data.Memo)),
sdk.NewAttribute(types.AttributeKeyAck, ack.String()),
),
)
Expand Down Expand Up @@ -273,7 +273,7 @@ func (im IBCModule) OnTimeoutPacket(
relayer sdk.AccAddress,
) error {
var data types.FungibleTokenPacketData
if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil {
if err := types.ModuleCdc.Unmarshal(packet.GetData(), &data); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet data: %s", err.Error())
}
// refund tokens
Expand All @@ -288,7 +288,7 @@ func (im IBCModule) OnTimeoutPacket(
sdk.NewAttribute(types.AttributeKeyRefundReceiver, data.Sender),
sdk.NewAttribute(types.AttributeKeyRefundDenom, data.Denom),
sdk.NewAttribute(types.AttributeKeyRefundAmount, data.Amount),
sdk.NewAttribute(types.AttributeKeyMemo, data.Memo),
// sdk.NewAttribute(types.AttributeKeyMemo, string(data.Memo)),
),
)

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/invariants_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (suite *KeeperTestSuite) TestTotalEscrowPerDenomInvariant() {
coin,
suite.chainA.SenderAccount.GetAddress().String(),
suite.chainB.SenderAccount.GetAddress().String(),
suite.chainA.GetTimeoutHeight(), 0, "",
suite.chainA.GetTimeoutHeight(), 0, []byte(""),
)

res, err := suite.chainA.SendMsgs(msg)
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/keeper/mbt_relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func FungibleTokenPacketFromTla(packet TlaFungibleTokenPacket) FungibleTokenPack
packet.Data.Amount,
AddressFromString(packet.Data.Sender),
AddressFromString(packet.Data.Receiver),
""),
[]byte("")),
}
}

Expand Down Expand Up @@ -346,7 +346,7 @@ func (suite *KeeperTestSuite) TestModelBasedRelay() {
sender.String(),
tc.packet.Data.Receiver,
suite.chainA.GetTimeoutHeight(), 0, // only use timeout height
"",
[]byte(""),
)

_, err = suite.chainB.GetSimApp().TransferKeeper.Transfer(sdk.WrapSDKContext(suite.chainB.GetContext()), msg)
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types.
sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver),
sdk.NewAttribute(types.AttributeKeyAmount, msg.Token.Amount.String()),
sdk.NewAttribute(types.AttributeKeyDenom, msg.Token.Denom),
sdk.NewAttribute(types.AttributeKeyMemo, msg.Memo),
// sdk.NewAttribute(types.AttributeKeyMemo, string(msg.Memo)),
),
sdk.NewEvent(
sdk.EventTypeMessage,
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (suite *KeeperTestSuite) TestMsgTransfer() {
path.EndpointA.ChannelID,
coin, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(),
suite.chainB.GetTimeoutHeight(), 0, // only use timeout height
"memo",
[]byte("memo"),
)

tc.malleate()
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (k Keeper) sendTransfer(
receiver string,
timeoutHeight clienttypes.Height,
timeoutTimestamp uint64,
memo string,
memo []byte,
) (uint64, error) {
channel, found := k.channelKeeper.GetChannel(ctx, sourcePort, sourceChannel)
if !found {
Expand Down
30 changes: 15 additions & 15 deletions modules/apps/transfer/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (suite *KeeperTestSuite) TestSendTransfer() {
path *ibctesting.Path
sender sdk.AccAddress
timeoutHeight clienttypes.Height
memo string
memo []byte
expEscrowAmount math.Int // total amount in escrow for denom on receiving chain
)

Expand All @@ -39,7 +39,7 @@ func (suite *KeeperTestSuite) TestSendTransfer() {
{
"successful transfer from source chain with memo",
func() {
memo = "memo" //nolint:goconst
memo = []byte("memo") //nolint:goconst
expEscrowAmount = math.NewInt(100)
}, true,
},
Expand All @@ -55,7 +55,7 @@ func (suite *KeeperTestSuite) TestSendTransfer() {
func() {
// send IBC token back to chainB
coin = types.GetTransferCoin(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coin.Denom, coin.Amount)
memo = "memo"
memo = []byte("memo") //nolint:goconst
}, true,
},
{
Expand Down Expand Up @@ -116,12 +116,12 @@ func (suite *KeeperTestSuite) TestSendTransfer() {

coin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))
sender = suite.chainA.SenderAccount.GetAddress()
memo = ""
memo = []byte("")
timeoutHeight = suite.chainB.GetTimeoutHeight()
expEscrowAmount = math.ZeroInt()

// create IBC token on chainA
transferMsg := types.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, coin, suite.chainB.SenderAccount.GetAddress().String(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainA.GetTimeoutHeight(), 0, "")
transferMsg := types.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, coin, suite.chainB.SenderAccount.GetAddress().String(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainA.GetTimeoutHeight(), 0, []byte(""))
result, err := suite.chainB.SendMsgs(transferMsg)
suite.Require().NoError(err) // message committed

Expand Down Expand Up @@ -204,7 +204,7 @@ func (suite *KeeperTestSuite) TestSendTransferSetsTotalEscrowAmountForSourceIBCT
coin,
suite.chainA.SenderAccount.GetAddress().String(),
suite.chainB.SenderAccount.GetAddress().String(),
suite.chainB.GetTimeoutHeight(), 0, "",
suite.chainB.GetTimeoutHeight(), 0, []byte(""),
)
result, err := suite.chainA.SendMsgs(transferMsg)
suite.Require().NoError(err) // message committed
Expand All @@ -224,7 +224,7 @@ func (suite *KeeperTestSuite) TestSendTransferSetsTotalEscrowAmountForSourceIBCT
coin,
suite.chainB.SenderAccount.GetAddress().String(),
suite.chainA.SenderAccount.GetAddress().String(),
suite.chainA.GetTimeoutHeight(), 0, "",
suite.chainA.GetTimeoutHeight(), 0, []byte("memo"),
)

res, err := suite.chainB.GetSimApp().TransferKeeper.Transfer(sdk.WrapSDKContext(suite.chainB.GetContext()), msg)
Expand Down Expand Up @@ -352,7 +352,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
if tc.recvIsSource {
// send coin from chainB to chainA, receive them, acknowledge them, and send back to chainB
coinFromBToA := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))
transferMsg := types.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, coinFromBToA, suite.chainB.SenderAccount.GetAddress().String(), suite.chainA.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 110), 0, memo)
transferMsg := types.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, coinFromBToA, suite.chainB.SenderAccount.GetAddress().String(), suite.chainA.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 110), 0, []byte(memo))
res, err := suite.chainB.SendMsgs(transferMsg)
suite.Require().NoError(err) // message committed

Expand All @@ -372,13 +372,13 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {

// send coin from chainA to chainB
coin := sdk.NewCoin(trace.IBCDenom(), amount)
transferMsg := types.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coin, suite.chainA.SenderAccount.GetAddress().String(), receiver, clienttypes.NewHeight(1, 110), 0, memo)
transferMsg := types.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coin, suite.chainA.SenderAccount.GetAddress().String(), receiver, clienttypes.NewHeight(1, 110), 0, []byte(memo))
_, err := suite.chainA.SendMsgs(transferMsg)
suite.Require().NoError(err) // message committed

tc.malleate()

data := types.NewFungibleTokenPacketData(trace.GetFullDenomPath(), amount.String(), suite.chainA.SenderAccount.GetAddress().String(), receiver, memo)
data := types.NewFungibleTokenPacketData(trace.GetFullDenomPath(), amount.String(), suite.chainA.SenderAccount.GetAddress().String(), receiver, []byte(memo))
packet := channeltypes.NewPacket(data.GetBytes(), seq, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0)

err = suite.chainB.GetSimApp().TransferKeeper.OnRecvPacket(suite.chainB.GetContext(), packet, data)
Expand Down Expand Up @@ -456,7 +456,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacketSetsTotalEscrowAmountForSourceIBCT
denomTrace.GetFullDenomPath(),
amount.String(),
suite.chainA.SenderAccount.GetAddress().String(),
suite.chainB.SenderAccount.GetAddress().String(), "",
suite.chainB.SenderAccount.GetAddress().String(), []byte(""),
)
packet := channeltypes.NewPacket(
data.GetBytes(),
Expand Down Expand Up @@ -576,7 +576,7 @@ func (suite *KeeperTestSuite) TestOnAcknowledgementPacket() {

tc.malleate()

data := types.NewFungibleTokenPacketData(trace.GetFullDenomPath(), amount.String(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), "")
data := types.NewFungibleTokenPacketData(trace.GetFullDenomPath(), amount.String(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), []byte(""))
packet := channeltypes.NewPacket(data.GetBytes(), 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0)
preCoin := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), trace.IBCDenom())

Expand Down Expand Up @@ -665,7 +665,7 @@ func (suite *KeeperTestSuite) TestOnAcknowledgementPacketSetsTotalEscrowAmountFo
denomTrace.GetFullDenomPath(),
amount.String(),
suite.chainB.SenderAccount.GetAddress().String(),
suite.chainA.SenderAccount.GetAddress().String(), "",
suite.chainA.SenderAccount.GetAddress().String(), []byte(""),
)
packet := channeltypes.NewPacket(
data.GetBytes(),
Expand Down Expand Up @@ -777,7 +777,7 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacket() {

tc.malleate()

data := types.NewFungibleTokenPacketData(trace.GetFullDenomPath(), amount.String(), sender, suite.chainB.SenderAccount.GetAddress().String(), "")
data := types.NewFungibleTokenPacketData(trace.GetFullDenomPath(), amount.String(), sender, suite.chainB.SenderAccount.GetAddress().String(), []byte(""))
packet := channeltypes.NewPacket(data.GetBytes(), 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0)
preCoin := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), trace.IBCDenom())

Expand Down Expand Up @@ -859,7 +859,7 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacketSetsTotalEscrowAmountForSourceI
denomTrace.GetFullDenomPath(),
amount.String(),
suite.chainB.SenderAccount.GetAddress().String(),
suite.chainA.SenderAccount.GetAddress().String(), "",
suite.chainA.SenderAccount.GetAddress().String(), []byte(""),
)
packet := channeltypes.NewPacket(
data.GetBytes(),
Expand Down
6 changes: 3 additions & 3 deletions modules/apps/transfer/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() {
coinToSendToB := sdk.NewCoin(sdk.DefaultBondDenom, amount)

// send from chainA to chainB
msg := types.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coinToSendToB, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), timeoutHeight, 0, "")
msg := types.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coinToSendToB, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), timeoutHeight, 0, []byte{})
res, err := suite.chainA.SendMsgs(msg)
suite.Require().NoError(err) // message committed

Expand All @@ -80,7 +80,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() {
suite.coordinator.Setup(pathBtoC)

// send from chainB to chainC
msg = types.NewMsgTransfer(pathBtoC.EndpointA.ChannelConfig.PortID, pathBtoC.EndpointA.ChannelID, coinSentFromAToB, suite.chainB.SenderAccount.GetAddress().String(), suite.chainC.SenderAccount.GetAddress().String(), timeoutHeight, 0, "")
msg = types.NewMsgTransfer(pathBtoC.EndpointA.ChannelConfig.PortID, pathBtoC.EndpointA.ChannelID, coinSentFromAToB, suite.chainB.SenderAccount.GetAddress().String(), suite.chainC.SenderAccount.GetAddress().String(), timeoutHeight, 0, []byte{})
res, err = suite.chainB.SendMsgs(msg)
suite.Require().NoError(err) // message committed

Expand All @@ -104,7 +104,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() {
suite.Require().Zero(balance.Amount.Int64())

// send from chainC back to chainB
msg = types.NewMsgTransfer(pathBtoC.EndpointB.ChannelConfig.PortID, pathBtoC.EndpointB.ChannelID, coinSentFromBToC, suite.chainC.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), timeoutHeight, 0, "")
msg = types.NewMsgTransfer(pathBtoC.EndpointB.ChannelConfig.PortID, pathBtoC.EndpointB.ChannelID, coinSentFromBToC, suite.chainC.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), timeoutHeight, 0, []byte{})
res, err = suite.chainC.SendMsgs(msg)
suite.Require().NoError(err) // message committed

Expand Down
9 changes: 9 additions & 0 deletions modules/apps/transfer/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
// NOTE: Copied from https://github.com/cosmos/cosmos-sdk/blob/971c542453e0972ef1dfc5a80159ad5049c7211c/codec/json.go
// and modified in order to allow `EmitDefaults` to be set to false for ics20 packet marshalling.
// This allows for the introduction of the memo field to be backwards compatible.
func mustProtoMarshalJSON(msg proto.Message) []byte {

Check failure on line 59 in modules/apps/transfer/types/codec.go

View workflow job for this annotation

GitHub Actions / lint

func `mustProtoMarshalJSON` is unused (unused)
anyResolver := codectypes.NewInterfaceRegistry()

// EmitDefaults is set to false to prevent marshalling of unpopulated fields (memo)
Expand All @@ -79,3 +79,12 @@

return buf.Bytes()
}

func mustProtoMarshal(msg proto.Message) []byte {
buf, err := proto.Marshal(msg)
if err != nil {
panic(err)
}

return buf
}
4 changes: 2 additions & 2 deletions modules/apps/transfer/types/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
// TestMustMarshalProtoJSON tests that the memo field is only emitted (marshalled) if it is populated
func (suite *TypesTestSuite) TestMustMarshalProtoJSON() {
memo := "memo"
packetData := types.NewFungibleTokenPacketData(sdk.DefaultBondDenom, "1", suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), memo)
packetData := types.NewFungibleTokenPacketData(sdk.DefaultBondDenom, "1", suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), []byte(memo))

bz := packetData.GetBytes()
exists := strings.Contains(string(bz), memo)
suite.Require().True(exists)

packetData.Memo = ""
packetData.Memo = []byte("")

bz = packetData.GetBytes()
exists = strings.Contains(string(bz), memo)
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewMsgTransfer(
sourcePort, sourceChannel string,
token sdk.Coin, sender, receiver string,
timeoutHeight clienttypes.Height, timeoutTimestamp uint64,
memo string,
memo []byte,
) *MsgTransfer {
return &MsgTransfer{
SourcePort: sourcePort,
Expand Down
Loading
Loading