app

package
v0.0.0-...-33e2c26 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 143 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bech32Prefix    = "danger"
	DefaultNodeHome = ".danger"
)

We pull these out so we can set them with LDFLAGS in the Makefile

View Source
var (
	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

These constants are derived from the above variables. These are the ones we will want to use in the code, based on any overrides above

Upgrades list of chain upgrades

Functions

func AllCapabilities

func AllCapabilities() []string

AllCapabilities returns all capabilities available with the current wasmvm See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

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

func MakeEncodingConfig

func MakeEncodingConfig(tb testing.TB) params.EncodingConfig

MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only

func NewAnteHandler

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

func NewTestNetworkFixture

func NewTestNetworkFixture() network.TestFixture

NewTestNetworkFixture returns a new DangerApp AppConstructor for network simulation tests

Types

type DangerApp

type DangerApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.BaseKeeper
	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
	AuthzKeeper           authzkeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	GroupKeeper           groupkeeper.Keeper
	NFTKeeper             nftkeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper
	CircuitKeeper         circuitkeeper.Keeper

	IBCKeeper           *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	IBCFeeKeeper        ibcfeekeeper.Keeper
	ICAControllerKeeper icacontrollerkeeper.Keeper
	ICAHostKeeper       icahostkeeper.Keeper
	TransferKeeper      ibctransferkeeper.Keeper
	WasmKeeper          wasmkeeper.Keeper

	ScopedIBCKeeper           capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper       capabilitykeeper.ScopedKeeper
	ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper      capabilitykeeper.ScopedKeeper
	ScopedIBCFeeKeeper        capabilitykeeper.ScopedKeeper
	ScopedWasmKeeper          capabilitykeeper.ScopedKeeper

	// the module manager
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// contains filtered or unexported fields
}

DangerApp extended ABCI application

func NewDangerApp

func NewDangerApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	wasmOpts []wasmkeeper.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) *DangerApp

NewDangerApp returns a reference to an initialized DangerApp.

func (*DangerApp) AppCodec

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

AppCodec returns 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 (*DangerApp) AutoCliOpts

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

AutoCliOpts returns the autocli options for the app.

func (*DangerApp) BeginBlocker

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

BeginBlocker application updates every begin block

func (*DangerApp) Configurator

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

func (*DangerApp) DefaultGenesis

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

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

func (*DangerApp) EndBlocker

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

EndBlocker application updates every end block

func (*DangerApp) ExportAppStateAndValidators

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

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

func (*DangerApp) GetAccountKeeper

func (app *DangerApp) GetAccountKeeper() authkeeper.AccountKeeper

func (*DangerApp) GetBankKeeper

func (app *DangerApp) GetBankKeeper() bankkeeper.Keeper

func (*DangerApp) GetBaseApp

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

func (*DangerApp) GetIBCKeeper

func (app *DangerApp) GetIBCKeeper() *ibckeeper.Keeper

func (*DangerApp) GetKey

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

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

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*DangerApp) GetScopedIBCKeeper

func (app *DangerApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper

func (*DangerApp) GetStakingKeeper

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

func (*DangerApp) GetStoreKeys

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

GetStoreKeys returns all the stored store keys.

func (*DangerApp) GetSubspace

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

func (app *DangerApp) 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 (*DangerApp) GetWasmKeeper

func (app *DangerApp) GetWasmKeeper() wasmkeeper.Keeper

func (*DangerApp) InitChainer

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

InitChainer application update at chain initialization

func (*DangerApp) InterfaceRegistry

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

InterfaceRegistry returns DangerApp's InterfaceRegistry

func (*DangerApp) LegacyAmino

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

LegacyAmino returns legacy 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 (*DangerApp) LoadHeight

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

LoadHeight loads a particular height

func (*DangerApp) Name

func (app *DangerApp) Name() string

Name returns the name of the App

func (*DangerApp) PreBlocker

func (app *DangerApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block

func (*DangerApp) RegisterAPIRoutes

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

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

func (*DangerApp) RegisterNodeService

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

func (*DangerApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*DangerApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (DangerApp) RegisterUpgradeHandlers

func (app DangerApp) RegisterUpgradeHandlers()

RegisterUpgradeHandlers registers the chain upgrade handlers

func (*DangerApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

func (*DangerApp) TxConfig

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

TxConfig returns DangerApp's TxConfig

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState 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(t *testing.T) GenesisState

NewDefaultGenesisState generates the default state for the application. Deprecated: use wasmApp.DefaultGenesis() instead

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	IBCKeeper             *keeper.Keeper
	WasmConfig            *wasmTypes.WasmConfig
	WasmKeeper            *wasmkeeper.Keeper
	TXCounterStoreService corestoretypes.KVStoreService
	CircuitKeeper         *circuitkeeper.Keeper
}

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

Directories

Path Synopsis
Package params defines the simulation parameters in the gaia.
Package params defines the simulation parameters in the gaia.

Jump to

Keyboard shortcuts

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