mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi/bind/backends: use new interfaces
This commit is contained in:
parent
e8d658b186
commit
2af45491ae
1 changed files with 4 additions and 10 deletions
|
|
@ -19,7 +19,6 @@ package backends
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"math"
|
"math"
|
||||||
"math/big"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/ethereum/go-ethereum"
|
||||||
|
|
@ -58,30 +57,25 @@ type SimChainManagement interface {
|
||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: these methods should have their own interface in the ethereum package.
|
|
||||||
type SimChainExtras interface {
|
|
||||||
BlockNumber(context.Context) (uint64, error)
|
|
||||||
ChainID(context.Context) (*big.Int, error)
|
|
||||||
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SimulatedBackend all interfaces in the ethereum package, but is based on a
|
// SimulatedBackend all interfaces in the ethereum package, but is based on a
|
||||||
// simulated blockchain. It is intended for testing purposes.
|
// simulated blockchain. It is intended for testing purposes.
|
||||||
type SimulatedBackend interface {
|
type SimulatedBackend interface {
|
||||||
SimChainManagement
|
SimChainManagement
|
||||||
|
|
||||||
// The backend implements all interfaces in the ethereum package.
|
// The backend implements all interfaces in the ethereum package.
|
||||||
|
ethereum.BlockNumberReader
|
||||||
ethereum.ChainReader
|
ethereum.ChainReader
|
||||||
ethereum.ChainStateReader
|
ethereum.ChainStateReader
|
||||||
ethereum.ContractCaller
|
ethereum.ContractCaller
|
||||||
ethereum.GasEstimator
|
ethereum.GasEstimator
|
||||||
ethereum.LogFilterer
|
|
||||||
ethereum.GasPricer
|
ethereum.GasPricer
|
||||||
|
ethereum.GasPricer1559
|
||||||
|
ethereum.LogFilterer
|
||||||
ethereum.PendingStateReader
|
ethereum.PendingStateReader
|
||||||
ethereum.PendingContractCaller
|
ethereum.PendingContractCaller
|
||||||
ethereum.TransactionReader
|
ethereum.TransactionReader
|
||||||
ethereum.TransactionSender
|
ethereum.TransactionSender
|
||||||
SimChainExtras
|
ethereum.ChainIDReader
|
||||||
}
|
}
|
||||||
|
|
||||||
type simBackend struct {
|
type simBackend struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue