mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
ethereum: add interfaces for missing methods
This commit is contained in:
parent
c16d8a430b
commit
e8d658b186
1 changed files with 16 additions and 0 deletions
|
|
@ -199,6 +199,12 @@ type GasPricer interface {
|
||||||
SuggestGasPrice(ctx context.Context) (*big.Int, error)
|
SuggestGasPrice(ctx context.Context) (*big.Int, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GasPricer1559 provides access to the EIP-1559 gas price oracle.
|
||||||
|
type GasPricer1559 interface {
|
||||||
|
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
|
||||||
|
FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*FeeHistory, error)
|
||||||
|
}
|
||||||
|
|
||||||
// FeeHistory provides recent fee market data that consumers can use to determine
|
// FeeHistory provides recent fee market data that consumers can use to determine
|
||||||
// a reasonable maxPriorityFeePerGas value.
|
// a reasonable maxPriorityFeePerGas value.
|
||||||
type FeeHistory struct {
|
type FeeHistory struct {
|
||||||
|
|
@ -239,3 +245,13 @@ type GasEstimator interface {
|
||||||
type PendingStateEventer interface {
|
type PendingStateEventer interface {
|
||||||
SubscribePendingTransactions(ctx context.Context, ch chan<- *types.Transaction) (Subscription, error)
|
SubscribePendingTransactions(ctx context.Context, ch chan<- *types.Transaction) (Subscription, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BlockNumberReader provides access to the current block number.
|
||||||
|
type BlockNumberReader interface {
|
||||||
|
BlockNumber(ctx context.Context) (uint64, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChainIDReader provides access to the chain ID.
|
||||||
|
type ChainIDReader interface {
|
||||||
|
ChainID(ctx context.Context) (*big.Int, error)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue