fee

package
v2.5.2-clf-20230912 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBumpFeeExceedsLimit = errors.New("fee bump exceeds limit")
	ErrBump                = errors.New("fee bump failed")
	ErrConnectivity        = errors.New("transaction propagation issue: transactions are not being mined")
)

Functions

func ApplyMultiplier

func ApplyMultiplier(feeLimit uint32, multiplier float32) (uint32, error)

func CalculateBumpedFee added in v2.5.0

func CalculateBumpedFee(
	lggr logger.SugaredLogger,
	currentfeePrice, originalfeePrice, maxFeePriceInput, maxBumpPrice, bumpMin *big.Int,
	bumpPercent uint16,
	toChainUnit feeUnitToChainUnit,
) (*big.Int, error)

CalculateBumpedFee computes the next fee price to attempt as the largest of: - A configured percentage bump (bumpPercent) on top of the baseline price. - A configured fixed amount of Unit (bumpMin) on top of the baseline price. The baseline price is the maximum of the previous fee price attempt and the node's current fee price.

func CalculateFee added in v2.5.0

func CalculateFee(
	maxFeePrice, defaultPrice, maxFeePriceConfigured *big.Int,
) *big.Int

CalculateFee computes the fee price for a transaction. The fee price is the minimum of: - max fee price specified, default fee price and max fee price for the node.

func IsBumpErr added in v2.5.0

func IsBumpErr(err error) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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