[Ethereum] Is it possible to send ERC20 tokens to a smart contract that is written to accept payments..

dappserc-20erc-223solidityweb3js

I have ERC20 compatible token that is already deployed in the ethereum main-net. I have a requirement to accept these tokens as payment, And this is going to be a new contract, The below are my doubts.

  1. Can I use another ERC20 contract to do this functionality, As I read in some blogs it tells we won't be able track the details of transfer. If it's not the case, Someone please provide me with a sample contract or documents.

  2. I saw some solutions using the ERC223 contract, If that the case can I use my already existing ERC20 tokens to use in the newly created ERC223 token contract..? if available please give a sample contract.

Best Answer

  1. Yes, you can. If you have the address of the token, your contract can interact with it (preferably by using ERC-20's transferFrom function).

  2. ERC-223, like ERC-20 is a definition for a Token. If the token you're going to accept payments from implements the ERC-223 standard, you are good to use it's functionality.

Related Topic