app

package
v0.4.7-rc6-fix Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 124 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "artela"
	Name                 = "artela"
	ExeName              = "artelad"
)

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string

	// 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{},
		authzmodule.AppModuleBasic{},
		genutil.NewAppModuleBasic(genutilmodule.DefaultMessageValidator),
		bank.AppModuleBasic{},
		capability.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(getGovProposalHandlers()),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		feegrantmodule.AppModuleBasic{},
		groupmodule.AppModuleBasic{},
		ibc.AppModuleBasic{},
		ibctm.AppModuleBasic{},
		solomachine.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		transfer.AppModuleBasic{},
		ica.AppModuleBasic{},
		vesting.AppModuleBasic{},
		consensus.AppModuleBasic{},
		evmmodule.AppModuleBasic{},
		feemodule.AppModuleBasic{},
	)
)

Functions

func MakeConfig

MakeConfig creates an EncodingConfig for testing

func RegisterInterfaces

func RegisterInterfaces(interfaceRegistry codectypes.InterfaceRegistry)

RegisterInterfaces registers Interfaces from types, crypto, and SDK std.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers Interfaces from types, crypto, and SDK std.

Types

type Artela

type Artela struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	AuthzKeeper           authzkeeper.Keeper
	BankKeeper            bankkeeper.Keeper
	CapabilityKeeper      *capabilitykeeper.Keeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	IBCKeeper             *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	EvidenceKeeper        evidencekeeper.Keeper
	TransferKeeper        ibctransferkeeper.Keeper
	ICAHostKeeper         icahostkeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	GroupKeeper           groupkeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper

	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper  capabilitykeeper.ScopedKeeper

	EvmKeeper *evmmodulekeeper.Keeper

	FeeKeeper *feemodulekeeper.Keeper
	// contains filtered or unexported fields
}

Artela 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 NewArtela

func NewArtela(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encodingConfig appparams.EncodingConfig,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *Artela

New returns a reference to an initialized blockchain app

func (*Artela) AppCodec

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

AppCodec returns an 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 (*Artela) BeginBlocker

func (app *Artela) BeginBlocker(ctx cosmos.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker application updates every begin block

func (*Artela) BlockedModuleAccountAddrs

func (app *Artela) BlockedModuleAccountAddrs() map[string]bool

BlockedModuleAccountAddrs returns all the app's blocked module account addresses.

func (*Artela) Configurator

func (app *Artela) Configurator() module.Configurator

Configurator get app configurator

func (*Artela) EndBlocker

func (app *Artela) EndBlocker(ctx cosmos.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker application updates every end block

func (*Artela) ExportAppStateAndValidators

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

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

func (*Artela) GetKey

func (app *Artela) 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 (*Artela) GetMemKey

func (app *Artela) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*Artela) GetSubspace

func (app *Artela) GetSubspace(moduleName string) paramsmodule.Subspace

GetSubspace returns a param subspace for a given module name.

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

func (*Artela) GetTKey

func (app *Artela) GetTKey(storeKey string) *storetypes.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

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

func (*Artela) InitChainer

func (app *Artela) InitChainer(ctx cosmos.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer application update at chain initialization

func (*Artela) InterfaceRegistry

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

InterfaceRegistry returns an InterfaceRegistry

func (*Artela) LegacyAmino

func (app *Artela) 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 (*Artela) LoadHeight

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

LoadHeight loads a particular height

func (*Artela) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*Artela) ModuleManager

func (app *Artela) ModuleManager() *module.Manager

ModuleManager returns the app ModuleManager

func (*Artela) Name

func (app *Artela) Name() string

Name returns the name of the App

func (*Artela) RegisterAPIRoutes

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

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

func (*Artela) RegisterNodeService

func (app *Artela) RegisterNodeService(clientCtx client.Context)

RegisterNodeService implements the Application.RegisterNodeService method.

func (*Artela) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*Artela) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*Artela) SimulationManager

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

SimulationManager returns the app SimulationManager

func (*Artela) TxConfig

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

TxConfig returns SimApp's TxConfig

type GenesisState

type GenesisState map[string]json.RawMessage

The genesis states 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 states for the application.

Directories

Path Synopsis
evm
evm

Jump to

Keyboard shortcuts

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