forked from cerc-io/laconicd-deprecated
620f6a6770
* add gasWanted transient store keys * add gasWanted transient store keeper functions * add gasWanted transient store tracker * add comment * remove unncesary comment * remove unnecesary function * fix tests * fix bad comment * remove unnecesary comment * update comment * update changelog * Update CHANGELOG.md Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * add GasWantedDecorator * remove unnecesary comments * gasWanted decorator test * fix tests * fix tests and build * fix lint * updated end block event * Update app/ante/fee_market.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix undeclared variable * Update app/ante/fee_market_test.go * remove unnecesary line * migrate MinGasMultiplier to FeeMarket module * set limited gas wanted * remove old newKeeper param * update proto comment * fix test * update comments * Update x/feemarket/keeper/abci.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * address comments from review * tidy * tests Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
30 lines
751 B
Go
30 lines
751 B
Go
package feemarket
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
|
|
|
"github.com/tharsis/ethermint/x/feemarket/keeper"
|
|
"github.com/tharsis/ethermint/x/feemarket/types"
|
|
)
|
|
|
|
// InitGenesis initializes genesis state based on exported genesis
|
|
func InitGenesis(
|
|
ctx sdk.Context,
|
|
k keeper.Keeper,
|
|
data types.GenesisState,
|
|
) []abci.ValidatorUpdate {
|
|
k.SetParams(ctx, data.Params)
|
|
k.SetBlockGasWanted(ctx, data.BlockGas)
|
|
|
|
return []abci.ValidatorUpdate{}
|
|
}
|
|
|
|
// ExportGenesis exports genesis state of the fee market module
|
|
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
|
|
return &types.GenesisState{
|
|
Params: k.GetParams(ctx),
|
|
BlockGas: k.GetBlockGasWanted(ctx),
|
|
}
|
|
}
|