Documentation ¶
Index ¶
- Variables
- func GetEnabledProposals() []wasmtypes.ProposalType
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- func NewDefaultGenesisState() wasmapp.GenesisState
- func RegisterSwaggerAPI(rtr *mux.Router)
- type EmptyBaseAppOptions
- type WasmPlusApp
- func (app *WasmPlusApp) AppCodec() codec.Codec
- func (app *WasmPlusApp) BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *WasmPlusApp) BlockedAddrs() map[string]bool
- func (app *WasmPlusApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *WasmPlusApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *WasmPlusApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *WasmPlusApp) LegacyAmino() *codec.LegacyAmino
- func (app *WasmPlusApp) LoadHeight(height int64) error
- func (app *WasmPlusApp) ModuleAccountAddrs() map[string]bool
- func (app *WasmPlusApp) ModuleConfigurator() module.Configurator
- func (app *WasmPlusApp) ModuleManager() module.Manager
- func (app *WasmPlusApp) Name() string
- func (app *WasmPlusApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *WasmPlusApp) RegisterNodeService(clientCtx client.Context)
- func (app *WasmPlusApp) RegisterTendermintService(clientCtx client.Context)
- func (app *WasmPlusApp) RegisterTxService(clientCtx client.Context)
- func (app *WasmPlusApp) SimulationManager() *module.SimulationManager
Constants ¶
This section is empty.
Variables ¶
var ( NodeDir = ".wasmplusd" Bech32Prefix = "link" ProposalsEnabled = "false" EnableSpecificProposals = "" )
We pull these out, so we can set them with LDFLAGS in the Makefile
var ( // DefaultNodeHome default home directories for wasmd DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir // 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 ( // 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{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( append( wasmclient.ProposalHandlers, paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, )..., ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, wasmplus.AppModuleBasic{}, ica.AppModuleBasic{}, ) )
Functions ¶
func GetEnabledProposals ¶
func GetEnabledProposals() []wasmtypes.ProposalType
GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates a new EncodingConfig with all modules registered
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() wasmapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
Types ¶
type EmptyBaseAppOptions ¶
type EmptyBaseAppOptions struct{}
EmptyBaseAppOptions is a stub implementing AppOptions
func (EmptyBaseAppOptions) Get ¶
func (ao EmptyBaseAppOptions) Get(o string) interface{}
Get implements AppOptions
type WasmPlusApp ¶
type WasmPlusApp 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 EvidenceKeeper evidencekeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper WasmKeeper wasmpluskeeper.Keeper ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedWasmKeeper capabilitykeeper.ScopedKeeper // make IBC modules public for test purposes // these modules are never directly routed to by the IBC Router ICAAuthModule ibcmock.IBCModule // contains filtered or unexported fields }
WasmPlusApp extended ABCI application
func NewWasmApp ¶
func NewWasmApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig wasmappparams.EncodingConfig, enabledProposals []wasmtypes.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *WasmPlusApp
NewWasmApp returns a reference to an initialized WasmPlusApp.
func Setup ¶
func Setup(isCheckTx bool, opts ...wasm.Option) *WasmPlusApp
Setup initializes a new WasmApp with DefaultNodeHome for integration tests
func (*WasmPlusApp) AppCodec ¶
func (app *WasmPlusApp) AppCodec() codec.Codec
func (*WasmPlusApp) BeginBlocker ¶
func (app *WasmPlusApp) BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*WasmPlusApp) BlockedAddrs ¶
func (app *WasmPlusApp) BlockedAddrs() map[string]bool
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*WasmPlusApp) EndBlocker ¶
func (app *WasmPlusApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*WasmPlusApp) ExportAppStateAndValidators ¶
func (app *WasmPlusApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*WasmPlusApp) InitChainer ¶
func (app *WasmPlusApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*WasmPlusApp) LegacyAmino ¶
func (app *WasmPlusApp) 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 (*WasmPlusApp) LoadHeight ¶
func (app *WasmPlusApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*WasmPlusApp) ModuleAccountAddrs ¶
func (app *WasmPlusApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*WasmPlusApp) ModuleConfigurator ¶
func (app *WasmPlusApp) ModuleConfigurator() module.Configurator
ModuleConfigurator returns instance
func (*WasmPlusApp) ModuleManager ¶
func (app *WasmPlusApp) ModuleManager() module.Manager
ModuleManager returns instance
func (*WasmPlusApp) RegisterAPIRoutes ¶
func (app *WasmPlusApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*WasmPlusApp) RegisterNodeService ¶
func (app *WasmPlusApp) RegisterNodeService(clientCtx client.Context)
func (*WasmPlusApp) RegisterTendermintService ¶
func (app *WasmPlusApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*WasmPlusApp) RegisterTxService ¶
func (app *WasmPlusApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*WasmPlusApp) SimulationManager ¶
func (app *WasmPlusApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface