0g-chain/x/liquidator/genesis.go
2019-11-25 14:46:02 -05:00

20 lines
453 B
Go

package liquidator
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// InitGenesis sets the genesis state in the keeper.
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) {
keeper.SetParams(ctx, data.Params)
}
// ExportGenesis returns a GenesisState for a given context and keeper.
func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState {
params := keeper.GetParams(ctx)
return GenesisState{
Params: params,
}
}