So i want to forward erc20 tokens that i receive in different wallets, to a single "parent" wallet so to speak.
by searching around the stackexchange, i found how to forward ethers,
> pragma solidity 0.4.21;
>
> contract Forwarder {
>
> address public destinationAddress; event LogForwarded(address
> indexed sender, uint amount); event LogFlushed(address indexed
> sender, uint amount);
>
> function Forwarder() public {
> destinationAddress = msg.sender; }
>
> function() payable public {
> emit LogForwarded(msg.sender, msg.value);
> destinationAddress.transfer(msg.value); }
>
> function flush() public {
> emit LogFlushed(msg.sender, address(this).balance);
> destinationAddress.transfer(address(this).balance); }
>
> }
but i can't seem to figure out how to do it for the erc20 tokens.
any material i can read up on or code snippets to check out would be appreciated.
Thank you very much.