I'm using the ERC20 wizard and getting errors when trying to compile it on remix.
It compiles ok when I don't use any of the features, but adding 1 or more of the features I get errors. It appears the code the wizard produces uses compilers 0.8.9 (main code) and 0.8.20 (imported code).
When I try compiling with version 0.8.20 I get errors like this:
TypeError: No arguments passed to the base constructor. Specify the arguments or mark "KaiToke" as abstract.
--> contracts/KaiToke.sol:8:1:
|
8 | contract KaiToke is ERC20, ERC20Burnable, Ownable {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Base constructor parameters:
--> @openzeppelin/contracts/access/Ownable.sol:38:16:
|
38 | constructor(address initialOwner) {
| ^^^^^^^^^^^^^^^^^^^^^^
And when I try compiling with version 0.8.9 I get errors like this:
ParserError: Source file requires different compiler version (current compiler is 0.8.9+commit.e5eed63a.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version
--> @openzeppelin/contracts/access/Ownable.sol:4:1:
|
4 | pragma solidity ^0.8.20;
| ^^^^^^^^^^^^^^^^^^^^^^^^
Is this me using the wizard incorrectly, or is this an issue with the wizard?
It looks like you are getting a cached version somehow. It should say pragma solidity ^0.8.20; at the top. Can you try a force refresh, clear browser cache, or try another browser?
I tried a force refresh and clear browser data, but still get that cached version. I also tried it on Brave, Chrome, and Edge; all of them giving me the same cached version.
Is it possible that I'm getting the cached version because I'm using windows 10?