@@ -94,47 +94,20 @@ type BlockHashContractCaller interface {
94
94
// used when the user does not provide some needed values, but rather leaves it up
95
95
// to the transactor to decide.
96
96
type ContractTransactor interface {
97
+ interfaces.GasEstimator
98
+ interfaces.GasPricer
99
+ interfaces.GasPricer1559
100
+ interfaces.TransactionSender
101
+
97
102
// HeaderByNumber returns a block header from the current canonical chain. If
98
103
// number is nil, the latest known header is returned.
99
104
HeaderByNumber (ctx context.Context , number * big.Int ) (* types.Header , error )
100
105
101
106
// AcceptedCodeAt returns the code of the given account in the accepted state.
102
107
AcceptedCodeAt (ctx context.Context , account common.Address ) ([]byte , error )
103
108
104
- // AcceptedNonceAt retrieves the current accepted nonce associated with an account.
105
- AcceptedNonceAt (ctx context.Context , account common.Address ) (uint64 , error )
106
-
107
- // SuggestGasPrice retrieves the currently suggested gas price to allow a timely
108
- // execution of a transaction.
109
- SuggestGasPrice (ctx context.Context ) (* big.Int , error )
110
-
111
- // SuggestGasTipCap retrieves the currently suggested 1559 priority fee to allow
112
- // a timely execution of a transaction.
113
- SuggestGasTipCap (ctx context.Context ) (* big.Int , error )
114
-
115
- // EstimateGas tries to estimate the gas needed to execute a specific
116
- // transaction based on the current pending state of the backend blockchain.
117
- // There is no guarantee that this is the true gas limit requirement as other
118
- // transactions may be added or removed by miners, but it should provide a basis
119
- // for setting a reasonable default.
120
- EstimateGas (ctx context.Context , call interfaces.CallMsg ) (gas uint64 , err error )
121
-
122
- // SendTransaction injects the transaction into the pending pool for execution.
123
- SendTransaction (ctx context.Context , tx * types.Transaction ) error
124
- }
125
-
126
- // ContractFilterer defines the methods needed to access log events using one-off
127
- // queries or continuous event subscriptions.
128
- type ContractFilterer interface {
129
- // FilterLogs executes a log filter operation, blocking during execution and
130
- // returning all the results in one batch.
131
- //
132
- // TODO(karalabe): Deprecate when the subscription one can return past data too.
133
- FilterLogs (ctx context.Context , query interfaces.FilterQuery ) ([]types.Log , error )
134
-
135
- // SubscribeFilterLogs creates a background log filtering operation, returning
136
- // a subscription immediately, which can be used to stream the found events.
137
- SubscribeFilterLogs (ctx context.Context , query interfaces.FilterQuery , ch chan <- types.Log ) (interfaces.Subscription , error )
109
+ // NonceAt retrieves the nonce associated with an account.
110
+ NonceAt (ctx context.Context , account common.Address , blockNum * big.Int ) (uint64 , error )
138
111
}
139
112
140
113
// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
@@ -143,6 +116,12 @@ type DeployBackend interface {
143
116
CodeAt (ctx context.Context , account common.Address , blockNumber * big.Int ) ([]byte , error )
144
117
}
145
118
119
+ // ContractFilterer defines the methods needed to access log events using one-off
120
+ // queries or continuous event subscriptions.
121
+ type ContractFilterer interface {
122
+ interfaces.LogFilterer
123
+ }
124
+
146
125
// ContractBackend defines the methods needed to work with contracts on a read-write basis.
147
126
type ContractBackend interface {
148
127
ContractCaller
0 commit comments