How do i add a third argument for DECIMALS
constructor(string memory name, string memory symbol) ERC20(name, symbol) {
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
_setupRole(MINTER_ROLE, _msgSender());
_setupRole(PAUSER_ROLE, _msgSender());
}
1 Like
Hi @chaindev123,
Welcome to the community
In OpenZeppelin Contracts 3.x and 4.x we don’t need to specify the decimals, instead we use the default of 18. If you want a different value in OpenZeppelin Contracts 4.x then you can override the decimals
function, see: https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20-decimals--
You can also try out with the Contracts Wizard: https://zpl.in/wizard
1 Like