Documentation ¶
Overview ¶
nolint
Index ¶
- func AppGenState(_ *wire.Codec, _ []json.RawMessage) (appState json.RawMessage, err error)
- func AppGenTx(_ *wire.Codec, pk crypto.PubKey) (appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, ...)
- func InitChainer(key sdk.StoreKey) func(sdk.Context, abci.RequestInitChain) abci.ResponseInitChain
- func KVStoreHandler(storeKey sdk.StoreKey) sdk.Handler
- func NewApp(rootDir string, logger log.Logger) (abci.Application, error)
- func NewCommitMultiStore(db dbm.DB) sdk.CommitMultiStore
- func NewTx(key, value string) kvstoreTx
- func SetupApp() (abci.Application, func(), error)
- type GenesisJSON
- type KV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppGenState ¶
func AppGenState(_ *wire.Codec, _ []json.RawMessage) (appState json.RawMessage, err error)
AppGenState can be passed into InitCmd, returns a static string of a few key-values that can be parsed by InitChainer
func AppGenTx ¶ added in v0.19.0
func AppGenTx(_ *wire.Codec, pk crypto.PubKey) ( appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, err error)
Return a validator, not much else
func InitChainer ¶
func InitChainer(key sdk.StoreKey) func(sdk.Context, abci.RequestInitChain) abci.ResponseInitChain
InitChainer returns a function that can initialize the chain with key/value pairs
func KVStoreHandler ¶
KVStoreHandler is a simple handler that takes kvstoreTx and writes them to the db
func NewApp ¶
NewApp creates a simple mock kvstore app for testing. It should work similar to a real app. Make sure rootDir is empty before running the test, in order to guarantee consistent results
func NewCommitMultiStore ¶
func NewCommitMultiStore(db dbm.DB) sdk.CommitMultiStore
func SetupApp ¶
func SetupApp() (abci.Application, func(), error)
SetupApp returns an application as well as a clean-up function to be used to quickly setup a test case with an app
Types ¶
type GenesisJSON ¶
type GenesisJSON struct {
Values []KV `json:"values"`
}
What Genesis JSON is formatted as