# How to transfer erc20 tokens between wallets rinkeby

**URL:** <https://forum.openzeppelin.com/t/how-to-transfer-erc20-tokens-between-wallets-rinkeby/7813>\
**Category:** Contracts\
**Tags:** erc20\
**Created:** [May 5, 2021, 1:35pm UTC](https://forum.openzeppelin.com/t/how-to-transfer-erc20-tokens-between-wallets-rinkeby/7813 "2021-05-05T13:35:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Volandemort](https://avatars.discourse-cdn.com/v4/letter/v/eb8c5e/32.png) [@Volandemort](https://forum.openzeppelin.com/u/Volandemort)\
**Post date:** [May 5, 2021, 1:35pm UTC](https://forum.openzeppelin.com/t/how-to-transfer-erc20-tokens-between-wallets-rinkeby/7813/1 "2021-05-05T13:35:24Z")

</div>

I have simple erc20 token contrct deployed to rinkeby([https://github.com/Valeria2001/ethereum-project/blob/main/project1/Simpletoken20.sol](https://github.com/Valeria2001/ethereum-project/blob/main/project1/Simpletoken20.sol)). When i tried to trasfer some erc20 to another contract, there is an issue:

```auto
execution reverted: ERC20: transfer amount exceeds allowance

```

But i called increaseAllowance method from erc20 contract. What i’m doing wrong?

---

<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:** [May 6, 2021, 12:41am UTC](https://forum.openzeppelin.com/t/how-to-transfer-erc20-tokens-between-wallets-rinkeby/7813/2 "2021-05-06T00:41:27Z")

</div>

Sorry, I am not sure what you mean.  
If you want to transfer token from your own wallet account to a contract by call one function in the contract, you should call `token.approve(CONTRACT_ADDR, AMOUNT)` at first, and then call that function in the contract to transfer you token.

If you want to transfer token from `contractA` to `contractB`, there should be a similar approve function in the contractA, such as:

```auto
function approve(uint256 amount) public onlyOwner {
    ERC20.approve(contractB, amount);
}

```

and then just like the case one, call the function in the `contractB` to transfer you token.

I hope I have made myself clear.

---

<div class="post-metadata">

**Author:** ![Volandemort](https://avatars.discourse-cdn.com/v4/letter/v/eb8c5e/32.png) [@Volandemort](https://forum.openzeppelin.com/u/Volandemort)\
**Post date:** [May 6, 2021, 6:41am UTC](https://forum.openzeppelin.com/t/how-to-transfer-erc20-tokens-between-wallets-rinkeby/7813/3 "2021-05-06T06:41:45Z")

</div>

thanks, that is solution. My error is setting ERC20.approve for contractA
