Lesson 12: KeyError: 'OpenZeppelin/[email protected]/Address' #258
-
Hi, When running the final script, brownie run scripts/deploy_and_upgrade.py --network rinkeby, I'm receiving an error message inidcating, "KeyError: 'OpenZeppelin/[email protected]/Address'" . I'm using version 4.3.2, so not sure why it's referencing 4.1.0. ProxyAdmin.sol is reporting a problem of, "Source "@openzeppelin/contracts/access/Ownable.sol" not found: File import callback not supported" and TransparentUpgradeableProxy.sol is reporting a problem of, "Source "@openzeppelin/contracts/porxy/ERC1967/ERC1967Proxy.sol" not found: File import callback not supported". My brownie-config.yaml and solidity codes look aligned with the file paths. Any help would be greatly appreciated. brownie-config dependencies:
Solidity Code // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./TransparentUpgradeableProxy.sol"; // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; Full Error Message PS C:\Users\chris\Dropbox\00_CODE\upgrades> brownie run scripts/deploy_and_upgrade.py --network rinkeby UpgradesProject is the active project. Running 'scripts\deploy_and_upgrade.py::main'... Waiting for https://api-rinkeby.etherscan.io/api to process contract... Waiting for https://api-rinkeby.etherscan.io/api to process contract... File "C:\Users\chris.local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli\run.py", line 49, in main |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 26 replies
-
You have a Typo on your import: Also on your OpenZeppelin/[email protected]
compiler:
solc:
remappings:
'@OpenZeppelin=OpenZeppelin/[email protected] On the Hope this info is useful for you, best regards. |
Beta Was this translation helpful? Give feedback.
You have a Typo on your import:
"@openzeppelin/contracts/porxy/ERC1967/ERC1967Proxy.sol"
change
porxy
toproxy
.Also on your
brownie-config.yaml
On the
remappings
section use@openzeppelin=
in lowercase.Hope this info is useful for you, best regards.