Documentation
¶
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- func SetConfig()
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *App) BlockedAddrs() map[string]bool
- func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *App) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *App) InitNormalKeepers()
- func (app *App) InitParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, ...) paramskeeper.Keeper
- func (app *App) InitSpecialKeepers(skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint)
- func (app *App) InterfaceRegistry() types.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) LoadHeight(height int64) error
- func (app *App) ModuleAccountAddrs() map[string]bool
- func (app *App) Name() string
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) RegisterTendermintService(clientCtx client.Context)
- func (app *App) RegisterTxService(clientCtx client.Context)
- func (app *App) SetupHooks()
- func (app *App) SimulationManager() *module.SimulationManager
- type AppKeepers
- type EmptyAppOptions
- type GenesisState
- type LumApp
Constants ¶
const ( AccountAddressPrefix = "lum" CoinBondDenom = "ulum" CoinType = 880 )
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, dfractclient.ProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, ica.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, authzmodule.AppModuleBasic{}, vesting.AppModuleBasic{}, beam.AppModuleBasic{}, airdrop.AppModuleBasic{}, dfract.AppModuleBasic{}, ) )
var ( AccountPubKeyPrefix = AccountAddressPrefix + "pub" ValidatorAddressPrefix = AccountAddressPrefix + "valoper" ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func RegisterSwaggerAPI ¶ added in v1.1.0
RegisterSwaggerAPI registers swagger route with API Server
Types ¶
type App ¶
type App struct { *baseapp.BaseApp AppKeepers // contains filtered or unexported fields }
App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func New ¶
func New( appName string, 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), ) *App
New returns a reference to an initialized App.
func SetupForTesting ¶ added in v1.2.0
func (*App) BeginBlocker ¶
func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*App) BlockedAddrs ¶ added in v1.2.0
func (*App) EndBlocker ¶
func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) GetKey ¶
func (app *App) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
func (*App) GetMemKey ¶
func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
func (*App) GetSubspace ¶
func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
func (*App) GetTKey ¶
func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
func (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*App) InitNormalKeepers ¶ added in v1.2.0
func (app *App) InitNormalKeepers()
InitNormalKeepers Initialize the normal keepers
func (*App) InitParamsKeeper ¶ added in v1.2.0
func (app *App) InitParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper
InitParamsKeeper init params keeper and its subspaces
func (*App) InitSpecialKeepers ¶ added in v1.2.0
func (app *App) InitSpecialKeepers( skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, )
InitSpecialKeepers Init the "special" keepers in the order of definition
func (*App) InterfaceRegistry ¶
func (app *App) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Gaia's InterfaceRegistry
func (*App) LegacyAmino ¶
func (app *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp's amino codec.
func (*App) LoadHeight ¶
LoadHeight loads a particular height
func (*App) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*App) SetupHooks ¶ added in v1.2.0
func (app *App) SetupHooks()
func (*App) SimulationManager ¶
func (app *App) SimulationManager() *module.SimulationManager
type AppKeepers ¶ added in v1.2.0
type AppKeepers struct { // Special Keepers ParamsKeeper *paramskeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Normal Keepers AccountKeeper *authkeeper.AccountKeeper BankKeeper *bankkeeper.BaseKeeper AuthzKeeper *authzkeeper.Keeper StakingKeeper *stakingkeeper.Keeper DistrKeeper *distrkeeper.Keeper SlashingKeeper *slashingkeeper.Keeper IBCKeeper *ibckeeper.Keeper ICAHostKeeper *icahostkeeper.Keeper TransferKeeper *ibctransferkeeper.Keeper EvidenceKeeper *evidencekeeper.Keeper MintKeeper *mintkeeper.Keeper GovKeeper *govkeeper.Keeper FeeGrantKeeper *feegrantkeeper.Keeper // Custom Keepers AirdropKeeper *airdropkeeper.Keeper BeamKeeper *beamkeeper.Keeper DFractKeeper *dfractkeeper.Keeper }
type EmptyAppOptions ¶ added in v1.2.0
type EmptyAppOptions struct{}
EmptyAppOptions is a stub implementing AppOptions
func (EmptyAppOptions) Get ¶ added in v1.2.0
func (ao EmptyAppOptions) Get(o string) interface{}
Get implements AppOptions
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 LumApp ¶
type LumApp interface { // Name The assigned name of the app. Name() string // LegacyAmino The application types codec. // NOTE: This should be sealed before being returned. LegacyAmino() *codec.LegacyAmino // BeginBlocker Application updates every begin block. BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // EndBlocker Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock // InitChainer Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain // LoadHeight Loads the app at a given height. LoadHeight(height int64) error // ExportAppStateAndValidators Exports the state of the application for a genesis file. ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (types.ExportedApp, error) // ModuleAccountAddrs All the registered module account addreses. ModuleAccountAddrs() map[string]bool }
LumApp implements the common methods for a Cosmos SDK-based application specific blockchain.