Documentation ¶
Index ¶
- func CheckTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error)
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func SetExpeditedProposalsEnabled(val bool)
- func SetMinStakedTokens(tokens math.LegacyDec)
- type GovExpeditedProposalsDecorator
- type GovVoteDecorator
- type HandlerOptions
- type MinCommissionDecorator
- func (min MinCommissionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
- func (min MinCommissionDecorator) CalculateDelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, ...) sdkmath.LegacyDec
- func (min MinCommissionDecorator) CalculateRedelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, ...) sdkmath.LegacyDec
- func (min MinCommissionDecorator) CalculateValidatorProjectedVotingPower(ctx sdk.Context, delegateAmount sdkmath.LegacyDec) sdkmath.LegacyDec
- type VestedAnteHandlerDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTxFeeWithValidatorMinGasPrices ¶
CheckTxFeeWithValidatorMinGasPrices implements the default fee logic, where the minimum price per unit of gas is fixed and set by each validator, can the tx priority is computed from the gas price.
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
func SetExpeditedProposalsEnabled ¶ added in v0.50.0
func SetExpeditedProposalsEnabled(val bool)
SetExpeditedProposalsEnabled toggles the expedited proposals decorator on/off. Should only be used in testing - It ensures that simtests tests pass.
func SetMinStakedTokens ¶ added in v0.50.0
SetMinStakedTokens sets the minimum amount of staked tokens required to vote Should only be used in testing
Types ¶
type GovExpeditedProposalsDecorator ¶ added in v0.50.0
type GovExpeditedProposalsDecorator struct {
// contains filtered or unexported fields
}
Check if the proposal is whitelisted for expedited voting.
func NewGovExpeditedProposalsDecorator ¶ added in v0.50.0
func NewGovExpeditedProposalsDecorator(cdc codec.BinaryCodec) GovExpeditedProposalsDecorator
func (GovExpeditedProposalsDecorator) AnteHandle ¶ added in v0.50.0
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 ¶ added in v0.50.0
type GovVoteDecorator struct {
// contains filtered or unexported fields
}
func NewGovVoteDecorator ¶ added in v0.50.0
func NewGovVoteDecorator(cdc codec.BinaryCodec, stakingKeeper *stakingkeeper.Keeper) GovVoteDecorator
func (GovVoteDecorator) AnteHandle ¶ added in v0.50.0
func (GovVoteDecorator) ValidateVoteMsgs ¶ added in v0.50.0
ValidateVoteMsgs checks if a voter has enough stake to vote
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions Cdc codec.BinaryCodec IBCKeeper *ibckeeper.Keeper StakingKeeper *stakingkeeper.Keeper ConsumerKeeper ibcconsumerkeeper.Keeper BankKeeper bankkeeper.Keeper ParameterKeeper parameterkeeper.Keeper }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type MinCommissionDecorator ¶
type MinCommissionDecorator struct {
// contains filtered or unexported fields
}
func NewMinCommissionDecorator ¶
func NewMinCommissionDecorator(cdc codec.BinaryCodec, sk *stakingkeeper.Keeper, bk bankkeeper.Keeper, pk parameterkeeper.Keeper) MinCommissionDecorator
func (MinCommissionDecorator) AnteHandle ¶
func (MinCommissionDecorator) CalculateDelegateProjectedVotingPower ¶
func (min MinCommissionDecorator) CalculateDelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdkmath.LegacyDec) sdkmath.LegacyDec
Returns the projected voting power as a percentage (not a fraction)
func (MinCommissionDecorator) CalculateRedelegateProjectedVotingPower ¶
func (min MinCommissionDecorator) CalculateRedelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdkmath.LegacyDec) sdkmath.LegacyDec
Returns the projected voting power as a percentage (not a fraction)
func (MinCommissionDecorator) CalculateValidatorProjectedVotingPower ¶
func (min MinCommissionDecorator) CalculateValidatorProjectedVotingPower(ctx sdk.Context, delegateAmount sdkmath.LegacyDec) sdkmath.LegacyDec
Returns the projected voting power as a percentage (not a fraction)
type VestedAnteHandlerDecorator ¶ added in v0.51.0
type VestedAnteHandlerDecorator struct {
// contains filtered or unexported fields
}
CustomAnteHandlerDecorator checks for the use of vested tokens in various operations
func NewVestedAnteHandlerDecorator ¶ added in v0.51.0
func NewVestedAnteHandlerDecorator(ak authante.AccountKeeper, bk bankkeeper.Keeper) VestedAnteHandlerDecorator