@@ -84,6 +84,11 @@ type BlockHashContractCaller interface {
84
84
// used when the user does not provide some needed values, but rather leaves it up
85
85
// to the transactor to decide.
86
86
type ContractTransactor interface {
87
+ ethereum.GasEstimator
88
+ ethereum.GasPricer
89
+ ethereum.GasPricer1559
90
+ ethereum.TransactionSender
91
+
87
92
// HeaderByNumber returns a block header from the current canonical chain. If
88
93
// number is nil, the latest known header is returned.
89
94
HeaderByNumber (ctx context.Context , number * big.Int ) (* types.Header , error )
@@ -93,38 +98,6 @@ type ContractTransactor interface {
93
98
94
99
// PendingNonceAt retrieves the current pending nonce associated with an account.
95
100
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 )
128
101
}
129
102
130
103
// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
@@ -133,6 +106,12 @@ type DeployBackend interface {
133
106
CodeAt (ctx context.Context , account common.Address , blockNumber * big.Int ) ([]byte , error )
134
107
}
135
108
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
+
136
115
// ContractBackend defines the methods needed to work with contracts on a read-write basis.
137
116
type ContractBackend interface {
138
117
ContractCaller
0 commit comments