Documentation ¶
Overview ¶
Package app provides the assets information for server module.
Index ¶
- Constants
- Variables
- func BeginBlockForks(ctx sdk.Context, app *ShentuApp)
- func DefaultConfig() network.Config
- func MakeCodecs() (codec.Codec, *codec.LegacyAmino)
- func MakeEncodingConfig() params.EncodingConfig
- func NewAppConstructor(encodingCfg params.EncodingConfig) network.AppConstructor
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- type GenesisState
- type ShentuApp
- func (app *ShentuApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *ShentuApp) Codec() codec.Codec
- func (app *ShentuApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *ShentuApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (servertypes.ExportedApp, error)
- func (app *ShentuApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *ShentuApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *ShentuApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *ShentuApp) LegacyAmino() *codec.LegacyAmino
- func (app *ShentuApp) LoadHeight(height int64) error
- func (app *ShentuApp) ModuleAccountAddrs() map[string]bool
- func (app *ShentuApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *ShentuApp) RegisterTendermintService(clientCtx client.Context)
- func (app *ShentuApp) RegisterTxService(clientCtx client.Context)
- func (app *ShentuApp) SimulationManager() *module.SimulationManager
Constants ¶
const ( // AppName specifies the global application name. AppName = "Shentu" // DefaultKeyPass for certik node daemon. DefaultKeyPass = "12345678" )
Variables ¶
var ( // DefaultNodeHome specifies where the node daemon data is stored. DefaultNodeHome = os.ExpandEnv("$HOME/.certik") // ModuleBasics 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{}, authz.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, feegrant.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, certclient.ProposalHandler, shieldclient.ProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, ), params.AppModuleBasic{}, slashing.AppModuleBasic{}, upgrade.AppModuleBasic{}, cvm.NewAppModuleBasic(), cert.NewAppModuleBasic(), oracle.NewAppModuleBasic(), shield.NewAppModuleBasic(), evidence.AppModuleBasic{}, ibc.AppModuleBasic{}, transfer.AppModuleBasic{}, ) )
Functions ¶
func BeginBlockForks ¶ added in v2.3.1
BeginBlockForks is intended to be ran in
func DefaultConfig ¶ added in v2.3.2
DefaultConfig returns a default configuration suitable for nearly all testing requirements.
func MakeCodecs ¶
func MakeCodecs() (codec.Codec, *codec.LegacyAmino)
MakeCodecs constructs the *std.Marshaler and *codec.LegacyAmino instances used by app. It is useful for tests and clients who do not want to construct the full app
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewAppConstructor ¶ added in v2.3.2
func NewAppConstructor(encodingCfg params.EncodingConfig) network.AppConstructor
Types ¶
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis 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 the application.
type ShentuApp ¶ added in v2.3.0
ShentuApp is the main Shentu Chain application type.
func NewShentuApp ¶ added in v2.3.0
func NewShentuApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig appparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp)) *ShentuApp
NewShentuApp returns a reference to an initialized ShentuApp.
func (*ShentuApp) BeginBlocker ¶ added in v2.3.0
func (app *ShentuApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker processes application updates at the beginning of each block.
func (*ShentuApp) EndBlocker ¶ added in v2.3.0
func (app *ShentuApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker processes application updates at the end of each block.
func (*ShentuApp) ExportAppStateAndValidators ¶ added in v2.3.0
func (app *ShentuApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the application state for a genesis file.
func (*ShentuApp) GetSubspace ¶ added in v2.3.0
func (app *ShentuApp) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*ShentuApp) InitChainer ¶ added in v2.3.0
func (app *ShentuApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer defines application update at chain initialization
func (*ShentuApp) InterfaceRegistry ¶ added in v2.3.0
func (app *ShentuApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns the app's InterfaceRegistry
func (*ShentuApp) LegacyAmino ¶ added in v2.3.0
func (app *ShentuApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp's amino codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*ShentuApp) LoadHeight ¶ added in v2.3.0
LoadHeight loads a particular height
func (*ShentuApp) ModuleAccountAddrs ¶ added in v2.3.0
ModuleAccountAddrs returns all the app's module account addresses.
func (*ShentuApp) RegisterAPIRoutes ¶ added in v2.3.0
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*ShentuApp) RegisterTendermintService ¶ added in v2.3.0
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*ShentuApp) RegisterTxService ¶ added in v2.3.0
RegisterTxService implements the Application.RegisterTxService method.
func (*ShentuApp) SimulationManager ¶ added in v2.3.0
func (app *ShentuApp) SimulationManager() *module.SimulationManager
SimulationManager returns app.sm.