Documentation
¶
Index ¶
- Constants
- Variables
- func MakeCodec() *codec.Codec
- type GenesisState
- type TruChain
- func (app *TruChain) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *TruChain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *TruChain) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (app *TruChain) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *TruChain) LoadHeight(height int64) error
- func (app *TruChain) ModuleAccountAddrs() map[string]bool
Constants ¶
const (
// DefaultKeyPass contains the default key password for genesis transactions
DefaultKeyPass = "12345678"
)
Variables ¶
var ( DefaultCLIHome = os.ExpandEnv("$HOME/.truchaincli") DefaultNodeHome = os.ExpandEnv("$HOME/.truchaind") // The ModuleBasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( genutil.AppModuleBasic{}, auth.AppModuleBasic{}, bank.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(paramsclient.ProposalHandler, distr.ProposalHandler), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, supply.AppModuleBasic{}, community.AppModuleBasic{}, claim.AppModuleBasic{}, account.AppModuleBasic{}, trubank.AppModuleBasic{}, trustaking.AppModuleBasic{}, truslashing.AppModuleBasic{}, trudist.AppModuleBasic{}, ) )
default home directories for expected binaries
Functions ¶
Types ¶
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState is the state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for gaia.
type TruChain ¶
TruChain implements an extended ABCI application. It contains a BaseApp, a codec for serialization, KVStore keys for multistore state management, and various mappers and keepers to manage getting, setting, and serializing the integral app types.
func NewTruChain ¶
func NewTruChain(logger log.Logger, db dbm.DB, loadLatest bool, invCheckPeriod uint, options ...func(*bam.BaseApp)) *TruChain
NewTruChain returns a reference to a new TruChain. Internally, a codec is created along with all the necessary keys. In addition, all necessary mappers and keepers are created, routes registered, and finally the stores being mounted along with any necessary chain initialization.
func (*TruChain) BeginBlocker ¶
func (app *TruChain) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker reflects logic to run before any TXs application are processed by the application.
func (*TruChain) EndBlocker ¶
func (app *TruChain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker reflects logic to run after all TXs are processed by the application.
func (*TruChain) ExportAppStateAndValidators ¶
func (app *TruChain) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string, ) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
ExportAppStateAndValidators export the state of gaia for a genesis file
func (*TruChain) InitChainer ¶
func (app *TruChain) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*TruChain) LoadHeight ¶
LoadHeight loads the app at a particular height
func (*TruChain) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.