I'm trying to specify the amount of decimals of a token using OpenZeppelin. This will cause a compilation error:
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
//........
constructor() ERC20("my token", "a") {
// _mint(..... )
_setupDecimals(4); // – undefined identifier
}
//.........
What's the matter?