app

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: GPL-3.0 Imports: 101 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bech32HRP = "story"
)

Bech32HRP is the human-readable-part of the Bech32 address format.

View Source
const Name = "story"

Variables

View Source
var (
	// `Upgrades` defines the upgrade handlers and store loaders for the application.
	// New upgrades should be added to this slice after they are implemented.
	Upgrades = []upgrades.Upgrade{}
	// Forks are for hard forks that breaks backward compatibility.
	Forks = []upgrades.Fork{}
)

Functions

func DepConfig

func DepConfig() depinject.Config

DepConfig returns the default app depinject config.

func Rollback

func Rollback(ctx context.Context, cfg Config, removeBlock bool) error

func Run

func Run(ctx context.Context, cfg Config) error

Run runs the story client until the context is canceled.

func Start

func Start(ctx context.Context, cfg Config) (func(context.Context) error, error)

Start starts the story client returning a stop function or an error.

Note that the original context used to start the app must be canceled first before calling the stop function and a fresh context should be passed into the stop function.

Types

type App

type App struct {
	*runtime.App

	Keepers keepers.Keepers
	// 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 CreateApp added in v0.10.2

func CreateApp(ctx context.Context, cfg Config) *App

TODO: Refactor CreateApp() to be used within the Start function, as most of the code originates from there.

func (App) ExportAppStateAndValidators

func (App) ExportAppStateAndValidators(_ bool, _, _ []string) (servertypes.ExportedApp, error)

func (App) GetAccountKeeper

func (a App) GetAccountKeeper() authkeeper.AccountKeeper

func (App) GetBankKeeper

func (a App) GetBankKeeper() bankkeeper.Keeper

func (App) GetDistrKeeper

func (a App) GetDistrKeeper() distrkeeper.Keeper

func (App) GetEvmStakingKeeper added in v0.10.0

func (a App) GetEvmStakingKeeper() *evmstakingkeeper.Keeper

func (App) GetMintKeeper added in v0.12.0

func (a App) GetMintKeeper() mintkeeper.Keeper

func (App) GetSlashingKeeper added in v0.10.0

func (a App) GetSlashingKeeper() slashingkeeper.Keeper

func (App) GetStakingKeeper

func (a App) GetStakingKeeper() *stakingkeeper.Keeper

func (App) GetUpgradeKeeper

func (a App) GetUpgradeKeeper() *upgradekeeper.Keeper

func (App) LegacyAmino

func (App) LegacyAmino() *codec.LegacyAmino

func (*App) PreBlocker

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

PreBlocker application updates every pre block.

func (App) SetCometAPI

func (a App) SetCometAPI(api comet.API)

SetCometAPI sets the comet API client. TODO: Figure out how to use depinject to set this.

func (App) SimulationManager

func (App) SimulationManager() *module.SimulationManager

type Config

type Config struct {
	storycfg.Config
	Comet cmtcfg.Config
}

Config wraps the story (app) and comet (client) configurations.

func (Config) BackendType

func (c Config) BackendType() dbm.BackendType

BackendType returns the story config backend type or the comet backend type otherwise.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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