I'm following the instructions here to interact with forked mainnet contracts using brownie. The three lines of code suggested are:
address = "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"
oracle = Contract.from_explorer(address)
oracle.latestAnswer()
However, when I run the second line, I get the following:
Fetching source of 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 from api.etherscan.io...
File "<console>", line 1, in <module>
File "brownie/network/contract.py", line 1162, in from_explorer
if not _verify_deployed_code(
File "brownie/network/contract.py", line 1765, in _verify_deployed_code
idx = -(int(actual_bytecode[-4:], 16) + 2) * 2
ValueError: invalid literal for int() with base 16: ''
It seems as though the mainnet fork is accessible, but the contract itself is somehow corrupt. What am I doing wrong?