Documentation ¶
Index ¶
- Variables
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- type AdjustGasPriceDecorator
- type HandlerOptions
- type ValidateMinCommissionDecorator
- func (vcd ValidateMinCommissionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
- func (vcd ValidateMinCommissionDecorator) CalculateDelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdk.Dec) sdk.Dec
- func (vcd ValidateMinCommissionDecorator) CalculateRedelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdk.Dec) sdk.Dec
Constants ¶
This section is empty.
Variables ¶
View Source
var MinCommission = sdk.NewDecWithPrec(5, 2) // 5% as a fraction
Functions ¶
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
Types ¶
type AdjustGasPriceDecorator ¶
type AdjustGasPriceDecorator struct {
// contains filtered or unexported fields
}
AdjustGasPriceDecorator is a custom decorator to reduce fee prices .
func NewAdjustGasPriceDecorator ¶
func NewAdjustGasPriceDecorator(adminKeeper adminkeeper.Keeper) AdjustGasPriceDecorator
NewAdjustGasPriceDecorator create a new instance of AdjustGasPriceDecorator
func (AdjustGasPriceDecorator) AnteHandle ¶
func (r AdjustGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle adjusts the gas price based on the tx type.
type HandlerOptions ¶ added in v0.15.0
type HandlerOptions struct { AdminKeeper adminkeeper.Keeper AccountKeeper ante.AccountKeeper BankKeeper bankkeeper.Keeper FeegrantKeeper ante.FeegrantKeeper StakingKeeper stakingkeeper.Keeper SignModeHandler authsigning.SignModeHandler SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error }
HandlerOptions defines the list of module keepers required to run the Sifnode AnteHandler decorators.
type ValidateMinCommissionDecorator ¶ added in v0.15.0
type ValidateMinCommissionDecorator struct {
// contains filtered or unexported fields
}
ValidateMinCommissionDecorator validates that the validator commission is always greater than or equal to the min commission rate
func NewValidateMinCommissionDecorator ¶ added in v0.15.0
func NewValidateMinCommissionDecorator(sk stakingkeeper.Keeper, bk bankkeeper.Keeper) ValidateMinCommissionDecorator
ValidateMinCommissionDecorator creates a new ValidateMinCommissionDecorator
func (ValidateMinCommissionDecorator) AnteHandle ¶ added in v0.15.0
func (ValidateMinCommissionDecorator) CalculateDelegateProjectedVotingPower ¶ added in v0.15.0
func (vcd ValidateMinCommissionDecorator) CalculateDelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdk.Dec) sdk.Dec
Returns the projected voting power as a percentage (not a fraction)
func (ValidateMinCommissionDecorator) CalculateRedelegateProjectedVotingPower ¶ added in v0.15.0
func (vcd ValidateMinCommissionDecorator) CalculateRedelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdk.Dec) sdk.Dec
Returns the projected voting power as a percentage (not a fraction)
Click to show internal directories.
Click to hide internal directories.