disable modules

This commit is contained in:
Solovyov1796 2024-04-24 11:48:54 +08:00
parent 8208e5fd97
commit 7e7049c289
3 changed files with 396 additions and 410 deletions

View File

@ -107,60 +107,34 @@ import (
"github.com/kava-labs/kava/app/ante" "github.com/kava-labs/kava/app/ante"
kavaparams "github.com/kava-labs/kava/app/params" kavaparams "github.com/kava-labs/kava/app/params"
"github.com/kava-labs/kava/x/auction"
auctionkeeper "github.com/kava-labs/kava/x/auction/keeper" // "github.com/kava-labs/kava/x/auction"
auctiontypes "github.com/kava-labs/kava/x/auction/types" // "github.com/kava-labs/kava/x/bep3"
// bep3keeper "github.com/kava-labs/kava/x/bep3/keeper"
// bep3types "github.com/kava-labs/kava/x/bep3/types"
// "github.com/kava-labs/kava/x/cdp"
// "github.com/kava-labs/kava/x/committee"
// "github.com/kava-labs/kava/x/community"
// "github.com/kava-labs/kava/x/earn"
// "github.com/kava-labs/kava/x/hard"
// "github.com/kava-labs/kava/x/incentive"
// "github.com/kava-labs/kava/x/issuance"
// "github.com/kava-labs/kava/x/kavadist"
// "github.com/kava-labs/kava/x/liquid"
// "github.com/kava-labs/kava/x/pricefeed"
// "github.com/kava-labs/kava/x/router"
// "github.com/kava-labs/kava/x/savings"
// "github.com/kava-labs/kava/x/swap"
"github.com/kava-labs/kava/x/bep3" "github.com/kava-labs/kava/x/bep3"
bep3keeper "github.com/kava-labs/kava/x/bep3/keeper"
bep3types "github.com/kava-labs/kava/x/bep3/types"
"github.com/kava-labs/kava/x/cdp"
cdpkeeper "github.com/kava-labs/kava/x/cdp/keeper"
cdptypes "github.com/kava-labs/kava/x/cdp/types"
"github.com/kava-labs/kava/x/committee"
committeeclient "github.com/kava-labs/kava/x/committee/client"
committeekeeper "github.com/kava-labs/kava/x/committee/keeper"
committeetypes "github.com/kava-labs/kava/x/committee/types"
"github.com/kava-labs/kava/x/community"
communityclient "github.com/kava-labs/kava/x/community/client"
communitykeeper "github.com/kava-labs/kava/x/community/keeper"
communitytypes "github.com/kava-labs/kava/x/community/types"
earn "github.com/kava-labs/kava/x/earn"
earnclient "github.com/kava-labs/kava/x/earn/client"
earnkeeper "github.com/kava-labs/kava/x/earn/keeper"
earntypes "github.com/kava-labs/kava/x/earn/types"
evmutil "github.com/kava-labs/kava/x/evmutil" evmutil "github.com/kava-labs/kava/x/evmutil"
evmutilkeeper "github.com/kava-labs/kava/x/evmutil/keeper" evmutilkeeper "github.com/kava-labs/kava/x/evmutil/keeper"
evmutiltypes "github.com/kava-labs/kava/x/evmutil/types" evmutiltypes "github.com/kava-labs/kava/x/evmutil/types"
"github.com/kava-labs/kava/x/hard"
hardkeeper "github.com/kava-labs/kava/x/hard/keeper" // metrics "github.com/kava-labs/kava/x/metrics"
hardtypes "github.com/kava-labs/kava/x/hard/types" // metricstypes "github.com/kava-labs/kava/x/metrics/types"
"github.com/kava-labs/kava/x/incentive"
incentivekeeper "github.com/kava-labs/kava/x/incentive/keeper"
incentivetypes "github.com/kava-labs/kava/x/incentive/types"
issuance "github.com/kava-labs/kava/x/issuance"
issuancekeeper "github.com/kava-labs/kava/x/issuance/keeper"
issuancetypes "github.com/kava-labs/kava/x/issuance/types"
"github.com/kava-labs/kava/x/kavadist"
kavadistclient "github.com/kava-labs/kava/x/kavadist/client"
kavadistkeeper "github.com/kava-labs/kava/x/kavadist/keeper"
kavadisttypes "github.com/kava-labs/kava/x/kavadist/types"
"github.com/kava-labs/kava/x/liquid"
liquidkeeper "github.com/kava-labs/kava/x/liquid/keeper"
liquidtypes "github.com/kava-labs/kava/x/liquid/types"
metrics "github.com/kava-labs/kava/x/metrics"
metricstypes "github.com/kava-labs/kava/x/metrics/types"
pricefeed "github.com/kava-labs/kava/x/pricefeed"
pricefeedkeeper "github.com/kava-labs/kava/x/pricefeed/keeper"
pricefeedtypes "github.com/kava-labs/kava/x/pricefeed/types"
"github.com/kava-labs/kava/x/router"
routerkeeper "github.com/kava-labs/kava/x/router/keeper"
routertypes "github.com/kava-labs/kava/x/router/types"
savings "github.com/kava-labs/kava/x/savings"
savingskeeper "github.com/kava-labs/kava/x/savings/keeper"
savingstypes "github.com/kava-labs/kava/x/savings/types"
"github.com/kava-labs/kava/x/swap"
swapkeeper "github.com/kava-labs/kava/x/swap/keeper"
swaptypes "github.com/kava-labs/kava/x/swap/types"
validatorvesting "github.com/kava-labs/kava/x/validator-vesting" validatorvesting "github.com/kava-labs/kava/x/validator-vesting"
validatorvestingrest "github.com/kava-labs/kava/x/validator-vesting/client/rest" validatorvestingrest "github.com/kava-labs/kava/x/validator-vesting/client/rest"
validatorvestingtypes "github.com/kava-labs/kava/x/validator-vesting/types" validatorvestingtypes "github.com/kava-labs/kava/x/validator-vesting/types"
@ -189,12 +163,12 @@ var (
upgradeclient.LegacyCancelProposalHandler, upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler, ibcclientclient.UpgradeProposalHandler,
kavadistclient.ProposalHandler, // kavadistclient.ProposalHandler,
committeeclient.ProposalHandler, // committeeclient.ProposalHandler,
earnclient.DepositProposalHandler, // earnclient.DepositProposalHandler,
earnclient.WithdrawProposalHandler, // earnclient.WithdrawProposalHandler,
communityclient.LendDepositProposalHandler, // communityclient.LendDepositProposalHandler,
communityclient.LendWithdrawProposalHandler, // communityclient.LendWithdrawProposalHandler,
}), }),
params.AppModuleBasic{}, params.AppModuleBasic{},
crisis.AppModuleBasic{}, crisis.AppModuleBasic{},
@ -210,25 +184,25 @@ var (
vesting.AppModuleBasic{}, vesting.AppModuleBasic{},
evm.AppModuleBasic{}, evm.AppModuleBasic{},
feemarket.AppModuleBasic{}, feemarket.AppModuleBasic{},
kavadist.AppModuleBasic{}, // kavadist.AppModuleBasic{},
auction.AppModuleBasic{}, // auction.AppModuleBasic{},
issuance.AppModuleBasic{}, // issuance.AppModuleBasic{},
bep3.AppModuleBasic{}, bep3.AppModuleBasic{},
pricefeed.AppModuleBasic{}, // pricefeed.AppModuleBasic{},
swap.AppModuleBasic{}, // swap.AppModuleBasic{},
cdp.AppModuleBasic{}, // cdp.AppModuleBasic{},
hard.AppModuleBasic{}, // hard.AppModuleBasic{},
committee.AppModuleBasic{}, // committee.AppModuleBasic{},
incentive.AppModuleBasic{}, // incentive.AppModuleBasic{},
savings.AppModuleBasic{}, // savings.AppModuleBasic{},
validatorvesting.AppModuleBasic{}, validatorvesting.AppModuleBasic{},
evmutil.AppModuleBasic{}, evmutil.AppModuleBasic{},
liquid.AppModuleBasic{}, // liquid.AppModuleBasic{},
earn.AppModuleBasic{}, // earn.AppModuleBasic{},
router.AppModuleBasic{}, // router.AppModuleBasic{},
mint.AppModuleBasic{}, mint.AppModuleBasic{},
community.AppModuleBasic{}, // community.AppModuleBasic{},
metrics.AppModuleBasic{}, // metrics.AppModuleBasic{},
consensus.AppModuleBasic{}, consensus.AppModuleBasic{},
) )
@ -244,20 +218,20 @@ var (
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, // used for secure addition and subtraction of balance using module account evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, // used for secure addition and subtraction of balance using module account
evmutiltypes.ModuleName: {authtypes.Minter, authtypes.Burner}, evmutiltypes.ModuleName: {authtypes.Minter, authtypes.Burner},
kavadisttypes.KavaDistMacc: {authtypes.Minter}, // kavadisttypes.KavaDistMacc: {authtypes.Minter},
auctiontypes.ModuleName: nil, // auctiontypes.ModuleName: nil,
issuancetypes.ModuleAccountName: {authtypes.Minter, authtypes.Burner}, // issuancetypes.ModuleAccountName: {authtypes.Minter, authtypes.Burner},
bep3types.ModuleName: {authtypes.Burner, authtypes.Minter}, // bep3types.ModuleName: {authtypes.Burner, authtypes.Minter},
swaptypes.ModuleName: nil, // swaptypes.ModuleName: nil,
cdptypes.ModuleName: {authtypes.Minter, authtypes.Burner}, // cdptypes.ModuleName: {authtypes.Minter, authtypes.Burner},
cdptypes.LiquidatorMacc: {authtypes.Minter, authtypes.Burner}, // cdptypes.LiquidatorMacc: {authtypes.Minter, authtypes.Burner},
hardtypes.ModuleAccountName: {authtypes.Minter}, // hardtypes.ModuleAccountName: {authtypes.Minter},
savingstypes.ModuleAccountName: nil, // savingstypes.ModuleAccountName: nil,
liquidtypes.ModuleAccountName: {authtypes.Minter, authtypes.Burner}, // liquidtypes.ModuleAccountName: {authtypes.Minter, authtypes.Burner},
earntypes.ModuleAccountName: nil, // earntypes.ModuleAccountName: nil,
kavadisttypes.FundModuleAccount: nil, // kavadisttypes.FundModuleAccount: nil,
minttypes.ModuleName: {authtypes.Minter}, minttypes.ModuleName: {authtypes.Minter},
communitytypes.ModuleName: nil, // communitytypes.ModuleName: nil,
} }
) )
@ -276,7 +250,7 @@ type Options struct {
MempoolAuthAddresses []sdk.AccAddress MempoolAuthAddresses []sdk.AccAddress
EVMTrace string EVMTrace string
EVMMaxGasWanted uint64 EVMMaxGasWanted uint64
TelemetryOptions metricstypes.TelemetryOptions // TelemetryOptions metricstypes.TelemetryOptions
} }
// DefaultOptions is a sensible default Options value. // DefaultOptions is a sensible default Options value.
@ -318,22 +292,22 @@ type App struct {
upgradeKeeper upgradekeeper.Keeper upgradeKeeper upgradekeeper.Keeper
evidenceKeeper evidencekeeper.Keeper evidenceKeeper evidencekeeper.Keeper
transferKeeper ibctransferkeeper.Keeper transferKeeper ibctransferkeeper.Keeper
kavadistKeeper kavadistkeeper.Keeper // kavadistKeeper kavadistkeeper.Keeper
auctionKeeper auctionkeeper.Keeper // auctionKeeper auctionkeeper.Keeper
issuanceKeeper issuancekeeper.Keeper // issuanceKeeper issuancekeeper.Keeper
bep3Keeper bep3keeper.Keeper // bep3Keeper bep3keeper.Keeper
pricefeedKeeper pricefeedkeeper.Keeper // pricefeedKeeper pricefeedkeeper.Keeper
swapKeeper swapkeeper.Keeper // swapKeeper swapkeeper.Keeper
cdpKeeper cdpkeeper.Keeper // cdpKeeper cdpkeeper.Keeper
hardKeeper hardkeeper.Keeper // hardKeeper hardkeeper.Keeper
committeeKeeper committeekeeper.Keeper // committeeKeeper committeekeeper.Keeper
incentiveKeeper incentivekeeper.Keeper // incentiveKeeper incentivekeeper.Keeper
savingsKeeper savingskeeper.Keeper // savingsKeeper savingskeeper.Keeper
liquidKeeper liquidkeeper.Keeper // liquidKeeper liquidkeeper.Keeper
earnKeeper earnkeeper.Keeper // earnKeeper earnkeeper.Keeper
routerKeeper routerkeeper.Keeper // routerKeeper routerkeeper.Keeper
mintKeeper mintkeeper.Keeper mintKeeper mintkeeper.Keeper
communityKeeper communitykeeper.Keeper // communityKeeper communitykeeper.Keeper
consensusParamsKeeper consensusparamkeeper.Keeper consensusParamsKeeper consensusparamkeeper.Keeper
// make scoped keepers public for test purposes // make scoped keepers public for test purposes
@ -379,17 +353,39 @@ func NewApp(
bApp.SetInterfaceRegistry(interfaceRegistry) bApp.SetInterfaceRegistry(interfaceRegistry)
keys := sdk.NewKVStoreKeys( keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, authtypes.StoreKey,
distrtypes.StoreKey, slashingtypes.StoreKey, packetforwardtypes.StoreKey, banktypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, stakingtypes.StoreKey,
upgradetypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, distrtypes.StoreKey,
evmtypes.StoreKey, feemarkettypes.StoreKey, authzkeeper.StoreKey, slashingtypes.StoreKey,
capabilitytypes.StoreKey, kavadisttypes.StoreKey, auctiontypes.StoreKey, packetforwardtypes.StoreKey,
issuancetypes.StoreKey, bep3types.StoreKey, pricefeedtypes.StoreKey, govtypes.StoreKey,
swaptypes.StoreKey, cdptypes.StoreKey, hardtypes.StoreKey, communitytypes.StoreKey, paramstypes.StoreKey,
committeetypes.StoreKey, incentivetypes.StoreKey, evmutiltypes.StoreKey, ibcexported.StoreKey,
savingstypes.StoreKey, earntypes.StoreKey, minttypes.StoreKey, upgradetypes.StoreKey,
consensusparamtypes.StoreKey, crisistypes.StoreKey, evidencetypes.StoreKey,
ibctransfertypes.StoreKey,
evmtypes.StoreKey,
feemarkettypes.StoreKey,
authzkeeper.StoreKey,
capabilitytypes.StoreKey,
// kavadisttypes.StoreKey,
// auctiontypes.StoreKey,
// issuancetypes.StoreKey,
// bep3types.StoreKey,
// pricefeedtypes.StoreKey,
// swaptypes.StoreKey,
// cdptypes.StoreKey,
// hardtypes.StoreKey,
// communitytypes.StoreKey,
// committeetypes.StoreKey,
// incentivetypes.StoreKey,
evmutiltypes.StoreKey,
// savingstypes.StoreKey,
// earntypes.StoreKey,
minttypes.StoreKey,
consensusparamtypes.StoreKey,
crisistypes.StoreKey,
) )
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
@ -422,23 +418,23 @@ func NewApp(
slashingSubspace := app.paramsKeeper.Subspace(slashingtypes.ModuleName) slashingSubspace := app.paramsKeeper.Subspace(slashingtypes.ModuleName)
govSubspace := app.paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) govSubspace := app.paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable())
crisisSubspace := app.paramsKeeper.Subspace(crisistypes.ModuleName) crisisSubspace := app.paramsKeeper.Subspace(crisistypes.ModuleName)
kavadistSubspace := app.paramsKeeper.Subspace(kavadisttypes.ModuleName) // kavadistSubspace := app.paramsKeeper.Subspace(kavadisttypes.ModuleName)
auctionSubspace := app.paramsKeeper.Subspace(auctiontypes.ModuleName) // auctionSubspace := app.paramsKeeper.Subspace(auctiontypes.ModuleName)
issuanceSubspace := app.paramsKeeper.Subspace(issuancetypes.ModuleName) // issuanceSubspace := app.paramsKeeper.Subspace(issuancetypes.ModuleName)
bep3Subspace := app.paramsKeeper.Subspace(bep3types.ModuleName) // bep3Subspace := app.paramsKeeper.Subspace(bep3types.ModuleName)
pricefeedSubspace := app.paramsKeeper.Subspace(pricefeedtypes.ModuleName) // pricefeedSubspace := app.paramsKeeper.Subspace(pricefeedtypes.ModuleName)
swapSubspace := app.paramsKeeper.Subspace(swaptypes.ModuleName) // swapSubspace := app.paramsKeeper.Subspace(swaptypes.ModuleName)
cdpSubspace := app.paramsKeeper.Subspace(cdptypes.ModuleName) // cdpSubspace := app.paramsKeeper.Subspace(cdptypes.ModuleName)
hardSubspace := app.paramsKeeper.Subspace(hardtypes.ModuleName) // hardSubspace := app.paramsKeeper.Subspace(hardtypes.ModuleName)
incentiveSubspace := app.paramsKeeper.Subspace(incentivetypes.ModuleName) // incentiveSubspace := app.paramsKeeper.Subspace(incentivetypes.ModuleName)
savingsSubspace := app.paramsKeeper.Subspace(savingstypes.ModuleName) // savingsSubspace := app.paramsKeeper.Subspace(savingstypes.ModuleName)
ibcSubspace := app.paramsKeeper.Subspace(ibcexported.ModuleName) ibcSubspace := app.paramsKeeper.Subspace(ibcexported.ModuleName)
ibctransferSubspace := app.paramsKeeper.Subspace(ibctransfertypes.ModuleName) ibctransferSubspace := app.paramsKeeper.Subspace(ibctransfertypes.ModuleName)
packetforwardSubspace := app.paramsKeeper.Subspace(packetforwardtypes.ModuleName).WithKeyTable(packetforwardtypes.ParamKeyTable()) packetforwardSubspace := app.paramsKeeper.Subspace(packetforwardtypes.ModuleName).WithKeyTable(packetforwardtypes.ParamKeyTable())
feemarketSubspace := app.paramsKeeper.Subspace(feemarkettypes.ModuleName) feemarketSubspace := app.paramsKeeper.Subspace(feemarkettypes.ModuleName)
evmSubspace := app.paramsKeeper.Subspace(evmtypes.ModuleName) evmSubspace := app.paramsKeeper.Subspace(evmtypes.ModuleName)
evmutilSubspace := app.paramsKeeper.Subspace(evmutiltypes.ModuleName) evmutilSubspace := app.paramsKeeper.Subspace(evmutiltypes.ModuleName)
earnSubspace := app.paramsKeeper.Subspace(earntypes.ModuleName) // earnSubspace := app.paramsKeeper.Subspace(earntypes.ModuleName)
mintSubspace := app.paramsKeeper.Subspace(minttypes.ModuleName) mintSubspace := app.paramsKeeper.Subspace(minttypes.ModuleName)
// set the BaseApp's parameter store // set the BaseApp's parameter store
@ -602,95 +598,95 @@ func NewApp(
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
app.ibcKeeper.SetRouter(ibcRouter) app.ibcKeeper.SetRouter(ibcRouter)
app.auctionKeeper = auctionkeeper.NewKeeper( // app.auctionKeeper = auctionkeeper.NewKeeper(
appCodec, // appCodec,
keys[auctiontypes.StoreKey], // keys[auctiontypes.StoreKey],
auctionSubspace, // auctionSubspace,
app.bankKeeper, // app.bankKeeper,
app.accountKeeper, // app.accountKeeper,
) // )
app.issuanceKeeper = issuancekeeper.NewKeeper( // app.issuanceKeeper = issuancekeeper.NewKeeper(
appCodec, // appCodec,
keys[issuancetypes.StoreKey], // keys[issuancetypes.StoreKey],
issuanceSubspace, // issuanceSubspace,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
) // )
app.bep3Keeper = bep3keeper.NewKeeper( // app.bep3Keeper = bep3keeper.NewKeeper(
appCodec, // appCodec,
keys[bep3types.StoreKey], // keys[bep3types.StoreKey],
app.bankKeeper, // app.bankKeeper,
app.accountKeeper, // app.accountKeeper,
bep3Subspace, // bep3Subspace,
app.ModuleAccountAddrs(), // app.ModuleAccountAddrs(),
) // )
app.pricefeedKeeper = pricefeedkeeper.NewKeeper( // app.pricefeedKeeper = pricefeedkeeper.NewKeeper(
appCodec, // appCodec,
keys[pricefeedtypes.StoreKey], // keys[pricefeedtypes.StoreKey],
pricefeedSubspace, // pricefeedSubspace,
) // )
swapKeeper := swapkeeper.NewKeeper( // swapKeeper := swapkeeper.NewKeeper(
appCodec, // appCodec,
keys[swaptypes.StoreKey], // keys[swaptypes.StoreKey],
swapSubspace, // swapSubspace,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
) // )
cdpKeeper := cdpkeeper.NewKeeper( // cdpKeeper := cdpkeeper.NewKeeper(
appCodec, // appCodec,
keys[cdptypes.StoreKey], // keys[cdptypes.StoreKey],
cdpSubspace, // cdpSubspace,
app.pricefeedKeeper, // app.pricefeedKeeper,
app.auctionKeeper, // app.auctionKeeper,
app.bankKeeper, // app.bankKeeper,
app.accountKeeper, // app.accountKeeper,
mAccPerms, // mAccPerms,
) // )
hardKeeper := hardkeeper.NewKeeper( // hardKeeper := hardkeeper.NewKeeper(
appCodec, // appCodec,
keys[hardtypes.StoreKey], // keys[hardtypes.StoreKey],
hardSubspace, // hardSubspace,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
app.pricefeedKeeper, // app.pricefeedKeeper,
app.auctionKeeper, // app.auctionKeeper,
) // )
app.liquidKeeper = liquidkeeper.NewDefaultKeeper( // app.liquidKeeper = liquidkeeper.NewDefaultKeeper(
appCodec, // appCodec,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
app.stakingKeeper, // app.stakingKeeper,
&app.distrKeeper, // &app.distrKeeper,
) // )
savingsKeeper := savingskeeper.NewKeeper( // savingsKeeper := savingskeeper.NewKeeper(
appCodec, // appCodec,
keys[savingstypes.StoreKey], // keys[savingstypes.StoreKey],
savingsSubspace, // savingsSubspace,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
app.liquidKeeper, // app.liquidKeeper,
) // )
earnKeeper := earnkeeper.NewKeeper( // earnKeeper := earnkeeper.NewKeeper(
appCodec, // appCodec,
keys[earntypes.StoreKey], // keys[earntypes.StoreKey],
earnSubspace, // earnSubspace,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
&app.liquidKeeper, // &app.liquidKeeper,
&hardKeeper, // &hardKeeper,
&savingsKeeper, // &savingsKeeper,
&app.distrKeeper, // &app.distrKeeper,
) // )
app.kavadistKeeper = kavadistkeeper.NewKeeper( // app.kavadistKeeper = kavadistkeeper.NewKeeper(
appCodec, // appCodec,
keys[kavadisttypes.StoreKey], // keys[kavadisttypes.StoreKey],
kavadistSubspace, // kavadistSubspace,
app.bankKeeper, // app.bankKeeper,
app.accountKeeper, // app.accountKeeper,
app.distrKeeper, // app.distrKeeper,
app.loadBlockedMaccAddrs(), // app.loadBlockedMaccAddrs(),
) // )
app.mintKeeper = mintkeeper.NewKeeper( app.mintKeeper = mintkeeper.NewKeeper(
appCodec, appCodec,
@ -703,74 +699,74 @@ func NewApp(
) )
// x/community's deposit/withdraw to lend proposals depend on hard keeper. // x/community's deposit/withdraw to lend proposals depend on hard keeper.
app.communityKeeper = communitykeeper.NewKeeper( // app.communityKeeper = communitykeeper.NewKeeper(
appCodec, // appCodec,
keys[communitytypes.StoreKey], // keys[communitytypes.StoreKey],
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
&cdpKeeper, // &cdpKeeper,
app.distrKeeper, // app.distrKeeper,
&hardKeeper, // &hardKeeper,
&app.mintKeeper, // &app.mintKeeper,
&app.kavadistKeeper, // &app.kavadistKeeper,
app.stakingKeeper, // app.stakingKeeper,
govAuthAddr, // govAuthAddr,
) // )
app.incentiveKeeper = incentivekeeper.NewKeeper( // app.incentiveKeeper = incentivekeeper.NewKeeper(
appCodec, // appCodec,
keys[incentivetypes.StoreKey], // keys[incentivetypes.StoreKey],
incentiveSubspace, // incentiveSubspace,
app.bankKeeper, // app.bankKeeper,
&cdpKeeper, // &cdpKeeper,
&hardKeeper, // &hardKeeper,
app.accountKeeper, // app.accountKeeper,
app.stakingKeeper, // app.stakingKeeper,
&swapKeeper, // &swapKeeper,
&savingsKeeper, // &savingsKeeper,
&app.liquidKeeper, // &app.liquidKeeper,
&earnKeeper, // &earnKeeper,
app.mintKeeper, // app.mintKeeper,
app.distrKeeper, // app.distrKeeper,
app.pricefeedKeeper, // app.pricefeedKeeper,
) // )
app.routerKeeper = routerkeeper.NewKeeper( // app.routerKeeper = routerkeeper.NewKeeper(
&app.earnKeeper, // &app.earnKeeper,
app.liquidKeeper, // app.liquidKeeper,
app.stakingKeeper, // app.stakingKeeper,
) // )
// create committee keeper with router // create committee keeper with router
committeeGovRouter := govv1beta1.NewRouter() // committeeGovRouter := govv1beta1.NewRouter()
committeeGovRouter. // committeeGovRouter.
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). // AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(communitytypes.RouterKey, community.NewCommunityPoolProposalHandler(app.communityKeeper)). // AddRoute(communitytypes.RouterKey, community.NewCommunityPoolProposalHandler(app.communityKeeper)).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). // AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.upgradeKeeper)) // AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.upgradeKeeper))
// Note: the committee proposal handler is not registered on the committee router. This means committees cannot create or update other committees. // // Note: the committee proposal handler is not registered on the committee router. This means committees cannot create or update other committees.
// Adding the committee proposal handler to the router is possible but awkward as the handler depends on the keeper which depends on the handler. // // Adding the committee proposal handler to the router is possible but awkward as the handler depends on the keeper which depends on the handler.
app.committeeKeeper = committeekeeper.NewKeeper( // app.committeeKeeper = committeekeeper.NewKeeper(
appCodec, // appCodec,
keys[committeetypes.StoreKey], // keys[committeetypes.StoreKey],
committeeGovRouter, // committeeGovRouter,
app.paramsKeeper, // app.paramsKeeper,
app.accountKeeper, // app.accountKeeper,
app.bankKeeper, // app.bankKeeper,
) // )
// register the staking hooks // register the staking hooks
app.stakingKeeper.SetHooks( app.stakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks( stakingtypes.NewMultiStakingHooks(
app.distrKeeper.Hooks(), app.distrKeeper.Hooks(),
app.slashingKeeper.Hooks(), app.slashingKeeper.Hooks(),
app.incentiveKeeper.Hooks(), // app.incentiveKeeper.Hooks(),
)) ))
app.swapKeeper = *swapKeeper.SetHooks(app.incentiveKeeper.Hooks()) // app.swapKeeper = *swapKeeper.SetHooks(app.incentiveKeeper.Hooks())
app.cdpKeeper = *cdpKeeper.SetHooks(cdptypes.NewMultiCDPHooks(app.incentiveKeeper.Hooks())) // app.cdpKeeper = *cdpKeeper.SetHooks(cdptypes.NewMultiCDPHooks(app.incentiveKeeper.Hooks()))
app.hardKeeper = *hardKeeper.SetHooks(hardtypes.NewMultiHARDHooks(app.incentiveKeeper.Hooks())) // app.hardKeeper = *hardKeeper.SetHooks(hardtypes.NewMultiHARDHooks(app.incentiveKeeper.Hooks()))
app.savingsKeeper = savingsKeeper // savings incentive hooks disabled // app.savingsKeeper = savingsKeeper // savings incentive hooks disabled
app.earnKeeper = *earnKeeper.SetHooks(app.incentiveKeeper.Hooks()) // app.earnKeeper = *earnKeeper.SetHooks(app.incentiveKeeper.Hooks())
// create gov keeper with router // create gov keeper with router
// NOTE this must be done after any keepers referenced in the gov router (ie committee) are defined // NOTE this must be done after any keepers referenced in the gov router (ie committee) are defined
@ -779,11 +775,13 @@ func NewApp(
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.upgradeKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.upgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper))
AddRoute(kavadisttypes.RouterKey, kavadist.NewCommunityPoolMultiSpendProposalHandler(app.kavadistKeeper)). // .
AddRoute(earntypes.RouterKey, earn.NewCommunityPoolProposalHandler(app.earnKeeper)). // AddRoute(kavadisttypes.RouterKey, kavadist.NewCommunityPoolMultiSpendProposalHandler(app.kavadistKeeper)).
AddRoute(communitytypes.RouterKey, community.NewCommunityPoolProposalHandler(app.communityKeeper)). // AddRoute(earntypes.RouterKey, earn.NewCommunityPoolProposalHandler(app.earnKeeper))
AddRoute(committeetypes.RouterKey, committee.NewProposalHandler(app.committeeKeeper)) // .
// AddRoute(communitytypes.RouterKey, community.NewCommunityPoolProposalHandler(app.communityKeeper))
// .AddRoute(committeetypes.RouterKey, committee.NewProposalHandler(app.committeeKeeper))
govConfig := govtypes.DefaultConfig() govConfig := govtypes.DefaultConfig()
govKeeper := govkeeper.NewKeeper( govKeeper := govkeeper.NewKeeper(
@ -800,11 +798,11 @@ func NewApp(
app.govKeeper = *govKeeper app.govKeeper = *govKeeper
// override x/gov tally handler with custom implementation // override x/gov tally handler with custom implementation
tallyHandler := NewTallyHandler( // tallyHandler := NewTallyHandler(
app.govKeeper, *app.stakingKeeper, app.savingsKeeper, app.earnKeeper, // app.govKeeper, *app.stakingKeeper, app.savingsKeeper, app.earnKeeper,
app.liquidKeeper, app.bankKeeper, // app.liquidKeeper, app.bankKeeper,
) // )
app.govKeeper.SetTallyHandler(tallyHandler) // app.govKeeper.SetTallyHandler(tallyHandler)
// create the module manager (Note: Any module instantiated in the module manager that is later modified // create the module manager (Note: Any module instantiated in the module manager that is later modified
// must be passed by reference here.) // must be passed by reference here.)
@ -829,41 +827,41 @@ func NewApp(
transferModule, transferModule,
vesting.NewAppModule(app.accountKeeper, app.bankKeeper), vesting.NewAppModule(app.accountKeeper, app.bankKeeper),
authzmodule.NewAppModule(appCodec, app.authzKeeper, app.accountKeeper, app.bankKeeper, app.interfaceRegistry), authzmodule.NewAppModule(appCodec, app.authzKeeper, app.accountKeeper, app.bankKeeper, app.interfaceRegistry),
kavadist.NewAppModule(app.kavadistKeeper, app.accountKeeper), // kavadist.NewAppModule(app.kavadistKeeper, app.accountKeeper),
auction.NewAppModule(app.auctionKeeper, app.accountKeeper, app.bankKeeper), // auction.NewAppModule(app.auctionKeeper, app.accountKeeper, app.bankKeeper),
issuance.NewAppModule(app.issuanceKeeper, app.accountKeeper, app.bankKeeper), // issuance.NewAppModule(app.issuanceKeeper, app.accountKeeper, app.bankKeeper),
bep3.NewAppModule(app.bep3Keeper, app.accountKeeper, app.bankKeeper), // bep3.NewAppModule(app.bep3Keeper, app.accountKeeper, app.bankKeeper),
pricefeed.NewAppModule(app.pricefeedKeeper, app.accountKeeper), // pricefeed.NewAppModule(app.pricefeedKeeper, app.accountKeeper),
validatorvesting.NewAppModule(app.bankKeeper), validatorvesting.NewAppModule(app.bankKeeper),
swap.NewAppModule(app.swapKeeper, app.accountKeeper), // swap.NewAppModule(app.swapKeeper, app.accountKeeper),
cdp.NewAppModule(app.cdpKeeper, app.accountKeeper, app.pricefeedKeeper, app.bankKeeper), // cdp.NewAppModule(app.cdpKeeper, app.accountKeeper, app.pricefeedKeeper, app.bankKeeper),
hard.NewAppModule(app.hardKeeper, app.accountKeeper, app.bankKeeper, app.pricefeedKeeper), // hard.NewAppModule(app.hardKeeper, app.accountKeeper, app.bankKeeper, app.pricefeedKeeper),
committee.NewAppModule(app.committeeKeeper, app.accountKeeper), // committee.NewAppModule(app.committeeKeeper, app.accountKeeper),
incentive.NewAppModule(app.incentiveKeeper, app.accountKeeper, app.bankKeeper, app.cdpKeeper), // incentive.NewAppModule(app.incentiveKeeper, app.accountKeeper, app.bankKeeper, app.cdpKeeper),
evmutil.NewAppModule(app.evmutilKeeper, app.bankKeeper, app.accountKeeper), evmutil.NewAppModule(app.evmutilKeeper, app.bankKeeper, app.accountKeeper),
savings.NewAppModule(app.savingsKeeper, app.accountKeeper, app.bankKeeper), // savings.NewAppModule(app.savingsKeeper, app.accountKeeper, app.bankKeeper),
liquid.NewAppModule(app.liquidKeeper), // liquid.NewAppModule(app.liquidKeeper),
earn.NewAppModule(app.earnKeeper, app.accountKeeper, app.bankKeeper), // earn.NewAppModule(app.earnKeeper, app.accountKeeper, app.bankKeeper),
router.NewAppModule(app.routerKeeper), // router.NewAppModule(app.routerKeeper),
// nil InflationCalculationFn, use SDK's default inflation function // nil InflationCalculationFn, use SDK's default inflation function
mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, nil, mintSubspace), mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, nil, mintSubspace),
community.NewAppModule(app.communityKeeper, app.accountKeeper), // community.NewAppModule(app.communityKeeper, app.accountKeeper),
metrics.NewAppModule(options.TelemetryOptions), // metrics.NewAppModule(options.TelemetryOptions),
) )
// Warning: Some begin blockers must run before others. Ensure the dependencies are understood before modifying this list. // Warning: Some begin blockers must run before others. Ensure the dependencies are understood before modifying this list.
app.mm.SetOrderBeginBlockers( app.mm.SetOrderBeginBlockers(
metricstypes.ModuleName, // metricstypes.ModuleName,
// Upgrade begin blocker runs migrations on the first block after an upgrade. It should run before any other module. // Upgrade begin blocker runs migrations on the first block after an upgrade. It should run before any other module.
upgradetypes.ModuleName, upgradetypes.ModuleName,
// Capability begin blocker runs non state changing initialization. // Capability begin blocker runs non state changing initialization.
capabilitytypes.ModuleName, capabilitytypes.ModuleName,
// Committee begin blocker changes module params by enacting proposals. // Committee begin blocker changes module params by enacting proposals.
// Run before to ensure params are updated together before state changes. // Run before to ensure params are updated together before state changes.
committeetypes.ModuleName, // committeetypes.ModuleName,
// Community begin blocker should run before x/mint and x/kavadist since // Community begin blocker should run before x/mint and x/kavadist since
// the disable inflation upgrade will update those modules' params. // the disable inflation upgrade will update those modules' params.
communitytypes.ModuleName, // communitytypes.ModuleName,
minttypes.ModuleName, minttypes.ModuleName,
distrtypes.ModuleName, distrtypes.ModuleName,
// During begin block slashing happens after distr.BeginBlocker so that // During begin block slashing happens after distr.BeginBlocker so that
@ -874,20 +872,20 @@ func NewApp(
stakingtypes.ModuleName, stakingtypes.ModuleName,
feemarkettypes.ModuleName, feemarkettypes.ModuleName,
evmtypes.ModuleName, evmtypes.ModuleName,
kavadisttypes.ModuleName, // kavadisttypes.ModuleName,
// Auction begin blocker will close out expired auctions and pay debt back to cdp. // Auction begin blocker will close out expired auctions and pay debt back to cdp.
// It should be run before cdp begin blocker which cancels out debt with stable and starts more auctions. // It should be run before cdp begin blocker which cancels out debt with stable and starts more auctions.
auctiontypes.ModuleName, // auctiontypes.ModuleName,
cdptypes.ModuleName, // cdptypes.ModuleName,
bep3types.ModuleName, // bep3types.ModuleName,
hardtypes.ModuleName, // hardtypes.ModuleName,
issuancetypes.ModuleName, // issuancetypes.ModuleName,
incentivetypes.ModuleName, // incentivetypes.ModuleName,
ibcexported.ModuleName, ibcexported.ModuleName,
// Add all remaining modules with an empty begin blocker below since cosmos 0.45.0 requires it // Add all remaining modules with an empty begin blocker below since cosmos 0.45.0 requires it
swaptypes.ModuleName, // swaptypes.ModuleName,
vestingtypes.ModuleName, vestingtypes.ModuleName,
pricefeedtypes.ModuleName, // pricefeedtypes.ModuleName,
validatorvestingtypes.ModuleName, validatorvestingtypes.ModuleName,
authtypes.ModuleName, authtypes.ModuleName,
banktypes.ModuleName, banktypes.ModuleName,
@ -898,10 +896,10 @@ func NewApp(
paramstypes.ModuleName, paramstypes.ModuleName,
authz.ModuleName, authz.ModuleName,
evmutiltypes.ModuleName, evmutiltypes.ModuleName,
savingstypes.ModuleName, // savingstypes.ModuleName,
liquidtypes.ModuleName, // liquidtypes.ModuleName,
earntypes.ModuleName, // earntypes.ModuleName,
routertypes.ModuleName, // routertypes.ModuleName,
consensusparamtypes.ModuleName, consensusparamtypes.ModuleName,
packetforwardtypes.ModuleName, packetforwardtypes.ModuleName,
) )
@ -914,22 +912,22 @@ func NewApp(
evmtypes.ModuleName, evmtypes.ModuleName,
// fee market module must go after evm module in order to retrieve the block gas used. // fee market module must go after evm module in order to retrieve the block gas used.
feemarkettypes.ModuleName, feemarkettypes.ModuleName,
pricefeedtypes.ModuleName, // pricefeedtypes.ModuleName,
// Add all remaining modules with an empty end blocker below since cosmos 0.45.0 requires it // Add all remaining modules with an empty end blocker below since cosmos 0.45.0 requires it
capabilitytypes.ModuleName, capabilitytypes.ModuleName,
incentivetypes.ModuleName, // incentivetypes.ModuleName,
issuancetypes.ModuleName, // issuancetypes.ModuleName,
slashingtypes.ModuleName, slashingtypes.ModuleName,
distrtypes.ModuleName, distrtypes.ModuleName,
auctiontypes.ModuleName, // auctiontypes.ModuleName,
bep3types.ModuleName, // bep3types.ModuleName,
cdptypes.ModuleName, // cdptypes.ModuleName,
hardtypes.ModuleName, // hardtypes.ModuleName,
committeetypes.ModuleName, // committeetypes.ModuleName,
upgradetypes.ModuleName, upgradetypes.ModuleName,
evidencetypes.ModuleName, evidencetypes.ModuleName,
kavadisttypes.ModuleName, // kavadisttypes.ModuleName,
swaptypes.ModuleName, // swaptypes.ModuleName,
vestingtypes.ModuleName, vestingtypes.ModuleName,
ibcexported.ModuleName, ibcexported.ModuleName,
validatorvestingtypes.ModuleName, validatorvestingtypes.ModuleName,
@ -940,13 +938,13 @@ func NewApp(
paramstypes.ModuleName, paramstypes.ModuleName,
authz.ModuleName, authz.ModuleName,
evmutiltypes.ModuleName, evmutiltypes.ModuleName,
savingstypes.ModuleName, // savingstypes.ModuleName,
liquidtypes.ModuleName, // liquidtypes.ModuleName,
earntypes.ModuleName, // earntypes.ModuleName,
routertypes.ModuleName, // routertypes.ModuleName,
minttypes.ModuleName, minttypes.ModuleName,
communitytypes.ModuleName, // communitytypes.ModuleName,
metricstypes.ModuleName, // metricstypes.ModuleName,
consensusparamtypes.ModuleName, consensusparamtypes.ModuleName,
packetforwardtypes.ModuleName, packetforwardtypes.ModuleName,
) )
@ -967,29 +965,29 @@ func NewApp(
ibctransfertypes.ModuleName, ibctransfertypes.ModuleName,
evmtypes.ModuleName, evmtypes.ModuleName,
feemarkettypes.ModuleName, feemarkettypes.ModuleName,
kavadisttypes.ModuleName, // kavadisttypes.ModuleName,
auctiontypes.ModuleName, // auctiontypes.ModuleName,
issuancetypes.ModuleName, // issuancetypes.ModuleName,
savingstypes.ModuleName, // savingstypes.ModuleName,
bep3types.ModuleName, // bep3types.ModuleName,
pricefeedtypes.ModuleName, // pricefeedtypes.ModuleName,
swaptypes.ModuleName, // swaptypes.ModuleName,
cdptypes.ModuleName, // reads market prices, so must run after pricefeed genesis // cdptypes.ModuleName, // reads market prices, so must run after pricefeed genesis
hardtypes.ModuleName, // hardtypes.ModuleName,
incentivetypes.ModuleName, // reads cdp params, so must run after cdp genesis // incentivetypes.ModuleName, // reads cdp params, so must run after cdp genesis
committeetypes.ModuleName, // committeetypes.ModuleName,
evmutiltypes.ModuleName, evmutiltypes.ModuleName,
earntypes.ModuleName, // earntypes.ModuleName,
communitytypes.ModuleName, // communitytypes.ModuleName,
genutiltypes.ModuleName, // runs arbitrary txs included in genisis state, so run after modules have been initialized genutiltypes.ModuleName, // runs arbitrary txs included in genisis state, so run after modules have been initialized
// Add all remaining modules with an empty InitGenesis below since cosmos 0.45.0 requires it // Add all remaining modules with an empty InitGenesis below since cosmos 0.45.0 requires it
vestingtypes.ModuleName, vestingtypes.ModuleName,
paramstypes.ModuleName, paramstypes.ModuleName,
upgradetypes.ModuleName, upgradetypes.ModuleName,
validatorvestingtypes.ModuleName, validatorvestingtypes.ModuleName,
liquidtypes.ModuleName, // liquidtypes.ModuleName,
routertypes.ModuleName, // routertypes.ModuleName,
metricstypes.ModuleName, // metricstypes.ModuleName,
consensusparamtypes.ModuleName, consensusparamtypes.ModuleName,
packetforwardtypes.ModuleName, packetforwardtypes.ModuleName,
crisistypes.ModuleName, // runs the invariants at genesis, should run after other modules crisistypes.ModuleName, // runs the invariants at genesis, should run after other modules
@ -1031,8 +1029,8 @@ func NewApp(
if options.MempoolEnableAuth { if options.MempoolEnableAuth {
fetchers = append(fetchers, fetchers = append(fetchers,
func(sdk.Context) []sdk.AccAddress { return options.MempoolAuthAddresses }, func(sdk.Context) []sdk.AccAddress { return options.MempoolAuthAddresses },
app.bep3Keeper.GetAuthorizedAddresses, // app.bep3Keeper.GetAuthorizedAddresses,
app.pricefeedKeeper.GetAuthorizedAddresses, // app.pricefeedKeeper.GetAuthorizedAddresses,
) )
} }
@ -1198,15 +1196,15 @@ func (app *App) loadBlockedMaccAddrs() map[string]bool {
modAccAddrs := app.ModuleAccountAddrs() modAccAddrs := app.ModuleAccountAddrs()
allowedMaccs := map[string]bool{ allowedMaccs := map[string]bool{
// kavadist // kavadist
app.accountKeeper.GetModuleAddress(kavadisttypes.ModuleName).String(): true, // app.accountKeeper.GetModuleAddress(kavadisttypes.ModuleName).String(): true,
// earn // earn
app.accountKeeper.GetModuleAddress(earntypes.ModuleName).String(): true, // app.accountKeeper.GetModuleAddress(earntypes.ModuleName).String(): true,
// liquid // liquid
app.accountKeeper.GetModuleAddress(liquidtypes.ModuleName).String(): true, // app.accountKeeper.GetModuleAddress(liquidtypes.ModuleName).String(): true,
// kavadist fund // kavadist fund
app.accountKeeper.GetModuleAddress(kavadisttypes.FundModuleAccount).String(): true, // app.accountKeeper.GetModuleAddress(kavadisttypes.FundModuleAccount).String(): true,
// community // community
app.accountKeeper.GetModuleAddress(communitytypes.ModuleAccountName).String(): true, // app.accountKeeper.GetModuleAddress(communitytypes.ModuleAccountName).String(): true,
// NOTE: if adding evmutil, adjust the cosmos-coins-fully-backed-invariant accordingly. // NOTE: if adding evmutil, adjust the cosmos-coins-fully-backed-invariant accordingly.
} }

View File

@ -41,22 +41,7 @@ import (
feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
auctionkeeper "github.com/kava-labs/kava/x/auction/keeper"
bep3keeper "github.com/kava-labs/kava/x/bep3/keeper"
cdpkeeper "github.com/kava-labs/kava/x/cdp/keeper"
committeekeeper "github.com/kava-labs/kava/x/committee/keeper"
communitykeeper "github.com/kava-labs/kava/x/community/keeper"
earnkeeper "github.com/kava-labs/kava/x/earn/keeper"
evmutilkeeper "github.com/kava-labs/kava/x/evmutil/keeper" evmutilkeeper "github.com/kava-labs/kava/x/evmutil/keeper"
hardkeeper "github.com/kava-labs/kava/x/hard/keeper"
incentivekeeper "github.com/kava-labs/kava/x/incentive/keeper"
issuancekeeper "github.com/kava-labs/kava/x/issuance/keeper"
kavadistkeeper "github.com/kava-labs/kava/x/kavadist/keeper"
liquidkeeper "github.com/kava-labs/kava/x/liquid/keeper"
pricefeedkeeper "github.com/kava-labs/kava/x/pricefeed/keeper"
routerkeeper "github.com/kava-labs/kava/x/router/keeper"
savingskeeper "github.com/kava-labs/kava/x/savings/keeper"
swapkeeper "github.com/kava-labs/kava/x/swap/keeper"
) )
var ( var (
@ -117,24 +102,28 @@ func (tApp TestApp) GetDistrKeeper() distkeeper.Keeper { return tApp.di
func (tApp TestApp) GetGovKeeper() govkeeper.Keeper { return tApp.govKeeper } func (tApp TestApp) GetGovKeeper() govkeeper.Keeper { return tApp.govKeeper }
func (tApp TestApp) GetCrisisKeeper() crisiskeeper.Keeper { return tApp.crisisKeeper } func (tApp TestApp) GetCrisisKeeper() crisiskeeper.Keeper { return tApp.crisisKeeper }
func (tApp TestApp) GetParamsKeeper() paramskeeper.Keeper { return tApp.paramsKeeper } func (tApp TestApp) GetParamsKeeper() paramskeeper.Keeper { return tApp.paramsKeeper }
func (tApp TestApp) GetKavadistKeeper() kavadistkeeper.Keeper { return tApp.kavadistKeeper }
func (tApp TestApp) GetAuctionKeeper() auctionkeeper.Keeper { return tApp.auctionKeeper } // func (tApp TestApp) GetKavadistKeeper() kavadistkeeper.Keeper { return tApp.kavadistKeeper }
func (tApp TestApp) GetIssuanceKeeper() issuancekeeper.Keeper { return tApp.issuanceKeeper } // func (tApp TestApp) GetAuctionKeeper() auctionkeeper.Keeper { return tApp.auctionKeeper }
func (tApp TestApp) GetBep3Keeper() bep3keeper.Keeper { return tApp.bep3Keeper } // func (tApp TestApp) GetIssuanceKeeper() issuancekeeper.Keeper { return tApp.issuanceKeeper }
func (tApp TestApp) GetPriceFeedKeeper() pricefeedkeeper.Keeper { return tApp.pricefeedKeeper } // func (tApp TestApp) GetBep3Keeper() bep3keeper.Keeper { return tApp.bep3Keeper }
func (tApp TestApp) GetSwapKeeper() swapkeeper.Keeper { return tApp.swapKeeper }
func (tApp TestApp) GetCDPKeeper() cdpkeeper.Keeper { return tApp.cdpKeeper } // func (tApp TestApp) GetPriceFeedKeeper() pricefeedkeeper.Keeper { return tApp.pricefeedKeeper }
func (tApp TestApp) GetHardKeeper() hardkeeper.Keeper { return tApp.hardKeeper } // func (tApp TestApp) GetSwapKeeper() swapkeeper.Keeper { return tApp.swapKeeper }
func (tApp TestApp) GetCommitteeKeeper() committeekeeper.Keeper { return tApp.committeeKeeper } // func (tApp TestApp) GetCDPKeeper() cdpkeeper.Keeper { return tApp.cdpKeeper }
func (tApp TestApp) GetIncentiveKeeper() incentivekeeper.Keeper { return tApp.incentiveKeeper } // func (tApp TestApp) GetHardKeeper() hardkeeper.Keeper { return tApp.hardKeeper }
// func (tApp TestApp) GetCommitteeKeeper() committeekeeper.Keeper { return tApp.committeeKeeper }
// func (tApp TestApp) GetIncentiveKeeper() incentivekeeper.Keeper { return tApp.incentiveKeeper }
func (tApp TestApp) GetEvmutilKeeper() evmutilkeeper.Keeper { return tApp.evmutilKeeper } func (tApp TestApp) GetEvmutilKeeper() evmutilkeeper.Keeper { return tApp.evmutilKeeper }
func (tApp TestApp) GetEvmKeeper() *evmkeeper.Keeper { return tApp.evmKeeper } func (tApp TestApp) GetEvmKeeper() *evmkeeper.Keeper { return tApp.evmKeeper }
func (tApp TestApp) GetSavingsKeeper() savingskeeper.Keeper { return tApp.savingsKeeper }
// func (tApp TestApp) GetSavingsKeeper() savingskeeper.Keeper { return tApp.savingsKeeper }
func (tApp TestApp) GetFeeMarketKeeper() feemarketkeeper.Keeper { return tApp.feeMarketKeeper } func (tApp TestApp) GetFeeMarketKeeper() feemarketkeeper.Keeper { return tApp.feeMarketKeeper }
func (tApp TestApp) GetLiquidKeeper() liquidkeeper.Keeper { return tApp.liquidKeeper }
func (tApp TestApp) GetEarnKeeper() earnkeeper.Keeper { return tApp.earnKeeper } // func (tApp TestApp) GetLiquidKeeper() liquidkeeper.Keeper { return tApp.liquidKeeper }
func (tApp TestApp) GetRouterKeeper() routerkeeper.Keeper { return tApp.routerKeeper } // func (tApp TestApp) GetEarnKeeper() earnkeeper.Keeper { return tApp.earnKeeper }
func (tApp TestApp) GetCommunityKeeper() communitykeeper.Keeper { return tApp.communityKeeper } // func (tApp TestApp) GetRouterKeeper() routerkeeper.Keeper { return tApp.routerKeeper }
// func (tApp TestApp) GetCommunityKeeper() communitykeeper.Keeper { return tApp.communityKeeper }
func (tApp TestApp) GetKVStoreKey(key string) *storetypes.KVStoreKey { func (tApp TestApp) GetKVStoreKey(key string) *storetypes.KVStoreKey {
return tApp.keys[key] return tApp.keys[key]

View File

@ -25,7 +25,6 @@ import (
"github.com/kava-labs/kava/app" "github.com/kava-labs/kava/app"
"github.com/kava-labs/kava/app/params" "github.com/kava-labs/kava/app/params"
metricstypes "github.com/kava-labs/kava/x/metrics/types"
) )
const ( const (
@ -118,7 +117,7 @@ func (ac appCreator) newApp(
MempoolAuthAddresses: mempoolAuthAddresses, MempoolAuthAddresses: mempoolAuthAddresses,
EVMTrace: cast.ToString(appOpts.Get(ethermintflags.EVMTracer)), EVMTrace: cast.ToString(appOpts.Get(ethermintflags.EVMTracer)),
EVMMaxGasWanted: cast.ToUint64(appOpts.Get(ethermintflags.EVMMaxTxGasWanted)), EVMMaxGasWanted: cast.ToUint64(appOpts.Get(ethermintflags.EVMMaxTxGasWanted)),
TelemetryOptions: metricstypes.TelemetryOptionsFromAppOpts(appOpts), // TelemetryOptions: metricstypes.TelemetryOptionsFromAppOpts(appOpts),
}, },
baseapp.SetPruning(pruningOpts), baseapp.SetPruning(pruningOpts),
baseapp.SetMinGasPrices(strings.Replace(cast.ToString(appOpts.Get(server.FlagMinGasPrices)), ";", ",", -1)), baseapp.SetMinGasPrices(strings.Replace(cast.ToString(appOpts.Get(server.FlagMinGasPrices)), ";", ",", -1)),