solidity – Fixing Brownie Deployment KeyError: ‘OpenZeppelin/[email protected]/Address’

brownieopenzeppelinopenzeppelin-contractssolidity

I'd been building with v3.4 of Zeppelin contracts for a while without issues. I just started a new project using v4.4.0 and I'm getting the following error when I try and publish my contract publish_source = True:

KeyError: 'OpenZeppelin/[email protected]/Address'

I'm using Brownie v1.16. I saw another user post that they solved a similar issue by upgrading to Brownie v1.17. However I'm even having issues doing that. For example, if I try to to update Brownie, it will say I have the latest version – 1.16. So I have tried to force update to 1.17 and I get the following error:

ERROR: Could not find a version that satisfies the requirement vyper==0.3.1 (from eth-brownie)

…So then I try and install vyper 0.3.1, and that presents another error:
ERROR: No matching distribution found for vyper==0.3.1

I'm at a loss as to where to go from here, I'm hoping I can solve my original issue by upgrading to Brownie 1.17, however I cannot even manage to get that to happen.

Thanks for any help in advance.

Best Answer

My issue seemed to come from having Python 3.10 installed. I was finally able to install Vyper v0.3.1 after I downgraded Python. From there, Brownie 1.17.2 installed without issue. Finally, in order to be able to deploy a contract with Brownie 1.17.2, I was missing some data in my brownie-config.yaml file that 1.16.0 didn't seem to mind not having. I added in the missing data as per the brownie docs and this finally let me deploy and validate my contract on Etherscan.

Related Topic