title: Send token from addressA to addressB through contract
body: <p>im tryin to do a function inside my contract that when someone use it:</p>
  <ol>
  <li>it get the tokenX_v1 balance of msg.sender,</li>
  <li>send the same amount of tokenX_v2 from my contract,</li>
  <li>send his tokenX_v1 to my contract or burn address.</li>
  </ol>
  <p>part 1 and 2 i did it like this:</p>
  <pre><code>function query_oldBalance(address _adrs) view public returns (uint) {
    address _tokenAddress = &quot;tokenV1&quot;
    return IERC20(_tokenAddress).balanceOf(_adrs);
  
  function myfunction() public {
    _tokenTransfer(address(this),msg.sender,query_oldBalance(msg.sender) , false);
  </code></pre>
  <p>and until here it works as intended but now i need to remove tokenV1 from the msg.sender, and i thought to do a transfer to send it to the contract or the burn address, but when i try to do a transferFrom i get:
  <code>execution reverted: ERC20: transfer amount exceeds allowance</code> even if i put the allowance to a much bigger number of what im trying to transfer
  if i try with a normal transfer i got <code>&quot;execution reverted: Transfer amount exceeds the maxTxAmount.</code> same here i tried to set the maxtxamount to a much bigger number than the token im trying to transfer.. about the allowance,
  im not sure about how allowance and approve works and if i need it in this case but this is what i tried:</p>
  <pre><code>IERC20(_tokenAddress).allowance(msg.sender, address(this)); 
  IERC20(_tokenAddress).approve(address(this),query_oldBalance(msg.sender)); //tried with this multiplied by 10 same story
  </code></pre>
  <p>i really don't understand how to do this addressA to addressB token transfer through contract.. Hope someone can help me Thanks.</p>