forked from cerc-io/laconicd-deprecated
feat: fee market module (#491)
* feat: fee market module * update proto * queriers: CLI + gRPC * gov params * genesis * enable height * fixes * fix app
This commit is contained in:
+18
-4
@@ -102,6 +102,9 @@ import (
|
||||
evmrest "github.com/tharsis/ethermint/x/evm/client/rest"
|
||||
evmkeeper "github.com/tharsis/ethermint/x/evm/keeper"
|
||||
evmtypes "github.com/tharsis/ethermint/x/evm/types"
|
||||
"github.com/tharsis/ethermint/x/feemarket"
|
||||
feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper"
|
||||
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -148,7 +151,9 @@ var (
|
||||
evidence.AppModuleBasic{},
|
||||
transfer.AppModuleBasic{},
|
||||
vesting.AppModuleBasic{},
|
||||
// Ethermint modules
|
||||
evm.AppModuleBasic{},
|
||||
feemarket.AppModuleBasic{},
|
||||
)
|
||||
|
||||
// module account permissions
|
||||
@@ -214,7 +219,8 @@ type EthermintApp struct {
|
||||
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
|
||||
|
||||
// Ethermint keepers
|
||||
EvmKeeper *evmkeeper.Keeper
|
||||
EvmKeeper *evmkeeper.Keeper
|
||||
FeeMarketKeeper feemarketkeeper.Keeper
|
||||
|
||||
// the module manager
|
||||
mm *module.Manager
|
||||
@@ -266,7 +272,7 @@ func NewEthermintApp(
|
||||
// ibc keys
|
||||
ibchost.StoreKey, ibctransfertypes.StoreKey,
|
||||
// ethermint keys
|
||||
evmtypes.StoreKey,
|
||||
evmtypes.StoreKey, feemarkettypes.StoreKey,
|
||||
)
|
||||
|
||||
// Add the EVM transient store key
|
||||
@@ -343,6 +349,10 @@ func NewEthermintApp(
|
||||
tracer, bApp.Trace(), // debug EVM based on Baseapp options
|
||||
)
|
||||
|
||||
app.FeeMarketKeeper = feemarketkeeper.NewKeeper(
|
||||
appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName),
|
||||
)
|
||||
|
||||
// Create IBC Keeper
|
||||
app.IBCKeeper = ibckeeper.NewKeeper(
|
||||
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
|
||||
@@ -422,6 +432,7 @@ func NewEthermintApp(
|
||||
transferModule,
|
||||
// Ethermint app modules
|
||||
evm.NewAppModule(app.EvmKeeper, app.AccountKeeper),
|
||||
feemarket.NewAppModule(app.FeeMarketKeeper),
|
||||
)
|
||||
|
||||
// During begin block slashing happens after distr.BeginBlocker so that
|
||||
@@ -437,9 +448,11 @@ func NewEthermintApp(
|
||||
minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName,
|
||||
evidencetypes.ModuleName, stakingtypes.ModuleName, ibchost.ModuleName,
|
||||
)
|
||||
|
||||
// NOTE: fee market module must go last in order to retrieve the block gas used.
|
||||
app.mm.SetOrderEndBlockers(
|
||||
crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName,
|
||||
evmtypes.ModuleName,
|
||||
evmtypes.ModuleName, feemarkettypes.ModuleName,
|
||||
)
|
||||
|
||||
// NOTE: The genutils module must occur after staking so that pools are
|
||||
@@ -454,7 +467,7 @@ func NewEthermintApp(
|
||||
ibchost.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName,
|
||||
authz.ModuleName, feegrant.ModuleName,
|
||||
// Ethermint modules
|
||||
evmtypes.ModuleName,
|
||||
evmtypes.ModuleName, feemarkettypes.ModuleName,
|
||||
|
||||
// NOTE: crisis module must go at the end to check for invariants on each module
|
||||
crisistypes.ModuleName,
|
||||
@@ -696,5 +709,6 @@ func initParamsKeeper(
|
||||
paramsKeeper.Subspace(ibchost.ModuleName)
|
||||
// ethermint subspaces
|
||||
paramsKeeper.Subspace(evmtypes.ModuleName)
|
||||
paramsKeeper.Subspace(feemarkettypes.ModuleName)
|
||||
return paramsKeeper
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user