fee

package
v2.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 8 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 uint64, multiplier float32) (uint64, 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

func MaxBumpedFee added in v2.10.0

func MaxBumpedFee(originalFeePrice *big.Int, feeBumpPercent uint16, feeBumpUnits *big.Int) *big.Int

Returns highest bumped fee price of originalFeePrice bumped by fixed units or percentage.

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