app

package
v0.0.0-...-bcd067f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 131 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const UpgradeName = "v0"

UpgradeName defines the on-chain upgrade name.

Variables

View Source
var (
	// DefaultNodeHome default home directory for the application daemon.
	DefaultNodeHome = os.ExpandEnv("$HOME/." + Name)
)

Functions

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func GetMaccPerms

func GetMaccPerms() map[string][]string

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

func (app *App) AppCodec() codec.Codec

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

func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

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

func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

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

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

LoadHeight loads a particular height.

func (*App) Name

func (app *App) Name() string

Name returns the name of the App.

func (*App) PreBlocker

func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block.

func (*App) RegisterAPIRoutes

func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*App) RegisterNodeService

func (app *App) RegisterNodeService(clientCtx client.Context, cfg config.Config)

RegisterNodeService implements the Application.RegisterNodeService method.

func (*App) RegisterTendermintService

func (app *App) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*App) RegisterTxService

func (app *App) RegisterTxService(clientCtx client.Context)

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

func (*App) TxConfig

func (app *App) TxConfig() client.TxConfig

TxConfig returns App's TxConfig

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL