mirror of
https://github.com/FlipsideCrypto/web3.py.git
synced 2026-02-06 10:56:47 +00:00
fix sha3 stuff
This commit is contained in:
parent
b034d7d871
commit
7c38b8f5ec
@ -1,7 +1,7 @@
|
||||
pytest>=2.8.2
|
||||
pytest-pythonpath>=0.3
|
||||
tox>=1.8.0
|
||||
eth-testrpc==0.4.1
|
||||
eth-testrpc==0.4.2
|
||||
py-geth>=0.5.0
|
||||
# Until pyethereum > 1.3.6 is released.
|
||||
https://github.com/ethereum/pyethereum/tarball/b06829e56e2a3de5276077a611ed8813b6cf5e74
|
||||
|
||||
@ -90,13 +90,11 @@ class Web3(object):
|
||||
def reset(self, keepIsSyncing):
|
||||
self._requestManager.reset(keepIsSyncing)
|
||||
|
||||
def sha3(self, value, encoding=None):
|
||||
if encoding is None:
|
||||
hex_string = encode_hex(value)
|
||||
elif encoding == 'hex':
|
||||
def sha3(self, value, encoding="hex"):
|
||||
if encoding == 'hex':
|
||||
hex_string = value
|
||||
else:
|
||||
raise ValueError("Unsupported encoding")
|
||||
hex_string = encode_hex(value)
|
||||
return self._requestManager.request_blocking('web3_sha3', [hex_string])
|
||||
|
||||
def isConnected(self):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user