app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 88 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "comdex"
	Name                 = "comdex"
)

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string
	// use this for clarity in argument list
	EmptyWasmOpts []wasm.Option
	// ModuleBasics defines the module BasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		auth.AppModuleBasic{},
		genutil.AppModuleBasic{},
		bank.AppModuleBasic{},
		capability.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(
			paramsclient.ProposalHandler,
			distrclient.ProposalHandler,
			upgradeclient.ProposalHandler,
			upgradeclient.CancelProposalHandler,
		),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		authzmodule.AppModuleBasic{},
		ibc.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		ibctransfer.AppModuleBasic{},
		vesting.AppModuleBasic{},
		wasm.AppModuleBasic{},
	)
)
View Source
var (
	AccountPubKeyPrefix        = AccountAddressPrefix + sdk.PrefixPublic
	ValidatorAddressPrefix     = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixOperator
	ValidatorPubKeyPrefix      = ValidatorAddressPrefix + sdk.PrefixPublic
	ConsensusNodeAddressPrefix = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus
	ConsensusNodePubKeyPrefix  = ConsensusNodeAddressPrefix + sdk.PrefixPublic
)

Functions

func SetAccountAddressPrefixes

func SetAccountAddressPrefixes()

SetAccountAddressPrefixes sets the global prefix to be used when serializing addresses to bech32 strings.

Types

type App

type App struct {
	*baseapp.BaseApp
	// 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 New

func New(
	logger log.Logger,
	db tmdb.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encoding EncodingConfig,
	appOptions servertypes.AppOptions,
	wasmOpts []wasm.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) *App

New returns a reference to an initialized App.

func (*App) AppCodec

func (a *App) AppCodec() codec.BinaryCodec

AppCodec returns App's 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) BeginBlocker

BeginBlocker application updates every begin block

func (*App) EndBlocker

EndBlocker application updates every end block

func (*App) ExportAppStateAndValidators

func (a *App) ExportAppStateAndValidators(
	forZeroHeight bool, jailAllowedAddrs []string,
) (servertypes.ExportedApp, error)

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

func (*App) GetKey

func (a *App) GetKey(storeKey string) *sdk.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*App) GetMemKey

func (a *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*App) GetSubspace

func (a *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) GetTKey

func (a *App) GetTKey(storeKey string) *sdk.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*App) InitChainer

InitChainer application update at chain initialization

func (*App) InterfaceRegistry

func (a *App) InterfaceRegistry() codectypes.InterfaceRegistry

InterfaceRegistry returns Gaia's InterfaceRegistry

func (*App) LegacyAmino

func (a *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 (a *App) LoadHeight(height int64) error

LoadHeight loads a particular height

func (*App) ModuleAccountAddrs

func (a *App) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*App) ModuleAccountsPermissions

func (a *App) ModuleAccountsPermissions() map[string][]string

func (*App) Name

func (a *App) Name() string

Name returns the name of the App

func (*App) RegisterAPIRoutes

func (a *App) RegisterAPIRoutes(server *api.Server, _ serverconfig.APIConfig)

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

func (*App) RegisterTendermintService

func (a *App) RegisterTendermintService(ctx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*App) RegisterTxService

func (a *App) RegisterTxService(ctx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

type EncodingConfig

type EncodingConfig struct {
	Amino             *codec.LegacyAmino
	InterfaceRegistry codectypes.InterfaceRegistry
	Marshaler         codec.ProtoCodecMarshaler
	TxConfig          client.TxConfig
}

func MakeEncodingConfig

func MakeEncodingConfig() EncodingConfig

func NewEncodingConfig

func NewEncodingConfig() EncodingConfig

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState 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.

func NewDefaultGenesisState

func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState

NewDefaultGenesisState generates the default state for the application.

Directories

Path Synopsis
upgrades

Jump to

Keyboard shortcuts

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