We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cad3432 commit 6c974f5Copy full SHA for 6c974f5
web3/providers/eth_tester/defaults.py
@@ -157,20 +157,20 @@ def personal_send_transaction(eth_tester, params):
157
),
158
},
159
'net': {
160
- 'version': not_implemented,
161
- 'peerCount': not_implemented,
162
- 'listening': not_implemented,
+ 'version': static_return('1'),
+ 'peerCount': static_return(0),
+ 'listening': static_return(False),
163
164
'eth': {
165
- 'protocolVersion': not_implemented,
166
- 'syncing': not_implemented,
+ 'protocolVersion': static_return('63'),
+ 'syncing': static_return(False),
167
'coinbase': compose(
168
operator.itemgetter(0),
169
call_eth_tester('get_accounts'),
170
171
- 'mining': not_implemented,
172
- 'hashrate': not_implemented,
173
- 'gasPrice': not_implemented,
+ 'mining': static_return(False),
+ 'hashrate': static_return(0),
+ 'gasPrice': static_return(1),
174
'accounts': call_eth_tester('get_accounts'),
175
'blockNumber': compose(
176
operator.itemgetter('number'),
web3/providers/eth_tester/main.py
@@ -4,15 +4,13 @@
4
5
from .middleware import (
6
default_transaction_fields_middleware,
7
- ethereum_tester_fixture_middleware,
8
ethereum_tester_middleware,
9
)
10
11
12
class EthereumTesterProvider(BaseProvider):
13
middlewares = [
14
15
16
17
]
18
ethereum_tester = None
web3/providers/eth_tester/middleware.py
@@ -28,7 +28,6 @@
28
pipe,
29
30
from web3.middleware import (
31
- construct_fixture_middleware,
32
construct_formatting_middleware,
33
34
@@ -259,20 +258,6 @@ def is_hexstr(value):
259
258
260
261
262
-ethereum_tester_fixture_middleware = construct_fixture_middleware({
263
- # Eth
264
- 'eth_protocolVersion': '63',
265
- 'eth_hashrate': 0,
266
- 'eth_gasPrice': 1,
267
- 'eth_syncing': False,
268
- 'eth_mining': False,
269
- # Net
270
- 'net_version': '1',
271
- 'net_listening': False,
272
- 'net_peerCount': 0,
273
-})
274
-
275
276
def guess_from(web3, transaction):
277
coinbase = web3.eth.coinbase
278
if coinbase is not None:
0 commit comments