Post
Topic
Board Altcoin Discussion
Re: Smart Contracts
by
DriveDeal.io
on 20/07/2018, 10:37:08 UTC
Yes, it's totally possible.
Your contract can interact with any number of tokens, there's no limitation on that. You can hold references for all of them or just receive the address and do something 'on the go'. Something like that:

Code:
pragma solidity ^0.4.23;

import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";

contract Contract {

  function doSomethingWithAnyERC20Token(ERC20 _token) public {
    _token.transfer(...)
  }
}