utils

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMaxPriorityFeePerGasNotFound = errors.New(
		"Method eth_maxPriorityFeePerGas not found",
	)

	// FallbackGasTipCap is the default fallback gasTipCap used when we are
	// unable to query an L1 backend for a suggested gasTipCap.
	FallbackGasTipCap = big.NewInt(1500000000)
)

Functions

func EstimateGas

func EstimateGas(
	ctx context.Context,
	ecdsaKey *ecdsa.PrivateKey,
	msgHash [32]byte,
	destChainID *big.Int,
	f func() (*types.Transaction, error),
) (uint64, error)

func IsMaxPriorityFeePerGasNotFoundError

func IsMaxPriorityFeePerGasNotFoundError(err error) bool

IsMaxPriorityFeePerGasNotFoundError returns true if the provided error signals that the backend does not support the eth_maxPriorityFeePerGas method. In this case, the caller should fallback to using the constant above.

func ScanBlocks

func ScanBlocks(ctx context.Context, ethClient headSubscriber, wg *sync.WaitGroup) error

func SetGasTipOrPrice

func SetGasTipOrPrice(ctx context.Context, auth *bind.TransactOpts, ethClient ethClient) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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