app

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 120 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func DefaultConfig added in v0.11.0

func DefaultConfig() network.Config

DefaultConfig returns a default configuration suitable for nearly all testing requirements.

func MakeEncodingConfig added in v0.8.0

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func NewAnteHandler added in v0.10.0

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

func NewAppConstructor added in v0.11.0

func NewAppConstructor(encodingCfg params.EncodingConfig) network.AppConstructor

func QueryBalanceExec added in v0.8.0

func QueryBalanceExec(clientCtx client.Context, address string, denom string, extraArgs ...string) (testutil.BufferWriter, error)

func RegisterSwaggerAPI added in v0.8.0

func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

Types

type BitsongApp added in v0.11.0

type BitsongApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper    authkeeper.AccountKeeper
	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
	FeeGrantKeeper   feegrantkeeper.Keeper
	AuthzKeeper      authzkeeper.Keeper
	RouterKeeper     routerkeeper.Keeper

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

	FanTokenKeeper   fantokenkeeper.Keeper
	MerkledropKeeper merkledropkeeper.Keeper
	// contains filtered or unexported fields
}

BitsongApp 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 NewBitsongApp

func NewBitsongApp(
	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),
) *BitsongApp

NewBitsongApp returns a reference to an initialized BitsongApp.

func Setup added in v0.8.0

func Setup(isCheckTx bool) *BitsongApp

Setup initializes a new BitsongApp

func (*BitsongApp) AppCodec added in v0.11.0

func (app *BitsongApp) 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 (*BitsongApp) BeginBlocker added in v0.11.0

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

BeginBlocker application updates every begin block

func (*BitsongApp) EndBlocker added in v0.11.0

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

EndBlocker application updates every end block

func (*BitsongApp) ExportAppStateAndValidators added in v0.11.0

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

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

func (*BitsongApp) GetKey added in v0.11.0

func (app *BitsongApp) 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 (*BitsongApp) GetMemKey added in v0.11.0

func (app *BitsongApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*BitsongApp) GetSubspace added in v0.11.0

func (app *BitsongApp) 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 (*BitsongApp) GetTKey added in v0.11.0

func (app *BitsongApp) 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 (*BitsongApp) InitChainer added in v0.11.0

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

InitChainer application update at chain initialization

func (*BitsongApp) InterfaceRegistry added in v0.11.0

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

InterfaceRegistry returns Gaia's InterfaceRegistry

func (*BitsongApp) LegacyAmino added in v0.11.0

func (app *BitsongApp) 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 (*BitsongApp) LoadHeight added in v0.11.0

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

LoadHeight loads a particular height

func (*BitsongApp) ModuleAccountAddrs added in v0.11.0

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*BitsongApp) Name added in v0.11.0

func (app *BitsongApp) Name() string

Name returns the name of the App

func (*BitsongApp) RegisterAPIRoutes added in v0.11.0

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

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

func (*BitsongApp) RegisterTendermintService added in v0.11.0

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*BitsongApp) RegisterTxService added in v0.11.0

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

RegisterTxService implements the Application.RegisterTxService method.

func (*BitsongApp) SimulationManager added in v0.11.0

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

SimulationManager implements the SimulationApp interface

type CosmosApp added in v0.8.0

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

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

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

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

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

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

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

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

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

type GenesisState added in v0.5.0

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.

func NewDefaultGenesisState added in v0.5.0

func NewDefaultGenesisState() GenesisState

NewDefaultGenesisState generates the default state for the application.

type HandlerOptions added in v0.10.0

type HandlerOptions struct {
	ante.HandlerOptions

	IBCkeeper *ibckeeper.Keeper
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.

type MinValCommissionDecorator added in v0.10.0

type MinValCommissionDecorator struct{}

func NewMinValCommissionDecorator added in v0.10.0

func NewMinValCommissionDecorator() MinValCommissionDecorator

func (MinValCommissionDecorator) AnteHandle added in v0.10.0

func (MinValCommissionDecorator) AnteHandle(
	ctx sdk.Context, tx sdk.Tx,
	simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

Directories

Path Synopsis
Package params defines the simulation parameters in the simapp.
Package params defines the simulation parameters in the simapp.
upgrades

Jump to

Keyboard shortcuts

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