Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var UseFeeMarketDecorator = true
UseFeeMarketDecorator to make the integration testing easier: we can switch off its ante and post decorators with this flag
Functions ¶
func NewAnteHandler ¶
func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error)
func SetExpeditedProposalsEnabled ¶
func SetExpeditedProposalsEnabled(val bool)
SetExpeditedProposalsEnabled toggles the expedited proposals decorator on/off. Should only be used in testing - this is to allow simtests to pass.
func SetMinStakedTokens ¶
SetMinStakedTokens sets the minimum amount of staked tokens required to vote Should only be used in testing
Types ¶
type GovExpeditedProposalsDecorator ¶
type GovExpeditedProposalsDecorator struct {
// contains filtered or unexported fields
}
Check if the proposal is whitelisted for expedited voting.
func NewGovExpeditedProposalsDecorator ¶
func NewGovExpeditedProposalsDecorator(cdc codec.BinaryCodec) GovExpeditedProposalsDecorator
func (GovExpeditedProposalsDecorator) AnteHandle ¶
func (g GovExpeditedProposalsDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle checks if the proposal is whitelisted for expedited voting. Only proposals submitted using "gaiad tx gov submit-proposal" can be expedited. Legacy proposals submitted using "gaiad tx gov submit-legacy-proposal" cannot be marked as expedited.
type GovVoteDecorator ¶
type GovVoteDecorator struct {
// contains filtered or unexported fields
}
func NewGovVoteDecorator ¶
func NewGovVoteDecorator(cdc codec.BinaryCodec, stakingKeeper *stakingkeeper.Keeper) GovVoteDecorator
func (GovVoteDecorator) AnteHandle ¶
func (GovVoteDecorator) ValidateVoteMsgs ¶
ValidateVoteMsgs checks if a voter has enough stake to vote
type HandlerOptions ¶
type HandlerOptions struct { ExtensionOptionChecker ante.ExtensionOptionChecker FeegrantKeeper ante.FeegrantKeeper SignModeHandler *txsigning.HandlerMap SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error AccountKeeper feemarketante.AccountKeeper BankKeeper feemarketante.BankKeeper Codec codec.BinaryCodec IBCkeeper *ibckeeper.Keeper StakingKeeper *stakingkeeper.Keeper FeeMarketKeeper *feemarketkeeper.Keeper TxFeeChecker ante.TxFeeChecker TXCounterStoreService corestoretypes.KVStoreService WasmConfig *wasmtypes.WasmConfig }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.