Change decimals for ERC20

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 :wave:

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:

You can also try out with the Contracts Wizard:

1 Like