# Can't mint token using ERC20PresetMinterPauserUpgradeable

**URL:** <https://forum.openzeppelin.com/t/cant-mint-token-using-erc20presetminterpauserupgradeable/7093>\
**Category:** Contracts\
**Created:** [April 17, 2021, 10:07pm UTC](https://forum.openzeppelin.com/t/cant-mint-token-using-erc20presetminterpauserupgradeable/7093 "2021-04-17T22:07:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [April 18, 2021, 12:06am UTC](https://forum.openzeppelin.com/t/cant-mint-token-using-erc20presetminterpauserupgradeable/7093/2 "2021-04-18T00:06:43Z")

</div>

Hi, it seems like your contract is ok, I think the error is in your scripts:

```auto
const ico = await deployProxy(IcoSeller, { deployer });

```

Actually, upgradeable contracts do not use constructor to initialize state, so you need to call a function to initialize state, for more details, please check at: [`initialize` functions](https://docs.openzeppelin.com/learn/upgrading-smart-contracts#initialization)

So I think your script should be like:

```auto
const ico = await deployProxy(IcoSeller, [], {initializer: 'initializeIcoDeployer'});

```

And there is tutorial, maybe you can have a look:

- [OpenZeppelin Upgrades: Step by Step Tutorial for Truffle](https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-truffle/3579)

---

_[View the full topic](https://forum.openzeppelin.com/t/cant-mint-token-using-erc20presetminterpauserupgradeable/7093)._
