Documentation
¶
Overview ¶
Package app provides the assets information for server module.
Index ¶
- Constants
- Variables
- func AddTestAddrs(app *ShentuApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress
- func AddTestAddrsIncremental(app *ShentuApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress
- func CreateIncrementalAccounts(accNum int) []sdk.AccAddress
- func MakeEncodingConfig() params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func StoreKeys() (map[string]*storetypes.KVStoreKey, map[string]*storetypes.MemoryStoreKey, ...)
- func TestAddr(addr, bech string) (sdk.AccAddress, error)
- type GenerateAccountStrategy
- type GenesisState
- type HandlerOptions
- type SetupOptions
- type ShentuApp
- func (app *ShentuApp) AppCodec() codec.Codec
- func (app *ShentuApp) AutoCliOpts() autocli.AppOptions
- func (app *ShentuApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *ShentuApp) BlockedAddrs() map[string]bool
- func (app *ShentuApp) DefaultGenesis() map[string]json.RawMessage
- func (app *ShentuApp) EncodingConfig() appparams.EncodingConfig
- func (app *ShentuApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *ShentuApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *ShentuApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *ShentuApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *ShentuApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *ShentuApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *ShentuApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- 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) ModuleManager() *module.Manager
- func (app *ShentuApp) Name() string
- func (app *ShentuApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *ShentuApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *ShentuApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *ShentuApp) RegisterTendermintService(clientCtx client.Context)
- func (app *ShentuApp) RegisterTxService(clientCtx client.Context)
- func (app *ShentuApp) RegisterUpgradeHandlers()
- func (app *ShentuApp) SimulationManager() *module.SimulationManager
- func (app *ShentuApp) TxConfig() client.TxConfig
Constants ¶
const (
// AppName specifies the global application name.
AppName = "Shentu"
)
Variables ¶
var ( // DefaultNodeHome specifies where the node daemon data is stored. DefaultNodeHome = os.ExpandEnv("$HOME/.shentud") )
Functions ¶
func AddTestAddrs ¶
func AddTestAddrsIncremental ¶ added in v2.10.0
func AddTestAddrsIncremental(app *ShentuApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress
AddTestAddrsIncremental constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func CreateIncrementalAccounts ¶ added in v2.13.0
func CreateIncrementalAccounts(accNum int) []sdk.AccAddress
CreateIncrementalAccounts is a strategy used by addTestAddrs() in order to generated addresses in ascending order.
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewAnteHandler ¶ added in v2.14.0
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler constructor
func StoreKeys ¶ added in v2.12.0
func StoreKeys() ( map[string]*storetypes.KVStoreKey, map[string]*storetypes.MemoryStoreKey, map[string]*storetypes.TransientStoreKey, )
StoreKeys returns all the store keys to register in current app
Types ¶
type GenerateAccountStrategy ¶ added in v2.10.0
type GenerateAccountStrategy func(int) []sdk.AccAddress
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState of the blockchain is represented here as a map of raw json messages key'd by an 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.
type HandlerOptions ¶ added in v2.14.0
type HandlerOptions struct {
ante.HandlerOptions
IBCKeeper *keeper.Keeper
WasmConfig *wasmTypes.NodeConfig
WasmKeeper *wasmkeeper.Keeper
TXCounterStoreService corestoretypes.KVStoreService
}
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type SetupOptions ¶ added in v2.10.0
type SetupOptions struct {
Logger log.Logger
DB *dbm.MemDB
AppOpts servertypes.AppOptions
}
SetupOptions defines arguments that are passed into `Simapp` constructor.
type ShentuApp ¶
type ShentuApp struct {
*baseapp.BaseApp
AccountKeeper sdkauthkeeper.AccountKeeper
AuthzKeeper authzkeeper.Keeper
BankKeeper bankkeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
FeegrantKeeper feegrantkeeper.Keeper
ParamsKeeper paramskeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
GovKeeper govkeeper.Keeper
CertKeeper certkeeper.Keeper
AuthKeeper authkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
IBCKeeper *ibckeeper.Keeper
IBCFeeKeeper ibcfeekeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
OracleKeeper oraclekeeper.Keeper
ShieldKeeper shieldkeeper.Keeper
BountyKeeper bountykeeper.Keeper
GroupKeeper groupkeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper
WasmKeeper wasmkeeper.Keeper
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
BasicModuleManager module.BasicManager
// contains filtered or unexported fields
}
ShentuApp is the main Shentu Chain application type.
func NewShentuApp ¶
func NewShentuApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *ShentuApp
NewShentuApp returns a reference to an initialized ShentuApp.
func NewShentuAppWithCustomOptions ¶ added in v2.12.0
func NewShentuAppWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptions) *ShentuApp
NewShentuAppWithCustomOptions initializes a new ShentuApp with custom options.
func (*ShentuApp) AppCodec ¶ added in v2.12.0
AppCodec returns Chain's app 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) AutoCliOpts ¶ added in v2.12.0
func (app *ShentuApp) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*ShentuApp) BeginBlocker ¶
BeginBlocker application updates every begin block
func (*ShentuApp) BlockedAddrs ¶ added in v2.12.0
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*ShentuApp) DefaultGenesis ¶ added in v2.12.0
func (app *ShentuApp) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*ShentuApp) EncodingConfig ¶ added in v2.12.0
func (app *ShentuApp) EncodingConfig() appparams.EncodingConfig
func (*ShentuApp) EndBlocker ¶
EndBlocker application updates every end block
func (*ShentuApp) ExportAppStateAndValidators ¶
func (app *ShentuApp) ExportAppStateAndValidators( forZeroHeight bool, jailWhiteList []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*ShentuApp) GetKey ¶
func (app *ShentuApp) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*ShentuApp) GetMemKey ¶
func (app *ShentuApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*ShentuApp) GetSubspace ¶
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) GetTKey ¶
func (app *ShentuApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*ShentuApp) InitChainer ¶
func (app *ShentuApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*ShentuApp) InterfaceRegistry ¶
func (app *ShentuApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns the app's InterfaceRegistry
func (*ShentuApp) LegacyAmino ¶
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 ¶
LoadHeight loads a particular height
func (*ShentuApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*ShentuApp) ModuleManager ¶
ModuleManager implements the SimulationApp interface
func (*ShentuApp) PreBlocker ¶ added in v2.12.0
func (app *ShentuApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker updates every pre begin block
func (*ShentuApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*ShentuApp) RegisterNodeService ¶ added in v2.11.0
func (*ShentuApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*ShentuApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*ShentuApp) RegisterUpgradeHandlers ¶
func (app *ShentuApp) RegisterUpgradeHandlers()
RegisterUpgradeHandlers registers necessary upgrade handlers
func (*ShentuApp) SimulationManager ¶
func (app *ShentuApp) SimulationManager() *module.SimulationManager
SimulationManager returns app.sm.