2018-11-08 16:28:28 -08:00
|
|
|
package auth
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
)
|
|
|
|
|
2019-02-08 13:35:19 -08:00
|
|
|
// InitGenesis - Init store state from genesis data
|
2019-06-28 13:11:27 -07:00
|
|
|
//
|
|
|
|
// CONTRACT: old coins from the FeeCollectionKeeper need to be transferred through
|
|
|
|
// a genesis port script to the new fee collector account
|
|
|
|
func InitGenesis(ctx sdk.Context, ak AccountKeeper, data GenesisState) {
|
2018-12-20 11:09:43 -08:00
|
|
|
ak.SetParams(ctx, data.Params)
|
2018-11-08 16:28:28 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExportGenesis returns a GenesisState for a given context and keeper
|
2019-06-28 13:11:27 -07:00
|
|
|
func ExportGenesis(ctx sdk.Context, ak AccountKeeper) GenesisState {
|
2018-12-20 11:09:43 -08:00
|
|
|
params := ak.GetParams(ctx)
|
2019-06-28 13:11:27 -07:00
|
|
|
return NewGenesisState(params)
|
2018-11-08 16:28:28 -08:00
|
|
|
}
|