Documentation ¶
Index ¶
- Variables
- func AllCapabilities() []string
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig(tb testing.TB) params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func NewTestNetworkFixture() network.TestFixture
- type DangerApp
- func (app *DangerApp) AppCodec() codec.Codec
- func (app *DangerApp) AutoCliOpts() autocli.AppOptions
- func (app *DangerApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *DangerApp) Configurator() module.Configurator
- func (app *DangerApp) DefaultGenesis() map[string]json.RawMessage
- func (app *DangerApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *DangerApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *DangerApp) GetAccountKeeper() authkeeper.AccountKeeper
- func (app *DangerApp) GetBankKeeper() bankkeeper.Keeper
- func (app *DangerApp) GetBaseApp() *baseapp.BaseApp
- func (app *DangerApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *DangerApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *DangerApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *DangerApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *DangerApp) GetStakingKeeper() *stakingkeeper.Keeper
- func (app *DangerApp) GetStoreKeys() []storetypes.StoreKey
- func (app *DangerApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *DangerApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *DangerApp) GetWasmKeeper() wasmkeeper.Keeper
- func (app *DangerApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *DangerApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *DangerApp) LegacyAmino() *codec.LegacyAmino
- func (app *DangerApp) LoadHeight(height int64) error
- func (app *DangerApp) Name() string
- func (app *DangerApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *DangerApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *DangerApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *DangerApp) RegisterTendermintService(clientCtx client.Context)
- func (app *DangerApp) RegisterTxService(clientCtx client.Context)
- func (app DangerApp) RegisterUpgradeHandlers()
- func (app *DangerApp) SimulationManager() *module.SimulationManager
- func (app *DangerApp) TxConfig() client.TxConfig
- type GenesisState
- type HandlerOptions
Constants ¶
This section is empty.
Variables ¶
var ( Bech32Prefix = "danger" DefaultNodeHome = ".danger" )
We pull these out so we can set them with LDFLAGS in the Makefile
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
var Upgrades = []upgrades.Upgrade{v050.Upgrade}
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 ¶
BlockedAddresses returns all the app's blocked account addresses.
func GetMaccPerms ¶
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 ¶
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 ¶
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 ¶
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 (*DangerApp) GetIBCKeeper ¶
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 ¶
LoadHeight loads a particular height
func (*DangerApp) PreBlocker ¶
func (app *DangerApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
func (*DangerApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*DangerApp) RegisterNodeService ¶
func (*DangerApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*DangerApp) RegisterTxService ¶
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
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.