func (tg *TestkitGenesis) AddAccount(accountName string) (keys.Info, string) {
	if tg.isSealed {
		panic("genesis sealed")
	}
	_, err := tg.kb.Get(accountName)
	if err == nil {
		panic(fmt.Errorf("can't re-add account %s", accountName))
	}
	i, seed, err := tg.kb.CreateMnemonic(
		accountName,
		keys.English,
		defaultPassphrase,
		keys.Secp256k1,
	)
	if err != nil {
		panic(err)
	}
	tg.accounts = append(tg.accounts, TestkitAccount{
		Address:  i.GetAddress().String(),
		Mnemonic: seed,
	})
	return i, seed
}
AddAccount creates new account from aan account name
package testkit
import (
	"encoding/json"
	"fmt"
	ckeys "github.com/cosmos/cosmos-sdk/client/keys"
	"github.com/cosmos/cosmos-sdk/crypto/keys"
	sdk "github.com/cosmos/cosmos-sdk/types"
	cauth "github.com/cosmos/cosmos-sdk/x/auth/exported"
	cauthtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
	"github.com/cosmos/cosmos-sdk/x/staking/types"
	tm "github.com/tendermint/tendermint/types"
	"github.com/terra-project/core/app"
	core "github.com/terra-project/core/types"
	"github.com/terra-project/core/x/auth"
	"github.com/terra-project/core/x/genutil"
	"time"
)
var defaultPassphrase = "12345678"
type TestkitAccount struct {
	Address  string `json:"address"`
	Mnemonic string `json:"mnemonic"`
}
type TestkitGenesisAccountToPrivValMap struct {
	Account       sdk.ValAddress
	PrivValidator tm.PrivValidator
}
type TestkitGenesis struct {
	chainId           string
	genesis           *tm.GenesisDoc
	isSealed          bool
	accounts          []TestkitAccount
	genesisValidators []auth.StdTx
	validatorMap      []TestkitGenesisAccountToPrivValMap
	kb                keys.Keybase
	hdAccount uint64
}
var ZeroCommission = types.NewCommissionRates(sdk.NewDec(0), sdk.NewDec(1), sdk.NewDec(1))
func NewTestkitGenesis(chainId string) *TestkitGenesis {
	config := sdk.GetConfig()
	config.SetCoinType(core.CoinType)
	config.SetFullFundraiserPath(core.FullFundraiserPath)
	config.SetBech32PrefixForAccount(core.Bech32PrefixAccAddr, core.Bech32PrefixAccPub)
	config.SetBech32PrefixForValidator(core.Bech32PrefixValAddr, core.Bech32PrefixValPub)
	config.SetBech32PrefixForConsensusNode(core.Bech32PrefixConsAddr, core.Bech32PrefixConsPub)
	return &TestkitGenesis{
		chainId:           chainId,
		genesis:           nil,
		isSealed:          false,
		accounts:          make([]TestkitAccount, 0),
		genesisValidators: []auth.StdTx{},
		validatorMap:      []TestkitGenesisAccountToPrivValMap{},
		kb:                ckeys.NewInMemoryKeyBase(),
		hdAccount:         0,
	}
}
func (tg *TestkitGenesis) IsSealed() bool {
	return tg.isSealed
}