fee

package
v0.0.0-...-47b5856 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 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

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

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

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