Documentation
¶
Index ¶
- Variables
- func AddPercentage(value *big.Int, percentage uint16) *big.Int
- func ApplyMultiplier(feeLimit uint64, multiplier float32) (uint64, error)
- func CalculateBumpedFee(lggr logger.SugaredLogger, ...) (*big.Int, error)
- func CalculateFee(maxFeePrice, defaultPrice, maxFeePriceConfigured *big.Int) *big.Int
- func IsBumpErr(err error) bool
- func MaxBumpedFee(originalFeePrice *big.Int, feeBumpPercent uint16, feeBumpUnits *big.Int) *big.Int
- type Fee
- type Opt
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddPercentage ¶
AddPercentage returns the input value increased by the given percentage.
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 ¶
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.
Types ¶
Click to show internal directories.
Click to hide internal directories.