I know transferring ERC-20 token from my wallet to a custom contract. The smart contract has to call transferFrom()
to enable withdraw.
ERC20 token = ERC20(_tokenAddress);
token.transferFrom(msg.sender, this, _amount);
But I need to first call approve function on the token contract to approve this contract to withraw funds on my behalf. I want to know is there any way to call the token.approve()
method from this contract itself?