A problem in my constructor

I have defined total supply as "1000000 * 1e5" and it returns me the following error:

Invalid type for argument in modifier invocation. Invalid implicit conversion from literal_string "1000000 * 1e5" to uint256 requested.

what's problem?

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC20.sol";

contract erfan is ERC20
    constructor() ERC20 ("erfan","ERF","1000000 * 1e5",5)


The error message says it all: the value "1000000 * 1e5", which is of type string, cannot be converted to a value of type uint256 (which is the type that the constructor expects for this input argument).

Passing 1000000 * 1e5 instead seems like it will solve the problem.

1 Like

My problem is sloved.
thank you :pray:

1 Like