app

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 94 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

	Upgrades = []upgrades.Upgrade{v2.Upgrade}
)
View Source
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp

DefaultTestingAppInit defines the IBC application used for testing

ModuleBasics defines the module BasicManager is in charge of setting up basic, non-dependant module elements, such as codec registration and genesis verification.

Functions

func CustomConsensusParams

func CustomConsensusParams() *tmproto.ConsensusParams

func GenesisStateWithValSet added in v0.2.0

func GenesisStateWithValSet(app *PundixApp, genesisState simapp.GenesisState,
	valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount,
	balances ...banktypes.Balance,
) simapp.GenesisState

func GetDefaultConsensusParams added in v0.2.0

func GetDefaultConsensusParams() *abci.ConsensusParams

DefaultConsensusParams defines the default Tendermint consensus params used in Evmos testing.

func MakeEncodingConfig

func MakeEncodingConfig() appparams.EncodingConfig

func NewDefAppGenesisByDenom

func NewDefAppGenesisByDenom(stakingDenom, mintDenom string, cdc codec.JSONCodec) map[string]json.RawMessage

func RegisterSwaggerAPI

func RegisterSwaggerAPI(rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

func SetupTestingApp added in v0.2.0

func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)

SetupTestingApp initializes the IBC-go testing application

Types

type CosmosApp

type CosmosApp interface {
	// The assigned name of the app.
	Name() string

	// The application types codec.
	// NOTE: This shoult be sealed before being returned.
	LegacyAmino() *codec.LegacyAmino

	// Application updates every begin block.
	BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

	// Application updates every end block.
	EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

	// Application update at chain (i.e app) initialization.
	InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

	// Loads the app at a given height.
	LoadHeight(height int64) error

	// Exports the state of the application for a genesis file.
	ExportAppStateAndValidators(
		forZeroHeight bool, jailAllowedAddrs []string,
	) (types.ExportedApp, error)

	// All the registered module account addreses.
	ModuleAccountAddrs() map[string]bool
}

App implements the common methods for a Cosmos SDK-based application specific blockchain.

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.

type PundixApp added in v0.2.0

type PundixApp struct {
	*baseapp.BaseApp
	keepers.AppKeepers
	// 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 NewPundixApp added in v0.2.0

func NewPundixApp(
	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),
) *PundixApp

func Setup added in v0.2.0

func Setup(
	isCheckTx bool,
) *PundixApp

Setup initializes a new Evmos. A Nop logger is set in Evmos.

func (*PundixApp) AppCodec added in v0.2.0

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

AppCodec returns Gaia's 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 (*PundixApp) BeginBlocker added in v0.2.0

func (app *PundixApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker application updates every begin block

func (*PundixApp) BlockedModuleAccountAddrs added in v0.2.0

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

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

func (*PundixApp) EndBlocker added in v0.2.0

func (app *PundixApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker application updates every end block

func (*PundixApp) ExportAppStateAndValidators added in v0.2.0

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

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

func (*PundixApp) GetBaseApp added in v0.2.0

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

GetBaseApp implements the TestingApp interface.

func (*PundixApp) GetStakingKeeper added in v0.2.0

func (app *PundixApp) GetStakingKeeper() stakingkeeper.Keeper

GetStakingKeeper implements the TestingApp interface.

func (*PundixApp) GetTxConfig added in v0.2.0

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

GetTxConfig implements the TestingApp interface.

func (*PundixApp) InitChainer added in v0.2.0

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

InitChainer application update at chain initialization

func (*PundixApp) InterfaceRegistry added in v0.2.0

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

InterfaceRegistry returns InterfaceRegistry

func (*PundixApp) LegacyAmino added in v0.2.0

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

LegacyAmino returns GaiaApp'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 (*PundixApp) LoadHeight added in v0.2.0

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

LoadHeight loads a particular height

func (*PundixApp) ModuleAccountAddrs added in v0.2.0

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*PundixApp) Name added in v0.2.0

func (app *PundixApp) Name() string

Name returns the name of the App

func (*PundixApp) RegisterAPIRoutes added in v0.2.0

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

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

func (*PundixApp) RegisterServices added in v0.2.0

func (app *PundixApp) RegisterServices()

func (*PundixApp) RegisterTendermintService added in v0.2.0

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*PundixApp) RegisterTxService added in v0.2.0

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

RegisterTxService implements the Application.RegisterTxService method.

func (*PundixApp) SimulationManager added in v0.2.0

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

Directories

Path Synopsis
v2

Jump to

Keyboard shortcuts

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