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

Update MsgTransfer to accept sdk.Coins instead of sdk.Coin #6113

Merged
merged 10 commits into from
Apr 9, 2024
88 changes: 48 additions & 40 deletions e2e/tests/transfer/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,18 @@ func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() {
t.Run("broadcast MsgGrant", createMsgGrantFn)

t.Run("broadcast MsgExec for ibc MsgTransfer", func(t *testing.T) {
transferMsg := transfertypes.MsgTransfer{
SourcePort: channelA.PortID,
SourceChannel: channelA.ChannelID,
Token: testvalues.DefaultTransferAmount(chainADenom),
Sender: granterAddress,
Receiver: receiverWalletAddress,
TimeoutHeight: suite.GetTimeoutHeight(ctx, chainB),
}

protoAny, err := codectypes.NewAnyWithValue(&transferMsg)
transferMsg := transfertypes.NewMsgTransfer(
channelA.PortID,
channelA.ChannelID,
testvalues.DefaultTransferCoins(chainADenom),
granterAddress,
receiverWalletAddress,
suite.GetTimeoutHeight(ctx, chainB),
0,
"",
)

protoAny, err := codectypes.NewAnyWithValue(transferMsg)
suite.Require().NoError(err)

msgExec := &authz.MsgExec{
Expand Down Expand Up @@ -161,16 +163,18 @@ func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() {
})

t.Run("exec unauthorized MsgTransfer", func(t *testing.T) {
transferMsg := transfertypes.MsgTransfer{
SourcePort: channelA.PortID,
SourceChannel: channelA.ChannelID,
Token: testvalues.DefaultTransferAmount(chainADenom),
Sender: granterAddress,
Receiver: receiverWalletAddress,
TimeoutHeight: suite.GetTimeoutHeight(ctx, chainB),
}

protoAny, err := codectypes.NewAnyWithValue(&transferMsg)
transferMsg := transfertypes.NewMsgTransfer(
channelA.PortID,
channelA.ChannelID,
testvalues.DefaultTransferCoins(chainADenom),
granterAddress,
receiverWalletAddress,
suite.GetTimeoutHeight(ctx, chainB),
0,
"",
)

protoAny, err := codectypes.NewAnyWithValue(transferMsg)
suite.Require().NoError(err)

msgExec := &authz.MsgExec{
Expand Down Expand Up @@ -241,16 +245,18 @@ func (suite *AuthzTransferTestSuite) TestAuthz_InvalidTransferAuthorizations() {
const invalidSpendAmount = spendLimit + 1

t.Run("broadcast MsgExec for ibc MsgTransfer", func(t *testing.T) {
transferMsg := transfertypes.MsgTransfer{
SourcePort: channelA.PortID,
SourceChannel: channelA.ChannelID,
Token: sdk.Coin{Denom: chainADenom, Amount: sdkmath.NewInt(invalidSpendAmount)},
Sender: granterAddress,
Receiver: receiverWalletAddress,
TimeoutHeight: suite.GetTimeoutHeight(ctx, chainB),
}

protoAny, err := codectypes.NewAnyWithValue(&transferMsg)
transferMsg := transfertypes.NewMsgTransfer(
channelA.PortID,
channelA.ChannelID,
sdk.NewCoins(sdk.Coin{Denom: chainADenom, Amount: sdkmath.NewInt(invalidSpendAmount)}),
granterAddress,
receiverWalletAddress,
suite.GetTimeoutHeight(ctx, chainB),
0,
"",
)

protoAny, err := codectypes.NewAnyWithValue(transferMsg)
suite.Require().NoError(err)

msgExec := &authz.MsgExec{
Expand Down Expand Up @@ -298,16 +304,18 @@ func (suite *AuthzTransferTestSuite) TestAuthz_InvalidTransferAuthorizations() {
invalidWalletAddress := invalidWallet.FormattedAddress()

t.Run("broadcast MsgExec for ibc MsgTransfer", func(t *testing.T) {
transferMsg := transfertypes.MsgTransfer{
SourcePort: channelA.PortID,
SourceChannel: channelA.ChannelID,
Token: sdk.Coin{Denom: chainADenom, Amount: sdkmath.NewInt(spendLimit)},
Sender: granterAddress,
Receiver: invalidWalletAddress,
TimeoutHeight: suite.GetTimeoutHeight(ctx, chainB),
}

protoAny, err := codectypes.NewAnyWithValue(&transferMsg)
transferMsg := transfertypes.NewMsgTransfer(
channelA.PortID,
channelA.ChannelID,
sdk.NewCoins(sdk.Coin{Denom: chainADenom, Amount: sdkmath.NewInt(spendLimit)}),
granterAddress,
invalidWalletAddress,
suite.GetTimeoutHeight(ctx, chainB),
0,
"",
)

protoAny, err := codectypes.NewAnyWithValue(transferMsg)
suite.Require().NoError(err)

msgExec := &authz.MsgExec{
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/transfer/incentivized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_InvalidReceiverAccou
transferAmount := testvalues.DefaultTransferAmount(chainADenom)

t.Run("send IBC transfer", func(t *testing.T) {
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.FormattedAddress(), testvalues.InvalidAddress, s.GetTimeoutHeight(ctx, chainB), 0, "")
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, sdk.NewCoins(transferAmount), chainAWallet.FormattedAddress(), testvalues.InvalidAddress, s.GetTimeoutHeight(ctx, chainB), 0, "")
txResp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgTransfer)
// this message should be successful, as receiver account is not validated on the sending chain.
s.AssertTxSuccess(txResp)
Expand Down Expand Up @@ -322,7 +322,7 @@ func (s *IncentivizedTransferTestSuite) TestMultiMsg_MsgPayPacketFeeSingleSender
})

msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil)
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.FormattedAddress(), chainBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainB), 0, "")
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, sdk.NewCoins(transferAmount), chainAWallet.FormattedAddress(), chainBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainB), 0, "")
resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer)
s.AssertTxSuccess(resp)

Expand Down
4 changes: 3 additions & 1 deletion e2e/tests/transfer/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (

sdkmath "cosmossdk.io/math"

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

"github.com/cosmos/ibc-go/e2e/testsuite"
"github.com/cosmos/ibc-go/e2e/testvalues"
feetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
Expand Down Expand Up @@ -195,7 +197,7 @@ func (s *TransferChannelUpgradesTestSuite) TestChannelUpgrade_WithFeeMiddleware_
transferAmount := testvalues.DefaultTransferAmount(chainA.Config().Denom)

msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil)
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.FormattedAddress(), chainBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainB), 0, "")
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, sdk.NewCoins(transferAmount), chainAWallet.FormattedAddress(), chainBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainB), 0, "")
resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer)
s.AssertTxSuccess(resp)
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/upgrades/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade_ChannelUpgrades() {
transferAmount := testvalues.DefaultTransferAmount(chainA.Config().Denom)

msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil)
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.FormattedAddress(), chainBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainB), 0, "")
msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, sdk.NewCoins(transferAmount), chainAWallet.FormattedAddress(), chainBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainB), 0, "")
resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer)
s.AssertTxSuccess(resp)
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/testsuite/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (s *E2ETestSuite) ExecuteGovV1Beta1Proposal(ctx context.Context, chain ibc.
func (s *E2ETestSuite) Transfer(ctx context.Context, chain ibc.Chain, user ibc.Wallet,
portID, channelID string, token sdk.Coin, sender, receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, memo string,
) sdk.TxResponse {
msg := transfertypes.NewMsgTransfer(portID, channelID, token, sender, receiver, timeoutHeight, timeoutTimestamp, memo)
msg := transfertypes.NewMsgTransfer(portID, channelID, sdk.NewCoins(token), sender, receiver, timeoutHeight, timeoutTimestamp, memo)
return s.BroadcastMessages(ctx, chain, user, msg)
}

Expand Down
4 changes: 4 additions & 0 deletions e2e/testvalues/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func DefaultTransferAmount(denom string) sdk.Coin {
return sdk.Coin{Denom: denom, Amount: sdkmath.NewInt(IBCTransferAmount)}
}

func DefaultTransferCoins(denom string) sdk.Coins {
return sdk.NewCoins(DefaultTransferAmount(denom))
}

func TransferAmount(amount int64, denom string) sdk.Coin {
return sdk.Coin{Denom: denom, Amount: sdkmath.NewInt(amount)}
}
Expand Down
38 changes: 20 additions & 18 deletions modules/apps/27-interchain-accounts/host/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,16 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID)
suite.Require().True(found)

msg := &transfertypes.MsgTransfer{
SourcePort: transferPath.EndpointA.ChannelConfig.PortID,
SourceChannel: transferPath.EndpointA.ChannelID,
Token: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100)),
Sender: interchainAccountAddr,
Receiver: suite.chainA.SenderAccount.GetAddress().String(),
TimeoutHeight: suite.chainB.GetTimeoutHeight(),
TimeoutTimestamp: uint64(0),
}
msg := transfertypes.NewMsgTransfer(
transferPath.EndpointA.ChannelConfig.PortID,
transferPath.EndpointA.ChannelID,
sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))),
interchainAccountAddr,
suite.chainA.SenderAccount.GetAddress().String(),
suite.chainB.GetTimeoutHeight(),
0,
"",
)

data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding)
suite.Require().NoError(err)
Expand All @@ -376,15 +377,16 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() {
interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID)
suite.Require().True(found)

msg := &transfertypes.MsgTransfer{
SourcePort: transferPath.EndpointA.ChannelConfig.PortID,
SourceChannel: transferPath.EndpointA.ChannelID,
Token: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100)),
Sender: interchainAccountAddr,
Receiver: "",
TimeoutHeight: suite.chainB.GetTimeoutHeight(),
TimeoutTimestamp: uint64(0),
}
msg := transfertypes.NewMsgTransfer(
transferPath.EndpointA.ChannelConfig.PortID,
transferPath.EndpointA.ChannelID,
sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))),
interchainAccountAddr,
"",
suite.chainB.GetTimeoutHeight(),
0,
"",
)

data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding)
suite.Require().NoError(err)
Expand Down
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 @@ -113,7 +113,7 @@ func (suite *KeeperTestSuite) TestDistributeFeeEvent() {

msgTransfer := transfertypes.NewMsgTransfer(
path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID,
sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100)), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(),
sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(),
clienttypes.NewHeight(1, 100), 0, "",
)

Expand Down
4 changes: 2 additions & 2 deletions 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, sdk.NewCoins(coin), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 100), 0, ""),
}
res, err := suite.chainA.SendMsgs(msgs...)
suite.Require().NoError(err) // message committed
Expand Down Expand Up @@ -138,7 +138,7 @@ func (suite *FeeTestSuite) TestTransferFeeUpgrade() {
fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee)
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, ibctesting.TestCoin, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 100), 0, ""),
transfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, sdk.NewCoins(ibctesting.TestCoin), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), clienttypes.NewHeight(1, 100), 0, ""),
}

res, err := suite.chainA.SendMsgs(msgs...)
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/callbacks/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (s *CallbacksTestSuite) TestOnTimeoutPacket() {
timeoutTimestamp := uint64(s.chainB.GetContext().BlockTime().UnixNano())
msg := transfertypes.NewMsgTransfer(
s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID,
ibctesting.TestCoin, s.chainA.SenderAccount.GetAddress().String(),
sdk.NewCoins(ibctesting.TestCoin), s.chainA.SenderAccount.GetAddress().String(),
s.chainB.SenderAccount.GetAddress().String(), clienttypes.ZeroHeight(), timeoutTimestamp,
fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"%d"}}`, ibctesting.TestAccAddress, userGasLimit), // set user gas limit above panic level in mock contract keeper
)
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/callbacks/replay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (s *CallbacksTestSuite) ExecuteFailedTransfer(memo string) {
msg := transfertypes.NewMsgTransfer(
s.path.EndpointA.ChannelConfig.PortID,
s.path.EndpointA.ChannelID,
amount,
sdk.NewCoins(amount),
s.chainA.SenderAccount.GetAddress().String(),
s.chainB.SenderAccount.GetAddress().String(),
clienttypes.NewHeight(1, 100), 0, memo,
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/callbacks/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (s *CallbacksTestSuite) ExecuteTransfer(memo string) {
msg := transfertypes.NewMsgTransfer(
s.path.EndpointA.ChannelConfig.PortID,
s.path.EndpointA.ChannelID,
amount,
sdk.NewCoins(amount),
s.chainA.SenderAccount.GetAddress().String(),
s.chainB.SenderAccount.GetAddress().String(),
clienttypes.NewHeight(1, 100), 0, memo,
Expand Down Expand Up @@ -223,7 +223,7 @@ func (s *CallbacksTestSuite) ExecuteTransferTimeout(memo string) {
msg := transfertypes.NewMsgTransfer(
s.path.EndpointA.ChannelConfig.PortID,
s.path.EndpointA.ChannelID,
amount,
sdk.NewCoins(amount),
s.chainA.SenderAccount.GetAddress().String(),
s.chainB.SenderAccount.GetAddress().String(),
timeoutHeight, timeoutTimestamp, memo,
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 @@ -107,7 +107,7 @@ Relative timeout timestamp is added to the value of the user's local system cloc
}

msg := types.NewMsgTransfer(
srcPort, srcChannel, coin, sender, receiver, timeoutHeight, timeoutTimestamp, memo,
srcPort, srcChannel, sdk.NewCoins(coin), sender, receiver, timeoutHeight, timeoutTimestamp, memo,
)
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
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 @@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestTotalEscrowPerDenomInvariant() {
msg := types.NewMsgTransfer(
path.EndpointA.ChannelConfig.PortID,
path.EndpointA.ChannelID,
coin,
sdk.NewCoins(coin),
suite.chainA.SenderAccount.GetAddress().String(),
suite.chainB.SenderAccount.GetAddress().String(),
suite.chainA.GetTimeoutHeight(), 0, "",
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/mbt_relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (suite *KeeperTestSuite) TestModelBasedRelay() {
msg := types.NewMsgTransfer(
tc.packet.SourcePort,
tc.packet.SourceChannel,
sdk.NewCoin(denom, amount),
sdk.NewCoins(sdk.NewCoin(denom, amount)),
sender.String(),
tc.packet.Data.Receiver,
suite.chainA.GetTimeoutHeight(), 0, // only use timeout height
Expand Down
15 changes: 9 additions & 6 deletions modules/apps/transfer/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,33 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types.
return nil, err
}

if !k.bankKeeper.IsSendEnabledCoin(ctx, msg.Token) {
return nil, errorsmod.Wrapf(types.ErrSendDisabled, "%s transfers are currently disabled", msg.Token.Denom)
// TODO: replace with correct usage.
token := msg.GetTokens()[0]

if !k.bankKeeper.IsSendEnabledCoin(ctx, token) {
return nil, errorsmod.Wrapf(types.ErrSendDisabled, "%s transfers are currently disabled", token.Denom)
}

if k.bankKeeper.BlockedAddr(sender) {
return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "%s is not allowed to send funds", sender)
}

sequence, err := k.sendTransfer(
ctx, msg.SourcePort, msg.SourceChannel, msg.Token, sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp,
ctx, msg.SourcePort, msg.SourceChannel, token, sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp,
msg.Memo)
if err != nil {
return nil, err
}

k.Logger(ctx).Info("IBC fungible token transfer", "token", msg.Token.Denom, "amount", msg.Token.Amount.String(), "sender", msg.Sender, "receiver", msg.Receiver)
k.Logger(ctx).Info("IBC fungible token transfer", "token", token.Denom, "amount", token.Amount.String(), "sender", msg.Sender, "receiver", msg.Receiver)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
types.EventTypeTransfer,
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver),
sdk.NewAttribute(types.AttributeKeyAmount, msg.Token.Amount.String()),
sdk.NewAttribute(types.AttributeKeyDenom, msg.Token.Denom),
sdk.NewAttribute(types.AttributeKeyAmount, token.Amount.String()),
sdk.NewAttribute(types.AttributeKeyDenom, token.Denom),
sdk.NewAttribute(types.AttributeKeyMemo, msg.Memo),
),
sdk.NewEvent(
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 @@ -95,7 +95,7 @@ func (suite *KeeperTestSuite) TestMsgTransfer() {
msg = types.NewMsgTransfer(
path.EndpointA.ChannelConfig.PortID,
path.EndpointA.ChannelID,
coin, suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(),
sdk.NewCoins(coin), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(),
suite.chainB.GetTimeoutHeight(), 0, // only use timeout height
"memo",
)
Expand Down
Loading
Loading