brownie-mix / aave-flashloan-mix

A Brownie mix containing all you need to get started with developing flash loans
GNU Affero General Public License v3.0
398 stars 275 forks source link

ValueError: invalid literal for int() with base 16: '0x' #7

Closed vintrocode closed 3 years ago

vintrocode commented 3 years ago

I'm trying to run the example code in the README and I'm running into an error when I try to execute the following line:

>>> WETH = Contract("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2")

Here's my traceback:

  File "<console>", line 1, in <module>
  File "brownie/network/contract.py", line 923, in __init__
    contract = self.from_explorer(address, owner=owner, silent=True)
  File "brownie/network/contract.py", line 1102, in from_explorer
    if int(implementation_eip1967.hex(), 16):
ValueError: invalid literal for int() with base 16: '0x'

Is it expecting an int?

Thanks in advance for the help.

iamdefinitelyahuman commented 3 years ago

What version of brownie are you using? I think this might be fixed if you upgrade to the latest version.

vintrocode commented 3 years ago

That did it. Thanks, sorry for the trouble!