Documentation ¶
Index ¶
- Constants
- Variables
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) AutoCliOpts() autocli.AppOptions
- func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *App) Configurator() module.Configurator
- func (app *App) DefaultGenesis() map[string]json.RawMessage
- func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *App) GetStoreKeys() []storetypes.StoreKey
- func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *App) InterfaceRegistry() types.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) LoadHeight(height int64) error
- func (app *App) Name() string
- func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *App) RegisterTendermintService(clientCtx client.Context)
- func (app *App) RegisterTxService(clientCtx client.Context)
- func (app *App) RegisterUpgradeHandlers()
- func (app *App) SimulationManager() *module.SimulationManager
- func (app *App) TxConfig() client.TxConfig
- type EncodingConfig
- type GenesisState
- type HandlerOptions
Constants ¶
const ( // Name is the name of the application. Name = "chora" // EnvPrefix is the environment variable prefix used to map environment // variables to command flags. EnvPrefix = "CHORA" // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address. Bech32PrefixAccAddr = Name // Bech32PrefixAccPub defines the Bech32 prefix of an account's public key. Bech32PrefixAccPub = Name + "pub" // Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address. Bech32PrefixValAddr = Name + "valoper" // Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key. Bech32PrefixValPub = Name + "valoperpub" // Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address. Bech32PrefixConsAddr = Name + "valcons" // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key. Bech32PrefixConsPub = Name + "valconspub" )
const UpgradeName = "v0"
UpgradeName defines the on-chain upgrade name.
Variables ¶
var ( // DefaultNodeHome default home directory for the application daemon. DefaultNodeHome = os.ExpandEnv("$HOME/." + Name) )
Functions ¶
func BlockedAddresses ¶
BlockedAddresses returns all the app's blocked account addresses.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
NOTE: This is solely to be used for testing purposes.
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
Types ¶
type App ¶
type App struct { *baseapp.BaseApp // sdk modules AccountKeeper authkeeper.AccountKeeper AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper CircuitKeeper circuitkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper DistrKeeper distrkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper GovKeeper govkeeper.Keeper GroupKeeper groupkeeper.Keeper MintKeeper mintkeeper.Keeper ParamsKeeper paramskeeper.Keeper SlashingKeeper slashingkeeper.Keeper StakingKeeper *stakingkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper // ibc modules CapabilityKeeper *capabilitykeeper.Keeper IBCKeeper *ibckeeper.Keeper IBCFeeKeeper ibcfeekeeper.Keeper IBCTransferKeeper ibctransferkeeper.Keeper //ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper // chora modules ContentKeeper contentkeeper.Keeper GeonodeKeeper geonodekeeper.Keeper VoucherKeeper voucherkeeper.Keeper // ibc modules (scoped) ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper //ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper // module manager ModuleManager *module.Manager BasicModuleManager module.BasicManager // 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 NewApp ¶
func NewApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App
NewApp returns a reference to an initialized application.
func (*App) AppCodec ¶
AppCodec returns App'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 (*App) AutoCliOpts ¶
func (app *App) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*App) BeginBlocker ¶
BeginBlocker application updates every begin block.
func (*App) Configurator ¶
func (app *App) Configurator() module.Configurator
func (*App) DefaultGenesis ¶
func (app *App) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*App) EndBlocker ¶
EndBlocker application updates every end block.
func (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) GetKey ¶
func (app *App) 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 (*App) GetStoreKeys ¶
func (app *App) GetStoreKeys() []storetypes.StoreKey
GetStoreKeys returns all the stored store keys.
func (*App) GetSubspace ¶
func (app *App) 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 (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*App) InterfaceRegistry ¶
func (app *App) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns App's InterfaceRegistry
func (*App) LegacyAmino ¶
func (app *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns App'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 (*App) LoadHeight ¶
LoadHeight loads a particular height.
func (*App) PreBlocker ¶
func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block.
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterNodeService ¶
RegisterNodeService implements the Application.RegisterNodeService method.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*App) RegisterUpgradeHandlers ¶
func (app *App) RegisterUpgradeHandlers()
func (*App) SimulationManager ¶
func (app *App) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState is the genesis state of the blockchain.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions CircuitKeeper circuitante.CircuitBreaker IBCKeeper *ibckeeper.Keeper }
HandlerOptions are the options required for constructing a default SDK AnteHandler.