deploying contracts on testnet like rinkeby or bsctestnet
and trying to verify them with @nomiclabs/hardhat-etherscan
is giving me an interesting error:
`Error in plugin @nomiclabs/hardhat-etherscan: The contract you want to verify was compiled with solidity 0.8.2, but your configured compiler version is: 0.8.4
the contracts have all pragma solidity ^0.8.4; so this is weird
Getting the same error as @Skyge and @abcoathup from this thread
Did not fully understand by reading his comments how he solved it.
(already using contracts-upgradeable": "^4.1.0, so that should not be it I think):
Error in plugin @nomiclabs/hardhat-etherscan: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.
Possible causes are:
- Contract code changed after the deployment was executed. This includes code for seemingly unrelated contracts.
- A solidity file was added, moved, deleted or renamed after the deployment was executed. This includes files for seemingly unrelated contracts.
- Solidity compiler settings were modified after the deployment was executed (like the optimizer, target EVM, etc.).
- The given address is wrong.
- The selected network (bsctestnet) is wrong.
ParserError: Source "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol" not found: File import callback not supported
--> myc:8:1:
|
8 | import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
below is the error i am getting when trying to verfify my contract i am new to this so i am not sure whats going on
ParserError: Source "@openzeppelin/contracts/access/Ownable.sol" not found: File import callback not supported
--> myc:9:1:
|
9 | import "@openzeppelin/contracts/access/Ownable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^