# Error Compiling Code generated by ERC20 wizard

**URL:** <https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178>\
**Category:** Contracts\
**Created:** [October 20, 2023, 8:44am UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178 "2023-10-20T08:44:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Godfrey](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/kai_godfrey/32/19541_2.png) [@Kai\_Godfrey](https://forum.openzeppelin.com/u/Kai_Godfrey)\
**Post date:** [October 20, 2023, 8:44am UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/1 "2023-10-20T08:44:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [October 20, 2023, 9:26am UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/2 "2023-10-20T09:26:47Z")

</div>

> [@Kai\_Godfrey](#):
>
> contract KaiToke is ERC20, ERC20Burnable, Ownable

In the constructor of this contract, you need to call the constructor of each contract which it inherits.

In other words, in the constructor of contract `KaiToke`, you need to call:

- The constructor of contract `ERC20`
- The constructor of contract `ERC20Burnable`
- The constructor of contract `Ownable`

---

<div class="post-metadata">

**Author:** ![ericglau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ericglau/32/15149_2.png) [@ericglau](https://forum.openzeppelin.com/u/ericglau)\
**Post date:** [October 20, 2023, 2:48pm UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/3 "2023-10-20T14:48:33Z")

</div>

> [@Kai\_Godfrey](#):
>
> It appears the code the wizard produces uses compilers 0.8.9 (main code) and 0.8.20 (imported code)

Wizard uses 0.8.20 on [https://wizard.openzeppelin.com/](https://wizard.openzeppelin.com/). Your version sounds out of date, where are you accessing it from?

---

<div class="post-metadata">

**Author:** ![Zartaj](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/zartaj/32/19230_2.png) [@Zartaj](https://forum.openzeppelin.com/u/Zartaj)\
**Post date:** [October 20, 2023, 4:28pm UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/4 "2023-10-20T16:28:47Z")

</div>

In addition to this Answer this is how you call the parent constructors.

```auto
constructor(address initialOwner) ERC20(arguments) AnyOthetInheritedConstructor(Arguments) { }

```

---

<div class="post-metadata">

**Author:** ![Kai\_Godfrey](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/kai_godfrey/32/19541_2.png) [@Kai\_Godfrey](https://forum.openzeppelin.com/u/Kai_Godfrey)\
**Post date:** [October 21, 2023, 2:57am UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/5 "2023-10-21T02:57:39Z")

</div>

I'm accessing the wizard through my browser (Opera). This is what I get when I go to "[https://wizard.openzeppelin.com](https://wizard.openzeppelin.com)":

 ![Screenshot (8)](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/3X/b/e/bedb009849bcb81e74a53ff80eefec1ed09e7c6a.png)

---

<div class="post-metadata">

**Author:** ![ericglau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ericglau/32/15149_2.png) [@ericglau](https://forum.openzeppelin.com/u/ericglau)\
**Post date:** [October 21, 2023, 4:37am UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/6 "2023-10-21T04:37:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kai\_Godfrey](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/kai_godfrey/32/19541_2.png) [@Kai\_Godfrey](https://forum.openzeppelin.com/u/Kai_Godfrey)\
**Post date:** [October 21, 2023, 6:53am UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/7 "2023-10-21T06:53:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Zartaj](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/zartaj/32/19230_2.png) [@Zartaj](https://forum.openzeppelin.com/u/Zartaj)\
**Post date:** [October 21, 2023, 4:38pm UTC](https://forum.openzeppelin.com/t/error-compiling-code-generated-by-erc20-wizard/38178/8 "2023-10-21T16:38:47Z")

</div>

This shouldn't be the case. I just tried it on brave, and it gives me the latest vesrion.  
I'm also on windows 10.
