22 lines
684 B
Go
22 lines
684 B
Go
package mint
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
|
"github.com/cosmos/cosmos-sdk/x/mint/types"
|
|
)
|
|
|
|
// InitGenesis new mint genesis
|
|
func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, ak types.AccountKeeper, data *types.GenesisState) {
|
|
keeper.SetMinter(ctx, data.Minter)
|
|
keeper.SetParams(ctx, data.Params)
|
|
ak.GetModuleAccount(ctx, types.ModuleName)
|
|
}
|
|
|
|
// ExportGenesis returns a GenesisState for a given context and keeper.
|
|
func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState {
|
|
minter := keeper.GetMinter(ctx)
|
|
params := keeper.GetParams(ctx)
|
|
return types.NewGenesisState(minter, params)
|
|
}
|