From dc95e33efeb1211b1121f4bbaa3a2b37945ee553 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 29 Jul 2022 21:39:44 +0200 Subject: [PATCH] refactor: replace app wiring yaml config by go (#12757) * refactor: end-to-end tests should use simapp * updates * updates * remove unecessary AppWiring --- simapp/app_config.go | 6 +- tests/e2e/auth/client/testutil/cli_test.go | 10 +- .../auth/vesting/client/testutil/cli_test.go | 6 +- tests/e2e/authz/client/testutil/cli_test.go | 4 +- .../e2e/evidence/client/testutil/cli_test.go | 10 +- .../e2e/feegrant/client/testutil/cli_test.go | 6 +- tests/e2e/group/client/testutil/cli_test.go | 6 +- tests/e2e/mint/client/testutil/cli_test.go | 6 +- tests/e2e/nft/client/testutil/cli_test.go | 6 +- tests/e2e/params/client/testutil/cli_test.go | 6 +- .../e2e/slashing/client/testutil/cli_test.go | 6 +- x/auth/testutil/app.yaml | 55 --------- x/auth/testutil/app_config.go | 104 +++++++++++++++- x/auth/vesting/testutil/app.yaml | 45 ------- x/auth/vesting/testutil/app_config.go | 19 --- x/authz/testutil/app.yaml | 51 -------- x/authz/testutil/app_config.go | 103 +++++++++++++++- x/capability/testutil/app.yaml | 46 ------- x/capability/testutil/app_config.go | 96 +++++++++++++-- x/distribution/testutil/app.yaml | 52 -------- x/distribution/testutil/app_config.go | 105 ++++++++++++++-- x/evidence/testutil/app.yaml | 52 -------- x/evidence/testutil/app_config.go | 105 ++++++++++++++-- x/feegrant/testutil/app.yaml | 51 -------- x/feegrant/testutil/app_config.go | 105 ++++++++++++++-- x/group/testutil/app.yaml | 51 -------- x/group/testutil/app_config.go | 104 +++++++++++++++- x/mint/testutil/app_config.go | 6 - x/nft/testutil/app_config.go | 6 - x/params/testutil/app.yaml | 41 ------- x/params/testutil/app_config.go | 85 +++++++++++-- x/slashing/testutil/app.yaml | 59 --------- x/slashing/testutil/app_config.go | 113 +++++++++++++++++- x/upgrade/testutil/app.yaml | 51 -------- x/upgrade/testutil/app_config.go | 20 ---- 35 files changed, 888 insertions(+), 709 deletions(-) delete mode 100644 x/auth/testutil/app.yaml delete mode 100644 x/auth/vesting/testutil/app.yaml delete mode 100644 x/auth/vesting/testutil/app_config.go delete mode 100644 x/authz/testutil/app.yaml delete mode 100644 x/capability/testutil/app.yaml delete mode 100644 x/distribution/testutil/app.yaml delete mode 100644 x/evidence/testutil/app.yaml delete mode 100644 x/feegrant/testutil/app.yaml delete mode 100644 x/group/testutil/app.yaml delete mode 100644 x/params/testutil/app.yaml delete mode 100644 x/slashing/testutil/app.yaml delete mode 100644 x/upgrade/testutil/app.yaml delete mode 100644 x/upgrade/testutil/app_config.go diff --git a/simapp/app_config.go b/simapp/app_config.go index ebd4eff047..7f1484ab55 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -48,6 +48,9 @@ import ( vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" ) +// Alternatively the AppConfig can be defined as a YAML or a JSON file. +// e.g. https://github.com/cosmos/cosmos-sdk/blob/91b1d83f1339e235a1dfa929ecc00084101a19e3/simapp/app.yaml + var AppConfig = appconfig.Compose(&appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { @@ -122,7 +125,6 @@ var AppConfig = appconfig.Compose(&appv1alpha1.Config{ }, }), }, - { Name: vestingtypes.ModuleName, Config: appconfig.WrapAny(&vestingmodulev1.Module{}), @@ -202,5 +204,3 @@ var AppConfig = appconfig.Compose(&appv1alpha1.Config{ }, }, }) - -// Alternatively this configuration can be set as yaml or json: https://github.com/cosmos/cosmos-sdk/blob/91b1d83f1339e235a1dfa929ecc00084101a19e3/simapp/app.yaml diff --git a/tests/e2e/auth/client/testutil/cli_test.go b/tests/e2e/auth/client/testutil/cli_test.go index 74a642b584..7b836c7f76 100644 --- a/tests/e2e/auth/client/testutil/cli_test.go +++ b/tests/e2e/auth/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" - testutil2 "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" - "github.com/cosmos/cosmos-sdk/x/auth/testutil" + clientestutil "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 2 - suite.Run(t, testutil2.NewIntegrationTestSuite(cfg)) + suite.Run(t, clientestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/auth/vesting/client/testutil/cli_test.go b/tests/e2e/auth/vesting/client/testutil/cli_test.go index b1e5d88765..7f3e580db1 100644 --- a/tests/e2e/auth/vesting/client/testutil/cli_test.go +++ b/tests/e2e/auth/vesting/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" testutil2 "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/testutil" - "github.com/cosmos/cosmos-sdk/x/auth/vesting/testutil" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, testutil2.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/authz/client/testutil/cli_test.go b/tests/e2e/authz/client/testutil/cli_test.go index ada6786e5a..38c1933e60 100644 --- a/tests/e2e/authz/client/testutil/cli_test.go +++ b/tests/e2e/authz/client/testutil/cli_test.go @@ -10,11 +10,11 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" - "github.com/cosmos/cosmos-sdk/x/authz/client/testutil" + clienttestutil "github.com/cosmos/cosmos-sdk/x/authz/client/testutil" ) func TestIntegrationTestSuite(t *testing.T) { cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 - suite.Run(t, testutil.NewIntegrationTestSuite(cfg)) + suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/evidence/client/testutil/cli_test.go b/tests/e2e/evidence/client/testutil/cli_test.go index bd3956fdd7..d5ea5fa80d 100644 --- a/tests/e2e/evidence/client/testutil/cli_test.go +++ b/tests/e2e/evidence/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" - testutil2 "github.com/cosmos/cosmos-sdk/x/evidence/client/testutil" - "github.com/cosmos/cosmos-sdk/x/evidence/testutil" + clienttestutil "github.com/cosmos/cosmos-sdk/x/evidence/client/testutil" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 - suite.Run(t, testutil2.NewIntegrationTestSuite(cfg)) + suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/feegrant/client/testutil/cli_test.go b/tests/e2e/feegrant/client/testutil/cli_test.go index de33b7fba3..7db09c25e2 100644 --- a/tests/e2e/feegrant/client/testutil/cli_test.go +++ b/tests/e2e/feegrant/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" clienttestutil "github.com/cosmos/cosmos-sdk/x/feegrant/client/testutil" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 3 suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/group/client/testutil/cli_test.go b/tests/e2e/group/client/testutil/cli_test.go index d592f50ef7..fc26405b7c 100644 --- a/tests/e2e/group/client/testutil/cli_test.go +++ b/tests/e2e/group/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" clienttestutil "github.com/cosmos/cosmos-sdk/x/group/client/testutil" - "github.com/cosmos/cosmos-sdk/x/group/testutil" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 2 suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/mint/client/testutil/cli_test.go b/tests/e2e/mint/client/testutil/cli_test.go index 103577875d..513b8f43eb 100644 --- a/tests/e2e/mint/client/testutil/cli_test.go +++ b/tests/e2e/mint/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" clienttestutil "github.com/cosmos/cosmos-sdk/x/mint/client/testutil" - "github.com/cosmos/cosmos-sdk/x/mint/testutil" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/nft/client/testutil/cli_test.go b/tests/e2e/nft/client/testutil/cli_test.go index 68451fb200..df9f045baa 100644 --- a/tests/e2e/nft/client/testutil/cli_test.go +++ b/tests/e2e/nft/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" clienttestutil "github.com/cosmos/cosmos-sdk/x/nft/client/testutil" - "github.com/cosmos/cosmos-sdk/x/nft/testutil" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/params/client/testutil/cli_test.go b/tests/e2e/params/client/testutil/cli_test.go index 41b155354c..2b5170d953 100644 --- a/tests/e2e/params/client/testutil/cli_test.go +++ b/tests/e2e/params/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" clienttestutil "github.com/cosmos/cosmos-sdk/x/params/client/testutil" - "github.com/cosmos/cosmos-sdk/x/params/testutil" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/tests/e2e/slashing/client/testutil/cli_test.go b/tests/e2e/slashing/client/testutil/cli_test.go index f019f5a7fc..3fe7a357e1 100644 --- a/tests/e2e/slashing/client/testutil/cli_test.go +++ b/tests/e2e/slashing/client/testutil/cli_test.go @@ -6,17 +6,15 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" clienttestutil "github.com/cosmos/cosmos-sdk/x/slashing/client/testutil" - "github.com/cosmos/cosmos-sdk/x/slashing/testutil" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) - require.NoError(t, err) + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg)) } diff --git a/x/auth/testutil/app.yaml b/x/auth/testutil/app.yaml deleted file mode 100644 index d8a7275fd5..0000000000 --- a/x/auth/testutil/app.yaml +++ /dev/null @@ -1,55 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: AuthApp - - begin_blockers: [staking, auth, bank, genutil, feegrant, params, vesting] - end_blockers: [staking, auth, bank, genutil, feegrant, params, vesting] - init_genesis: [auth, bank, staking, genutil, feegrant, params, vesting] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - account: multiple permissions account # dummy permissions - permissions: [burner, minter, staking] - - account: random permission - permissions: [random] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: feegrant - config: - "@type": cosmos.feegrant.module.v1.Module - - - name: vesting - config: - "@type": cosmos.vesting.module.v1.Module diff --git a/x/auth/testutil/app_config.go b/x/auth/testutil/app_config.go index f5d521c8dd..9717d6c8d1 100644 --- a/x/auth/testutil/app_config.go +++ b/x/auth/testutil/app_config.go @@ -1,22 +1,114 @@ package testutil import ( - _ "embed" - _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" _ "github.com/cosmos/cosmos-sdk/x/bank" _ "github.com/cosmos/cosmos-sdk/x/feegrant/module" _ "github.com/cosmos/cosmos-sdk/x/genutil" - _ "github.com/cosmos/cosmos-sdk/x/gov" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/feegrant" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" + vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" ) -//go:embed app.yaml -var appConfig []byte +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "AuthApp", + BeginBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + feegrant.ModuleName, + paramstypes.ModuleName, + vestingtypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + feegrant.ModuleName, + paramstypes.ModuleName, + vestingtypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + genutiltypes.ModuleName, + feegrant.ModuleName, + paramstypes.ModuleName, + vestingtypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: "multiple permissions account", Permissions: []string{authtypes.Minter, authtypes.Burner, stakingtypes.ModuleName}}, // dummy permissions + {Account: "random permission", Permissions: []string{"random"}}, + }, + }), + }, + { + Name: vestingtypes.ModuleName, + Config: appconfig.WrapAny(&vestingmodulev1.Module{}), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, -var AppConfig = appconfig.LoadYAML(appConfig) + { + Name: feegrant.ModuleName, + Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), + }, + }, +}) diff --git a/x/auth/vesting/testutil/app.yaml b/x/auth/vesting/testutil/app.yaml deleted file mode 100644 index 0d8e127b81..0000000000 --- a/x/auth/vesting/testutil/app.yaml +++ /dev/null @@ -1,45 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: VestingApp - - begin_blockers: [staking, auth, bank, genutil, params, vesting] - end_blockers: [staking, auth, bank, genutil, params, vesting] - init_genesis: [auth, bank, staking, genutil, params, vesting] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: vesting - config: - "@type": cosmos.vesting.module.v1.Module diff --git a/x/auth/vesting/testutil/app_config.go b/x/auth/vesting/testutil/app_config.go deleted file mode 100644 index 1f6347c2b4..0000000000 --- a/x/auth/vesting/testutil/app_config.go +++ /dev/null @@ -1,19 +0,0 @@ -package testutil - -import ( - _ "embed" - - "cosmossdk.io/core/appconfig" - _ "github.com/cosmos/cosmos-sdk/x/auth" - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" - _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" - _ "github.com/cosmos/cosmos-sdk/x/bank" - _ "github.com/cosmos/cosmos-sdk/x/genutil" - _ "github.com/cosmos/cosmos-sdk/x/params" - _ "github.com/cosmos/cosmos-sdk/x/staking" -) - -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) diff --git a/x/authz/testutil/app.yaml b/x/authz/testutil/app.yaml deleted file mode 100644 index 1cc530e7de..0000000000 --- a/x/authz/testutil/app.yaml +++ /dev/null @@ -1,51 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - app_name: AuthzApp - begin_blockers: [mint, staking, auth, bank, genutil, authz, params] - end_blockers: [mint, staking, auth, bank, genutil, authz, params] - init_genesis: [auth, bank, staking, mint, genutil, authz, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - account: gov - permissions: [burner] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: authz - config: - "@type": cosmos.authz.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: mint - config: - "@type": cosmos.mint.module.v1.Module \ No newline at end of file diff --git a/x/authz/testutil/app_config.go b/x/authz/testutil/app_config.go index 104dbc12a9..0a19fd6eb7 100644 --- a/x/authz/testutil/app_config.go +++ b/x/authz/testutil/app_config.go @@ -1,8 +1,6 @@ package testutil import ( - _ "embed" - _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/authz/module" @@ -14,9 +12,102 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/staking" "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/authz" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + authzmodulev1 "cosmossdk.io/api/cosmos/authz/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + mintmodulev1 "cosmossdk.io/api/cosmos/mint/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "AuthzApp", + BeginBlockers: []string{ + minttypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + authz.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + minttypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + authz.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + minttypes.ModuleName, + genutiltypes.ModuleName, + authz.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: govtypes.ModuleName, Permissions: []string{authtypes.Burner}}, + }, + }), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: authz.ModuleName, + Config: appconfig.WrapAny(&authzmodulev1.Module{}), + }, + { + Name: minttypes.ModuleName, + Config: appconfig.WrapAny(&mintmodulev1.Module{}), + }, + }, +}) diff --git a/x/capability/testutil/app.yaml b/x/capability/testutil/app.yaml deleted file mode 100644 index c0bf0b059a..0000000000 --- a/x/capability/testutil/app.yaml +++ /dev/null @@ -1,46 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: CapabilityApp - - begin_blockers: [capability, staking, auth, bank, genutil, params] - end_blockers: [staking, capability, auth, bank, genutil, params] - init_genesis: [capability, auth, bank, staking, genutil, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: capability - config: - "@type": cosmos.capability.module.v1.Module - seal_keeper: true diff --git a/x/capability/testutil/app_config.go b/x/capability/testutil/app_config.go index 85678ee39e..bdc3954b95 100644 --- a/x/capability/testutil/app_config.go +++ b/x/capability/testutil/app_config.go @@ -1,9 +1,6 @@ package testutil import ( - _ "embed" - - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/bank" @@ -11,9 +8,94 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/genutil" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + capabilitymodulev1 "cosmossdk.io/api/cosmos/capability/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "CapabilityApp", + BeginBlockers: []string{ + capabilitytypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + capabilitytypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + capabilitytypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: capabilitytypes.ModuleName, + Config: appconfig.WrapAny(&capabilitymodulev1.Module{ + SealKeeper: true, + }), + }, + }, +}) diff --git a/x/distribution/testutil/app.yaml b/x/distribution/testutil/app.yaml deleted file mode 100644 index 8d12b17835..0000000000 --- a/x/distribution/testutil/app.yaml +++ /dev/null @@ -1,52 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: DistrApp - - begin_blockers: [mint, distribution, staking, auth, bank, genutil, params] - end_blockers: [staking, auth, bank, distribution, mint, genutil, params] - init_genesis: [auth, bank, distribution, staking, mint, genutil, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: distribution - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: mint - config: - "@type": cosmos.mint.module.v1.Module - - - name: distribution - config: - "@type": cosmos.distribution.module.v1.Module diff --git a/x/distribution/testutil/app_config.go b/x/distribution/testutil/app_config.go index c3d70daa5d..67aff35b9b 100644 --- a/x/distribution/testutil/app_config.go +++ b/x/distribution/testutil/app_config.go @@ -1,9 +1,6 @@ package testutil import ( - _ "embed" - - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/bank" @@ -12,9 +9,103 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/mint" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + mintmodulev1 "cosmossdk.io/api/cosmos/mint/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "DistrApp", + BeginBlockers: []string{ + minttypes.ModuleName, + distrtypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + distrtypes.ModuleName, + minttypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + distrtypes.ModuleName, + stakingtypes.ModuleName, + minttypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: distrtypes.ModuleName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: distrtypes.ModuleName, + Config: appconfig.WrapAny(&distrmodulev1.Module{}), + }, + { + Name: minttypes.ModuleName, + Config: appconfig.WrapAny(&mintmodulev1.Module{}), + }, + }, +}) diff --git a/x/evidence/testutil/app.yaml b/x/evidence/testutil/app.yaml deleted file mode 100644 index ef2f13a968..0000000000 --- a/x/evidence/testutil/app.yaml +++ /dev/null @@ -1,52 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: EvidenceApp - - begin_blockers: [slashing, evidence, staking, auth, bank, genutil, params] - end_blockers: [staking, auth, bank, slashing, genutil, evidence, params] - init_genesis: [auth, bank, staking, slashing, genutil, evidence, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - account: nft - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: slashing - config: - "@type": cosmos.slashing.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: evidence - config: - "@type": cosmos.evidence.module.v1.Module diff --git a/x/evidence/testutil/app_config.go b/x/evidence/testutil/app_config.go index 4347a4ac9f..5c14e66a19 100644 --- a/x/evidence/testutil/app_config.go +++ b/x/evidence/testutil/app_config.go @@ -1,9 +1,6 @@ package testutil import ( - _ "embed" - - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/bank" @@ -12,9 +9,103 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/slashing" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + slashingmodulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "EvidenceApp", + BeginBlockers: []string{ + slashingtypes.ModuleName, + evidencetypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + slashingtypes.ModuleName, + genutiltypes.ModuleName, + evidencetypes.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + slashingtypes.ModuleName, + genutiltypes.ModuleName, + evidencetypes.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: slashingtypes.ModuleName, + Config: appconfig.WrapAny(&slashingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: evidencetypes.ModuleName, + Config: appconfig.WrapAny(&evidencemodulev1.Module{}), + }, + }, +}) diff --git a/x/feegrant/testutil/app.yaml b/x/feegrant/testutil/app.yaml deleted file mode 100644 index 72b6f3e946..0000000000 --- a/x/feegrant/testutil/app.yaml +++ /dev/null @@ -1,51 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: AuthApp - - begin_blockers: [staking, auth, bank, genutil, feegrant, params, vesting] - end_blockers: [staking, auth, bank, genutil, feegrant, params, vesting] - init_genesis: [auth, bank, staking, genutil, feegrant, params, vesting] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: feegrant - config: - "@type": cosmos.feegrant.module.v1.Module - - - name: vesting - config: - "@type": cosmos.vesting.module.v1.Module diff --git a/x/feegrant/testutil/app_config.go b/x/feegrant/testutil/app_config.go index 05a298c79c..e1e2f02111 100644 --- a/x/feegrant/testutil/app_config.go +++ b/x/feegrant/testutil/app_config.go @@ -1,9 +1,6 @@ package testutil import ( - _ "embed" - - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" @@ -13,9 +10,103 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/mint" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/feegrant" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" + vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "FeegrantApp", + BeginBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + feegrant.ModuleName, + paramstypes.ModuleName, + vestingtypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + feegrant.ModuleName, + paramstypes.ModuleName, + vestingtypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + genutiltypes.ModuleName, + feegrant.ModuleName, + paramstypes.ModuleName, + vestingtypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, + { + Name: vestingtypes.ModuleName, + Config: appconfig.WrapAny(&vestingmodulev1.Module{}), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: feegrant.ModuleName, + Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), + }, + }, +}) diff --git a/x/group/testutil/app.yaml b/x/group/testutil/app.yaml deleted file mode 100644 index ae253b397b..0000000000 --- a/x/group/testutil/app.yaml +++ /dev/null @@ -1,51 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: GroupApp - - begin_blockers: [mint, staking, auth, bank, genutil, group, params] - end_blockers: [staking, auth, bank, mint, genutil, group, params] - init_genesis: [auth, bank, staking, mint, genutil, group, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: group - config: - "@type": cosmos.group.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: mint - config: - "@type": cosmos.mint.module.v1.Module diff --git a/x/group/testutil/app_config.go b/x/group/testutil/app_config.go index 56d7c79739..ffba8ac1c6 100644 --- a/x/group/testutil/app_config.go +++ b/x/group/testutil/app_config.go @@ -1,9 +1,10 @@ package testutil import ( - _ "embed" + "time" + + "google.golang.org/protobuf/types/known/durationpb" - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/authz" @@ -13,9 +14,100 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/mint" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/cosmos/cosmos-sdk/x/group" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + groupmodulev1 "cosmossdk.io/api/cosmos/group/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "GroupApp", + BeginBlockers: []string{ + minttypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + group.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + minttypes.ModuleName, + genutiltypes.ModuleName, + group.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + minttypes.ModuleName, + genutiltypes.ModuleName, + group.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: group.ModuleName, + Config: appconfig.WrapAny(&groupmodulev1.Module{ + MaxExecutionPeriod: durationpb.New(time.Second * 1209600), + MaxMetadataLen: 255, + }), + }, + }, +}) diff --git a/x/mint/testutil/app_config.go b/x/mint/testutil/app_config.go index 6f9b581355..47e4ed4de7 100644 --- a/x/mint/testutil/app_config.go +++ b/x/mint/testutil/app_config.go @@ -50,12 +50,6 @@ var AppConfig = appconfig.Compose(&appv1alpha1.Config{ genutiltypes.ModuleName, paramstypes.ModuleName, }, - OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ - { - ModuleName: authtypes.ModuleName, - KvStoreKey: "acc", - }, - }, InitGenesis: []string{ authtypes.ModuleName, banktypes.ModuleName, diff --git a/x/nft/testutil/app_config.go b/x/nft/testutil/app_config.go index b93d562977..467313f8d3 100644 --- a/x/nft/testutil/app_config.go +++ b/x/nft/testutil/app_config.go @@ -55,12 +55,6 @@ var AppConfig = appconfig.Compose(&appv1alpha1.Config{ nft.ModuleName, paramstypes.ModuleName, }, - OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ - { - ModuleName: authtypes.ModuleName, - KvStoreKey: "acc", - }, - }, InitGenesis: []string{ authtypes.ModuleName, banktypes.ModuleName, diff --git a/x/params/testutil/app.yaml b/x/params/testutil/app.yaml deleted file mode 100644 index d623a8ccf1..0000000000 --- a/x/params/testutil/app.yaml +++ /dev/null @@ -1,41 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: ParamsApp - - begin_blockers: [staking, auth, bank, genutil, params] - end_blockers: [staking, auth, bank, genutil, params] - init_genesis: [auth, bank, staking, genutil, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module diff --git a/x/params/testutil/app_config.go b/x/params/testutil/app_config.go index 36fd9c861c..133872dc0a 100644 --- a/x/params/testutil/app_config.go +++ b/x/params/testutil/app_config.go @@ -1,18 +1,89 @@ package testutil import ( - _ "embed" - - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/bank" _ "github.com/cosmos/cosmos-sdk/x/genutil" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig) +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "ParamsApp", + BeginBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + stakingtypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + }, +}) diff --git a/x/slashing/testutil/app.yaml b/x/slashing/testutil/app.yaml deleted file mode 100644 index 723977c856..0000000000 --- a/x/slashing/testutil/app.yaml +++ /dev/null @@ -1,59 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: SlashingApp - - begin_blockers: - [mint, distribution, staking, auth, bank, genutil, slashing, params] - end_blockers: - [staking, auth, bank, genutil, distribution, mint, slashing, params] - init_genesis: - [auth, bank, distribution, staking, mint, slashing, genutil, params] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: distribution - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: slashing - config: - "@type": cosmos.slashing.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: mint - config: - "@type": cosmos.mint.module.v1.Module - - - name: distribution - config: - "@type": cosmos.distribution.module.v1.Module diff --git a/x/slashing/testutil/app_config.go b/x/slashing/testutil/app_config.go index 9a9069894d..9b88072054 100644 --- a/x/slashing/testutil/app_config.go +++ b/x/slashing/testutil/app_config.go @@ -1,9 +1,6 @@ package testutil import ( - _ "embed" - - "cosmossdk.io/core/appconfig" _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/bank" @@ -13,9 +10,113 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/slashing" _ "github.com/cosmos/cosmos-sdk/x/staking" + + "cosmossdk.io/core/appconfig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" + genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + mintmodulev1 "cosmossdk.io/api/cosmos/mint/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + slashingmodulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + txmodulev1 "cosmossdk.io/api/cosmos/tx/module/v1" ) -//go:embed app.yaml -var appConfig []byte +var AppConfig = appconfig.Compose(&appv1alpha1.Config{ + Modules: []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "SlashingApp", + BeginBlockers: []string{ + minttypes.ModuleName, + distrtypes.ModuleName, + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + slashingtypes.ModuleName, + paramstypes.ModuleName, + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + genutiltypes.ModuleName, + distrtypes.ModuleName, + minttypes.ModuleName, + slashingtypes.ModuleName, + paramstypes.ModuleName, + }, + InitGenesis: []string{ + authtypes.ModuleName, + banktypes.ModuleName, + distrtypes.ModuleName, + stakingtypes.ModuleName, + minttypes.ModuleName, + slashingtypes.ModuleName, + genutiltypes.ModuleName, + paramstypes.ModuleName, + }, + }), + }, + { + Name: authtypes.ModuleName, + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: authtypes.FeeCollectorName}, + {Account: distrtypes.ModuleName}, + {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, + {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, + }, + }), + }, -var AppConfig = appconfig.LoadYAML(appConfig) + { + Name: banktypes.ModuleName, + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + }, + { + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: slashingtypes.ModuleName, + Config: appconfig.WrapAny(&slashingmodulev1.Module{}), + }, + { + Name: paramstypes.ModuleName, + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txmodulev1.Module{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: minttypes.ModuleName, + Config: appconfig.WrapAny(&mintmodulev1.Module{}), + }, + { + Name: distrtypes.ModuleName, + Config: appconfig.WrapAny(&distrmodulev1.Module{}), + }, + }, +}) diff --git a/x/upgrade/testutil/app.yaml b/x/upgrade/testutil/app.yaml deleted file mode 100644 index 5bc0bd1dac..0000000000 --- a/x/upgrade/testutil/app.yaml +++ /dev/null @@ -1,51 +0,0 @@ -modules: - - name: runtime - config: - "@type": cosmos.app.runtime.v1alpha1.Module - - app_name: UpgradeApp - - begin_blockers: [upgrade, mint, staking, auth, bank, genutil, params] - end_blockers: [staking, auth, bank, mint, genutil, params, upgrade] - init_genesis: [auth, bank, staking, mint, genutil, params, upgrade] - - - name: auth - config: - "@type": cosmos.auth.module.v1.Module - bech32_prefix: cosmos - module_account_permissions: - - account: fee_collector - - account: mint - permissions: [minter] - - account: bonded_tokens_pool - permissions: [burner, staking] - - account: not_bonded_tokens_pool - permissions: [burner, staking] - - - name: bank - config: - "@type": cosmos.bank.module.v1.Module - - - name: params - config: - "@type": cosmos.params.module.v1.Module - - - name: tx - config: - "@type": cosmos.tx.module.v1.Module - - - name: staking - config: - "@type": cosmos.staking.module.v1.Module - - - name: genutil - config: - "@type": cosmos.genutil.module.v1.Module - - - name: mint - config: - "@type": cosmos.mint.module.v1.Module - - - name: upgrade - config: - "@type": cosmos.upgrade.module.v1.Module diff --git a/x/upgrade/testutil/app_config.go b/x/upgrade/testutil/app_config.go deleted file mode 100644 index fb0517a4f7..0000000000 --- a/x/upgrade/testutil/app_config.go +++ /dev/null @@ -1,20 +0,0 @@ -package testutil - -import ( - _ "embed" - - "cosmossdk.io/core/appconfig" - _ "github.com/cosmos/cosmos-sdk/x/auth" - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" - _ "github.com/cosmos/cosmos-sdk/x/bank" - _ "github.com/cosmos/cosmos-sdk/x/genutil" - _ "github.com/cosmos/cosmos-sdk/x/mint" - _ "github.com/cosmos/cosmos-sdk/x/params" - _ "github.com/cosmos/cosmos-sdk/x/staking" - _ "github.com/cosmos/cosmos-sdk/x/upgrade" -) - -//go:embed app.yaml -var appConfig []byte - -var AppConfig = appconfig.LoadYAML(appConfig)