mirror of
https://github.com/FlipsideCrypto/web3.py.git
synced 2026-02-06 10:56:47 +00:00
adjust calls to web3.sha3
This commit is contained in:
parent
7c38b8f5ec
commit
ad50ed7910
@ -24,7 +24,7 @@ def test_eth_call_with_no_args(web3, wait_for_transaction, MATH_CODE, MATH_RUNTI
|
||||
|
||||
assert force_bytes(web3.eth.getCode(contract_address)) == MATH_RUNTIME
|
||||
|
||||
abi_signature = web3.sha3("return13()")[:10]
|
||||
abi_signature = web3.sha3("return13()", encoding=None)[:10]
|
||||
# sanity
|
||||
assert abi_signature == '0x16216f39'
|
||||
actual_result_hex = web3.eth.call({
|
||||
|
||||
@ -70,7 +70,7 @@ def test_eth_sign(web3):
|
||||
# the data to be signed
|
||||
data = b'1234567890abcdefghijklmnopqrstuvwxyz'
|
||||
# the hash of the data `0x089c33d56ed10bd8b571a0f493cedb28db1ae0f40c6cd266243001528c06eab3`
|
||||
data_hash = web3.sha3(data)
|
||||
data_hash = web3.sha3(data, encoding=None)
|
||||
data_hash_bytes = decode_hex(data_hash)
|
||||
|
||||
assert force_bytes(data_hash) == sha3(data)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user