app

package
v0.0.0-...-8edd000 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 77 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bech32Prefix         = "cosmos"
	AppName              = "tutorial"
	DefaultDenom         = "uatom"
	Bech32PrefixAccAddr  = Bech32Prefix
	Bech32PrefixAccPub   = Bech32Prefix + "pub"
	Bech32PrefixValAddr  = Bech32Prefix + "valoper"
	Bech32PrefixValPub   = Bech32Prefix + "valoperpub"
	Bech32PrefixConsAddr = Bech32Prefix + "valcons"
	Bech32PrefixConsPub  = Bech32Prefix + "valconspub"
)

Variables

View Source
var (
	DefaultNodeHome string
)

Functions

This section is empty.

Types

type EmptyAppOptions

type EmptyAppOptions struct{}

func (EmptyAppOptions) Get

func (ao EmptyAppOptions) Get(_ string) interface{}

type ExampleApp

type ExampleApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.Keeper
	StakingKeeper         *stakingkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper

	BasicManager module.BasicManager
	// contains filtered or unexported fields
}

func NewExampleApp

func NewExampleApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	valKeyName string,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *ExampleApp

func (*ExampleApp) AppCodec

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

func (*ExampleApp) AutoCliOpts

func (app *ExampleApp) AutoCliOpts() autocli.AppOptions

AutoCliOpts returns the autocli options for the app.

func (*ExampleApp) BeginBlocker

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

BeginBlocker application updates every begin block

func (*ExampleApp) BlockedModuleAccountAddrs

func (app *ExampleApp) BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[string]bool

func (*ExampleApp) DefaultGenesis

func (app *ExampleApp) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*ExampleApp) EndBlocker

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

EndBlocker application updates every end block

func (*ExampleApp) ExportAppStateAndValidators

func (app *ExampleApp) ExportAppStateAndValidators(
	forZeroHeight bool,
	jailAllowedAddrs []string,
	modulesToExport []string,
) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*ExampleApp) GetBaseApp

func (app *ExampleApp) GetBaseApp() *baseapp.BaseApp

func (*ExampleApp) GetKey

func (app *ExampleApp) 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 (*ExampleApp) GetStoreKeys

func (app *ExampleApp) GetStoreKeys() []storetypes.StoreKey

GetStoreKeys returns all the stored store keys.

func (*ExampleApp) GetSubspace

func (app *ExampleApp) 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 (*ExampleApp) GetTxConfig

func (app *ExampleApp) GetTxConfig() client.TxConfig

func (*ExampleApp) InitChainer

func (app *ExampleApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)

InitChainer application update at chain initialization

func (*ExampleApp) InterfaceRegistry

func (app *ExampleApp) InterfaceRegistry() types.InterfaceRegistry

func (*ExampleApp) LegacyAmino

func (app *ExampleApp) LegacyAmino() *codec.LegacyAmino

func (*ExampleApp) LoadHeight

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

func (*ExampleApp) ModuleAccountAddrs

func (app *ExampleApp) ModuleAccountAddrs() map[string]bool

func (*ExampleApp) Name

func (app *ExampleApp) Name() string

func (*ExampleApp) OnTxFailed

func (app *ExampleApp) OnTxFailed(_ sdk.Context, _, _ string, _, _ []byte)

func (*ExampleApp) OnTxSucceeded

func (app *ExampleApp) OnTxSucceeded(_ sdk.Context, _, _ string, _, _ []byte)

func (*ExampleApp) RegisterAPIRoutes

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

func (*ExampleApp) RegisterNodeService

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

func (*ExampleApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*ExampleApp) RegisterTxService

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

func (*ExampleApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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