【发布时间】:2022-01-03 22:41:38
【问题描述】:
我正在按照指示 here 使用 brownie 与分叉的主网合约进行交互。建议的三行代码是:
address = "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"
oracle = Contract.from_explorer(address)
oracle.latestAnswer()
但是,当我运行第二行时,我得到以下信息:
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: ''
似乎主网分叉是可访问的,但合约本身在某种程度上已损坏。我做错了什么?
【问题讨论】:
-
嗨 Nik 我看到你做了几乎同样的问题,你在ethereum.stackexchange.com/questions/117963/…得到了回复那么,它解决了吗?
-
谢谢索朗日。不幸的是,回复并没有解决问题。
标签: python ethereum solidity chainlink brownie