Documentation

Index

Constants

View Source
const (
	// DefaultKeyPass contains the default key password for genesis transactions
	DefaultKeyPass = "12345678"
)

Variables

View Source
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

    func MakeCodec

    func MakeCodec() *codec.Codec

      MakeCodec creates a new codec codec and registers all the necessary types with the codec.

      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

          type TruChain struct {
          	*bam.BaseApp
          	// contains filtered or unexported fields
          }

            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

                      func (app *TruChain) LoadHeight(height int64) error

                        LoadHeight loads the app at a particular height

                        func (*TruChain) ModuleAccountAddrs

                        func (app *TruChain) ModuleAccountAddrs() map[string]bool

                          ModuleAccountAddrs returns all the app's module account addresses.