Documentation ¶
Index ¶
- type EVMCommitter
- type EVMCommitterOption
- func OptionGasLimit(limit uint64) EVMCommitterOption
- func OptionGasPriceFromBigInt(i *big.Int) EVMCommitterOption
- func OptionGasPriceFromDecimal(gasPrice decimal.Decimal) EVMCommitterOption
- func OptionGasPriceFromString(str string) EVMCommitterOption
- func TxBroadcastTimeout(dur time.Duration) EVMCommitterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EVMCommitter ¶
type EVMCommitter interface { FromAddress() ethcmn.Address Provider() provider.EVMProvider SendTx( ctx context.Context, recipient ethcmn.Address, txData []byte, gasCost uint64, gasPrice *big.Int, ) (txHash ethcmn.Hash, err error) EstimateGas( ctx context.Context, recipient ethcmn.Address, txData []byte, ) (gasCost uint64, gasPrice *big.Int, err error) }
EVMCommitter defines an interface for submitting transactions into Ethereum, Matic, and other EVM-compatible networks.
func NewEthCommitter ¶
func NewEthCommitter( logger zerolog.Logger, fromAddress ethcmn.Address, ethGasPriceAdjustment float64, ethGasLimitAdjustment float64, 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
Click to show internal directories.
Click to hide internal directories.