gasprice

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tier added in v0.11.0

func Tier(live uint64) uint64

func Tiers added in v0.11.0

func Tiers() []uint64

Types

type Buffer

type Buffer interface {
	GasPrice(chainID uint64) uint64
	Stream(ctx context.Context)
}

func NewBuffer

func NewBuffer(pricers map[uint64]ethereum.GasPricer, ticker ticker.Ticker) (Buffer, error)

NewBuffer creates a new gas price buffer.

type MockBuffer added in v0.11.0

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

func NewMockBuffer added in v0.11.0

func NewMockBuffer() *MockBuffer

func (*MockBuffer) GasPrice added in v0.11.0

func (b *MockBuffer) GasPrice(chainID uint64) uint64

func (*MockBuffer) SetGasPrice added in v0.11.0

func (b *MockBuffer) SetGasPrice(chainID uint64, price uint64)

func (*MockBuffer) Stream added in v0.11.0

func (*MockBuffer) Stream(context.Context)

type MockPricer

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

func NewMockPricer

func NewMockPricer(price uint64) *MockPricer

func (*MockPricer) Price

func (m *MockPricer) Price() uint64

func (*MockPricer) SetPrice

func (m *MockPricer) SetPrice(price uint64)

func (*MockPricer) SuggestGasPrice

func (m *MockPricer) SuggestGasPrice(_ context.Context) (*big.Int, error)

Jump to

Keyboard shortcuts

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