ante

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTxFeeWithValidatorMinGasPrices

func CheckTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error)

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.

Types

type HandlerOptions

type HandlerOptions struct {
	sdkante.HandlerOptions
	Cdc               codec.BinaryCodec
	StakingKeeper     *stakingkeeper.Keeper
	BankKeeper        bankkeeper.Keeper
	IBCKeeper         *ibckeeper.Keeper
	WasmConfig        *wasmtypes.WasmConfig
	ParameterKeeper   parameterkeeper.Keeper
	TXCounterStoreKey storetypes.StoreKey
}

HandlerOptions extends the SDK's AnteHandler options by requiring the IBC channel keeper.

type MinCommissionDecorator

type MinCommissionDecorator struct {
	// contains filtered or unexported fields
}

func (MinCommissionDecorator) AnteHandle

func (min MinCommissionDecorator) AnteHandle(
	ctx sdk.Context, tx sdk.Tx,
	simulate bool, next sdk.AnteHandler,
) (newCtx sdk.Context, err error)

func (MinCommissionDecorator) CalculateDelegateProjectedVotingPower

func (min MinCommissionDecorator) CalculateDelegateProjectedVotingPower(ctx sdk.Context, validator stakingtypes.ValidatorI, delegateAmount sdk.Dec) sdk.Dec

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 sdk.Dec) sdk.Dec

Returns the projected voting power as a percentage (not a fraction)

func (MinCommissionDecorator) CalculateValidatorProjectedVotingPower

func (min MinCommissionDecorator) CalculateValidatorProjectedVotingPower(ctx sdk.Context, 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