gas

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Overview

Package gas defines the Gas API. All chains that support transactions (either account-based or utxo-based) should implement this API. This API is used to understand the current recommended gas costs required to get confirmations in a reasonable amount of time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Estimator

type Estimator interface {
	// EstimateGasPrice that should be used to get confirmation within a
	// reasonable amount of time. The precise definition of "reasonable amount
	// of time" varies from chain to chain, and so is left open to
	// interpretation by the implementation. For example, in Bitcoin, it would
	// be the recommended SATs-per-byte required to get a transaction into the
	// next block. In Ethereum, it would be the recommended GWEI-per-gas
	// required to get a transaction into one of the next few blocks (because
	// blocks happen a lot faster).
	EstimateGasPrice(context.Context) (pack.U256, error)
}

The Estimator interface defines the functionality required to know the current recommended gas prices.

Jump to

Keyboard shortcuts

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