diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 662081f9459..284a8718f00 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -701,7 +701,7 @@ https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middl | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `receive_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `recv_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | | `ack_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | | `timeout_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | @@ -978,7 +978,7 @@ MsgPayPacketFeeResponse defines the response type for Msg/PayPacketFee ### MsgRegisterCounterpartyAddress -MsgRegisterCounterpartyAddress is the request type for registering the counter party address +MsgRegisterCounterpartyAddress is the request type for registering the counterparty address | Field | Type | Label | Description | diff --git a/modules/apps/29-fee/ibc_module_test.go b/modules/apps/29-fee/ibc_module_test.go index a12b8ae972f..f0bdf89ff80 100644 --- a/modules/apps/29-fee/ibc_module_test.go +++ b/modules/apps/29-fee/ibc_module_test.go @@ -524,7 +524,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { { "success", func() { - expectedRelayerBalance = identifiedFee.Fee.ReceiveFee.Add(identifiedFee.Fee.AckFee[0]) + expectedRelayerBalance = identifiedFee.Fee.RecvFee.Add(identifiedFee.Fee.AckFee[0]) }, true, }, @@ -603,7 +603,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { identifiedFee = types.NewIdentifiedPacketFee( packetId, types.Fee{ - ReceiveFee: validCoins, + RecvFee: validCoins, AckFee: validCoins2, TimeoutFee: validCoins3, }, @@ -698,7 +698,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { relayerAddr = suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress() expectedBalance = originalBalance. - Add(identifiedFee.Fee.ReceiveFee[0]). + Add(identifiedFee.Fee.RecvFee[0]). Add(identifiedFee.Fee.AckFee[0]). Add(ibctesting.TestCoin) // timeout refund for ics20 transfer }, @@ -737,7 +737,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { identifiedFee = types.NewIdentifiedPacketFee( packetId, types.Fee{ - ReceiveFee: validCoins, + RecvFee: validCoins, AckFee: validCoins2, TimeoutFee: validCoins3, }, @@ -754,7 +754,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { // default to success case expectedBalance = originalBalance. - Add(identifiedFee.Fee.ReceiveFee[0]). + Add(identifiedFee.Fee.RecvFee[0]). Add(identifiedFee.Fee.AckFee[0]). Add(coin) // timeout refund from ics20 transfer diff --git a/modules/apps/29-fee/keeper/escrow.go b/modules/apps/29-fee/keeper/escrow.go index 9ba1709a8dc..a3c6e920671 100644 --- a/modules/apps/29-fee/keeper/escrow.go +++ b/modules/apps/29-fee/keeper/escrow.go @@ -26,7 +26,7 @@ func (k Keeper) EscrowPacketFee(ctx sdk.Context, identifiedFee *types.Identified return sdkerrors.Wrap(types.ErrRefundAccNotFound, fmt.Sprintf("Account with address: %s not found", refundAcc)) } - coins := identifiedFee.Fee.ReceiveFee + coins := identifiedFee.Fee.RecvFee coins = coins.Add(identifiedFee.Fee.AckFee...) coins = coins.Add(identifiedFee.Fee.TimeoutFee...) @@ -46,7 +46,7 @@ func (k Keeper) DistributePacketFees(ctx sdk.Context, refundAcc, forwardRelayer // distribute fee for forward relaying forward, err := sdk.AccAddressFromBech32(forwardRelayer) if err == nil { - k.distributeFee(ctx, forward, feeInEscrow.Fee.ReceiveFee) + k.distributeFee(ctx, forward, feeInEscrow.Fee.RecvFee) } // distribute fee for reverse relaying @@ -74,7 +74,7 @@ func (k Keeper) DistributePacketFeesOnTimeout(ctx sdk.Context, refundAcc string, } // refund receive fee for unused forward relaying - k.distributeFee(ctx, refundAddr, feeInEscrow.Fee.ReceiveFee) + k.distributeFee(ctx, refundAddr, feeInEscrow.Fee.RecvFee) // refund ack fee for unused reverse relaying k.distributeFee(ctx, refundAddr, feeInEscrow.Fee.AckFee) @@ -117,7 +117,7 @@ func (k Keeper) RefundFeesOnChannel(ctx sdk.Context, portID, channelID string) e // refund all fees to refund address // Use SendCoins rather than the module account send functions since refund address may be a user account or module address. // if any `SendCoins` call returns an error, we return error and stop iteration - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, refundAccAddr, identifiedFee.Fee.ReceiveFee) + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, refundAccAddr, identifiedFee.Fee.RecvFee) if err != nil { refundErr = err return true diff --git a/modules/apps/29-fee/keeper/escrow_test.go b/modules/apps/29-fee/keeper/escrow_test.go index 9c07c79589c..721bbf6f79a 100644 --- a/modules/apps/29-fee/keeper/escrow_test.go +++ b/modules/apps/29-fee/keeper/escrow_test.go @@ -71,7 +71,7 @@ func (suite *KeeperTestSuite) TestEscrowPacketFee() { tc.malleate() fee := types.Fee{ - ReceiveFee: receiveFee, + RecvFee: receiveFee, AckFee: ackFee, TimeoutFee: timeoutFee, } @@ -87,7 +87,7 @@ func (suite *KeeperTestSuite) TestEscrowPacketFee() { feeInEscrow, _ := suite.chainA.GetSimApp().IBCFeeKeeper.GetFeeInEscrow(suite.chainA.GetContext(), packetId) // check if the escrowed fee is set in state suite.Require().True(feeInEscrow.Fee.AckFee.IsEqual(fee.AckFee)) - suite.Require().True(feeInEscrow.Fee.ReceiveFee.IsEqual(fee.ReceiveFee)) + suite.Require().True(feeInEscrow.Fee.RecvFee.IsEqual(fee.RecvFee)) suite.Require().True(feeInEscrow.Fee.TimeoutFee.IsEqual(fee.TimeoutFee)) // check if the fee is escrowed correctly hasBalance := suite.chainA.GetSimApp().BankKeeper.HasBalance(suite.chainA.GetContext(), suite.chainA.GetSimApp().IBCFeeKeeper.GetFeeModuleAddress(), sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(600)}) @@ -142,7 +142,7 @@ func (suite *KeeperTestSuite) TestDistributeFee() { packetId := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, transfertypes.PortID, validSeq) fee := types.Fee{ - ReceiveFee: defaultReceiveFee, + RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee, } @@ -172,7 +172,7 @@ func (suite *KeeperTestSuite) TestDistributeFee() { // check if the forward relayer is paid forward, err := sdk.AccAddressFromBech32(forwardRelayer) suite.Require().NoError(err) - hasBalance = suite.chainA.GetSimApp().BankKeeper.HasBalance(suite.chainA.GetContext(), forward, fee.ReceiveFee[0]) + hasBalance = suite.chainA.GetSimApp().BankKeeper.HasBalance(suite.chainA.GetContext(), forward, fee.RecvFee[0]) suite.Require().True(hasBalance) // check if the refund acc has been refunded the timeoutFee @@ -185,7 +185,7 @@ func (suite *KeeperTestSuite) TestDistributeFee() { suite.Require().True(hasBalance) } else { // check the module acc wallet still has forward relaying balance - hasBalance := suite.chainA.GetSimApp().BankKeeper.HasBalance(suite.chainA.GetContext(), suite.chainA.GetSimApp().IBCFeeKeeper.GetFeeModuleAddress(), fee.ReceiveFee[0]) + hasBalance := suite.chainA.GetSimApp().BankKeeper.HasBalance(suite.chainA.GetContext(), suite.chainA.GetSimApp().IBCFeeKeeper.GetFeeModuleAddress(), fee.RecvFee[0]) suite.Require().True(hasBalance) } }) @@ -206,7 +206,7 @@ func (suite *KeeperTestSuite) TestDistributeTimeoutFee() { ) fee := types.Fee{ - ReceiveFee: defaultReceiveFee, + RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee, } @@ -237,7 +237,7 @@ func (suite *KeeperTestSuite) TestDistributeTimeoutFee() { // check if the refund acc has been refunded the recv & ack fees expectedRefundAccBal := refundAccBal.Add(fee.AckFee[0]) - expectedRefundAccBal = refundAccBal.Add(fee.ReceiveFee[0]) + expectedRefundAccBal = refundAccBal.Add(fee.RecvFee[0]) hasBalance = suite.chainA.GetSimApp().BankKeeper.HasBalance(suite.chainA.GetContext(), refundAcc, expectedRefundAccBal) suite.Require().True(hasBalance) @@ -256,7 +256,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannel() { for i := 0; i < 5; i++ { packetId := channeltypes.NewPacketId("channel-0", transfertypes.PortID, uint64(i)) fee := types.Fee{ - ReceiveFee: defaultReceiveFee, + RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee, } @@ -270,7 +270,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannel() { // send a packet over a different channel to ensure this fee is not refunded packetId := channeltypes.NewPacketId("channel-1", transfertypes.PortID, 1) fee := types.Fee{ - ReceiveFee: defaultReceiveFee, + RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee, } @@ -286,7 +286,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannel() { // add fee sent to channel-1 to after balance to recover original balance afterBal := suite.chainA.GetSimApp().BankKeeper.GetAllBalances(suite.chainA.GetContext(), refundAcc) - suite.Require().Equal(prevBal, afterBal.Add(fee.ReceiveFee...).Add(fee.AckFee...).Add(fee.TimeoutFee...), "refund account not back to original balance after refunding all tokens") + suite.Require().Equal(prevBal, afterBal.Add(fee.RecvFee...).Add(fee.AckFee...).Add(fee.TimeoutFee...), "refund account not back to original balance after refunding all tokens") // create escrow and then change module account balance to cause error on refund packetId = channeltypes.NewPacketId("channel-0", transfertypes.PortID, uint64(6)) diff --git a/modules/apps/29-fee/keeper/grpc_query_test.go b/modules/apps/29-fee/keeper/grpc_query_test.go index bef02669b04..c456090caaf 100644 --- a/modules/apps/29-fee/keeper/grpc_query_test.go +++ b/modules/apps/29-fee/keeper/grpc_query_test.go @@ -26,7 +26,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacketI() { validPacketId, types.Fee{ AckFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), - ReceiveFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + RecvFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), TimeoutFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), }, "", // leave empty here and then populate on each testcase since suite resets @@ -94,7 +94,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPackets() { fee := types.Fee{ AckFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, - ReceiveFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, + RecvFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, TimeoutFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, } diff --git a/modules/apps/29-fee/keeper/keeper_test.go b/modules/apps/29-fee/keeper/keeper_test.go index ad19cfac072..459eafbf70b 100644 --- a/modules/apps/29-fee/keeper/keeper_test.go +++ b/modules/apps/29-fee/keeper/keeper_test.go @@ -57,7 +57,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) TestFeeInEscrow() { - fee := types.Fee{ReceiveFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee} + fee := types.Fee{RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee} // set some fees for i := 1; i < 6; i++ { diff --git a/modules/apps/29-fee/keeper/msg_server_test.go b/modules/apps/29-fee/keeper/msg_server_test.go index 26a62830035..f541dd3fd36 100644 --- a/modules/apps/29-fee/keeper/msg_server_test.go +++ b/modules/apps/29-fee/keeper/msg_server_test.go @@ -70,7 +70,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { refundAcc := suite.chainA.SenderAccount.GetAddress() channelID := suite.path.EndpointA.ChannelID fee := types.Fee{ - ReceiveFee: defaultReceiveFee, + RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee, } @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { // build packetId channelID := suite.path.EndpointA.ChannelID fee := types.Fee{ - ReceiveFee: defaultReceiveFee, + RecvFee: defaultReceiveFee, AckFee: defaultAckFee, TimeoutFee: defaultTimeoutFee, } diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 1db63e62f8a..4fa6f240abb 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // See Fee Payment Middleware spec: // https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract type Fee struct { - ReceiveFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=receive_fee,json=receiveFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"receive_fee" yaml:"receive_fee"` + RecvFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=recv_fee,json=recvFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"recv_fee" yaml:"receive_fee"` AckFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=ack_fee,json=ackFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"ack_fee" yaml:"ack_fee"` TimeoutFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=timeout_fee,json=timeoutFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"timeout_fee" yaml:"timeout_fee"` } @@ -68,9 +68,9 @@ func (m *Fee) XXX_DiscardUnknown() { var xxx_messageInfo_Fee proto.InternalMessageInfo -func (m *Fee) GetReceiveFee() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *Fee) GetRecvFee() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.ReceiveFee + return m.RecvFee } return nil } @@ -169,38 +169,38 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/fee.proto", fileDescriptor_cb3319f1af2a53e5) } var fileDescriptor_cb3319f1af2a53e5 = []byte{ - // 482 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x31, 0x8f, 0xd3, 0x30, - 0x14, 0xc7, 0x1b, 0x72, 0x3a, 0xee, 0x5c, 0x71, 0x42, 0x01, 0x44, 0xae, 0x82, 0xb4, 0x64, 0xca, - 0x52, 0x5b, 0xed, 0xc1, 0x00, 0x13, 0x04, 0xa9, 0xd2, 0x4d, 0xa0, 0x88, 0x89, 0xa5, 0x72, 0xec, - 0xd7, 0x9e, 0xd5, 0x24, 0x8e, 0xe2, 0x34, 0x52, 0x57, 0x16, 0x56, 0x3e, 0x07, 0x9f, 0xe4, 0xc6, - 0x1b, 0x99, 0x0a, 0x6a, 0xbf, 0xc1, 0x7d, 0x01, 0x90, 0x63, 0xf7, 0x54, 0x09, 0x21, 0xd4, 0xc9, - 0xf6, 0xf3, 0xfb, 0xbf, 0xdf, 0x7b, 0xcf, 0xcf, 0xe8, 0x85, 0x48, 0x19, 0xa1, 0x65, 0x99, 0x09, - 0x46, 0x6b, 0x21, 0x0b, 0x45, 0x66, 0x00, 0xa4, 0x19, 0xe9, 0x05, 0x97, 0x95, 0xac, 0xa5, 0xf7, - 0x54, 0xa4, 0x0c, 0xef, 0xbb, 0x60, 0x7d, 0xd7, 0x8c, 0x7a, 0x01, 0x93, 0x2a, 0x97, 0x8a, 0xa4, - 0x54, 0x69, 0x49, 0x0a, 0x35, 0x1d, 0x11, 0x26, 0x45, 0x61, 0x84, 0xbd, 0xc7, 0x73,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x11, 0x36, 0x92, 0x4b, 0x1e, 0xfb, 0x36, 0xbb, 0x87, 0x26, 0xbb, 0x3b, - 0x75, 0x98, 0x9c, 0x94, 0xd6, 0xc7, 0x7b, 0x89, 0x5c, 0xd3, 0x66, 0x1d, 0xef, 0x19, 0xfe, 0xc7, - 0xdc, 0xe1, 0x09, 0x40, 0x7c, 0xa4, 0xc3, 0x25, 0xda, 0xdd, 0x7b, 0x8b, 0xce, 0x2a, 0x98, 0x2d, - 0x0b, 0x3e, 0xa5, 0x9c, 0x57, 0xa0, 0x94, 0xef, 0x0e, 0x9c, 0xe8, 0x34, 0x3e, 0xbf, 0x5d, 0xf7, - 0x9f, 0xec, 0x06, 0x61, 0xff, 0x3e, 0x4c, 0x1e, 0x18, 0xc3, 0x3b, 0x73, 0xf6, 0x7a, 0xe8, 0xa4, - 0x82, 0x8c, 0xae, 0xa0, 0x52, 0xfe, 0xd1, 0xc0, 0x8d, 0x4e, 0x93, 0xbb, 0x73, 0xfc, 0xe1, 0x7a, - 0x13, 0x38, 0x37, 0x9b, 0xc0, 0xf9, 0xb5, 0x09, 0x9c, 0x6f, 0xdb, 0xa0, 0x73, 0xb3, 0x0d, 0x3a, - 0x3f, 0xb6, 0x41, 0xe7, 0xf3, 0xab, 0xbf, 0x3b, 0x2a, 0x52, 0x36, 0x9c, 0x4b, 0xd2, 0x5c, 0x90, - 0x5c, 0xf2, 0x65, 0x06, 0x4a, 0x7f, 0x2d, 0x45, 0xc6, 0xaf, 0x87, 0xfa, 0x57, 0xb5, 0x4d, 0x4e, - 0x8f, 0xdb, 0x19, 0xbf, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x76, 0xdd, 0x8f, 0x88, 0x7a, 0x03, - 0x00, 0x00, + // 488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xbd, 0x8e, 0xd3, 0x40, + 0x10, 0xc7, 0x63, 0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0x15, 0x9c, 0x84, 0x67, 0x37, 0xeb, 0xfe, 0xe3, 0xdb, 0x2d, 0xd8, 0x3d, 0xf7, 0xa3, 0xfb, 0x26, + 0xf0, 0xd6, 0xf8, 0x4e, 0x0f, 0x17, 0x2c, 0xe5, 0x2b, 0x28, 0xb5, 0x7b, 0x30, 0xb0, 0x83, 0x93, + 0xe8, 0xce, 0x0f, 0xdf, 0x5f, 0x6d, 0x3c, 0xeb, 0x7a, 0xe3, 0x59, 0xbf, 0x36, 0x9e, 0xf5, 0x6d, + 0xeb, 0x75, 0xae, 0xb7, 0x5e, 0xe7, 0xc7, 0xd6, 0xeb, 0x7c, 0x7a, 0xf9, 0xf7, 0x44, 0x65, 0x2c, + 0x86, 0x73, 0xc5, 0xea, 0x73, 0x96, 0xa9, 0x64, 0x99, 0x82, 0xc6, 0x37, 0xa5, 0xd9, 0xf8, 0xd5, + 0x10, 0x9f, 0x53, 0x33, 0xe4, 0xf8, 0xb0, 0x59, 0xee, 0xf3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x4e, 0x82, 0x74, 0x21, 0x73, 0x03, 0x00, 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { @@ -251,10 +251,10 @@ func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.ReceiveFee) > 0 { - for iNdEx := len(m.ReceiveFee) - 1; iNdEx >= 0; iNdEx-- { + if len(m.RecvFee) > 0 { + for iNdEx := len(m.RecvFee) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.ReceiveFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.RecvFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -344,8 +344,8 @@ func (m *Fee) Size() (n int) { } var l int _ = l - if len(m.ReceiveFee) > 0 { - for _, e := range m.ReceiveFee { + if len(m.RecvFee) > 0 { + for _, e := range m.RecvFee { l = e.Size() n += 1 + l + sovFee(uint64(l)) } @@ -425,7 +425,7 @@ func (m *Fee) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RecvFee", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -452,8 +452,8 @@ func (m *Fee) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReceiveFee = append(m.ReceiveFee, types.Coin{}) - if err := m.ReceiveFee[len(m.ReceiveFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RecvFee = append(m.RecvFee, types.Coin{}) + if err := m.RecvFee[len(m.RecvFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/modules/apps/29-fee/types/msgs.go b/modules/apps/29-fee/types/msgs.go index 7138706cf80..15b3fd716be 100644 --- a/modules/apps/29-fee/types/msgs.go +++ b/modules/apps/29-fee/types/msgs.go @@ -81,12 +81,12 @@ func (msg MsgPayPacketFee) ValidateBasic() error { } // if any of the fee's are invalid return an error - if !msg.Fee.AckFee.IsValid() || !msg.Fee.ReceiveFee.IsValid() || !msg.Fee.TimeoutFee.IsValid() { + if !msg.Fee.AckFee.IsValid() || !msg.Fee.RecvFee.IsValid() || !msg.Fee.TimeoutFee.IsValid() { return sdkerrors.ErrInvalidCoins } // if all three fee's are zero or empty return an error - if msg.Fee.AckFee.IsZero() && msg.Fee.ReceiveFee.IsZero() && msg.Fee.TimeoutFee.IsZero() { + if msg.Fee.AckFee.IsZero() && msg.Fee.RecvFee.IsZero() && msg.Fee.TimeoutFee.IsZero() { return sdkerrors.ErrInvalidCoins } @@ -157,12 +157,12 @@ func (fee IdentifiedPacketFee) Validate() error { } // if any of the fee's are invalid return an error - if !fee.Fee.AckFee.IsValid() || !fee.Fee.ReceiveFee.IsValid() || !fee.Fee.TimeoutFee.IsValid() { + if !fee.Fee.AckFee.IsValid() || !fee.Fee.RecvFee.IsValid() || !fee.Fee.TimeoutFee.IsValid() { return sdkerrors.ErrInvalidCoins } // if all three fee's are zero or empty return an error - if fee.Fee.AckFee.IsZero() && fee.Fee.ReceiveFee.IsZero() && fee.Fee.TimeoutFee.IsZero() { + if fee.Fee.AckFee.IsZero() && fee.Fee.RecvFee.IsZero() && fee.Fee.TimeoutFee.IsZero() { return sdkerrors.ErrInvalidCoins } diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 2c36575ecb0..46f20f29783 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -29,7 +29,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgRegisterCounterpartyAddress is the request type for registering the counter party address +// MsgRegisterCounterpartyAddress is the request type for registering the counterparty address type MsgRegisterCounterpartyAddress struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"counterparty_address"` diff --git a/proto/ibc/applications/fee/v1/ack.proto b/proto/ibc/applications/fee/v1/ack.proto index 626b4518f18..b978454892d 100644 --- a/proto/ibc/applications/fee/v1/ack.proto +++ b/proto/ibc/applications/fee/v1/ack.proto @@ -1,9 +1,11 @@ syntax = "proto3"; package ibc.applications.fee.v1; -import "gogoproto/gogo.proto"; + option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +import "gogoproto/gogo.proto"; + // IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware // It contains the raw acknowledgement bytes, as well as the forward relayer address message IncentivizedAcknowledgement { diff --git a/proto/ibc/applications/fee/v1/fee.proto b/proto/ibc/applications/fee/v1/fee.proto index a942d3c8fe5..b57cc2cc03c 100644 --- a/proto/ibc/applications/fee/v1/fee.proto +++ b/proto/ibc/applications/fee/v1/fee.proto @@ -1,16 +1,18 @@ syntax = "proto3"; package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; + import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; // Fee implements the ics29 Fee interface // See Fee Payment Middleware spec: // https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract message Fee { - repeated cosmos.base.v1beta1.Coin receive_fee = 1 [ + repeated cosmos.base.v1beta1.Coin recv_fee = 1 [ (gogoproto.moretags) = "yaml:\"receive_fee\"", (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" diff --git a/proto/ibc/applications/fee/v1/genesis.proto b/proto/ibc/applications/fee/v1/genesis.proto index 1aeac5f1d05..793ee2561ae 100644 --- a/proto/ibc/applications/fee/v1/genesis.proto +++ b/proto/ibc/applications/fee/v1/genesis.proto @@ -1,12 +1,13 @@ syntax = "proto3"; package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; + import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; import "ibc/core/channel/v1/channel.proto"; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; - // GenesisState defines the fee middleware genesis state message GenesisState { repeated IdentifiedPacketFee identified_fees = 1 [(gogoproto.moretags) = "yaml:\"identified_fees\""]; diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index ad7d56f5b2b..1a41c3091c4 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -2,14 +2,14 @@ syntax = "proto3"; package ibc.applications.fee.v1; +option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; + import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; import "google/api/annotations.proto"; import "ibc/core/channel/v1/channel.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; - // Query provides defines the gRPC querier service. service Query { // Gets all incentivized packets diff --git a/proto/ibc/applications/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto index 07517f52a80..4540c28967e 100644 --- a/proto/ibc/applications/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -2,10 +2,11 @@ syntax = "proto3"; package ibc.applications.fee.v1; +option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; + import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; import "ibc/core/channel/v1/channel.proto"; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; // Msg defines the ibc/fee Msg service. service Msg { @@ -25,7 +26,7 @@ service Msg { rpc PayPacketFeeAsync(MsgPayPacketFeeAsync) returns (MsgPayPacketFeeAsyncResponse); } -// MsgRegisterCounterpartyAddress is the request type for registering the counter party address +// MsgRegisterCounterpartyAddress is the request type for registering the counterparty address message MsgRegisterCounterpartyAddress { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false;