laconicd-deprecated/x/evm/genesis.go
Federico Kunze 30f34e6c59
evm: move Keeper and Querier to /keeper package (#182)
* evm: move Keeper and Querier to /keeper package

* keeper: update keeper_test.go

* fix format

* evm: use aliased types

* add comments from review

* changelog
2020-03-09 10:17:23 -03:00

21 lines
575 B
Go

package evm
import (
sdk "github.com/cosmos/cosmos-sdk/types"
abci "github.com/tendermint/tendermint/abci/types"
)
// InitGenesis initializes genesis state based on exported genesis
func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorUpdate {
for _, record := range data.Accounts {
k.SetCode(ctx, record.Address, record.Code)
k.CreateGenesisAccount(ctx, record)
}
return []abci.ValidatorUpdate{}
}
// ExportGenesis exports genesis state
func ExportGenesis(ctx sdk.Context, _ Keeper) GenesisState {
return GenesisState{Accounts: nil}
}