0

Is it possible for a contract to hold multiple versions of ERC20 tokens? Also in extension this, what if one does not know which versions of ERC20 token(s) is to be sold in advance of deployment of the contract, is it possible to define and initiate the token(s) through the constructor?

1 Answer 1

1

The ERC20 Standard does not account for multiple tokens.

It is possible to develop a smart contract that houses multiple tokens but it would require significant changes that would circumvent ERC20 standards.

So...no. Sorry.

4
  • In extension, would it be possible to define a token on contract initialisation through the constructor? If all tokens are based on the ERC20 standard this should be possible? I should be able to create a contract, which allows me to define whether I want to use a ERC20TokenA or ERC20TokenB without having to reprogram the contract
    – NowsyMe
    May 8, 2018 at 23:29
  • @NowsyMe That really would be pointless since the constructor only happens on contract initialization. You'd essentially have one defined Token anyway so you might as just keep the ERC20 standard and just launch 2 contracts.
    – ReyHaynes
    May 10, 2018 at 2:33
  • could you show an example?
    – NowsyMe
    May 10, 2018 at 3:57
  • @NowsyMe There's nothing to show. I'm saying just take the ERC20 standard smart contract and if you want two ERC20 tokens, just do it separately.
    – ReyHaynes
    May 10, 2018 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.