Documentation ¶
Index ¶
Constants ¶
View Source
const TwoAndTheHalfGwei = 2500000000 // Lowest MaxPriorityFee. Defined by some researches...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GasPriceClient ¶
type GasPricerOpts ¶
type GasPricerOpts struct { UpperLimitFeePerGas *big.Int // UpperLimitFeePerGas in Static and London gasPricer limits the maximum gas price that could be used. In London gasPricer if BaseFee > UpperLimitFeePerGas, then maxFeeCap will be BaseFee + 2.5 Gwei for MaxTipCap. If nil - not applied GasPriceFactor *big.Float // GasPriceFactor In static gasPricer multiplies final gasPrice. Could be for example 0.75 or 5. Args []interface{} // Args is the array of dynamic typed args that could be used for other custom GasPricer implementations }
GasPricerOpts is the structure that holds parameters that could be used to configure different gasPRicer implementation
type LondonGasClient ¶
type LondonGasPriceDeterminant ¶
type LondonGasPriceDeterminant struct {
// contains filtered or unexported fields
}
func NewLondonGasPriceClient ¶
func NewLondonGasPriceClient(client LondonGasClient, opts *GasPricerOpts) *LondonGasPriceDeterminant
func (*LondonGasPriceDeterminant) GasPrice ¶
func (gasPricer *LondonGasPriceDeterminant) GasPrice() ([]*big.Int, error)
func (*LondonGasPriceDeterminant) SetClient ¶
func (gasPricer *LondonGasPriceDeterminant) SetClient(client LondonGasClient)
func (*LondonGasPriceDeterminant) SetOpts ¶
func (gasPricer *LondonGasPriceDeterminant) SetOpts(opts *GasPricerOpts)
type StaticGasPriceDeterminant ¶
type StaticGasPriceDeterminant struct {
// contains filtered or unexported fields
}
StaticGasPriceDeterminant for when you want to always use generic `GasPrice()` method from an EVM client.
Client should implement `GasPrice()` to query first for a gas price field that is set on client construction This way a developer can use a specific gas price for transactions, such as in the CLI
Currently, if the client being used is created by the `EVMClientFromParams` constructor a constant gas price is then set and will be returned by this gas pricer
func NewStaticGasPriceDeterminant ¶
func NewStaticGasPriceDeterminant(client GasPriceClient, opts *GasPricerOpts) *StaticGasPriceDeterminant
func (*StaticGasPriceDeterminant) GasPrice ¶
func (gasPricer *StaticGasPriceDeterminant) GasPrice() ([]*big.Int, error)
func (*StaticGasPriceDeterminant) SetClient ¶
func (gasPricer *StaticGasPriceDeterminant) SetClient(client LondonGasClient)
func (*StaticGasPriceDeterminant) SetOpts ¶
func (gasPricer *StaticGasPriceDeterminant) SetOpts(opts *GasPricerOpts)
Click to show internal directories.
Click to hide internal directories.