app

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: LGPL-3.0 Imports: 111 Imported by: 0

Documentation

Index

Constants

View Source
const UpgradeName = "v047-to-v050"

UpgradeName defines the on-chain upgrade name for the sample SimApp upgrade from v047 to v050.

NOTE: This upgrade defines a reference implementation of what an upgrade could look like when an application is migrating from Cosmos SDK version v0.47.x to v0.50.x.

Variables

View Source
var DefaultNodeHome string

DefaultNodeHome default home directories for the application daemon.

Functions

func MakeAppConfig

func MakeAppConfig(bech32Prefix string) depinject.Config

MakeAppConfig makes the application config with the given bech32 prefix for accounts.

func PolarisConfigFn

func PolarisConfigFn(cfg *evmconfig.Config) func() *evmconfig.Config

PolarisConfigFn returns a function that provides the initialization of the standard set of precompiles.

func PrecompilesToInject

func PrecompilesToInject(
	app *App,
	customPcs ...ethprecompile.Registrable,
) func() *ethprecompile.Injector

PrecompilesToInject returns a function that provides the initialization of the standard set of precompiles.

func QueryContextFn

func QueryContextFn(app *App) func() func(height int64, prove bool) (sdk.Context, error)

Types

type App

type App struct {
	*runtime.App
	*polarruntime.Polaris

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.Keeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             *govkeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	ConsensusParamsKeeper consensuskeeper.Keeper

	// polaris required keepers
	EVMKeeper *evmkeeper.Keeper

	// world engine keepers
	NamespaceKeeper *namespacekeeper.Keeper
	ShardKeeper     *shardkeeper.Keeper

	// plugins
	Router         router.Router
	ShardSequencer *sequencer.Sequencer
	// 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,
	bech32Prefix string,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *App

NewApp returns a reference to an initialized App.

func (*App) Close

func (app *App) Close() error

Close shuts down the application.

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) LegacyAmino

func (app *App) 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 (*App) Name

func (app *App) Name() string

Name returns the name of the App.

func (*App) PrepareProposalHook added in v1.4.0

PrepareProposalHook injects the shard router side-channel messages into ResponsePrepareProposal after Polaris' PrepareProposal logic is executed.

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) RegisterUpgradeHandlers added in v1.2.0

func (app App) RegisterUpgradeHandlers()

func (*App) SimulationManager

func (app *App) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface. We don't use simulations.

Jump to

Keyboard shortcuts

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