interface
doesn't seem to be available anywhere, and the docs seem out of date. How are you all using interface
?
File "brownie/_cli/__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "brownie/_cli/analyze.py", line 344, in main
submission.generate_highlighting_report()
File "brownie/_cli/analyze.py", line 252, in generate_highlighting_report
SEVERITY_COLOURS[severity],
KeyError: ‚UNKNOWN'
inputs = [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'a...', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}]
topics = ['0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000aa08cf02c3c96711d9b3e44ae40d8226edb5e81', '0x0000000000000000000000000000000000000000000000000000000000000000']
data = '0x'
def _decode(inputs: List, topics: List, data: str) -> List:
indexed_count = len([i for i in inputs if i["indexed"]])
if indexed_count and not topics:
# special case - if the ABI has indexed values but the log does not,
# we should still be able to decode the data
unindexed_types = inputs
else:
if indexed_count < len(topics):
raise EventError(
> "Event log does not contain enough topics for the given ABI - this"
" is usually because an event argument is not marked as indexed"
)
E eth_event.main.EventError: Event log does not contain enough topics for the given ABI - this is usually because an event argument is not marked as indexed
../../.local/pipx/venvs/eth-brownie/lib/python3.6/site-packages/eth_event/main.py:302: EventError
Updated link for Discord, that one expired: https://discord.gg/abJEARdx3Q
@kjr217 you can get help in this discord!
I'm trying to run tests via brownie test
but this is the error that I get. It seems that the global web3
object has None
for its provider attribute despite the ganache-cli rpc launching successfully
I also tried running the offending code inside of the brownie console and there were no issues - web3 had a provider and everything so its only during the test
command
psutil.net_connections()
which seems to work for host-based and dockerized RPC attaching on linux.
brownie test
, is here anyone knows how to handle this?
Hi guys, can't fetch this Aave pool contract:
$ brownie console --network mainnet-fork
Contract.from_explorer("0x7d2768dE32b0b80b7a3454c06BdAc94A69D
Dc7A9")
Fetching source of 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9 from api.etherscan.io...
File "<console>", line 1, in <module>
File "brownie/network/contract.py", line 1103, in from_explorer
as_proxy_for = _resolve_address(implementation_eip1967[12:])
File "brownie/network/web3.py", line 192, in _resolve_address
return to_address(domain)
File "brownie/convert/main.py", line 43, in to_address
return str(EthAddress(value))
File "brownie/convert/datatypes.py", line 204, in new
raise ValueError(f"'{value}' is not a valid ETH address") from None
ValueError: 'b'\x92xw\xef\xdaB[\xaf'' is not a valid ETH address
Any help?
I see the same issue here: https://www.gitmemory.com/issue/eth-brownie/brownie/963/782712384
Thank you
From the config example in brownie's docs:
hypothesis:
deadline: null
max_examples: 50
report_multiple_bugs: False
stateful_step_count: 10
phases:
explicit: true
reuse: true
generate: true
target: true
shrink: true
How to turn it off in the settings of a stateful test?settings = {"stateful_step_count": 50, "max_examples": 10, "phases": {"shrink":False}}
gives the error: hypothesis.errors.InvalidArgument: 'shrink' is not a valid phase
Hi guys, can't fetch this Aave pool contract:
$ brownie console --network mainnet-forkContract.from_explorer("0x7d2768dE32b0b80b7a3454c06BdAc94A69D
Dc7A9")Fetching source of 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9 from api.etherscan.io...
File "<console>", line 1, in <module>
File "brownie/network/contract.py", line 1103, in from_explorer
as_proxy_for = _resolve_address(implementation_eip1967[12:])
File "brownie/network/web3.py", line 192, in _resolve_address
return to_address(domain)
File "brownie/convert/main.py", line 43, in to_address
return str(EthAddress(value))
File "brownie/convert/datatypes.py", line 204, in new
raise ValueError(f"'{value}' is not a valid ETH address") from None
ValueError: 'b'\x92xw\xef\xdaB[\xaf'' is not a valid ETH addressAny help?
I see the same issue here: https://www.gitmemory.com/issue/eth-brownie/brownie/963/782712384Thank you
for future reference, this happens because the contract fetched is a proxy contract, so the second argument (as_proxy_for) needs to be added or brownie will try to resolve the reserved EIP1967 storage address and crash. I think Brownie could give a warning for this