Documentation ¶
Overview ¶
The lockup AnteHandler defines a configurable Tx validation system to control which Txs submitted to the chain will be allowed into the Mempool and eventually included in a block. In particular, this file defines a LockupAnteHandler, which performs the funds transfer locking feature and a WrappedAnteHanlder which makes it simpler to chain multiple AnteHandlers from disparate sources in the chain.
Index ¶
- func NewLockupAnteHandler(lockupKeeper keeper.Keeper, cdc codec.Codec) sdk.AnteHandler
- func NewWrappedLockupAnteHandler(anteHandler sdk.AnteHandler, lockupKeeper keeper.Keeper, cdc codec.Codec) sdk.AnteHandler
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx sdk.Context, _ 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(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func (AppModule) Name() string
- func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
- func (am AppModule) QuerierRoute() string
- func (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 (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
- type LockAnteDecorator
- type WrappedAnteHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLockupAnteHandler ¶
NewLockupAnteHandler returns an AnteHandler that ensures any transaction under a locked chain originates from a LockExempt address
func NewWrappedLockupAnteHandler ¶
func NewWrappedLockupAnteHandler( anteHandler sdk.AnteHandler, lockupKeeper keeper.Keeper, cdc codec.Codec, ) sdk.AnteHandler
WrappedLockupAnteHandler wraps a LockupAnteHandler around the input AnteHandler
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule object for module implementation
func NewAppModule ¶
func NewAppModule(k keeper.Keeper, bankKeeper bankkeeper.Keeper) AppModule
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
BeginBlock implements app module
func (AppModule) ConsensusVersion ¶
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock implements app module
func (AppModule) ExportGenesis ¶
ExportGenesis exports the current genesis state to a json.RawMessage
func (AppModule) GenerateGenesisState ¶
func (AppModule) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the distribution module.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis initializes the genesis state for this module and implements app module.
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
LegacyQuerierHandler returns the distribution module sdk.Querier.
func (AppModule) ProposalContents ¶
func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
ProposalContents returns all the distribution content functions used to simulate governance proposals.
func (AppModule) QuerierRoute ¶
QuerierRoute implements app module
func (AppModule) RandomizedParams ¶
func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
RandomizedParams creates randomized distribution param changes for the simulator.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants implements app module
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices registers module services.
func (AppModule) RegisterStoreDecoder ¶
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for distribution 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 object for module implementation
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis implements app module basic
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd implements app module basic
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd implements app module basic
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the distribution module. also implements app modeul basic
func (AppModuleBasic) RegisterInterfaces ¶
func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces implements app bmodule basic
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec implements app module basic
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)
RegisterRESTRoutes implements app module basic
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis implements app module basic
type LockAnteDecorator ¶
type LockAnteDecorator struct {
// contains filtered or unexported fields
}
LockAnteDecorator Ensures that any transaction under a locked chain originates from a LockExempt address
func NewLockupAnteDecorator ¶
func NewLockupAnteDecorator(lockupKeeper keeper.Keeper, cdc codec.Codec) LockAnteDecorator
NewLockupAnteDecorator initializes a LockupAnteDecorator for locking messages based on the settings stored in lockupKeeper
func (LockAnteDecorator) AnteHandle ¶
func (lad LockAnteDecorator) AnteHandle( ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler, ) (newCtx sdk.Context, err error)
AnteHandle Ensures that any transaction transferring a locked token via a locked message type from a nonexempt address is blocked when the chain is locked
type WrappedAnteHandler ¶
type WrappedAnteHandler struct {
// contains filtered or unexported fields
}
WrappedAnteHandler An AnteDecorator used to wrap any AnteHandler for decorator chaining This is necessary to use the Cosmos SDK's NewAnteHandler() output with a LockupAnteHandler, as the sdk does not expose a stable list of AnteDecorators before chaining, and every upgrade poses a risk of missing updates
func (WrappedAnteHandler) AnteHandle ¶
func (wad WrappedAnteHandler) AnteHandle( ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler, ) (sdk.Context, error)
AnteHandle calls wad.anteHandler and then the next one in the chain