Got yelled at doing something that doesn't fail when using web3py directly
Code that produced the error
from vyper.compiler import compile as vyc
from vyper.compiler import mk_full_signature as vya
@pytest.fixture
def AdHocContract(w3):
VYPER_CONTRACT = """
a: address
"""
interface = {
'abi': vya(VYPER_CONTRACT),
'bytecode': vyc(VYPER_CONTRACT),
'bytecode_runtime': vyc(VYPER_CONTRACT, bytecode_runtime=True)
}
txn_hash = w3.eth.contract(**interface).constructor().transact()
address = w3.eth.waitForTransactionReceipt(txn_hash)['contractAddress']
return w3.eth.contract(address, **interface)
Full error output
txn_hash = w3.eth.contract(**interface).constructor().transact()
address = w3.eth.waitForTransactionReceipt(txn_hash)['contractAddress']
> return w3.eth.contract(address, **interface)
E ethpm.exceptions.ValidationError: Py-EthPM library only accepts canonicalized addresses.
0xDe09E74d4888Bc4e65F589e8c13Bce9F71DdF4c7 is not in the accepted format.
How can it be fixed?
pytest-ethereum should convert address to canonical form before passing to ethPM for ad-hoc compiled contracts.
What was wrong?
Got yelled at doing something that doesn't fail when using web3py directly
Code that produced the error
Full error output
How can it be fixed?
pytest-ethereum
should convert address to canonical form before passing to ethPM for ad-hoc compiled contracts.