committer

package
v1.3.27 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMaxGasPrice

func ParseMaxGasPrice(maxGasPriceStr string) int64

Types

type EVMCommitter

type EVMCommitter interface {
	FromAddress() common.Address
	Provider() provider.EVMProvider
	SendTx(
		ctx context.Context,
		recipient common.Address,
		txData []byte,
	) (txHash common.Hash, err error)
}

EVMCommitter defines an interface for submitting transactions into Ethereum, Matic, and other EVM-compatible networks.

func NewEthCommitter

func NewEthCommitter(
	fromAddress common.Address,
	ethGasPriceAdjustment float64,
	ethMaxGasPrice string,
	fromSigner bind.SignerFn,
	evmProvider provider.EVMProviderWithRet,
	committerOpts ...EVMCommitterOption,
) (EVMCommitter, error)

NewEthCommitter returns an instance of EVMCommitter, which can be used to submit txns into Ethereum, Matic, and other EVM-compatible networks.

type EVMCommitterOption

type EVMCommitterOption func(o *options) error

func OptionGasLimit

func OptionGasLimit(limit uint64) EVMCommitterOption

func OptionGasPriceFromBigInt

func OptionGasPriceFromBigInt(i *big.Int) EVMCommitterOption

func OptionGasPriceFromDecimal

func OptionGasPriceFromDecimal(gasPrice decimal.Decimal) EVMCommitterOption

func OptionGasPriceFromString

func OptionGasPriceFromString(str string) EVMCommitterOption

func TxBroadcastTimeout

func TxBroadcastTimeout(dur time.Duration) EVMCommitterOption

Jump to

Keyboard shortcuts

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