Documentation ¶
Index ¶
- Constants
- func AddModuleInitFlags(startCmd *cobra.Command)
- func BeginBlocker(ctx sdk.Context, k abciKeeper, b abci.RequestBeginBlock)
- func ContractAddress(codeID, instanceID uint64) sdk.AccAddress
- func EndBlocker(ctx sdk.Context, k abciKeeper) []abci.ValidatorUpdate
- func ReadWasmConfig(opts servertypes.AppOptions) (types.TWasmConfig, error)
- func RecoverToLog(logger log.Logger, contractAddr sdk.AccAddress) func()
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, b abci.RequestBeginBlock)
- func (am AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx sdk.Context, b abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (AppModule) GenerateGenesisState(simState *module.SimulationState)
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier
- func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
- func (AppModule) QuerierRoute() string
- func (am AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (am AppModule) Route() sdk.Route
- func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation
- type AppModuleBasic
- func (b AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (b AppModuleBasic) GetQueryCmd() *cobra.Command
- func (b AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, serveMux *runtime.ServeMux)
- func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func (b AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(cliCtx client.Context, rtr *mux.Router)
- func (b AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, config client.TxEncodingConfig, ...) error
Constants ¶
const ( ModuleName = types.ModuleName StoreKey = types.StoreKey RouterKey = types.RouterKey )
Variables ¶
This section is empty.
Functions ¶
func AddModuleInitFlags ¶
AddModuleInitFlags implements servertypes.ModuleInitFlags interface.
func BeginBlocker ¶
func BeginBlocker(ctx sdk.Context, k abciKeeper, b abci.RequestBeginBlock)
func ContractAddress ¶
func ContractAddress(codeID, instanceID uint64) sdk.AccAddress
ContractAddress generator function. Same as in wasm
func EndBlocker ¶
func EndBlocker(ctx sdk.Context, k abciKeeper) []abci.ValidatorUpdate
EndBlocker ABCI end block callback. Does not modify the validator set
func ReadWasmConfig ¶
func ReadWasmConfig(opts servertypes.AppOptions) (types.TWasmConfig, error)
ReadWasmConfig reads the wasm specifig configuration
func RecoverToLog ¶ added in v1.0.0
func RecoverToLog(logger log.Logger, contractAddr sdk.AccAddress) func()
RecoverToLog catches panic and logs cause to error
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the wasm module.
func NewAppModule ¶
func NewAppModule( cdc codec.Codec, keeper *keeper.Keeper, validatorSetSource wasmkeeper.ValidatorSetSource, ak wasmtypes.AccountKeeper, bk simulation.BankKeeper, ) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, b abci.RequestBeginBlock)
BeginBlock returns the begin blocker for the wasm module.
func (AppModule) ConsensusVersion ¶ added in v0.6.2
ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, b abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock returns the end blocker for the wasm module. It returns no validator updates.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the wasm module.
func (AppModule) GenerateGenesisState ¶
func (AppModule) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the bank module.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the wasm module. It returns no validator updates.
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier
func (AppModule) ProposalContents ¶
func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the wasm module's querier route name.
func (AppModule) RandomizedParams ¶
func (am AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
RandomizedParams creates randomized bank param changes for the simulator.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants registers the wasm module invariants.
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
func (AppModule) RegisterStoreDecoder ¶
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for supply module's types
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation
WeightedOperations returns the all the gov module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic defines the basic application module used by the wasm module.
func (AppModuleBasic) DefaultGenesis ¶
func (b AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the wasm module.
func (AppModuleBasic) GetQueryCmd ¶
func (b AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd returns no root query command for the wasm module.
func (AppModuleBasic) GetTxCmd ¶
func (b AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns the root tx command for the wasm module.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the wasm module's name.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, serveMux *runtime.ServeMux)
func (AppModuleBasic) RegisterInterfaces ¶
func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaceTypes implements InterfaceModule
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (b AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(cliCtx client.Context, rtr *mux.Router)
RegisterRESTRoutes registers the REST routes for the wasm module.
func (AppModuleBasic) ValidateGenesis ¶
func (b AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, config client.TxEncodingConfig, message json.RawMessage) error
ValidateGenesis performs genesis state validation for the wasm module.