diff --git a/middleware/packet-forward-middleware/Makefile b/middleware/packet-forward-middleware/Makefile index 2e28b38d..104f3918 100644 --- a/middleware/packet-forward-middleware/Makefile +++ b/middleware/packet-forward-middleware/Makefile @@ -143,12 +143,12 @@ cosmovisor: mocks: $(MOCKS_DIR) go install go.uber.org/mock/mockgen@v0.2.0 - mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/router/types TransferKeeper - mockgen -package=mock -destination=./test/mock/distribution_keeper.go $(GOMOD)/router/types DistributionKeeper - mockgen -package=mock -destination=./test/mock/bank_keeper.go $(GOMOD)/router/types BankKeeper + mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/packetforward/types TransferKeeper + mockgen -package=mock -destination=./test/mock/distribution_keeper.go $(GOMOD)/packetforward/types DistributionKeeper + mockgen -package=mock -destination=./test/mock/bank_keeper.go $(GOMOD)/packetforward/types BankKeeper + mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/packetforward/types ChannelKeeper mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v7/modules/core/05-port/types ICS4Wrapper mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v7/modules/core/05-port/types IBCModule - mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper .PHONY: mocks diff --git a/middleware/packet-forward-middleware/README.md b/middleware/packet-forward-middleware/README.md index 92674e94..27453826 100644 --- a/middleware/packet-forward-middleware/README.md +++ b/middleware/packet-forward-middleware/README.md @@ -133,7 +133,7 @@ The examples above show the intended usage of the `receiver` field for one or mu ## Implementation details -Flow sequence mainly encoded in [middleware](router/ibc_middleware.go) and in [keeper](router/keeper/keeper.go). +Flow sequence mainly encoded in [middleware](packetforward/ibc_middleware.go) and in [keeper](packetforward/keeper/keeper.go). Describes `A` sending to `C` via `B` in several scenarios with operational opened channels, enabled denom composition, fees and available to refund, but no retries. diff --git a/middleware/packet-forward-middleware/docs/integration.md b/middleware/packet-forward-middleware/docs/integration.md index 2f386d2e..5d4ec909 100644 --- a/middleware/packet-forward-middleware/docs/integration.md +++ b/middleware/packet-forward-middleware/docs/integration.md @@ -17,9 +17,9 @@ Integration of the PFM should take approximately 20 minutes. // Import the packet forward middleware import ( - packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router" - packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/keeper" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" + packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ) ... diff --git a/middleware/packet-forward-middleware/router/client/cli/cli.go b/middleware/packet-forward-middleware/packetforward/client/cli/cli.go similarity index 68% rename from middleware/packet-forward-middleware/router/client/cli/cli.go rename to middleware/packet-forward-middleware/packetforward/client/cli/cli.go index 6e08212e..2480ed58 100644 --- a/middleware/packet-forward-middleware/router/client/cli/cli.go +++ b/middleware/packet-forward-middleware/packetforward/client/cli/cli.go @@ -3,7 +3,7 @@ package cli import ( "fmt" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -11,10 +11,10 @@ import ( "github.com/cosmos/cosmos-sdk/version" ) -// GetQueryCmd returns the query commands for router +// GetQueryCmd returns the query commands for packetforward func GetQueryCmd() *cobra.Command { queryCmd := &cobra.Command{ - Use: "ibc-router", + Use: "packetforward", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, } @@ -26,14 +26,14 @@ func GetQueryCmd() *cobra.Command { return queryCmd } -// GetCmdParams returns the command handler for ibc-router parameter querying. +// GetCmdParams returns the command handler for packetforward parameter querying. func GetCmdParams() *cobra.Command { cmd := &cobra.Command{ Use: "params", - Short: "Query the current ibc-router parameters", - Long: "Query the current ibc-router parameters", + Short: "Query the current packetforward parameters", + Long: "Query the current packetforward parameters", Args: cobra.NoArgs, - Example: fmt.Sprintf("%s query ibc-router params", version.AppName), + Example: fmt.Sprintf("%s query packetforward params", version.AppName), RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -54,7 +54,7 @@ func GetCmdParams() *cobra.Command { return cmd } -// NewTxCmd returns the transaction commands for router +// NewTxCmd returns the transaction commands for packetforward func NewTxCmd() *cobra.Command { return nil } diff --git a/middleware/packet-forward-middleware/router/ibc_middleware.go b/middleware/packet-forward-middleware/packetforward/ibc_middleware.go similarity index 99% rename from middleware/packet-forward-middleware/router/ibc_middleware.go rename to middleware/packet-forward-middleware/packetforward/ibc_middleware.go index 1bacab32..605db916 100644 --- a/middleware/packet-forward-middleware/router/ibc_middleware.go +++ b/middleware/packet-forward-middleware/packetforward/ibc_middleware.go @@ -1,4 +1,4 @@ -package router +package packetforward import ( "encoding/json" @@ -7,8 +7,8 @@ import ( "time" "github.com/armon/go-metrics" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" errorsmod "cosmossdk.io/errors" diff --git a/middleware/packet-forward-middleware/router/keeper/genesis.go b/middleware/packet-forward-middleware/packetforward/keeper/genesis.go similarity index 97% rename from middleware/packet-forward-middleware/router/keeper/genesis.go rename to middleware/packet-forward-middleware/packetforward/keeper/genesis.go index df024ebd..41f4c8ec 100644 --- a/middleware/packet-forward-middleware/router/keeper/genesis.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/genesis.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/middleware/packet-forward-middleware/router/keeper/grpc_query.go b/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go similarity index 94% rename from middleware/packet-forward-middleware/router/keeper/grpc_query.go rename to middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go index d9a8c9dc..f6fcc377 100644 --- a/middleware/packet-forward-middleware/router/keeper/grpc_query.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/middleware/packet-forward-middleware/router/keeper/keeper.go b/middleware/packet-forward-middleware/packetforward/keeper/keeper.go similarity index 98% rename from middleware/packet-forward-middleware/router/keeper/keeper.go rename to middleware/packet-forward-middleware/packetforward/keeper/keeper.go index 1c913f37..fbac42f2 100644 --- a/middleware/packet-forward-middleware/router/keeper/keeper.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/keeper.go @@ -7,7 +7,7 @@ import ( "time" "github.com/armon/go-metrics" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" errorsmod "cosmossdk.io/errors" @@ -39,7 +39,7 @@ var ( // DefaultForwardTransferPacketTimeoutTimestamp is the timeout timestamp following IBC defaults DefaultForwardTransferPacketTimeoutTimestamp = time.Duration(transfertypes.DefaultRelativePacketTimeoutTimestamp) * time.Nanosecond - // DefaultRefundTransferPacketTimeoutTimestamp is a 28-day timeout for refund packets since funds are stuck in router module otherwise. + // DefaultRefundTransferPacketTimeoutTimestamp is a 28-day timeout for refund packets since funds are stuck in packetforward module otherwise. DefaultRefundTransferPacketTimeoutTimestamp = 28 * 24 * time.Hour ) @@ -378,14 +378,14 @@ func (k *Keeper) RetryTimeout( amount, ok := sdk.NewIntFromString(data.Amount) if !ok { - k.Logger(ctx).Error("packetForwardMiddleware error parsing amount from string for router retry on timeout", + k.Logger(ctx).Error("packetForwardMiddleware error parsing amount from string for packetforward retry on timeout", "original-sender-address", inFlightPacket.OriginalSenderAddress, "refund-channel-id", inFlightPacket.RefundChannelId, "refund-port-id", inFlightPacket.RefundPortId, "retries-remaining", inFlightPacket.RetriesRemaining, "amount", data.Amount, ) - return fmt.Errorf("error parsing amount from string for router retry: %s", data.Amount) + return fmt.Errorf("error parsing amount from string for packetforward retry: %s", data.Amount) } denom := transfertypes.ParseDenomTrace(data.Denom).IBCDenom() diff --git a/middleware/packet-forward-middleware/router/keeper/params.go b/middleware/packet-forward-middleware/packetforward/keeper/params.go similarity index 96% rename from middleware/packet-forward-middleware/router/keeper/params.go rename to middleware/packet-forward-middleware/packetforward/keeper/params.go index f7c3bdce..cfdd6d08 100644 --- a/middleware/packet-forward-middleware/router/keeper/params.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/params.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/middleware/packet-forward-middleware/router/module.go b/middleware/packet-forward-middleware/packetforward/module.go similarity index 86% rename from middleware/packet-forward-middleware/router/module.go rename to middleware/packet-forward-middleware/packetforward/module.go index 561d02f1..b998db6e 100644 --- a/middleware/packet-forward-middleware/router/module.go +++ b/middleware/packet-forward-middleware/packetforward/module.go @@ -1,13 +1,13 @@ -package router +package packetforward import ( "context" "encoding/json" "fmt" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/client/cli" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/client/cli" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -28,7 +28,7 @@ var ( _ module.AppModuleSimulation = AppModule{} ) -// AppModuleBasic is the router AppModuleBasic +// AppModuleBasic is the packetforward AppModuleBasic type AppModuleBasic struct{} // Name implements AppModuleBasic interface @@ -43,12 +43,12 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {} func (AppModuleBasic) RegisterInterfaces(_ codectypes.InterfaceRegistry) {} // DefaultGenesis returns default genesis state as raw bytes for the ibc -// router module. +// packetforward module. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesisState()) } -// ValidateGenesis performs genesis state validation for the router module. +// ValidateGenesis performs genesis state validation for the packetforward module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var gs types.GenesisState if err := cdc.UnmarshalJSON(bz, &gs); err != nil { @@ -61,7 +61,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo // RegisterRESTRoutes implements AppModuleBasic interface func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-router module. +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the packetforward module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { _ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } @@ -82,7 +82,7 @@ type AppModule struct { keeper *keeper.Keeper } -// NewAppModule creates a new router module +// NewAppModule creates a new packetforward module func NewAppModule(k *keeper.Keeper) AppModule { return AppModule{ keeper: k, @@ -99,7 +99,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) } -// InitGenesis performs genesis initialization for the ibc-router module. It returns +// InitGenesis performs genesis initialization for the packetforward module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { err := am.ValidateGenesis(cdc, nil, data) @@ -113,7 +113,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. return []abci.ValidatorUpdate{} } -// ExportGenesis returns the exported genesis state as raw bytes for the ibc-router +// ExportGenesis returns the exported genesis state as raw bytes for the packetforward // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs := am.keeper.ExportGenesis(ctx) @@ -133,7 +133,7 @@ func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Valid // AppModuleSimulation functions -// GenerateGenesisState creates a randomized GenState of the router module. +// GenerateGenesisState creates a randomized GenState of the packetforward module. func (AppModule) GenerateGenesisState(_ *module.SimulationState) {} // ProposalContents doesn't return any content functions for governance proposals. @@ -141,10 +141,10 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP return nil } -// RegisterStoreDecoder registers a decoder for router module's types +// RegisterStoreDecoder registers a decoder for packetforward module's types func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} -// WeightedOperations returns the all the router module operations with their respective weights. +// WeightedOperations returns the all the packetforward module operations with their respective weights. func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } diff --git a/middleware/packet-forward-middleware/router/module_test.go b/middleware/packet-forward-middleware/packetforward/module_test.go similarity index 95% rename from middleware/packet-forward-middleware/router/module_test.go rename to middleware/packet-forward-middleware/packetforward/module_test.go index aa50ed21..c7a63c75 100644 --- a/middleware/packet-forward-middleware/router/module_test.go +++ b/middleware/packet-forward-middleware/packetforward/module_test.go @@ -1,12 +1,12 @@ -package router_test +package packetforward_test import ( "encoding/json" "fmt" "testing" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/test" "github.com/iancoleman/orderedmap" "github.com/stretchr/testify/require" @@ -291,7 +291,7 @@ func TestOnRecvPacket_ForwardNoFee(t *testing.T) { Return(nil), ) - // chain B with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr) require.Nil(t, ack) @@ -352,7 +352,7 @@ func TestOnRecvPacket_ForwardAmountInt256(t *testing.T) { Return(nil), ) - // chain B with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr) require.Nil(t, ack) @@ -371,7 +371,7 @@ func TestOnRecvPacket_ForwardWithFee(t *testing.T) { forwardMiddleware := setup.ForwardMiddleware // Set fee param to 10% - setup.Keepers.RouterKeeper.SetParams(ctx, types.NewParams(sdk.NewDecWithPrec(10, 2))) + setup.Keepers.PacketForwardKeeper.SetParams(ctx, types.NewParams(sdk.NewDecWithPrec(10, 2))) denom := makeIBCDenom(testDestinationPort, testDestinationChannel, testDenom) senderAccAddr := test.AccAddress() @@ -418,7 +418,7 @@ func TestOnRecvPacket_ForwardWithFee(t *testing.T) { Return(nil), ) - // chain B with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr) require.Nil(t, ack) @@ -519,11 +519,11 @@ func TestOnRecvPacket_ForwardMultihopStringNext(t *testing.T) { Return(nil), ) - // chain B with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr) require.Nil(t, ack) - // chain C with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain C with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack = forwardMiddleware.OnRecvPacket(ctx, packet2, senderAccAddr2) require.Nil(t, ack) @@ -631,11 +631,11 @@ func TestOnRecvPacket_ForwardMultihopJSONNext(t *testing.T) { Return(nil), ) - // chain B with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr) require.Nil(t, ack) - // chain C with router module receives packet and forwards. ack should be nil so that it is not written yet. + // chain C with packetforward module receives packet and forwards. ack should be nil so that it is not written yet. ack = forwardMiddleware.OnRecvPacket(ctx, packet2, senderAccAddr2) require.Nil(t, ack) diff --git a/middleware/packet-forward-middleware/router/types/expected_keepers.go b/middleware/packet-forward-middleware/packetforward/types/expected_keepers.go similarity index 100% rename from middleware/packet-forward-middleware/router/types/expected_keepers.go rename to middleware/packet-forward-middleware/packetforward/types/expected_keepers.go diff --git a/middleware/packet-forward-middleware/router/types/forward.go b/middleware/packet-forward-middleware/packetforward/types/forward.go similarity index 100% rename from middleware/packet-forward-middleware/router/types/forward.go rename to middleware/packet-forward-middleware/packetforward/types/forward.go diff --git a/middleware/packet-forward-middleware/router/types/forward_test.go b/middleware/packet-forward-middleware/packetforward/types/forward_test.go similarity index 99% rename from middleware/packet-forward-middleware/router/types/forward_test.go rename to middleware/packet-forward-middleware/packetforward/types/forward_test.go index 303dcc8c..f6a749db 100644 --- a/middleware/packet-forward-middleware/router/types/forward_test.go +++ b/middleware/packet-forward-middleware/packetforward/types/forward_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" "github.com/stretchr/testify/require" ) diff --git a/middleware/packet-forward-middleware/router/types/genesis.go b/middleware/packet-forward-middleware/packetforward/types/genesis.go similarity index 100% rename from middleware/packet-forward-middleware/router/types/genesis.go rename to middleware/packet-forward-middleware/packetforward/types/genesis.go diff --git a/middleware/packet-forward-middleware/router/types/genesis.pb.go b/middleware/packet-forward-middleware/packetforward/types/genesis.pb.go similarity index 87% rename from middleware/packet-forward-middleware/router/types/genesis.pb.go rename to middleware/packet-forward-middleware/packetforward/types/genesis.pb.go index d94a7f8f..7d58bbe5 100644 --- a/middleware/packet-forward-middleware/router/types/genesis.pb.go +++ b/middleware/packet-forward-middleware/packetforward/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: router/v1/genesis.proto +// source: packetforward/v1/genesis.proto package types @@ -24,7 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// GenesisState defines the router genesis state +// GenesisState defines the packetforward genesis state type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // key - information about forwarded packet: src_channel @@ -38,7 +38,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_4940b763c55c4e0b, []int{0} + return fileDescriptor_afd4e56ea31af982, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -81,7 +81,7 @@ func (m *GenesisState) GetInFlightPackets() map[string]InFlightPacket { return nil } -// Params defines the set of IBC router parameters. +// Params defines the set of packetforward parameters. type Params struct { FeePercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=fee_percentage,json=feePercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_percentage" yaml:"fee_percentage"` } @@ -90,7 +90,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_4940b763c55c4e0b, []int{1} + return fileDescriptor_afd4e56ea31af982, []int{1} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -140,7 +140,7 @@ func (m *InFlightPacket) Reset() { *m = InFlightPacket{} } func (m *InFlightPacket) String() string { return proto.CompactTextString(m) } func (*InFlightPacket) ProtoMessage() {} func (*InFlightPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_4940b763c55c4e0b, []int{2} + return fileDescriptor_afd4e56ea31af982, []int{2} } func (m *InFlightPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,57 +254,57 @@ func (m *InFlightPacket) GetNonrefundable() bool { } func init() { - proto.RegisterType((*GenesisState)(nil), "router.v1.GenesisState") - proto.RegisterMapType((map[string]InFlightPacket)(nil), "router.v1.GenesisState.InFlightPacketsEntry") - proto.RegisterType((*Params)(nil), "router.v1.Params") - proto.RegisterType((*InFlightPacket)(nil), "router.v1.InFlightPacket") + proto.RegisterType((*GenesisState)(nil), "packetforward.v1.GenesisState") + proto.RegisterMapType((map[string]InFlightPacket)(nil), "packetforward.v1.GenesisState.InFlightPacketsEntry") + proto.RegisterType((*Params)(nil), "packetforward.v1.Params") + proto.RegisterType((*InFlightPacket)(nil), "packetforward.v1.InFlightPacket") } -func init() { proto.RegisterFile("router/v1/genesis.proto", fileDescriptor_4940b763c55c4e0b) } +func init() { proto.RegisterFile("packetforward/v1/genesis.proto", fileDescriptor_afd4e56ea31af982) } -var fileDescriptor_4940b763c55c4e0b = []byte{ - // 643 bytes of a gzipped FileDescriptorProto +var fileDescriptor_afd4e56ea31af982 = []byte{ + // 645 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xcd, 0x4e, 0x1b, 0x3b, - 0x14, 0xce, 0x84, 0x10, 0x88, 0x13, 0xfe, 0x7c, 0xe1, 0x32, 0x97, 0x45, 0x12, 0x45, 0xe8, 0xde, - 0xe8, 0xd2, 0x64, 0x04, 0x95, 0x5a, 0xc4, 0xae, 0x29, 0x2d, 0x65, 0xd5, 0x68, 0xc2, 0xaa, 0x52, - 0x35, 0x72, 0x66, 0x4e, 0x26, 0x16, 0x33, 0xf6, 0xd4, 0x76, 0x42, 0xd3, 0xa7, 0xe8, 0xba, 0x9b, - 0xbe, 0x0e, 0x4b, 0x96, 0x55, 0x17, 0x51, 0x05, 0x6f, 0xc0, 0x13, 0x54, 0x63, 0x4f, 0x20, 0x11, - 0x5d, 0x8d, 0x7d, 0xbe, 0x1f, 0x7f, 0xe7, 0x8c, 0x65, 0xb4, 0x2b, 0xf8, 0x48, 0x81, 0x70, 0xc6, - 0x87, 0x4e, 0x08, 0x0c, 0x24, 0x95, 0xed, 0x44, 0x70, 0xc5, 0x71, 0xc9, 0x00, 0xed, 0xf1, 0xe1, - 0xde, 0x76, 0xc8, 0x43, 0xae, 0xab, 0x4e, 0xba, 0x32, 0x84, 0xc6, 0xb7, 0x3c, 0xaa, 0x9c, 0x19, - 0x49, 0x4f, 0x11, 0x05, 0xd8, 0x41, 0xc5, 0x84, 0x08, 0x12, 0x4b, 0xdb, 0xaa, 0x5b, 0xcd, 0xf2, - 0xd1, 0x56, 0xfb, 0xc1, 0xa2, 0xdd, 0xd5, 0x40, 0xa7, 0x70, 0x3d, 0xad, 0xe5, 0xdc, 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x32, 0xca, 0x42, 0x1b, 0xd5, 0xad, - 0xe6, 0xb2, 0xbb, 0x99, 0x01, 0xee, 0xac, 0x8e, 0x6d, 0xb4, 0x92, 0x65, 0xb4, 0xcb, 0xda, 0x6d, - 0xb6, 0xc5, 0xfb, 0x68, 0x8d, 0x71, 0x66, 0xbc, 0x49, 0x3f, 0x02, 0xbb, 0x52, 0xb7, 0x9a, 0xab, - 0xee, 0x62, 0xb1, 0x43, 0xaf, 0x6f, 0xab, 0xd6, 0xcd, 0x6d, 0xd5, 0xfa, 0x75, 0x5b, 0xb5, 0xbe, - 0xde, 0x55, 0x73, 0x37, 0x77, 0xd5, 0xdc, 0x8f, 0xbb, 0x6a, 0xee, 0xc3, 0xfb, 0xa7, 0x77, 0x91, - 0xf6, 0xfd, 0x16, 0x49, 0x12, 0xe9, 0xc4, 0x34, 0x08, 0x22, 0xb8, 0x22, 0x02, 0x1c, 0xd3, 0x61, - 0x6b, 0xc0, 0xc5, 0x15, 0x11, 0x41, 0x6b, 0x0e, 0x19, 0xbf, 0x74, 0xb2, 0xf7, 0x44, 0x5f, 0xdc, - 0x7e, 0x51, 0x3f, 0x15, 0xcf, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xe7, 0x23, 0xe3, 0x66, - 0x04, 0x00, 0x00, + 0x14, 0xce, 0x84, 0x10, 0xc0, 0x09, 0x7f, 0xbe, 0x70, 0xaf, 0xc5, 0x22, 0x19, 0x45, 0xe8, 0x36, + 0x2a, 0x4a, 0x46, 0x80, 0x44, 0x11, 0xbb, 0xa6, 0xb4, 0x94, 0x5d, 0x34, 0x41, 0x5d, 0x74, 0x33, + 0x72, 0x66, 0x4e, 0x26, 0x16, 0x19, 0xcf, 0xd4, 0x76, 0x42, 0xb3, 0xec, 0x1b, 0xf4, 0x0d, 0xfa, + 0x0a, 0x7d, 0x0c, 0x96, 0x2c, 0xab, 0x2e, 0xa2, 0x0a, 0xde, 0x80, 0x27, 0xa8, 0x62, 0x4f, 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 0x7f, 0xbb, 0x45, 0xfd, 0x8e, 0x1c, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x23, 0x75, + 0x84, 0x91, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/middleware/packet-forward-middleware/router/types/keys.go b/middleware/packet-forward-middleware/packetforward/types/keys.go similarity index 100% rename from middleware/packet-forward-middleware/router/types/keys.go rename to middleware/packet-forward-middleware/packetforward/types/keys.go diff --git a/middleware/packet-forward-middleware/router/types/params.go b/middleware/packet-forward-middleware/packetforward/types/params.go similarity index 100% rename from middleware/packet-forward-middleware/router/types/params.go rename to middleware/packet-forward-middleware/packetforward/types/params.go diff --git a/middleware/packet-forward-middleware/router/types/query.pb.go b/middleware/packet-forward-middleware/packetforward/types/query.pb.go similarity index 82% rename from middleware/packet-forward-middleware/router/types/query.pb.go rename to middleware/packet-forward-middleware/packetforward/types/query.pb.go index bb5ca3c8..418d23f6 100644 --- a/middleware/packet-forward-middleware/router/types/query.pb.go +++ b/middleware/packet-forward-middleware/packetforward/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: router/v1/query.proto +// source: packetforward/v1/query.proto package types @@ -36,7 +36,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8961e0cabda3d9d6, []int{0} + return fileDescriptor_358c54bd2cc154d0, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8961e0cabda3d9d6, []int{1} + return fileDescriptor_358c54bd2cc154d0, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -112,32 +112,33 @@ func (m *QueryParamsResponse) GetParams() *Params { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "router.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "router.v1.QueryParamsResponse") -} - -func init() { proto.RegisterFile("router/v1/query.proto", fileDescriptor_8961e0cabda3d9d6) } - -var fileDescriptor_8961e0cabda3d9d6 = []byte{ - // 285 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xbd, 0x4e, 0xc3, 0x30, - 0x14, 0x85, 0x13, 0x24, 0x22, 0x61, 0x26, 0x0c, 0x08, 0x14, 0x15, 0x0b, 0x65, 0x82, 0x21, 0xb1, - 0x5a, 0x06, 0x56, 0xc4, 0x0b, 0xf0, 0x33, 0xb2, 0x39, 0xc9, 0x25, 0x58, 0x6d, 0x72, 0x5d, 0xdb, - 0x49, 0xd5, 0x95, 0x27, 0x40, 0xe2, 0xa5, 0x18, 0x2b, 0xb1, 0x30, 0xa2, 0x84, 0x07, 0x41, 0x4d, - 0x02, 0x2d, 0x42, 0x5d, 0xcf, 0x39, 0xfe, 0x3e, 0xf9, 0x92, 0x43, 0x8d, 0xa5, 0x05, 0xcd, 0xab, - 0x21, 0x9f, 0x96, 0xa0, 0xe7, 0x91, 0xd2, 0x68, 0x91, 0xee, 0x74, 0x71, 0x54, 0x0d, 0xfd, 0x41, - 0x86, 0x98, 0x4d, 0x80, 0x0b, 0x25, 0xb9, 0x28, 0x0a, 0xb4, 0xc2, 0x4a, 0x2c, 0x4c, 0x37, 0xf4, - 0x8f, 0x56, 0xef, 0x33, 0x28, 0xc0, 0xc8, 0xbe, 0x08, 0x0e, 0x08, 0xbd, 0x5b, 0x02, 0x6f, 0x85, - 0x16, 0xb9, 0xb9, 0x87, 0x69, 0x09, 0xc6, 0x06, 0x57, 0x64, 0xff, 0x4f, 0x6a, 0x14, 0x16, 0x06, - 0xe8, 0x39, 0xf1, 0x54, 0x9b, 0x1c, 0xbb, 0xa7, 0xee, 0xd9, 0xee, 0x68, 0x2f, 0xfa, 0xf5, 0x47, - 0xfd, 0xb4, 0x1f, 0x8c, 0x2c, 0xd9, 0x6e, 0x09, 0x74, 0x4c, 0xbc, 0xae, 0xa2, 0x27, 0x6b, 0xeb, - 0xff, 0x4e, 0x9f, 0x6d, 0xaa, 0x3b, 0x79, 0x10, 0x3c, 0xbf, 0x7f, 0xbd, 0x6e, 0x0d, 0xa8, 0xcf, - 0x65, 0x9c, 0x70, 0xa1, 0x94, 0xe1, 0xab, 0x4f, 0x75, 0xd6, 0x6b, 0xf9, 0x56, 0x33, 0x77, 0x51, - 0x33, 0xf7, 0xb3, 0x66, 0xee, 0x4b, 0xc3, 0x9c, 0x45, 0xc3, 0x9c, 0x8f, 0x86, 0x39, 0x0f, 0x37, - 0x99, 0xb4, 0x4f, 0x65, 0x1c, 0x25, 0x98, 0xf3, 0x04, 0x4d, 0x8e, 0x66, 0x89, 0x09, 0x5b, 0x4c, - 0x2e, 0xd3, 0x74, 0x02, 0x33, 0xa1, 0x81, 0x2b, 0x91, 0x8c, 0xc1, 0x86, 0x8f, 0xa8, 0x67, 0x42, - 0xa7, 0xe1, 0x5a, 0x53, 0x5d, 0xfe, 0xe8, 0xec, 0x5c, 0x81, 0x89, 0xbd, 0xf6, 0x7e, 0x17, 0xdf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x89, 0x9b, 0xac, 0xc7, 0x9a, 0x01, 0x00, 0x00, + proto.RegisterType((*QueryParamsRequest)(nil), "packetforward.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "packetforward.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("packetforward/v1/query.proto", fileDescriptor_358c54bd2cc154d0) } + +var fileDescriptor_358c54bd2cc154d0 = []byte{ + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0x63, 0x24, 0x32, 0x98, 0x05, 0x19, 0x86, 0x2a, 0xaa, 0x2c, 0x08, 0x20, 0xc1, 0x90, + 0x98, 0x96, 0x81, 0x9d, 0x85, 0x15, 0x18, 0x18, 0xd8, 0x9c, 0xc4, 0x04, 0x8b, 0x26, 0xe7, 0xda, + 0x4e, 0xaa, 0x6e, 0x88, 0x91, 0x09, 0x89, 0x97, 0x62, 0xac, 0xc4, 0xc2, 0x88, 0x12, 0x1e, 0x04, + 0x35, 0xc9, 0x40, 0x9b, 0xa1, 0xeb, 0xfd, 0xff, 0x7d, 0xfe, 0x7c, 0x78, 0xa8, 0x78, 0xfc, 0x2c, + 0xec, 0x23, 0xe8, 0x19, 0xd7, 0x09, 0x2b, 0x47, 0x6c, 0x5a, 0x08, 0x3d, 0x0f, 0x95, 0x06, 0x0b, + 0x64, 0x77, 0x25, 0x0d, 0xcb, 0x91, 0x37, 0x4c, 0x01, 0xd2, 0x89, 0x60, 0x5c, 0x49, 0xc6, 0xf3, + 0x1c, 0x2c, 0xb7, 0x12, 0x72, 0xd3, 0xf6, 0x3d, 0xda, 0xa3, 0xa5, 0x22, 0x17, 0x46, 0x76, 0xb9, + 0xbf, 0x8f, 0xc9, 0xed, 0x12, 0x7f, 0xc3, 0x35, 0xcf, 0xcc, 0x9d, 0x98, 0x16, 0xc2, 0x58, 0xff, + 0x1a, 0xef, 0xad, 0x4c, 0x8d, 0x82, 0xdc, 0x08, 0x72, 0x8e, 0x5d, 0xd5, 0x4c, 0x06, 0xe8, 0x00, + 0x9d, 0xee, 0x8c, 0x07, 0xe1, 0xba, 0x4d, 0xd8, 0x6d, 0x74, 0xbd, 0xf1, 0x1b, 0xc2, 0xdb, 0x0d, + 0x89, 0xbc, 0x20, 0xec, 0xb6, 0x21, 0x39, 0xee, 0xaf, 0xf5, 0x1d, 0xbc, 0x93, 0x0d, 0xad, 0xd6, + 0xc9, 0x3f, 0x7b, 0xfd, 0xfa, 0xfd, 0xd8, 0x3a, 0x22, 0x87, 0x4c, 0x46, 0x31, 0xe3, 0x4a, 0x19, + 0xd6, 0xfb, 0x72, 0x2b, 0x73, 0xa5, 0x3e, 0x2b, 0x8a, 0x16, 0x15, 0x45, 0x3f, 0x15, 0x45, 0xef, + 0x35, 0x75, 0x16, 0x35, 0x75, 0xbe, 0x6b, 0xea, 0x3c, 0xdc, 0xa7, 0xd2, 0x3e, 0x15, 0x51, 0x18, + 0x43, 0xc6, 0x62, 0x30, 0x19, 0x98, 0x25, 0x2d, 0x68, 0x68, 0x99, 0x4c, 0x92, 0x89, 0x98, 0x71, + 0x2d, 0x3a, 0x70, 0xd0, 0x91, 0x83, 0x7f, 0x49, 0x79, 0xb9, 0xf6, 0xaa, 0x9d, 0x2b, 0x61, 0x22, + 0xb7, 0x39, 0xf2, 0xc5, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x52, 0xe6, 0xbf, 0xd4, 0x01, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -152,7 +153,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params queries all parameters of the router module. + // Params queries all parameters of the packetforward module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -166,7 +167,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/router.v1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/packetforward.v1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -175,7 +176,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . // QueryServer is the server API for Query service. type QueryServer interface { - // Params queries all parameters of the router module. + // Params queries all parameters of the packetforward module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } @@ -201,7 +202,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/router.v1.Query/Params", + FullMethod: "/packetforward.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -210,7 +211,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "router.v1.Query", + ServiceName: "packetforward.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -219,7 +220,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "router/v1/query.proto", + Metadata: "packetforward/v1/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/middleware/packet-forward-middleware/router/types/query.pb.gw.go b/middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go similarity index 97% rename from middleware/packet-forward-middleware/router/types/query.pb.gw.go rename to middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go index 227af549..d624d470 100644 --- a/middleware/packet-forward-middleware/router/types/query.pb.gw.go +++ b/middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: router/v1/query.proto +// source: packetforward/v1/query.proto /* Package types is a reverse proxy. @@ -145,7 +145,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "router", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "packetforward", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/middleware/packet-forward-middleware/proto/router/v1/genesis.proto b/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto similarity index 88% rename from middleware/packet-forward-middleware/proto/router/v1/genesis.proto rename to middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto index 00dcaaea..9fe0291b 100644 --- a/middleware/packet-forward-middleware/proto/router/v1/genesis.proto +++ b/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package router.v1; +package packetforward.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types"; +option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"; -// GenesisState defines the router genesis state +// GenesisState defines the packetforward genesis state message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; @@ -19,7 +19,7 @@ message GenesisState { ]; } -// Params defines the set of IBC router parameters. +// Params defines the set of packetforward parameters. message Params { string fee_percentage = 1 [ (gogoproto.moretags) = "yaml:\"fee_percentage\"", diff --git a/middleware/packet-forward-middleware/proto/router/v1/query.proto b/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto similarity index 68% rename from middleware/packet-forward-middleware/proto/router/v1/query.proto rename to middleware/packet-forward-middleware/proto/packetforward/v1/query.proto index 0dac7d24..2ef90ab9 100644 --- a/middleware/packet-forward-middleware/proto/router/v1/query.proto +++ b/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto @@ -1,16 +1,16 @@ syntax = "proto3"; -package router.v1; +package packetforward.v1; import "google/api/annotations.proto"; -import "router/v1/genesis.proto"; +import "packetforward/v1/genesis.proto"; -option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types"; +option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"; // Query provides defines the gRPC querier service. service Query { - // Params queries all parameters of the router module. + // Params queries all parameters of the packetforward module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/apps/router/v1/params"; + option (google.api.http).get = "/ibc/apps/packetforward/v1/params"; } } diff --git a/middleware/packet-forward-middleware/scripts/protocgen.sh b/middleware/packet-forward-middleware/scripts/protocgen.sh index 16bd8b7f..644b6d21 100755 --- a/middleware/packet-forward-middleware/scripts/protocgen.sh +++ b/middleware/packet-forward-middleware/scripts/protocgen.sh @@ -12,7 +12,7 @@ cd .. # move proto files to the right places # # Note: Proto files are suffixed with the current binary version. -cp -r github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v*/router/* router/ +cp -r github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v*/packetforward/* packetforward/ rm -rf github.com go mod tidy \ No newline at end of file diff --git a/middleware/packet-forward-middleware/test/mock/bank_keeper.go b/middleware/packet-forward-middleware/test/mock/bank_keeper.go index 77d568e4..0c5e6f2c 100644 --- a/middleware/packet-forward-middleware/test/mock/bank_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/bank_keeper.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types (interfaces: BankKeeper) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: BankKeeper) // Package mock is a generated GoMock package. package mock diff --git a/middleware/packet-forward-middleware/test/mock/channel_keeper.go b/middleware/packet-forward-middleware/test/mock/channel_keeper.go index cc6d327f..433e7fd6 100644 --- a/middleware/packet-forward-middleware/test/mock/channel_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/channel_keeper.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types (interfaces: ChannelKeeper) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: ChannelKeeper) // Package mock is a generated GoMock package. package mock diff --git a/middleware/packet-forward-middleware/test/mock/distribution_keeper.go b/middleware/packet-forward-middleware/test/mock/distribution_keeper.go index 6f836c61..af02d865 100644 --- a/middleware/packet-forward-middleware/test/mock/distribution_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/distribution_keeper.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types (interfaces: DistributionKeeper) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: DistributionKeeper) // Package mock is a generated GoMock package. package mock diff --git a/middleware/packet-forward-middleware/test/mock/transfer_keeper.go b/middleware/packet-forward-middleware/test/mock/transfer_keeper.go index e15af53d..a49c96d8 100644 --- a/middleware/packet-forward-middleware/test/mock/transfer_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/transfer_keeper.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types (interfaces: TransferKeeper) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: TransferKeeper) // Package mock is a generated GoMock package. package mock diff --git a/middleware/packet-forward-middleware/test/setup.go b/middleware/packet-forward-middleware/test/setup.go index 25f798d7..e7b006c1 100644 --- a/middleware/packet-forward-middleware/test/setup.go +++ b/middleware/packet-forward-middleware/test/setup.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/test/mock" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -38,19 +38,18 @@ func NewTestSetup(t *testing.T, ctl *gomock.Controller) *Setup { ics4WrapperMock := mock.NewMockICS4Wrapper(ctl) paramsKeeper := initializer.paramsKeeper() - routerKeeper := initializer.routerKeeper(paramsKeeper, transferKeeperMock, channelKeeperMock, distributionKeeperMock, bankKeeperMock, ics4WrapperMock) - // routerModule := initializer.routerModule(routerKeeper) + packetforwardKeeper := initializer.packetforwardKeeper(paramsKeeper, transferKeeperMock, channelKeeperMock, distributionKeeperMock, bankKeeperMock, ics4WrapperMock) require.NoError(t, initializer.StateStore.LoadLatestVersion()) - routerKeeper.SetParams(initializer.Ctx, types.DefaultParams()) + packetforwardKeeper.SetParams(initializer.Ctx, types.DefaultParams()) return &Setup{ Initializer: initializer, Keepers: &testKeepers{ - ParamsKeeper: ¶msKeeper, - RouterKeeper: routerKeeper, + ParamsKeeper: ¶msKeeper, + PacketForwardKeeper: packetforwardKeeper, }, Mocks: &testMocks{ @@ -60,7 +59,7 @@ func NewTestSetup(t *testing.T, ctl *gomock.Controller) *Setup { ICS4WrapperMock: ics4WrapperMock, }, - ForwardMiddleware: initializer.forwardMiddleware(ibcModuleMock, routerKeeper, 0, keeper.DefaultForwardTransferPacketTimeoutTimestamp, keeper.DefaultRefundTransferPacketTimeoutTimestamp), + ForwardMiddleware: initializer.forwardMiddleware(ibcModuleMock, packetforwardKeeper, 0, keeper.DefaultForwardTransferPacketTimeoutTimestamp, keeper.DefaultRefundTransferPacketTimeoutTimestamp), } } @@ -70,12 +69,12 @@ type Setup struct { Keepers *testKeepers Mocks *testMocks - ForwardMiddleware router.IBCMiddleware + ForwardMiddleware packetforward.IBCMiddleware } type testKeepers struct { - ParamsKeeper *paramskeeper.Keeper - RouterKeeper *keeper.Keeper + ParamsKeeper *paramskeeper.Keeper + PacketForwardKeeper *keeper.Keeper } type testMocks struct { @@ -126,7 +125,7 @@ func (i initializer) paramsKeeper() paramskeeper.Keeper { return paramsKeeper } -func (i initializer) routerKeeper( +func (i initializer) packetforwardKeeper( paramsKeeper paramskeeper.Keeper, transferKeeper types.TransferKeeper, channelKeeper types.ChannelKeeper, @@ -138,7 +137,7 @@ func (i initializer) routerKeeper( i.StateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, i.DB) subspace := paramsKeeper.Subspace(types.ModuleName) - routerKeeper := keeper.NewKeeper( + packetforwardKeeper := keeper.NewKeeper( i.Marshaler, storeKey, subspace, @@ -149,9 +148,9 @@ func (i initializer) routerKeeper( ics4Wrapper, ) - return routerKeeper + return packetforwardKeeper } -func (i initializer) forwardMiddleware(app porttypes.IBCModule, k *keeper.Keeper, retriesOnTimeout uint8, forwardTimeout time.Duration, refundTimeout time.Duration) router.IBCMiddleware { - return router.NewIBCMiddleware(app, k, retriesOnTimeout, forwardTimeout, refundTimeout) +func (i initializer) forwardMiddleware(app porttypes.IBCModule, k *keeper.Keeper, retriesOnTimeout uint8, forwardTimeout time.Duration, refundTimeout time.Duration) packetforward.IBCMiddleware { + return packetforward.NewIBCMiddleware(app, k, retriesOnTimeout, forwardTimeout, refundTimeout) }