# A problem in my constructor

**URL:** <https://forum.openzeppelin.com/t/a-problem-in-my-constructor/36236>\
**Category:** Smart Contracts\
**Tags:** erc20\
**Created:** [May 15, 2023, 7:26pm UTC](https://forum.openzeppelin.com/t/a-problem-in-my-constructor/36236 "2023-05-15T19:26:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erfan5416](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@erfan5416](https://forum.openzeppelin.com/u/erfan5416)\
**Post date:** [May 15, 2023, 7:26pm UTC](https://forum.openzeppelin.com/t/a-problem-in-my-constructor/36236/1 "2023-05-15T19:26:19Z")

</div>

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?

```auto
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC20.sol";

contract erfan is ERC20
{
    constructor() ERC20 ("erfan","ERF","1000000 * 1e5",5)
    {
        _balances[_msgSender()]=1000000*1e5;
    }

    
}

```

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [May 15, 2023, 7:41pm UTC](https://forum.openzeppelin.com/t/a-problem-in-my-constructor/36236/2 "2023-05-15T19:41:17Z")

</div>

> [@erfan5416](#):
>
> Invalid implicit conversion from literal\_string "1000000 \* 1e5" to uint256 requested.

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.

---

<div class="post-metadata">

**Author:** ![erfan5416](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@erfan5416](https://forum.openzeppelin.com/u/erfan5416)\
**Post date:** [May 15, 2023, 7:54pm UTC](https://forum.openzeppelin.com/t/a-problem-in-my-constructor/36236/3 "2023-05-15T19:54:49Z")

</div>

My problem is sloved.  
thank you 🙏
