cosmos-sdk/x/auth/genesis.go

20 lines
575 B
Go
Raw Normal View History

package auth
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// 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)
}
// 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)
}