You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/projects/temp/erc721$ brownie console
Brownie v1.16.2 - Python development framework for Ethereum
Compiling contracts...
Solc version: 0.8.7
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
Generating build data...
- OpenZeppelin/openzeppelin-contracts@4.3.1/ERC721
- OpenZeppelin/openzeppelin-contracts@4.3.1/IERC721
- OpenZeppelin/openzeppelin-contracts@4.3.1/IERC721Receiver
- OpenZeppelin/openzeppelin-contracts@4.3.1/IERC721Metadata
- OpenZeppelin/openzeppelin-contracts@4.3.1/Address
- OpenZeppelin/openzeppelin-contracts@4.3.1/Context
- OpenZeppelin/openzeppelin-contracts@4.3.1/Strings
- OpenZeppelin/openzeppelin-contracts@4.3.1/ERC165
- OpenZeppelin/openzeppelin-contracts@4.3.1/IERC165
- TestImport
ErcProject is the active project.
Launching 'ganache-cli --accounts 10 --hardfork istanbul --gasLimit 12000000 --mnemonic brownie --port 8545'...
Brownie environment is ready.
>>> TestImport.get_verification_info()
File "<console>", line 1, in<module>
File "brownie/network/contract.py", line 315, in get_verification_info
build_json = self._project._build.get(name)
File "brownie/project/build.py", line 124, in get
return self._interfaces[key]
KeyError: 'OpenZeppelin/openzeppelin-contracts@4.3.1/IERC721Receiver'
>>> interface.
File "<console>", line 1,
interface.
^
SyntaxError: invalid syntax
So I can compile and deploy this contract and it's work well. But I can't publish source.
When I use olidity >=0.6.0 <0.8.0; and /openzeppelin-contracts@3.4.0 - all is OK And TestImport.get_verification_info() work well
I am having the same error. I believe problem comes from importing contracts. Tried deploying simple contracts with no imports and worked with no probs.
Environment information
brownie
Version: 1.16.2ganache-cli
Version: 0.8.4solc
Version: 0.8.7What was wrong?
Example contract:
TestImport.get_verification_info()
fail:So I can compile and deploy this contract and it's work well. But I can't publish source.
When I use
olidity >=0.6.0 <0.8.0;
and/openzeppelin-contracts@3.4.0
- all is OK AndTestImport.get_verification_info()
work wellI think that problem is occur when we use
import
from package files that includeimport
directives with not inherited code. Let's look at OpenZeppelin ERC721.sol:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol
We can notice that IERC721Receiver is not ininheriting but still used in contract code:
Assume that issue #1114 was part of this problem.
Console screenshot
http://i.imgur.com/wAVKnRx.png
The text was updated successfully, but these errors were encountered: