ante

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 (vcd ValidateMinCommissionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL