# ERC20Capped: Immutable Variables cannot be read during contract creation time

**URL:** <https://forum.openzeppelin.com/t/erc20capped-immutable-variables-cannot-be-read-during-contract-creation-time/6174>\
**Category:** Contracts\
**Created:** [March 9, 2021, 9:11pm UTC](https://forum.openzeppelin.com/t/erc20capped-immutable-variables-cannot-be-read-during-contract-creation-time/6174 "2021-03-09T21:11:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 10, 2021, 8:07am UTC](https://forum.openzeppelin.com/t/erc20capped-immutable-variables-cannot-be-read-during-contract-creation-time/6174/4 "2021-03-10T08:07:57Z")

</div>

Hi @grimmdev,

Minting outside the constructor should be fine. You should create appropriate unit tests.

OpenZeppelin Contracts 4 is still a release candidate, so I want to check if it is possible to enable capped minting in the constructor.

---

_[View the full topic](https://forum.openzeppelin.com/t/erc20capped-immutable-variables-cannot-be-read-during-contract-creation-time/6174)._
