gasestimator

package
v0.0.0-...-9e984db Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GasLimitEstimator

type GasLimitEstimator struct {
	// contains filtered or unexported fields
}

GasLimitEstimator is the gas estimator for the contract methods on the Ethereum network.

func NewGasLimitEstimator

func NewGasLimitEstimator(address common.Address, abi abi.ABI, transactor bind.ContractTransactor) *GasLimitEstimator

NewGasLimitEstimator creates instance of GasLimitEstimator

func (*GasLimitEstimator) EstimateGas

func (c *GasLimitEstimator) EstimateGas(opts *bind.TransactOpts, method string, params ...interface{}) (*big.Int, error)

EstimateGas estimates gas limit to call the (paid) contract method with params as input values.

type GasPriceEstimator

type GasPriceEstimator struct {
	// contains filtered or unexported fields
}

GasPriceEstimator is the gas price estimator, it returns cached gas price to allow a timely execution of a transaction.

func NewGasPriceEstimator

func NewGasPriceEstimator(rawRPCURL string) (*GasPriceEstimator, error)

NewGasPriceEstimator creates an instance of GasPriceEstimator

func (*GasPriceEstimator) Close

func (e *GasPriceEstimator) Close() (err error)

Close implements io.Closer interface.

func (*GasPriceEstimator) SuggestGasPrice

func (e *GasPriceEstimator) SuggestGasPrice() (gasPrice *big.Int)

SuggestGasPrice retrieves the currently suggested gas price to allow a timely execution of a transaction.

Jump to

Keyboard shortcuts

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