I have 2 ERC20 tokens. The contract are designed as standard ERC20. Here are the 2 tokens to take as an example -
AUDC --> Contract address: (0xContractAUDC)
Wallet Address: (0xWalletAUDC)
DAI --> Contract address: (0xContractDAI)
Wallet Address: (0xWalletDAI)
I want to transfer some DAI from wallet 0xWalletDAI
to 0xWalletAUDC
to receive converted AUDC in return (I have private keys of both the wallets).
Looking for some help to know how this can be implemented. I would try to be helpful with more information if needed.
I am using ethers.js v4.0
to interact with blockchain.