From f23aa3bf2273274c9fa57ca7415664a420c60e9b Mon Sep 17 00:00:00 2001 From: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:48:58 -0500 Subject: [PATCH 1/3] rename: `router` -> `packetforward` (#118) * rename: `router` -> `packetforward` * use RouterKey for the Module keys (cherry picked from commit 47f2ae01187928f04c4e6d3e4340b3ece2d4e414) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/packetforward/client/cli/cli.go # middleware/packet-forward-middleware/packetforward/ibc_middleware.go # middleware/packet-forward-middleware/packetforward/keeper/genesis.go # middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go # middleware/packet-forward-middleware/packetforward/keeper/keeper.go # middleware/packet-forward-middleware/packetforward/keeper/params.go # middleware/packet-forward-middleware/packetforward/module.go # middleware/packet-forward-middleware/packetforward/module_test.go # middleware/packet-forward-middleware/packetforward/types/forward_test.go # middleware/packet-forward-middleware/packetforward/types/genesis.pb.go # middleware/packet-forward-middleware/packetforward/types/query.pb.go # middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go # middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto # middleware/packet-forward-middleware/proto/packetforward/v1/query.proto # middleware/packet-forward-middleware/scripts/protocgen.sh # middleware/packet-forward-middleware/test/mock/bank_keeper.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/distribution_keeper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go --- middleware/packet-forward-middleware/Makefile | 9 +++ .../packet-forward-middleware/README.md | 2 +- .../docs/integration.md | 6 +- .../client/cli/cli.go | 18 +++-- .../ibc_middleware.go | 9 ++- .../keeper/genesis.go | 4 ++ .../keeper/grpc_query.go | 4 ++ .../keeper/keeper.go | 12 +++- .../keeper/params.go | 4 ++ .../{router => packetforward}/module.go | 28 +++++--- .../{router => packetforward}/module_test.go | 24 ++++--- .../types/expected_keepers.go | 0 .../types/forward.go | 0 .../types/forward_test.go | 4 ++ .../types/genesis.go | 0 .../types/genesis.pb.go | 69 +++++++++++++++---- .../{router => packetforward}/types/keys.go | 0 .../{router => packetforward}/types/params.go | 0 .../types/query.pb.go | 48 +++++++++---- .../types/query.pb.gw.go | 6 +- .../v1/genesis.proto | 12 +++- .../{router => packetforward}/v1/query.proto | 13 +++- .../scripts/protocgen.sh | 6 ++ .../test/mock/bank_keeper.go | 4 ++ .../test/mock/channel_keeper.go | 4 ++ .../test/mock/distribution_keeper.go | 4 ++ .../test/mock/transfer_keeper.go | 4 ++ .../packet-forward-middleware/test/setup.go | 35 ++++++---- 28 files changed, 252 insertions(+), 77 deletions(-) rename middleware/packet-forward-middleware/{router => packetforward}/client/cli/cli.go (58%) rename middleware/packet-forward-middleware/{router => packetforward}/ibc_middleware.go (97%) rename middleware/packet-forward-middleware/{router => packetforward}/keeper/genesis.go (77%) rename middleware/packet-forward-middleware/{router => packetforward}/keeper/grpc_query.go (58%) rename middleware/packet-forward-middleware/{router => packetforward}/keeper/keeper.go (96%) rename middleware/packet-forward-middleware/{router => packetforward}/keeper/params.go (70%) rename middleware/packet-forward-middleware/{router => packetforward}/module.go (81%) rename middleware/packet-forward-middleware/{router => packetforward}/module_test.go (93%) rename middleware/packet-forward-middleware/{router => packetforward}/types/expected_keepers.go (100%) rename middleware/packet-forward-middleware/{router => packetforward}/types/forward.go (100%) rename middleware/packet-forward-middleware/{router => packetforward}/types/forward_test.go (89%) rename middleware/packet-forward-middleware/{router => packetforward}/types/genesis.go (100%) rename middleware/packet-forward-middleware/{router => packetforward}/types/genesis.pb.go (87%) rename middleware/packet-forward-middleware/{router => packetforward}/types/keys.go (100%) rename middleware/packet-forward-middleware/{router => packetforward}/types/params.go (100%) rename middleware/packet-forward-middleware/{router => packetforward}/types/query.pb.go (83%) rename middleware/packet-forward-middleware/{router => packetforward}/types/query.pb.gw.go (92%) rename middleware/packet-forward-middleware/proto/{router => packetforward}/v1/genesis.proto (67%) rename middleware/packet-forward-middleware/proto/{router => packetforward}/v1/query.proto (54%) diff --git a/middleware/packet-forward-middleware/Makefile b/middleware/packet-forward-middleware/Makefile index cba98df0..4015bbc2 100644 --- a/middleware/packet-forward-middleware/Makefile +++ b/middleware/packet-forward-middleware/Makefile @@ -143,6 +143,7 @@ cosmovisor: mocks: $(MOCKS_DIR) go install go.uber.org/mock/mockgen@v0.2.0 +<<<<<<< HEAD mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/router/types TransferKeeper mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper mockgen -package=mock -destination=./test/mock/distribution_keeper.go $(GOMOD)/router/types DistributionKeeper @@ -150,6 +151,14 @@ mocks: $(MOCKS_DIR) mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v4/modules/core/05-port/types ICS4Wrapper mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v4/modules/core/05-port/types IBCModule +======= + 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 +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) .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 58% rename from middleware/packet-forward-middleware/router/client/cli/cli.go rename to middleware/packet-forward-middleware/packetforward/client/cli/cli.go index a50bbf29..5256c036 100644 --- a/middleware/packet-forward-middleware/router/client/cli/cli.go +++ b/middleware/packet-forward-middleware/packetforward/client/cli/cli.go @@ -3,7 +3,11 @@ package cli import ( "fmt" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/client/cli/cli.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" +======= + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/client/cli/cli.go "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -11,10 +15,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 +30,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 +58,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 97% rename from middleware/packet-forward-middleware/router/ibc_middleware.go rename to middleware/packet-forward-middleware/packetforward/ibc_middleware.go index 558520d8..6e9150c8 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,15 @@ import ( "time" "github.com/armon/go-metrics" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/ibc_middleware.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/ibc_middleware.go sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" diff --git a/middleware/packet-forward-middleware/router/keeper/genesis.go b/middleware/packet-forward-middleware/packetforward/keeper/genesis.go similarity index 77% rename from middleware/packet-forward-middleware/router/keeper/genesis.go rename to middleware/packet-forward-middleware/packetforward/keeper/genesis.go index 9654cfc9..751e00eb 100644 --- a/middleware/packet-forward-middleware/router/keeper/genesis.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/genesis.go @@ -1,7 +1,11 @@ package keeper import ( +<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/genesis.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" +======= + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/genesis.go 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 58% rename from middleware/packet-forward-middleware/router/keeper/grpc_query.go rename to middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go index 38c4e10c..dec1b8bd 100644 --- a/middleware/packet-forward-middleware/router/keeper/grpc_query.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go @@ -3,7 +3,11 @@ package keeper import ( "context" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/grpc_query.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" +======= + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go 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 96% rename from middleware/packet-forward-middleware/router/keeper/keeper.go rename to middleware/packet-forward-middleware/packetforward/keeper/keeper.go index 8f1c8335..831888ba 100644 --- a/middleware/packet-forward-middleware/router/keeper/keeper.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/keeper.go @@ -7,8 +7,14 @@ import ( "time" "github.com/armon/go-metrics" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/keeper.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" "github.com/tendermint/tendermint/libs/log" +======= + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + + errorsmod "cosmossdk.io/errors" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/keeper.go "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -37,7 +43,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 ) @@ -374,14 +380,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 70% rename from middleware/packet-forward-middleware/router/keeper/params.go rename to middleware/packet-forward-middleware/packetforward/keeper/params.go index c4c5f82e..272acfa8 100644 --- a/middleware/packet-forward-middleware/router/keeper/params.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/params.go @@ -1,7 +1,11 @@ package keeper import ( +<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/params.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" +======= + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/params.go 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 81% rename from middleware/packet-forward-middleware/router/module.go rename to middleware/packet-forward-middleware/packetforward/module.go index f4e66678..570d37e2 100644 --- a/middleware/packet-forward-middleware/router/module.go +++ b/middleware/packet-forward-middleware/packetforward/module.go @@ -1,4 +1,4 @@ -package router +package packetforward import ( "context" @@ -6,9 +6,15 @@ import ( "fmt" "math/rand" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/module.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/client/cli" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module.go "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -28,7 +34,7 @@ var ( _ module.AppModuleSimulation = AppModule{} ) -// AppModuleBasic is the router AppModuleBasic +// AppModuleBasic is the packetforward AppModuleBasic type AppModuleBasic struct{} // Name implements AppModuleBasic interface @@ -43,12 +49,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 +67,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 +88,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, @@ -112,7 +118,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) @@ -126,7 +132,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) @@ -146,7 +152,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. @@ -159,10 +165,10 @@ func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { 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 93% rename from middleware/packet-forward-middleware/router/module_test.go rename to middleware/packet-forward-middleware/packetforward/module_test.go index 19243dd2..3f888771 100644 --- a/middleware/packet-forward-middleware/router/module_test.go +++ b/middleware/packet-forward-middleware/packetforward/module_test.go @@ -1,13 +1,19 @@ -package router_test +package packetforward_test import ( "encoding/json" "fmt" "testing" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/module_test.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/test" +======= + "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" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module_test.go "github.com/iancoleman/orderedmap" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -291,7 +297,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) @@ -351,7 +357,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) @@ -370,7 +376,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(t) @@ -416,7 +422,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) @@ -516,11 +522,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) @@ -626,11 +632,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 89% rename from middleware/packet-forward-middleware/router/types/forward_test.go rename to middleware/packet-forward-middleware/packetforward/types/forward_test.go index 2304b9b8..28809505 100644 --- a/middleware/packet-forward-middleware/router/types/forward_test.go +++ b/middleware/packet-forward-middleware/packetforward/types/forward_test.go @@ -4,7 +4,11 @@ import ( "encoding/json" "testing" +<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/forward_test.go "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" +======= + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/forward_test.go "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 5591786b..b0648a6e 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,17 +254,18 @@ 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, +<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/genesis.pb.go 0x14, 0xce, 0x84, 0x10, 0x88, 0x13, 0xfe, 0x7c, 0xe1, 0x32, 0x97, 0x45, 0x12, 0x45, 0xe8, 0xde, 0xe8, 0xd2, 0x64, 0x04, 0xad, 0x2a, 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, @@ -305,6 +306,48 @@ var fileDescriptor_4940b763c55c4e0b = []byte{ 0x6b, 0xc0, 0xc5, 0x15, 0x11, 0x41, 0x6b, 0x0e, 0x19, 0xbf, 0x70, 0xb2, 0xf7, 0x44, 0x5f, 0xdc, 0x7e, 0x51, 0x3f, 0x15, 0xcf, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x4a, 0x5b, 0xda, 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, 0x20, + 0xd3, 0x74, 0x35, 0xf6, 0xf9, 0x7e, 0x7c, 0xce, 0x27, 0x8f, 0x51, 0x25, 0xa1, 0xfe, 0x35, 0xa8, + 0x5e, 0x2c, 0x6e, 0xa8, 0x08, 0x9c, 0xd1, 0xa1, 0x13, 0x02, 0x07, 0xc9, 0x64, 0x33, 0x11, 0xb1, + 0x8a, 0xf1, 0x56, 0x06, 0x6f, 0x8e, 0x0e, 0xf7, 0x76, 0xc2, 0x38, 0x8c, 0x35, 0xe8, 0x4c, 0x57, + 0x86, 0x57, 0xfb, 0x9e, 0x47, 0xe5, 0x0b, 0xa3, 0xec, 0x28, 0xaa, 0x00, 0x9f, 0xa0, 0x62, 0x42, + 0x05, 0x8d, 0x24, 0xb1, 0x6c, 0xab, 0x5e, 0x3a, 0x22, 0xcd, 0x3f, 0x9d, 0x9a, 0x6d, 0x8d, 0xb7, + 0x0a, 0xb7, 0x93, 0x6a, 0xce, 0x4d, 0xd9, 0xf8, 0x8b, 0x85, 0xb6, 0x19, 0xf7, 0x7a, 0x03, 0x16, + 0xf6, 0x95, 0x67, 0x34, 0x92, 0xe4, 0xed, 0xa5, 0x7a, 0xe9, 0xe8, 0x78, 0xd1, 0x63, 0xfe, 0xcc, + 0xe6, 0x25, 0x7f, 0xa7, 0x65, 0x6d, 0xa3, 0x7a, 0xcb, 0x95, 0x18, 0xb7, 0xec, 0xa9, 0xfd, 0xe3, + 0xa4, 0x4a, 0xc6, 0x34, 0x1a, 0x9c, 0xd5, 0x16, 0xbc, 0x6b, 0xee, 0x26, 0xcb, 0xea, 0xf6, 0x02, + 0xb4, 0xf3, 0x37, 0x2b, 0xbc, 0x85, 0x96, 0xae, 0x61, 0xac, 0x07, 0x5a, 0x73, 0xa7, 0x4b, 0x7c, + 0x82, 0x96, 0x47, 0x74, 0x30, 0x04, 0x92, 0xd7, 0x43, 0xda, 0x8b, 0x0d, 0x66, 0x8d, 0x5c, 0x43, + 0x3f, 0xcb, 0x9f, 0x5a, 0xb5, 0xcf, 0xa8, 0x68, 0x12, 0xc0, 0x1c, 0x6d, 0xf4, 0x00, 0xbc, 0x04, + 0x84, 0x0f, 0x5c, 0xd1, 0x10, 0xcc, 0x11, 0xad, 0x8b, 0x69, 0xeb, 0x3f, 0x27, 0xd5, 0xff, 0x43, + 0xa6, 0xfa, 0xc3, 0x6e, 0xd3, 0x8f, 0x23, 0xc7, 0x8f, 0x65, 0x14, 0xcb, 0xf4, 0xd3, 0x90, 0xc1, + 0xb5, 0xa3, 0xc6, 0x09, 0xc8, 0xe6, 0x39, 0xf8, 0x8f, 0x93, 0xea, 0xae, 0x19, 0x32, 0xeb, 0x56, + 0x73, 0xd7, 0x7b, 0x00, 0xed, 0xe7, 0xfd, 0xb7, 0x02, 0xda, 0xc8, 0xf6, 0x85, 0x4f, 0xd0, 0x7f, + 0xb1, 0x60, 0x21, 0xe3, 0x74, 0xe0, 0x49, 0xe0, 0x01, 0x08, 0x8f, 0x06, 0x81, 0x00, 0x29, 0xd3, + 0x71, 0x77, 0x67, 0x70, 0x47, 0xa3, 0xaf, 0x0d, 0x88, 0x5f, 0xa2, 0x6d, 0x01, 0xbd, 0x21, 0x0f, + 0x3c, 0xbf, 0x4f, 0x39, 0x87, 0x81, 0xc7, 0x02, 0x1d, 0xc6, 0x9a, 0xbb, 0x69, 0x80, 0x37, 0xa6, + 0x7e, 0x19, 0xe0, 0x7d, 0xb4, 0x91, 0x72, 0x93, 0x58, 0xa8, 0x29, 0x71, 0x49, 0x13, 0xcb, 0xa6, + 0xda, 0x8e, 0x85, 0xba, 0x0c, 0xf0, 0x21, 0xda, 0x35, 0x21, 0x7a, 0x52, 0xf8, 0xf3, 0xae, 0x05, + 0x4d, 0xc6, 0x06, 0xec, 0x08, 0xff, 0xd9, 0xf8, 0x00, 0xe1, 0x39, 0xc9, 0xcc, 0x7c, 0xd9, 0x74, + 0xf1, 0xc4, 0x4f, 0xfd, 0x4f, 0x11, 0x49, 0xc9, 0x8a, 0x45, 0x10, 0x0f, 0xcd, 0x57, 0x2a, 0x1a, + 0x25, 0xa4, 0x68, 0x5b, 0xf5, 0x82, 0xfb, 0xaf, 0xc1, 0xaf, 0x0c, 0x7c, 0x35, 0x43, 0xf1, 0xd1, + 0x53, 0x67, 0x33, 0x65, 0x1f, 0xa6, 0x11, 0x92, 0x15, 0x7d, 0xd2, 0x3f, 0x19, 0xd9, 0x7b, 0x0d, + 0xe1, 0x2a, 0x2a, 0xa5, 0x9a, 0x80, 0x2a, 0x4a, 0x56, 0x6d, 0xab, 0x5e, 0x76, 0x91, 0x29, 0x9d, + 0x53, 0x45, 0xf1, 0x0b, 0x94, 0xe6, 0xe4, 0x49, 0xf8, 0x34, 0x04, 0xee, 0x03, 0x59, 0xd3, 0x5d, + 0xa4, 0x59, 0x75, 0xd2, 0x2a, 0x3e, 0x98, 0x26, 0xad, 0x04, 0x03, 0xe9, 0x09, 0x88, 0x28, 0xe3, + 0x8c, 0x87, 0x04, 0xd9, 0x56, 0x7d, 0xd9, 0xdd, 0x4a, 0x01, 0x77, 0x56, 0xc7, 0x04, 0xad, 0xa4, + 0x3d, 0x92, 0x92, 0x76, 0x9b, 0x6d, 0xf1, 0x3e, 0x5a, 0xe7, 0x31, 0x37, 0xde, 0xb4, 0x3b, 0x00, + 0x52, 0xb6, 0xad, 0xfa, 0xaa, 0x9b, 0x2d, 0xb6, 0x92, 0xdb, 0xfb, 0x8a, 0x75, 0x77, 0x5f, 0xb1, + 0x7e, 0xdd, 0x57, 0xac, 0xaf, 0x0f, 0x95, 0xdc, 0xdd, 0x43, 0x25, 0xf7, 0xe3, 0xa1, 0x92, 0xfb, + 0xf8, 0x61, 0xf1, 0x2e, 0xb2, 0xae, 0xdf, 0xa0, 0x49, 0x22, 0x9d, 0x88, 0x05, 0xc1, 0x00, 0x6e, + 0xa8, 0x00, 0xc7, 0x4c, 0xd8, 0x48, 0x7f, 0x84, 0xc6, 0x1c, 0x32, 0x7a, 0xe5, 0x64, 0xdf, 0x1c, + 0x7d, 0x7f, 0xbb, 0x45, 0xfd, 0x8e, 0x1c, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x23, 0x75, + 0x84, 0x91, 0x04, 0x00, 0x00, +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/genesis.pb.go } 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 83% rename from middleware/packet-forward-middleware/router/types/query.pb.go rename to middleware/packet-forward-middleware/packetforward/types/query.pb.go index 6d55c215..09105ff2 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 @@ -37,7 +37,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) @@ -76,7 +76,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) @@ -113,12 +113,13 @@ func (m *QueryParamsResponse) GetParams() *Params { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "router.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "router.v1.QueryParamsResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "packetforward.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "packetforward.v1.QueryParamsResponse") } -func init() { proto.RegisterFile("router/v1/query.proto", fileDescriptor_8961e0cabda3d9d6) } +func init() { proto.RegisterFile("packetforward/v1/query.proto", fileDescriptor_358c54bd2cc154d0) } +<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/query.pb.go var fileDescriptor_8961e0cabda3d9d6 = []byte{ // 295 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x3d, 0x4e, 0xc3, 0x30, @@ -140,6 +141,29 @@ var fileDescriptor_8961e0cabda3d9d6 = []byte{ 0x5c, 0x8b, 0x78, 0x0a, 0x6e, 0xf4, 0x80, 0x66, 0x21, 0x4c, 0x32, 0xda, 0x20, 0xc5, 0xc5, 0xb7, 0xce, 0x2d, 0x35, 0xd8, 0xa8, 0xdf, 0xbc, 0xdf, 0xf9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xf0, 0xe7, 0x4c, 0xb0, 0x01, 0x00, 0x00, +======= +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, +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/query.pb.go } // Reference imports to suppress errors if they are not otherwise used. @@ -154,7 +178,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) } @@ -168,7 +192,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 } @@ -177,7 +201,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) } @@ -203,7 +227,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)) @@ -212,7 +236,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{ { @@ -221,7 +245,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 92% 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 cb38e5e5..5065a151 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. @@ -140,7 +140,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( +<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/query.pb.gw.go 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(true))) +======= + 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))) +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go ) 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 67% rename from middleware/packet-forward-middleware/proto/router/v1/genesis.proto rename to middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto index 4731d184..30414b1f 100644 --- a/middleware/packet-forward-middleware/proto/router/v1/genesis.proto +++ b/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto @@ -1,12 +1,20 @@ syntax = "proto3"; +<<<<<<< HEAD:middleware/packet-forward-middleware/proto/router/v1/genesis.proto package router.v1; +======= +package packetforward.v1; +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types"; +<<<<<<< HEAD:middleware/packet-forward-middleware/proto/router/v1/genesis.proto import "gogoproto/gogo.proto"; +======= +option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"; +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto -// GenesisState defines the router genesis state +// GenesisState defines the packetforward genesis state message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; @@ -20,7 +28,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 54% rename from middleware/packet-forward-middleware/proto/router/v1/query.proto rename to middleware/packet-forward-middleware/proto/packetforward/v1/query.proto index 07ad819a..2aa2b0a2 100644 --- a/middleware/packet-forward-middleware/proto/router/v1/query.proto +++ b/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +<<<<<<< HEAD:middleware/packet-forward-middleware/proto/router/v1/query.proto package router.v1; @@ -7,12 +8,20 @@ import "router/v1/genesis.proto"; import "google/api/annotations.proto"; option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types"; +======= +package packetforward.v1; + +import "google/api/annotations.proto"; +import "packetforward/v1/genesis.proto"; + +option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"; +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/proto/packetforward/v1/query.proto // 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 570e10ef..e109c10d 100755 --- a/middleware/packet-forward-middleware/scripts/protocgen.sh +++ b/middleware/packet-forward-middleware/scripts/protocgen.sh @@ -26,5 +26,11 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ done # move proto files to the right places +<<<<<<< HEAD cp -r github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/* router/ +======= +# +# Note: Proto files are suffixed with the current binary version. +cp -r github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v*/packetforward/* packetforward/ +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) rm -rf github.com diff --git a/middleware/packet-forward-middleware/test/mock/bank_keeper.go b/middleware/packet-forward-middleware/test/mock/bank_keeper.go index c8effe42..9989ab73 100644 --- a/middleware/packet-forward-middleware/test/mock/bank_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/bank_keeper.go @@ -1,5 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. +<<<<<<< HEAD // Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: BankKeeper) +======= +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: BankKeeper) +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) // 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 65783a42..7d7db5bf 100644 --- a/middleware/packet-forward-middleware/test/mock/channel_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/channel_keeper.go @@ -1,5 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. +<<<<<<< HEAD // Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: ChannelKeeper) +======= +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: ChannelKeeper) +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) // 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 b8d7a909..8621122e 100644 --- a/middleware/packet-forward-middleware/test/mock/distribution_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/distribution_keeper.go @@ -1,5 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. +<<<<<<< HEAD // Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: DistributionKeeper) +======= +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: DistributionKeeper) +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) // 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 ec595459..3a689918 100644 --- a/middleware/packet-forward-middleware/test/mock/transfer_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/transfer_keeper.go @@ -1,5 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. +<<<<<<< HEAD // Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: TransferKeeper) +======= +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: TransferKeeper) +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) // 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 4f99257d..8ca67e8e 100644 --- a/middleware/packet-forward-middleware/test/setup.go +++ b/middleware/packet-forward-middleware/test/setup.go @@ -4,10 +4,17 @@ import ( "testing" "time" +<<<<<<< HEAD "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/test/mock" +======= + "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" +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -38,18 +45,22 @@ func NewTestSetup(t *testing.T, ctl *gomock.Controller) *Setup { ics4WrapperMock := mock.NewMockICS4Wrapper(ctl) paramsKeeper := initializer.paramsKeeper() +<<<<<<< HEAD routerKeeper := initializer.routerKeeper(paramsKeeper, transferKeeperMock, channelKeeperMock, distributionKeeperMock, bankKeeperMock, ics4WrapperMock) +======= + packetforwardKeeper := initializer.packetforwardKeeper(paramsKeeper, transferKeeperMock, channelKeeperMock, distributionKeeperMock, bankKeeperMock, ics4WrapperMock) +>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) 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 +71,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 +81,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 { @@ -127,7 +138,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, @@ -139,7 +150,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, @@ -150,9 +161,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) } From d8a92a211072f5164fb2f9ce86e6877e3e8a5b00 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 11 Oct 2023 16:15:52 -0500 Subject: [PATCH 2/3] move to v4 namespace --- middleware/packet-forward-middleware/Makefile | 9 ---- .../packetforward/client/cli/cli.go | 6 +-- .../packetforward/ibc_middleware.go | 11 +---- .../packetforward/keeper/genesis.go | 6 +-- .../packetforward/keeper/grpc_query.go | 6 +-- .../packetforward/keeper/keeper.go | 8 +-- .../packetforward/keeper/params.go | 6 +-- .../packetforward/module.go | 12 ++--- .../packetforward/module_test.go | 10 +--- .../packetforward/types/forward_test.go | 6 +-- .../packetforward/types/genesis.pb.go | 49 ++----------------- .../packetforward/types/query.pb.go | 29 +---------- .../packetforward/types/query.pb.gw.go | 6 +-- .../proto/packetforward/v1/genesis.proto | 12 +---- .../proto/packetforward/v1/query.proto | 13 +---- .../scripts/protocgen.sh | 4 -- .../test/mock/bank_keeper.go | 6 +-- .../test/mock/channel_keeper.go | 6 +-- .../test/mock/distribution_keeper.go | 6 +-- .../test/mock/transfer_keeper.go | 6 +-- .../packet-forward-middleware/test/setup.go | 17 ++----- 21 files changed, 28 insertions(+), 206 deletions(-) diff --git a/middleware/packet-forward-middleware/Makefile b/middleware/packet-forward-middleware/Makefile index 4015bbc2..cba98df0 100644 --- a/middleware/packet-forward-middleware/Makefile +++ b/middleware/packet-forward-middleware/Makefile @@ -143,7 +143,6 @@ cosmovisor: mocks: $(MOCKS_DIR) go install go.uber.org/mock/mockgen@v0.2.0 -<<<<<<< HEAD mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/router/types TransferKeeper mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper mockgen -package=mock -destination=./test/mock/distribution_keeper.go $(GOMOD)/router/types DistributionKeeper @@ -151,14 +150,6 @@ mocks: $(MOCKS_DIR) mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v4/modules/core/05-port/types ICS4Wrapper mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v4/modules/core/05-port/types IBCModule -======= - 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 ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) .PHONY: mocks diff --git a/middleware/packet-forward-middleware/packetforward/client/cli/cli.go b/middleware/packet-forward-middleware/packetforward/client/cli/cli.go index 5256c036..2c1063b3 100644 --- a/middleware/packet-forward-middleware/packetforward/client/cli/cli.go +++ b/middleware/packet-forward-middleware/packetforward/client/cli/cli.go @@ -3,11 +3,7 @@ package cli import ( "fmt" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/client/cli/cli.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" -======= - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/client/cli/cli.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" diff --git a/middleware/packet-forward-middleware/packetforward/ibc_middleware.go b/middleware/packet-forward-middleware/packetforward/ibc_middleware.go index 6e9150c8..077fe46d 100644 --- a/middleware/packet-forward-middleware/packetforward/ibc_middleware.go +++ b/middleware/packet-forward-middleware/packetforward/ibc_middleware.go @@ -7,15 +7,8 @@ import ( "time" "github.com/armon/go-metrics" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/ibc_middleware.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/ibc_middleware.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" diff --git a/middleware/packet-forward-middleware/packetforward/keeper/genesis.go b/middleware/packet-forward-middleware/packetforward/keeper/genesis.go index 751e00eb..54f63649 100644 --- a/middleware/packet-forward-middleware/packetforward/keeper/genesis.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/genesis.go @@ -1,11 +1,7 @@ package keeper import ( -<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/genesis.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" -======= - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/genesis.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go b/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go index dec1b8bd..6071b2bb 100644 --- a/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go @@ -3,11 +3,7 @@ package keeper import ( "context" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/grpc_query.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" -======= - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/middleware/packet-forward-middleware/packetforward/keeper/keeper.go b/middleware/packet-forward-middleware/packetforward/keeper/keeper.go index 831888ba..6489bf43 100644 --- a/middleware/packet-forward-middleware/packetforward/keeper/keeper.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/keeper.go @@ -7,14 +7,8 @@ import ( "time" "github.com/armon/go-metrics" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/keeper.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" "github.com/tendermint/tendermint/libs/log" -======= - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - - errorsmod "cosmossdk.io/errors" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/keeper.go "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/middleware/packet-forward-middleware/packetforward/keeper/params.go b/middleware/packet-forward-middleware/packetforward/keeper/params.go index 272acfa8..a0c71355 100644 --- a/middleware/packet-forward-middleware/packetforward/keeper/params.go +++ b/middleware/packet-forward-middleware/packetforward/keeper/params.go @@ -1,11 +1,7 @@ package keeper import ( -<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/params.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" -======= - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/params.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/middleware/packet-forward-middleware/packetforward/module.go b/middleware/packet-forward-middleware/packetforward/module.go index 570d37e2..e2f0a320 100644 --- a/middleware/packet-forward-middleware/packetforward/module.go +++ b/middleware/packet-forward-middleware/packetforward/module.go @@ -6,15 +6,9 @@ import ( "fmt" "math/rand" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/module.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/client/cli" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/client/cli" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" diff --git a/middleware/packet-forward-middleware/packetforward/module_test.go b/middleware/packet-forward-middleware/packetforward/module_test.go index 3f888771..ca8d45a6 100644 --- a/middleware/packet-forward-middleware/packetforward/module_test.go +++ b/middleware/packet-forward-middleware/packetforward/module_test.go @@ -5,15 +5,9 @@ import ( "fmt" "testing" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/module_test.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/test" -======= - "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" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module_test.go "github.com/iancoleman/orderedmap" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/middleware/packet-forward-middleware/packetforward/types/forward_test.go b/middleware/packet-forward-middleware/packetforward/types/forward_test.go index 28809505..6047b1e8 100644 --- a/middleware/packet-forward-middleware/packetforward/types/forward_test.go +++ b/middleware/packet-forward-middleware/packetforward/types/forward_test.go @@ -4,11 +4,7 @@ import ( "encoding/json" "testing" -<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/forward_test.go - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" -======= - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/forward_test.go + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" "github.com/stretchr/testify/require" ) diff --git a/middleware/packet-forward-middleware/packetforward/types/genesis.pb.go b/middleware/packet-forward-middleware/packetforward/types/genesis.pb.go index b0648a6e..4575e288 100644 --- a/middleware/packet-forward-middleware/packetforward/types/genesis.pb.go +++ b/middleware/packet-forward-middleware/packetforward/types/genesis.pb.go @@ -265,50 +265,8 @@ func init() { proto.RegisterFile("packetforward/v1/genesis.proto", fileDescripto 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, -<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/genesis.pb.go - 0x14, 0xce, 0x84, 0x10, 0x88, 0x13, 0xfe, 0x7c, 0xe1, 0x32, 0x97, 0x45, 0x12, 0x45, 0xe8, 0xde, - 0xe8, 0xd2, 0x64, 0x04, 0xad, 0x2a, 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, 0x8c, 0x86, - 0xbf, 0xa0, 0x2d, 0xca, 0xbc, 0x41, 0x44, 0xc3, 0xa1, 0xf2, 0x12, 0xe2, 0x5f, 0x82, 0x92, 0x76, - 0xbe, 0xbe, 0xd4, 0x2c, 0x1f, 0x3d, 0x9b, 0xd3, 0xce, 0x1f, 0xd2, 0x3e, 0x67, 0x6f, 0x35, 0xbf, - 0x6b, 0xe8, 0x6f, 0x98, 0x12, 0x93, 0x4e, 0x3d, 0xb5, 0xbd, 0x9f, 0xd6, 0xec, 0x09, 0x89, 0xa3, - 0x93, 0xc6, 0x13, 0xd3, 0x86, 0xbb, 0x41, 0x17, 0x75, 0x7b, 0x1f, 0xd1, 0xf6, 0x9f, 0xac, 0xf0, - 0x26, 0x5a, 0xba, 0x84, 0x89, 0xee, 0xa0, 0xe4, 0xa6, 0x4b, 0xec, 0xa0, 0xe5, 0x31, 0x89, 0x46, - 0x60, 0xe7, 0x75, 0x57, 0xff, 0xcc, 0x25, 0x5b, 0x74, 0x70, 0x0d, 0xef, 0x24, 0x7f, 0x6c, 0x35, - 0x3e, 0xa3, 0xa2, 0x69, 0x19, 0x33, 0xb4, 0x3e, 0x00, 0xf0, 0x12, 0x10, 0x3e, 0x30, 0x45, 0x42, - 0x30, 0xde, 0x9d, 0xb3, 0x34, 0xf3, 0xcf, 0x69, 0xed, 0xdf, 0x90, 0xaa, 0xe1, 0xa8, 0xdf, 0xf6, - 0x79, 0xec, 0xf8, 0x5c, 0xc6, 0x5c, 0x66, 0x9f, 0x96, 0x0c, 0x2e, 0x1d, 0x35, 0x49, 0x40, 0xb6, - 0x4f, 0xc1, 0xbf, 0x9f, 0xd6, 0x76, 0x4c, 0x77, 0x8b, 0x6e, 0x0d, 0x77, 0x6d, 0x00, 0xd0, 0x7d, - 0xdc, 0x7f, 0x2f, 0xa0, 0xf5, 0xc5, 0x5c, 0xf8, 0x25, 0xda, 0xe5, 0x82, 0x86, 0x94, 0x91, 0xc8, - 0x93, 0xc0, 0x02, 0x10, 0x1e, 0x09, 0x02, 0x01, 0x52, 0x66, 0x7d, 0xee, 0xcc, 0xe0, 0x9e, 0x46, - 0x5f, 0x19, 0x10, 0xff, 0x8f, 0xb6, 0x04, 0x0c, 0x46, 0x2c, 0xf0, 0xfc, 0x21, 0x61, 0x0c, 0x22, - 0x8f, 0x06, 0x7a, 0x0a, 0x25, 0x77, 0xc3, 0x00, 0xaf, 0x4d, 0xfd, 0x3c, 0xc0, 0xfb, 0x68, 0x3d, - 0xe3, 0x26, 0x5c, 0xa8, 0x94, 0xb8, 0xa4, 0x89, 0x15, 0x53, 0xed, 0x72, 0xa1, 0xce, 0x03, 0x7c, - 0x88, 0x76, 0xcc, 0x2f, 0xf1, 0xa4, 0xf0, 0xe7, 0x5d, 0x0b, 0x9a, 0x8c, 0x0d, 0xd8, 0x13, 0xfe, - 0xa3, 0xf1, 0x01, 0xc2, 0x73, 0x92, 0x99, 0xf9, 0xb2, 0x49, 0xf1, 0xc0, 0xcf, 0xfc, 0x8f, 0x91, - 0x9d, 0x91, 0x15, 0x8d, 0x81, 0x8f, 0xcc, 0x57, 0x2a, 0x12, 0x27, 0x76, 0xb1, 0x6e, 0x35, 0x0b, - 0xee, 0xdf, 0x06, 0xbf, 0x30, 0xf0, 0xc5, 0x0c, 0xc5, 0x47, 0x0f, 0xc9, 0x66, 0xca, 0x21, 0xa4, - 0x23, 0xb4, 0x57, 0xf4, 0x49, 0x7f, 0x2d, 0xc8, 0xde, 0x69, 0x08, 0xd7, 0x50, 0x39, 0xd3, 0x04, - 0x44, 0x11, 0x7b, 0xb5, 0x6e, 0x35, 0x2b, 0x2e, 0x32, 0xa5, 0x53, 0xa2, 0x08, 0xfe, 0x0f, 0x65, - 0x73, 0xf2, 0x24, 0x7c, 0x1a, 0x01, 0xf3, 0xc1, 0x2e, 0xe9, 0x14, 0xd9, 0xac, 0x7a, 0x59, 0x15, - 0x1f, 0xa4, 0x93, 0x56, 0x82, 0x82, 0xf4, 0x04, 0xc4, 0x84, 0x32, 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, 0x70, 0xb2, 0xf7, 0x44, 0x5f, 0xdc, - 0x7e, 0x51, 0x3f, 0x15, 0xcf, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x4a, 0x5b, 0xda, 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, + 0x2a, 0x4a, 0x46, 0x40, 0x85, 0x10, 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, 0x20, 0xd3, 0x74, 0x35, 0xf6, 0xf9, 0x7e, 0x7c, 0xce, 0x27, 0x8f, 0x51, 0x25, 0xa1, 0xfe, 0x35, 0xa8, @@ -345,9 +303,8 @@ var fileDescriptor_afd4e56ea31af982 = []byte{ 0x7e, 0xdd, 0x57, 0xac, 0xaf, 0x0f, 0x95, 0xdc, 0xdd, 0x43, 0x25, 0xf7, 0xe3, 0xa1, 0x92, 0xfb, 0xf8, 0x61, 0xf1, 0x2e, 0xb2, 0xae, 0xdf, 0xa0, 0x49, 0x22, 0x9d, 0x88, 0x05, 0xc1, 0x00, 0x6e, 0xa8, 0x00, 0xc7, 0x4c, 0xd8, 0x48, 0x7f, 0x84, 0xc6, 0x1c, 0x32, 0x7a, 0xe5, 0x64, 0xdf, 0x1c, - 0x7d, 0x7f, 0xbb, 0x45, 0xfd, 0x8e, 0x1c, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x23, 0x75, - 0x84, 0x91, 0x04, 0x00, 0x00, ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/genesis.pb.go + 0x7d, 0x7f, 0xbb, 0x45, 0xfd, 0x8e, 0x1c, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x48, 0x7d, + 0x21, 0x91, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/middleware/packet-forward-middleware/packetforward/types/query.pb.go b/middleware/packet-forward-middleware/packetforward/types/query.pb.go index 09105ff2..3bbd4931 100644 --- a/middleware/packet-forward-middleware/packetforward/types/query.pb.go +++ b/middleware/packet-forward-middleware/packetforward/types/query.pb.go @@ -6,7 +6,6 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -119,34 +118,11 @@ func init() { func init() { proto.RegisterFile("packetforward/v1/query.proto", fileDescriptor_358c54bd2cc154d0) } -<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/query.pb.go -var fileDescriptor_8961e0cabda3d9d6 = []byte{ - // 295 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x3d, 0x4e, 0xc3, 0x30, - 0x18, 0x86, 0x1b, 0x24, 0x2a, 0x61, 0x26, 0x4c, 0x11, 0x28, 0x2a, 0x16, 0xca, 0x04, 0x43, 0x63, - 0xb5, 0x70, 0x00, 0xc4, 0x05, 0xf8, 0x19, 0xd9, 0x9c, 0xe4, 0xc3, 0x58, 0x6d, 0xf2, 0xb9, 0xb6, - 0x93, 0xaa, 0x2b, 0x27, 0x40, 0xe2, 0x52, 0x8c, 0x95, 0x58, 0x18, 0x51, 0xc2, 0x41, 0x50, 0x7e, - 0xa0, 0x45, 0x88, 0x2d, 0x7a, 0x9f, 0x37, 0xef, 0x63, 0x9b, 0x1c, 0x18, 0xcc, 0x1d, 0x18, 0x5e, - 0x8c, 0xf9, 0x3c, 0x07, 0xb3, 0x0c, 0xb5, 0x41, 0x87, 0x74, 0xa7, 0x8d, 0xc3, 0x62, 0xec, 0x0f, - 0x24, 0x4a, 0x6c, 0x52, 0x5e, 0x7f, 0xb5, 0x05, 0xff, 0x70, 0xfd, 0x9f, 0x84, 0x0c, 0xac, 0xb2, - 0x1d, 0x18, 0x4a, 0x44, 0x39, 0x03, 0x2e, 0xb4, 0xe2, 0x22, 0xcb, 0xd0, 0x09, 0xa7, 0x30, 0xeb, - 0x68, 0x30, 0x20, 0xf4, 0xb6, 0xd6, 0xdc, 0x08, 0x23, 0x52, 0x7b, 0x07, 0xf3, 0x1c, 0xac, 0x0b, - 0x2e, 0xc9, 0xfe, 0xaf, 0xd4, 0x6a, 0xcc, 0x2c, 0xd0, 0x33, 0xd2, 0xd7, 0x4d, 0x72, 0xe4, 0x9d, - 0x78, 0xa7, 0xbb, 0x93, 0xbd, 0xf0, 0xe7, 0x54, 0x61, 0x57, 0xed, 0x0a, 0x13, 0x47, 0xb6, 0x9b, - 0x05, 0x3a, 0x25, 0xfd, 0x16, 0xd1, 0xe3, 0x8d, 0xf6, 0x5f, 0xa7, 0xcf, 0xfe, 0xc3, 0xad, 0x3c, - 0x08, 0x9e, 0xde, 0x3e, 0x5f, 0xb6, 0x86, 0xd4, 0xe7, 0x2a, 0x8a, 0xb9, 0xd0, 0xda, 0xf2, 0xf5, - 0x95, 0x5b, 0xeb, 0x95, 0x7a, 0x2d, 0x99, 0xb7, 0x2a, 0x99, 0xf7, 0x51, 0x32, 0xef, 0xb9, 0x62, - 0xbd, 0x55, 0xc5, 0x7a, 0xef, 0x15, 0xeb, 0xdd, 0x5f, 0x4b, 0xe5, 0x1e, 0xf3, 0x28, 0x8c, 0x31, - 0xe5, 0x31, 0xda, 0x14, 0x6d, 0x3d, 0x33, 0x6a, 0x66, 0x52, 0x95, 0x24, 0x33, 0x58, 0x08, 0x03, - 0x5c, 0x8b, 0x78, 0x0a, 0x6e, 0xf4, 0x80, 0x66, 0x21, 0x4c, 0x32, 0xda, 0x20, 0xc5, 0xc5, 0xb7, - 0xce, 0x2d, 0x35, 0xd8, 0xa8, 0xdf, 0xbc, 0xdf, 0xf9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, - 0xf0, 0xe7, 0x4c, 0xb0, 0x01, 0x00, 0x00, -======= 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, + 0x98, 0x16, 0x9e, 0x80, 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, @@ -161,9 +137,8 @@ var fileDescriptor_358c54bd2cc154d0 = []byte{ 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, + 0xb7, 0x39, 0xf2, 0xc5, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x39, 0xee, 0x1a, 0xd4, 0x01, 0x00, 0x00, ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/query.pb.go } // Reference imports to suppress errors if they are not otherwise used. diff --git a/middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go b/middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go index 5065a151..8cc70e27 100644 --- a/middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go +++ b/middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go @@ -140,11 +140,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( -<<<<<<< HEAD:middleware/packet-forward-middleware/router/types/query.pb.gw.go - 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(true))) -======= - 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))) ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go + 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(true))) ) var ( diff --git a/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto b/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto index 30414b1f..b3113806 100644 --- a/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto +++ b/middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto @@ -1,18 +1,8 @@ syntax = "proto3"; -<<<<<<< HEAD:middleware/packet-forward-middleware/proto/router/v1/genesis.proto - -package router.v1; -======= package packetforward.v1; ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto - -option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types"; -<<<<<<< HEAD:middleware/packet-forward-middleware/proto/router/v1/genesis.proto import "gogoproto/gogo.proto"; -======= -option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"; ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto +option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types"; // GenesisState defines the packetforward genesis state message GenesisState { diff --git a/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto b/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto index 2aa2b0a2..49e4027f 100644 --- a/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto +++ b/middleware/packet-forward-middleware/proto/packetforward/v1/query.proto @@ -1,21 +1,10 @@ syntax = "proto3"; -<<<<<<< HEAD:middleware/packet-forward-middleware/proto/router/v1/query.proto - -package router.v1; - -import "gogoproto/gogo.proto"; -import "router/v1/genesis.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types"; -======= package packetforward.v1; import "google/api/annotations.proto"; import "packetforward/v1/genesis.proto"; -option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"; ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/proto/packetforward/v1/query.proto +option go_package = "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types"; // Query provides defines the gRPC querier service. service Query { diff --git a/middleware/packet-forward-middleware/scripts/protocgen.sh b/middleware/packet-forward-middleware/scripts/protocgen.sh index e109c10d..6a0fc72c 100755 --- a/middleware/packet-forward-middleware/scripts/protocgen.sh +++ b/middleware/packet-forward-middleware/scripts/protocgen.sh @@ -26,11 +26,7 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ done # move proto files to the right places -<<<<<<< HEAD -cp -r github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/* router/ -======= # # Note: Proto files are suffixed with the current binary version. cp -r github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v*/packetforward/* packetforward/ ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) rm -rf github.com diff --git a/middleware/packet-forward-middleware/test/mock/bank_keeper.go b/middleware/packet-forward-middleware/test/mock/bank_keeper.go index 9989ab73..3f8de637 100644 --- a/middleware/packet-forward-middleware/test/mock/bank_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/bank_keeper.go @@ -1,9 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -<<<<<<< HEAD -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: BankKeeper) -======= -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: BankKeeper) ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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 7d7db5bf..dfe7d21d 100644 --- a/middleware/packet-forward-middleware/test/mock/channel_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/channel_keeper.go @@ -1,9 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -<<<<<<< HEAD -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: ChannelKeeper) -======= -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: ChannelKeeper) ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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 8621122e..1bdd8fbf 100644 --- a/middleware/packet-forward-middleware/test/mock/distribution_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/distribution_keeper.go @@ -1,9 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -<<<<<<< HEAD -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: DistributionKeeper) -======= -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: DistributionKeeper) ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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 3a689918..95642807 100644 --- a/middleware/packet-forward-middleware/test/mock/transfer_keeper.go +++ b/middleware/packet-forward-middleware/test/mock/transfer_keeper.go @@ -1,9 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -<<<<<<< HEAD -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types (interfaces: TransferKeeper) -======= -// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types (interfaces: TransferKeeper) ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) +// Source: github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/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 8ca67e8e..8557d0dd 100644 --- a/middleware/packet-forward-middleware/test/setup.go +++ b/middleware/packet-forward-middleware/test/setup.go @@ -4,17 +4,10 @@ import ( "testing" "time" -<<<<<<< HEAD - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/keeper" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/keeper" + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/packetforward/types" "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/test/mock" -======= - "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" ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -45,11 +38,7 @@ func NewTestSetup(t *testing.T, ctl *gomock.Controller) *Setup { ics4WrapperMock := mock.NewMockICS4Wrapper(ctl) paramsKeeper := initializer.paramsKeeper() -<<<<<<< HEAD - routerKeeper := initializer.routerKeeper(paramsKeeper, transferKeeperMock, channelKeeperMock, distributionKeeperMock, bankKeeperMock, ics4WrapperMock) -======= packetforwardKeeper := initializer.packetforwardKeeper(paramsKeeper, transferKeeperMock, channelKeeperMock, distributionKeeperMock, bankKeeperMock, ics4WrapperMock) ->>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)) require.NoError(t, initializer.StateStore.LoadLatestVersion()) From bb3c497e5bd158fc2a01f74d8fe808f95ca277ca Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 11 Oct 2023 16:22:30 -0500 Subject: [PATCH 3/3] packetforward for mocks --- middleware/packet-forward-middleware/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/middleware/packet-forward-middleware/Makefile b/middleware/packet-forward-middleware/Makefile index cba98df0..3f462057 100644 --- a/middleware/packet-forward-middleware/Makefile +++ b/middleware/packet-forward-middleware/Makefile @@ -143,11 +143,11 @@ 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/channel_keeper.go $(GOMOD)/router/types ChannelKeeper - 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/channel_keeper.go $(GOMOD)/router/types ChannelKeeper + mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/packetforward/types TransferKeeper + mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/packetforward/types ChannelKeeper + 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/v4/modules/core/05-port/types ICS4Wrapper mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v4/modules/core/05-port/types IBCModule