2018-10-19 11:36:00 -07:00
|
|
|
package mint
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
2020-03-05 02:45:51 -08:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/mint/types"
|
2018-10-19 11:36:00 -07:00
|
|
|
)
|
|
|
|
|
2020-03-05 07:19:36 -08:00
|
|
|
// InitGenesis new mint genesis
|
2020-04-20 12:32:10 -07:00
|
|
|
func InitGenesis(ctx sdk.Context, keeper Keeper, ak types.AccountKeeper, data GenesisState) {
|
2018-10-19 11:36:00 -07:00
|
|
|
keeper.SetMinter(ctx, data.Minter)
|
2019-04-05 13:20:58 -07:00
|
|
|
keeper.SetParams(ctx, data.Params)
|
2020-04-20 12:32:10 -07:00
|
|
|
ak.GetModuleAccount(ctx, ModuleName)
|
2018-10-19 11:36:00 -07:00
|
|
|
}
|
|
|
|
|
2020-03-05 07:19:36 -08:00
|
|
|
// ExportGenesis returns a GenesisState for a given context and keeper.
|
|
|
|
func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState {
|
2019-04-05 13:20:58 -07:00
|
|
|
minter := keeper.GetMinter(ctx)
|
|
|
|
params := keeper.GetParams(ctx)
|
|
|
|
return NewGenesisState(minter, params)
|
2018-10-19 11:36:00 -07:00
|
|
|
}
|