diff --git a/app/client/cli/cmd_test.go b/app/client/cli/cmd_test.go index f6cba9ec76..2ad8689796 100644 --- a/app/client/cli/cmd_test.go +++ b/app/client/cli/cmd_test.go @@ -27,7 +27,7 @@ func TestInitCmd(t *testing.T) { err = os.Mkdir(nodeHome, 0755) require.NoError(t, err) - rootCmd, _ := cli.NewRootCmd() + rootCmd := cli.NewRootCmd() rootCmd.SetArgs([]string{ "init", "test", diff --git a/app/simulation/app_after_import_test.go b/app/simulation/app_after_import_test.go index 055ed4ca24..8af280ae8c 100644 --- a/app/simulation/app_after_import_test.go +++ b/app/simulation/app_after_import_test.go @@ -8,12 +8,9 @@ import ( "testing" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" regen "github.com/regen-network/regen-ledger/v5/app" @@ -32,17 +29,7 @@ func TestAppAfterImport(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := regen.NewRegenApp( - logger, - db, - nil, - true, - map[int64]bool{}, - regen.DefaultNodeHome, - simcli.FlagPeriodValue, - simtestutil.EmptyAppOptions{}, - fauxMerkleModeOpt, - ) + app := regen.NewRegenApp(logger, db, nil, true, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{}) require.Equal(t, regen.AppName, app.Name()) // run randomized simulation @@ -64,7 +51,7 @@ func TestAppAfterImport(t *testing.T) { fmt.Printf("exporting genesis...\n") - exported, err := app.ExportAppStateAndValidators(true, []string{}) + exported, err := app.ExportAppStateAndValidators(true, []string{}, []string{}) require.NoError(t, err) fmt.Printf("importing genesis...\n") @@ -77,17 +64,7 @@ func TestAppAfterImport(t *testing.T) { require.NoError(t, os.RemoveAll(newDir)) }() - newApp := regen.NewRegenApp( - log.NewNopLogger(), - newDB, - nil, - true, - map[int64]bool{}, - regen.DefaultNodeHome, - simcli.FlagPeriodValue, - simtestutil.EmptyAppOptions{}, - fauxMerkleModeOpt, - ) + newApp := regen.NewRegenApp(logger, db, nil, true, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{}) require.Equal(t, regen.AppName, newApp.Name()) newApp.InitChain(abci.RequestInitChain{ diff --git a/app/simulation/app_determinism_test.go b/app/simulation/app_determinism_test.go index 4e2939a8d0..3573c62b4f 100644 --- a/app/simulation/app_determinism_test.go +++ b/app/simulation/app_determinism_test.go @@ -10,6 +10,7 @@ import ( dbm "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/libs/log" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -46,16 +47,16 @@ func TestAppDeterminism(t *testing.T) { } db := dbm.NewMemDB() + app := regen.NewRegenApp( logger, db, nil, true, - map[int64]bool{}, - regen.DefaultNodeHome, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{}, interBlockCacheOpt(), + baseapp.SetChainID(SimAppChainID), ) require.Equal(t, regen.AppName, app.Name()) @@ -63,7 +64,6 @@ func TestAppDeterminism(t *testing.T) { "running app-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, ) - _, _, err := simulateFromSeed(t, app, config) require.NoError(t, err) diff --git a/app/simulation/app_import_export_test.go b/app/simulation/app_import_export_test.go index eee14a1735..9c2820503b 100644 --- a/app/simulation/app_import_export_test.go +++ b/app/simulation/app_import_export_test.go @@ -28,7 +28,7 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibchost "github.com/cosmos/ibc-go/v7/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" regen "github.com/regen-network/regen-ledger/v5/app" "github.com/regen-network/regen-ledger/x/data/v3" @@ -53,8 +53,6 @@ func TestAppImportExport(t *testing.T) { db, nil, true, - map[int64]bool{}, - regen.DefaultNodeHome, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, @@ -75,7 +73,7 @@ func TestAppImportExport(t *testing.T) { fmt.Printf("exporting genesis...\n") - exported, err := app.ExportAppStateAndValidators(false, []string{}) + exported, err := app.ExportAppStateAndValidators(false, []string{}, []string{}) require.NoError(t, err) fmt.Printf("importing genesis...\n") @@ -93,8 +91,6 @@ func TestAppImportExport(t *testing.T) { newDB, nil, true, - map[int64]bool{}, - regen.DefaultNodeHome, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, @@ -145,7 +141,7 @@ func TestAppImportExport(t *testing.T) { }}, // ibc modules - {app.GetKey(ibchost.StoreKey), newApp.GetKey(ibchost.StoreKey), [][]byte{}}, + {app.GetKey(ibcexported.StoreKey), newApp.GetKey(ibcexported.StoreKey), [][]byte{}}, {app.GetKey(ibctransfertypes.StoreKey), newApp.GetKey(ibctransfertypes.StoreKey), [][]byte{}}, // regen modules diff --git a/app/simulation/app_test.go b/app/simulation/app_test.go index f7b6385fc9..a0725a9d96 100644 --- a/app/simulation/app_test.go +++ b/app/simulation/app_test.go @@ -15,7 +15,7 @@ import ( func TestApp(t *testing.T) { config := simcli.NewConfigFromFlags() - db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "app", "simulation".false, true) + db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "app", "simulation", false, true) if skip { t.Skip("skipping app simulation") } @@ -31,8 +31,6 @@ func TestApp(t *testing.T) { db, nil, true, - map[int64]bool{}, - regen.DefaultNodeHome, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, diff --git a/app/testsuite/app_test.go b/app/testsuite/app_test.go index b189d7c28a..ec0d1bfb79 100644 --- a/app/testsuite/app_test.go +++ b/app/testsuite/app_test.go @@ -4,8 +4,8 @@ import ( "os" "testing" - "github.com/stretchr/testify/require" dbm "github.com/cometbft/cometbft-db" + "github.com/stretchr/testify/require" "github.com/cometbft/cometbft/libs/log" @@ -13,18 +13,15 @@ import ( ) func TestSimAppExportAndBlockedAddrs(t *testing.T) { - encCfg := app.MakeEncodingConfig() db := dbm.NewMemDB() logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) - regenApp := NewAppWithCustomOptions(t, false, SetupOptions{ - Logger: logger, - DB: db, - InvCheckPeriod: 0, - EncConfig: encCfg, - HomePath: app.DefaultNodeHome, - SkipUpgradeHeights: map[int64]bool{}, - AppOpts: EmptyAppOptions{}, - }) + setupOptions := SetupOptions{ + Logger: logger, + DB: db, + InvCheckPeriod: 0, + AppOpts: EmptyAppOptions{}, + } + regenApp := NewAppWithCustomOptions(t, false, setupOptions) for acc := range app.GetMaccPerms() { require.Equal(t, true, regenApp.BankKeeper.BlockedAddr(regenApp.AccountKeeper.GetModuleAddress(acc)), @@ -34,7 +31,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) { regenApp.Commit() // Making a new app object with the db, so that initchain hasn't been called - app2 := app.NewRegenApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, app.DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) - _, err := app2.ExportAppStateAndValidators(false, []string{}) + app2 := app.NewRegenApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, setupOptions.InvCheckPeriod, EmptyAppOptions{}) + _, err := app2.ExportAppStateAndValidators(false, []string{}, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } diff --git a/app/testsuite/modules_test.go b/app/testsuite/modules_test.go index 6621197bd4..b391ead9ac 100644 --- a/app/testsuite/modules_test.go +++ b/app/testsuite/modules_test.go @@ -5,6 +5,7 @@ package testsuite import ( "testing" + "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/stretchr/testify/suite" data "github.com/regen-network/regen-ledger/x/data/v3/client/testsuite" @@ -12,11 +13,11 @@ import ( ) func TestDataIntegration(t *testing.T) { - cfg := DefaultConfig() + cfg := network.DefaultConfig(NewTestNetworkFixture) suite.Run(t, data.NewIntegrationTestSuite(cfg)) } func TestEcocreditIntegration(t *testing.T) { - cfg := DefaultConfig() + cfg := network.DefaultConfig(NewTestNetworkFixture) suite.Run(t, ecocredit.NewIntegrationTestSuite(cfg)) } diff --git a/scripts/generate_cli_docs.go b/scripts/generate_cli_docs.go index b183e9ffd4..3c8a2f72a8 100644 --- a/scripts/generate_cli_docs.go +++ b/scripts/generate_cli_docs.go @@ -10,7 +10,7 @@ import ( // generate documentation for all regen app commands func main() { - rootCmd, _ := cli.NewRootCmd() + rootCmd := cli.NewRootCmd() err := doc.GenMarkdownTree(rootCmd, "commands") if err != nil { log.Fatal(err) diff --git a/scripts/start_dev.sh b/scripts/start_dev.sh new file mode 100755 index 0000000000..bf73b963bd --- /dev/null +++ b/scripts/start_dev.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Set environment variables +export coins="10000000000stake,100000000000samoleans" +export coinsV="5000000000stake" +export REGEN_KEYRING_BACKEND=test +export CHAINID=regen-local +export TMCFG=~/.regen/config/config.toml +export APPCFG=~/.regen/config/app.toml + +# Remove existing regen configuration +rm -rf ~/.regen + +# Add a new key for the validator +./build/regen keys add validator --keyring-backend test + +# Initialize the chain +./build/regen init dev-val --chain-id $CHAINID + +# Add genesis account +./build/regen genesis add-genesis-account validator --keyring-backend test $coins + +# Generate a genesis transaction +./build/regen genesis gentx validator $coinsV --chain-id $CHAINID --keyring-backend test + +# Collect genesis transactions +./build/regen genesis collect-gentxs + +# Validate genesis file +./build/regen genesis validate-genesis + +# Modify configuration files +perl -i -pe 's|timeout_commit = ".*?"|timeout_commit = "2s"|g' $TMCFG +perl -i -pe 's|minimum-gas-prices = ""|minimum-gas-prices = "0stake"|g' $APPCFG + +# Start the node +./build/regen start --api.enable true --grpc.address="0.0.0.0:9090" diff --git a/x/data/server/testsuite/suite_test.go b/x/data/server/testsuite/suite_test.go index a18b17c0fe..7c6ddb07b9 100644 --- a/x/data/server/testsuite/suite_test.go +++ b/x/data/server/testsuite/suite_test.go @@ -5,7 +5,6 @@ import ( "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkmodules "github.com/cosmos/cosmos-sdk/types/module" @@ -33,7 +32,6 @@ func setup(t *testing.T) fixture.Factory { ff := fixture.NewFixtureFactory(t, 8) baseApp := ff.BaseApp() cdc := ff.Codec() - amino := codec.NewLegacyAmino() authtypes.RegisterInterfaces(cdc.InterfaceRegistry()) params.RegisterInterfaces(cdc.InterfaceRegistry()) @@ -52,22 +50,25 @@ func setup(t *testing.T) fixture.Factory { baseApp.MountStore(paramsKey, storetypes.StoreTypeIAVL) baseApp.MountStore(tkey, storetypes.StoreTypeTransient) - authSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, authtypes.ModuleName) - bankSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, banktypes.ModuleName) - maccPerms := map[string][]string{ minttypes.ModuleName: {authtypes.Minter}, } + authority := authtypes.NewModuleAddress("gov") + accountKeeper := authkeeper.NewAccountKeeper( - cdc, authKey, authSubspace, authtypes.ProtoBaseAccount, maccPerms, "regen", + cdc, + authKey, + authtypes.ProtoBaseAccount, + maccPerms, + "regen", + authority.String(), ) - bankKeeper := bankkeeper.NewBaseKeeper( - cdc, bankKey, accountKeeper, bankSubspace, nil, - ) + bankKeeper := bankkeeper.NewBaseKeeper(cdc, bankKey, accountKeeper, nil, authority.String()) dataMod := datamodule.NewModule(dataKey, accountKeeper, bankKeeper) + dataMod.RegisterInterfaces(cdc.InterfaceRegistry()) ff.SetModules([]sdkmodules.AppModule{dataMod}) return ff diff --git a/x/ecocredit/base/simulation/msg_add_class_creator.go b/x/ecocredit/base/simulation/msg_add_class_creator.go index add4b83784..b1ad9598d3 100644 --- a/x/ecocredit/base/simulation/msg_add_class_creator.go +++ b/x/ecocredit/base/simulation/msg_add_class_creator.go @@ -65,10 +65,12 @@ func SimulateMsgAddClassCreator(ak ecocredit.AccountKeeper, bk ecocredit.BankKee } msg := &govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), Messages: []*codectypes.Any{anyMsg}, InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), } txCtx := simulation.OperationInput{ diff --git a/x/ecocredit/base/simulation/msg_add_credit_type.go b/x/ecocredit/base/simulation/msg_add_credit_type.go index f116ff1f04..7c2de56273 100644 --- a/x/ecocredit/base/simulation/msg_add_credit_type.go +++ b/x/ecocredit/base/simulation/msg_add_credit_type.go @@ -76,10 +76,12 @@ func SimulateMsgAddCreditType(ak ecocredit.AccountKeeper, bk ecocredit.BankKeepe } msg := &govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), Messages: []*codectypes.Any{anyMsg}, InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), } txCtx := simulation.OperationInput{ diff --git a/x/ecocredit/base/simulation/msg_remove_class_creator.go b/x/ecocredit/base/simulation/msg_remove_class_creator.go index 2b37e2ec68..4f53f102bd 100644 --- a/x/ecocredit/base/simulation/msg_remove_class_creator.go +++ b/x/ecocredit/base/simulation/msg_remove_class_creator.go @@ -65,10 +65,12 @@ func SimulateMsgRemoveClassCreator(ak ecocredit.AccountKeeper, bk ecocredit.Bank } msg := &govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), Messages: []*codectypes.Any{anyMsg}, InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), } txCtx := simulation.OperationInput{ diff --git a/x/ecocredit/base/simulation/msg_set_class_creator_allowlist.go b/x/ecocredit/base/simulation/msg_set_class_creator_allowlist.go index bcd28d3686..e0c659a288 100644 --- a/x/ecocredit/base/simulation/msg_set_class_creator_allowlist.go +++ b/x/ecocredit/base/simulation/msg_set_class_creator_allowlist.go @@ -56,10 +56,12 @@ func SimulateMsgSetClassCreatorAllowlist(ak ecocredit.AccountKeeper, bk ecocredi } msg := &govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), Messages: []*codectypes.Any{anyMsg}, InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), } txCtx := simulation.OperationInput{ diff --git a/x/ecocredit/base/simulation/msg_update_class_fee.go b/x/ecocredit/base/simulation/msg_update_class_fee.go index 2f9677224a..f577b32e51 100644 --- a/x/ecocredit/base/simulation/msg_update_class_fee.go +++ b/x/ecocredit/base/simulation/msg_update_class_fee.go @@ -61,10 +61,12 @@ func SimulateMsgUpdateClassFee(ak ecocredit.AccountKeeper, bk ecocredit.BankKeep } msg := &govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), Messages: []*codectypes.Any{anyMsg}, InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), } txCtx := simulation.OperationInput{ diff --git a/x/ecocredit/basket/simulation/msg_update_basket_fees.go b/x/ecocredit/basket/simulation/msg_update_basket_fees.go index 7dd5a40496..d72b180a30 100644 --- a/x/ecocredit/basket/simulation/msg_update_basket_fees.go +++ b/x/ecocredit/basket/simulation/msg_update_basket_fees.go @@ -63,6 +63,8 @@ func SimulateMsgUpdateBasketFee(ak ecocredit.AccountKeeper, bk ecocredit.BankKee } proposalMsg := govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), diff --git a/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go b/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go index 9ec3fa64d1..8baec6563e 100644 --- a/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go +++ b/x/ecocredit/marketplace/keeper/msg_buy_direct_test.go @@ -9,7 +9,7 @@ import ( "github.com/cockroachdb/apd/v3" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/jsonpb" - gogoproto "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/regen-network/gocuke" @@ -561,14 +561,14 @@ func (s *buyDirectSuite) ExpectEventBuyDirectWithProperties(a gocuke.DocString) s.expectEvent(&event) } -func (s *buyDirectSuite) expectEvent(expected gogoproto.Message) { +func (s *buyDirectSuite) expectEvent(expected proto.Message) { sdkEvent, found := testutil.GetEvent(expected, s.sdkCtx.EventManager().Events()) require.True(s.t, found) foundEvt, err := sdk.ParseTypedEvent(abci.Event(sdkEvent)) require.NoError(s.t, err) - msgType, err := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(gogoproto.MessageName(expected))) + msgType, err := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(proto.MessageName(expected))) require.NoError(s.t, err) evt := msgType.New().Interface() evt2 := msgType.New().Interface() diff --git a/x/ecocredit/marketplace/simulation/msg_add_allowed_denom.go b/x/ecocredit/marketplace/simulation/msg_add_allowed_denom.go index ab84eccfa8..81d7951b9f 100644 --- a/x/ecocredit/marketplace/simulation/msg_add_allowed_denom.go +++ b/x/ecocredit/marketplace/simulation/msg_add_allowed_denom.go @@ -69,6 +69,8 @@ func SimulateMsgAddAllowedDenom(ak ecocredit.AccountKeeper, bk ecocredit.BankKee } proposalMsg := govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), diff --git a/x/ecocredit/marketplace/simulation/msg_remove_allowed_denom.go b/x/ecocredit/marketplace/simulation/msg_remove_allowed_denom.go index b2520ef989..a535107748 100644 --- a/x/ecocredit/marketplace/simulation/msg_remove_allowed_denom.go +++ b/x/ecocredit/marketplace/simulation/msg_remove_allowed_denom.go @@ -65,6 +65,8 @@ func SimulateMsgRemoveAllowedDenom(ak ecocredit.AccountKeeper, bk ecocredit.Bank } proposalMsg := govtypes.MsgSubmitProposal{ + Title: simtypes.RandStringOfLength(r, 10), + Summary: simtypes.RandStringOfLength(r, 10), InitialDeposit: deposit, Proposer: proposerAddr, Metadata: simtypes.RandStringOfLength(r, 10), diff --git a/x/ecocredit/server/server_test.go b/x/ecocredit/server/server_test.go index 5027ef0b92..ab3cbe8683 100644 --- a/x/ecocredit/server/server_test.go +++ b/x/ecocredit/server/server_test.go @@ -62,8 +62,6 @@ func setup(t *testing.T) (fixture.Factory, bankkeeper.BaseKeeper, authkeeper.Acc baseApp.MountStore(paramsKey, storetypes.StoreTypeIAVL) baseApp.MountStore(tkey, storetypes.StoreTypeTransient) - authSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, authtypes.ModuleName) - bankSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, banktypes.ModuleName) ecocreditSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, ecocredit.ModuleName) maccPerms := map[string][]string{ @@ -73,16 +71,20 @@ func setup(t *testing.T) (fixture.Factory, bankkeeper.BaseKeeper, authkeeper.Acc marketplace.FeePoolName: {authtypes.Burner}, } + authority := authtypes.NewModuleAddress(govtypes.ModuleName) accountKeeper := authkeeper.NewAccountKeeper( - cdc, authKey, authSubspace, authtypes.ProtoBaseAccount, maccPerms, "regen", + cdc, + authKey, + authtypes.ProtoBaseAccount, + maccPerms, + "regen", + authority.String(), ) - bankKeeper := bankkeeper.NewBaseKeeper( - cdc, bankKey, accountKeeper, bankSubspace, nil, - ) + bankKeeper := bankkeeper.NewBaseKeeper(cdc, bankKey, accountKeeper, nil, authority.String()) - authority := authtypes.NewModuleAddress(govtypes.ModuleName) ecocreditModule := module.NewModule(ecoKey, authority, accountKeeper, bankKeeper, ecocreditSubspace, nil) + ecocreditModule.RegisterInterfaces(cdc.InterfaceRegistry()) ff.SetModules([]sdkmodule.AppModule{ecocreditModule}) return ff, bankKeeper, accountKeeper diff --git a/x/ecocredit/server/tests/utils.go b/x/ecocredit/server/tests/utils.go index 3d5c37baa7..a98675114f 100644 --- a/x/ecocredit/server/tests/utils.go +++ b/x/ecocredit/server/tests/utils.go @@ -72,5 +72,7 @@ func NewEcocreditModule(ff fixture.Factory) *ecocredit.Module { bankKeeper := bankkeeper.NewBaseKeeper(cdc, bankKey, accountKeeper, nil, govAddr) _, _, addr := testdata.KeyTestPubAddr() - return ecocredit.NewModule(ecocreditKey, addr, accountKeeper, bankKeeper, ecocreditSubspace, nil) + ecocreditModule := ecocredit.NewModule(ecocreditKey, addr, accountKeeper, bankKeeper, ecocreditSubspace, nil) + ecocreditModule.RegisterInterfaces(cdc.InterfaceRegistry()) + return ecocreditModule }