laconicd-deprecated/x/feemarket/genesis.go
2022-10-10 16:08:33 +05:30

30 lines
749 B
Go

package feemarket
import (
sdk "github.com/cosmos/cosmos-sdk/types"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/cerc-io/laconicd/x/feemarket/keeper"
"github.com/cerc-io/laconicd/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),
}
}