Hello Everyone,
I am on this video when we extending our ERC 20 contract on the Solidity 201 course with ERC20Capped.sol file from OpenZeppelin: https://academy.ivanontech.com/lessons/extending-erc20
When I would like to compile I am getting the following error ( haven’t met this with yet) :
TypeError: Immutable variables cannot be read during contract creation time, which means they cannot be read in the constructor or any function or modifier called from it.
--> project:/node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol:26:16:
|
26 | return _cap;
| ^^^^
Compilation failed. See above.
I am trying to find the solution meanwhile, but if someone can point me how to solve this, that would be appreciated.
Thank you.