To withdraw a token balance, you need to execute the transfer() function on the token contract . So in order to withdraw all tokens, you need to execute the transfer() function on all token contracts. You can create a function that withdraws any ERC-20 token based on the token contract address that you pass as an input.
Read moreDo smart contracts require tokens?
Anyone can use smart contracts if they have Ethereum’s native token ether , which can be bought on cryptocurrency exchanges.
Read more