# After minting erc20 token , increase allowance

**URL:** <https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897>\
**Category:** Smart Contracts\
**Tags:** erc20\
**Created:** [March 9, 2022, 8:18am UTC](https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897 "2022-03-09T08:18:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![victory015](https://avatars.discourse-cdn.com/v4/letter/v/a3d4f5/32.png) [@victory015](https://forum.openzeppelin.com/u/victory015)\
**Post date:** [March 9, 2022, 8:18am UTC](https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897/1 "2022-03-09T08:18:39Z")

</div>

After minting erc20 token ,i increase the allowance. Is this the correct way to handle erc20 token?

Code snippet is below:

```
    _mint(account, amount);
    _approve(
        account,
        msg.sender,
        amount
    );
```

---

<div class="post-metadata">

**Author:** ![maxareo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/maxareo/32/11606_2.png) [@maxareo](https://forum.openzeppelin.com/u/maxareo)\
**Post date:** [March 9, 2022, 11:32am UTC](https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897/2 "2022-03-09T11:32:49Z")

</div>

It depends on the objective. Are you expecting to approve `account` for `msg.sender` or the other way around?

---

<div class="post-metadata">

**Author:** ![victory015](https://avatars.discourse-cdn.com/v4/letter/v/a3d4f5/32.png) [@victory015](https://forum.openzeppelin.com/u/victory015)\
**Post date:** [March 9, 2022, 12:22pm UTC](https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897/3 "2022-03-09T12:22:53Z")

</div>

Yes, the purpose is to approve `msg.sender` to spend the erc20 tokens in `account`

---

<div class="post-metadata">

**Author:** ![maxareo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/maxareo/32/11606_2.png) [@maxareo](https://forum.openzeppelin.com/u/maxareo)\
**Post date:** [March 9, 2022, 12:45pm UTC](https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897/4 "2022-03-09T12:45:35Z")

</div>

Yes, then it is correct.

---

<div class="post-metadata">

**Author:** ![victory015](https://avatars.discourse-cdn.com/v4/letter/v/a3d4f5/32.png) [@victory015](https://forum.openzeppelin.com/u/victory015)\
**Post date:** [March 9, 2022, 1:25pm UTC](https://forum.openzeppelin.com/t/after-minting-erc20-token-increase-allowance/25897/5 "2022-03-09T13:25:25Z")

</div>

great. thank you. It helps.
