2021-08-26 10:08:11 +00:00
|
|
|
package feemarket
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
|
|
|
|
2022-09-07 06:36:11 +00:00
|
|
|
"github.com/cerc-io/laconicd/x/feemarket/keeper"
|
|
|
|
"github.com/cerc-io/laconicd/x/feemarket/types"
|
2021-08-26 10:08:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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)
|
2022-10-10 10:38:33 +00:00
|
|
|
k.SetBlockGasWanted(ctx, data.BlockGas)
|
2021-08-26 10:08:11 +00:00
|
|
|
|
|
|
|
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),
|
2022-10-10 10:38:33 +00:00
|
|
|
BlockGas: k.GetBlockGasWanted(ctx),
|
2021-08-26 10:08:11 +00:00
|
|
|
}
|
|
|
|
}
|