Skip to content

Commit dd938d1

Browse files
committed
Merge branch 'master' into release/1.13
2 parents b20b4a7 + 4f82531 commit dd938d1

38 files changed

+803
-2599
lines changed

accounts/abi/bind/backend.go

+11-32
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ type BlockHashContractCaller interface {
8484
// used when the user does not provide some needed values, but rather leaves it up
8585
// to the transactor to decide.
8686
type ContractTransactor interface {
87+
ethereum.GasEstimator
88+
ethereum.GasPricer
89+
ethereum.GasPricer1559
90+
ethereum.TransactionSender
91+
8792
// HeaderByNumber returns a block header from the current canonical chain. If
8893
// number is nil, the latest known header is returned.
8994
HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
@@ -93,38 +98,6 @@ type ContractTransactor interface {
9398

9499
// PendingNonceAt retrieves the current pending nonce associated with an account.
95100
PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
96-
97-
// SuggestGasPrice retrieves the currently suggested gas price to allow a timely
98-
// execution of a transaction.
99-
SuggestGasPrice(ctx context.Context) (*big.Int, error)
100-
101-
// SuggestGasTipCap retrieves the currently suggested 1559 priority fee to allow
102-
// a timely execution of a transaction.
103-
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
104-
105-
// EstimateGas tries to estimate the gas needed to execute a specific
106-
// transaction based on the current pending state of the backend blockchain.
107-
// There is no guarantee that this is the true gas limit requirement as other
108-
// transactions may be added or removed by miners, but it should provide a basis
109-
// for setting a reasonable default.
110-
EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
111-
112-
// SendTransaction injects the transaction into the pending pool for execution.
113-
SendTransaction(ctx context.Context, tx *types.Transaction) error
114-
}
115-
116-
// ContractFilterer defines the methods needed to access log events using one-off
117-
// queries or continuous event subscriptions.
118-
type ContractFilterer interface {
119-
// FilterLogs executes a log filter operation, blocking during execution and
120-
// returning all the results in one batch.
121-
//
122-
// TODO(karalabe): Deprecate when the subscription one can return past data too.
123-
FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
124-
125-
// SubscribeFilterLogs creates a background log filtering operation, returning
126-
// a subscription immediately, which can be used to stream the found events.
127-
SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
128101
}
129102

130103
// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
@@ -133,6 +106,12 @@ type DeployBackend interface {
133106
CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
134107
}
135108

109+
// ContractFilterer defines the methods needed to access log events using one-off
110+
// queries or continuous event subscriptions.
111+
type ContractFilterer interface {
112+
ethereum.LogFilterer
113+
}
114+
136115
// ContractBackend defines the methods needed to work with contracts on a read-write basis.
137116
type ContractBackend interface {
138117
ContractCaller

0 commit comments

Comments
 (0)