Documentation
¶
Index ¶
- type AvgGasLimit
- type AvgGasPrice
- type GasClient
- func (c *GasClient) EstimateConfirmationTime(ctx context.Context, gasPriceGwei int64) (uint64, error)
- func (c *GasClient) GetDailyAvgGasLimit(ctx context.Context, req *ecommon.DateRange) (result []AvgGasLimit, err error)
- func (c *GasClient) GetDailyAvgGasPrice(ctx context.Context, req *ecommon.DateRange) (result []AvgGasPrice, err error)
- func (c *GasClient) GetDailyTotalGasUsed(ctx context.Context, req *ecommon.DateRange) (result []GasUsed, err error)
- func (c *GasClient) GetGasOracle(ctx context.Context) (*GasPrices, error)
- type GasPrices
- type GasUsed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvgGasLimit ¶
type AvgGasLimit struct {
Timestamp time.Time `etherscan:"unixTimeStamp"`
GasLimit uint64 `etherscan:"gasLimit"`
}
AvgGasLimit describes the average gas limit on a particular day.
type AvgGasPrice ¶
type AvgGasPrice struct {
Timestamp time.Time `etherscan:"unixTimeStamp"`
MaxGasPrice *big.Int `etherscan:"maxGasPrice_Wei"`
MinGasPrice *big.Int `etherscan:"minGasPrice_Wei"`
AvgGasPrice *big.Int `etherscan:"avgGasPrice_Wei"`
}
AvgGasPrice describes the average gas prices on a particular day.
type GasClient ¶
GasClient is the client for gas actions.
func (*GasClient) EstimateConfirmationTime ¶
func (c *GasClient) EstimateConfirmationTime( ctx context.Context, gasPriceGwei int64, ) (uint64, error)
EstimateConfirmationTime returns the estimated time, in seconds, for a transaction to be confirmed on the blockchain.
func (*GasClient) GetDailyAvgGasLimit ¶
func (c *GasClient) GetDailyAvgGasLimit( ctx context.Context, req *ecommon.DateRange, ) (result []AvgGasLimit, err error)
GetDailyAvgGasLimit returns the historical daily average gas limit of the Ethereum network.
func (*GasClient) GetDailyAvgGasPrice ¶
func (c *GasClient) GetDailyAvgGasPrice( ctx context.Context, req *ecommon.DateRange, ) (result []AvgGasPrice, err error)
GetDailyAvgGasPrice returns the daily average gas price used on the Ethereum network.
type GasPrices ¶
type GasPrices struct {
LastBlock uint64 `etherscan:"LastBlock"`
SafeGasPrice uint64 `etherscan:"SafeGasPrice"`
ProposeGasPrice uint64 `etherscan:"ProposeGasPrice"`
FastGasPrice uint64 `etherscan:"FastGasPrice"`
SuggestBaseFee decimal.Decimal `etherscan:"suggestBaseFee"`
GasUsedRatio []decimal.Decimal `etherscan:"gasUsedRatio,sep"`
}
GasPrices describes the current recommended gas prices.
Click to show internal directories.
Click to hide internal directories.