diff --git a/ignite/pkg/cosmosanalysis/module/module_test.go b/ignite/pkg/cosmosanalysis/module/module_test.go index 452b690147..0ba79a2f15 100644 --- a/ignite/pkg/cosmosanalysis/module/module_test.go +++ b/ignite/pkg/cosmosanalysis/module/module_test.go @@ -164,10 +164,10 @@ func TestDiscover(t *testing.T) { } } -func TestDiscoverWithVersionedApp(t *testing.T) { +func TestDiscoverWithAppV2(t *testing.T) { ctx := context.Background() - sourcePath := "testdata/planet_v2" - testModule := newModule(sourcePath, "github.com/tendermint/planet/v2") + sourcePath := "testdata/earth" + testModule := newModule(sourcePath, "github.com/tendermint/planet") tests := []struct { name, protoDir string diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/app/app.go b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app.go similarity index 95% rename from ignite/pkg/cosmosanalysis/module/testdata/planet_v2/app/app.go rename to ignite/pkg/cosmosanalysis/module/testdata/earth/app/app.go index 8d28b5b175..a4eb82834b 100644 --- a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/app/app.go +++ b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app.go @@ -12,7 +12,7 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/gogo/protobuf/codec" - fookeeper "github.com/tendermint/planet/x/foo/keeper" + marskeeper "github.com/tendermint/planet/x/mars/keeper" abci "github.com/tendermint/tendermint/abci/types" app "github.com/ignite/cli/ignite/pkg/cosmosanalysis/app/testdata/modules/registration_not_in_app_go" @@ -23,7 +23,7 @@ type Foo struct { BankKeeper bankkeeper.Keeper StakingKeeper stakingkeeper.Keeper GovKeeper govkeeper.Keeper - FooKeeper fookeeper.Keeper + MarsKeeper marskeeper.Keeper } var ModuleBasics = module.NewBasicManager(foo.AppModuleBasic{}) diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/app/app_config.go b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go similarity index 95% rename from ignite/pkg/cosmosanalysis/module/testdata/planet_v2/app/app_config.go rename to ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go index 42e35eaa42..8ff441e81b 100644 --- a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/app/app_config.go +++ b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go @@ -64,16 +64,19 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + _ "github.com/cosmos/ibc-go/modules/capability" // import for side-effects capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + _ "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" // import for side-effects icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + _ "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" // import for side-effects ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" "google.golang.org/protobuf/types/known/durationpb" - marsmodulev1 "github.com/ignite/mars/api/mars/mars/module" - _ "github.com/ignite/mars/x/mars" // import for side-effects - marsmoduletypes "github.com/ignite/mars/x/mars/types" + marsmodulev1 "github.com/tendermint/mars/api/mars/mars/module" + _ "github.com/tendermint/mars/x/mars" // import for side-effects + marsmoduletypes "github.com/tendermint/mars/x/mars/types" // this line is used by starport scaffolding # stargate/app/moduleImport ) @@ -120,7 +123,6 @@ var ( // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) beginBlockers = []string{ // cosmos sdk modules - upgradetypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, @@ -156,6 +158,11 @@ var ( // this line is used by starport scaffolding # stargate/app/endBlockers } + preBlockers = []string{ + upgradetypes.ModuleName, + // this line is used by starport scaffolding # stargate/app/preBlockers + } + // module account permissions moduleAccPerms = []*authmodulev1.ModuleAccountPermission{ {Account: authtypes.FeeCollectorName}, @@ -188,6 +195,7 @@ var ( Name: runtime.ModuleName, Config: appconfig.WrapAny(&runtimev1alpha1.Module{ AppName: Name, + PreBlockers: preBlockers, BeginBlockers: beginBlockers, EndBlockers: endBlockers, InitGenesis: genesisModuleOrder, diff --git a/ignite/pkg/cosmosanalysis/module/testdata/earth/go.mod b/ignite/pkg/cosmosanalysis/module/testdata/earth/go.mod new file mode 100644 index 0000000000..f470e685ca --- /dev/null +++ b/ignite/pkg/cosmosanalysis/module/testdata/earth/go.mod @@ -0,0 +1,3 @@ +module github.com/tendermint/planet + +go 1.18 diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/proto/planet/mars/mars.proto b/ignite/pkg/cosmosanalysis/module/testdata/earth/proto/planet/mars/mars.proto similarity index 100% rename from ignite/pkg/cosmosanalysis/module/testdata/planet_v2/proto/planet/mars/mars.proto rename to ignite/pkg/cosmosanalysis/module/testdata/earth/proto/planet/mars/mars.proto diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/x/mars/keeper/query_my_query.go b/ignite/pkg/cosmosanalysis/module/testdata/earth/x/mars/keeper/query_my_query.go similarity index 100% rename from ignite/pkg/cosmosanalysis/module/testdata/planet_v2/x/mars/keeper/query_my_query.go rename to ignite/pkg/cosmosanalysis/module/testdata/earth/x/mars/keeper/query_my_query.go diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/x/mars/types/types.go b/ignite/pkg/cosmosanalysis/module/testdata/earth/x/mars/types/types.go similarity index 100% rename from ignite/pkg/cosmosanalysis/module/testdata/planet_v2/x/mars/types/types.go rename to ignite/pkg/cosmosanalysis/module/testdata/earth/x/mars/types/types.go diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet/app/app.go b/ignite/pkg/cosmosanalysis/module/testdata/planet/app/app.go index af7ae87352..7d09692af3 100644 --- a/ignite/pkg/cosmosanalysis/module/testdata/planet/app/app.go +++ b/ignite/pkg/cosmosanalysis/module/testdata/planet/app/app.go @@ -12,7 +12,7 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/gogo/protobuf/codec" - fookeeper "github.com/tendermint/planet/x/foo/keeper" + marskeeper "github.com/tendermint/planet/x/mars/keeper" abci "github.com/tendermint/tendermint/abci/types" app "github.com/ignite/cli/ignite/pkg/cosmosanalysis/app/testdata/modules/registration_not_in_app_go" @@ -23,7 +23,7 @@ type Foo struct { BankKeeper bankkeeper.Keeper StakingKeeper stakingkeeper.Keeper GovKeeper govkeeper.Keeper - FooKeeper fookeeper.Keeper + MarsKeeper marskeeper.Keeper } var ModuleBasics = module.NewBasicManager(mars.AppModuleBasic{}) diff --git a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/go.mod b/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/go.mod deleted file mode 100644 index 7348883587..0000000000 --- a/ignite/pkg/cosmosanalysis/module/testdata/planet_v2/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/tendermint/planet/v2 - -go 1.18