ITX USDT Transfer

Is it possible to use Infura ITX to do a gasless transfer for USDT? Basically I have a wallet with no ETH but has USDT. I want to use ITX to transfer it using meta transactions.

I used the code below to sign a transfer transaction and relay it using ITX but the contract rejected it.

Is there something else I have to do? Very new to Ethereum, appreciate the help!

Code:

 // Get USDT balance for target
  const target = new ethers.Wallet(TARGET, itx)

  // Create USDT contract provider
  const usdt = new ethers.Contract(
    '0xdac17f958d2ee523a2206206994597c13d831ec7',
    abi,
    target
  )

  // Check USDT balance
  const balance = await usdt.balanceOf(target.getAddress())
  console.log(`USDT balance: ${ethers.utils.formatUnits(balance, 6)}`)

  // Get unsigned transaction
  const unsigned = await usdt.populateTransaction.transfer(
    target.address,
    balance
  )
  console.log(`Unsigned transaction: ${JSON.stringify(unsigned)}`)

  // Sign transaction
  const signed = await target.signTransaction(unsigned)
  console.log(`Signed transaction: ${signed}`)

  // Create relay transaction
  const tx = {
    // Address of the contract we want to call
    to: '0xdac17f958d2ee523a2206206994597c13d831ec7',
    // Encoded data payload representing the contract method call
    data: signed,
    // An upper limit on the gas we're willing to spend
    gas: '50000',
    // "fast" and "slow" supported.
    schedule: 'fast',
  }

Hi @homesteadeth

Welcome to our Infura community.

In order to process any transaction using ITX you will have to add ETH to your wallet. If you have any questions please let me know.

Hello,

I’ve added ETH but it but the Tether contract is rejecting the transaction. On Ethterscan it says “Warning! Error encountered during contract execution [ Reverted ]”

Thank you!

Hi,

Please check the ETH gas tracker from here -> https://etherscan.io/gastracker and add enough ETH to your wallet in order to have your transaction processed.

Could you as well share with me the TXID for this transaction to further investigate?

Hello,

The transaction ID is 0x0371e869f8119dcd10f2d9b43dfa01335a397d491b146669bd8fe26599678cfd.

Thank you!

Any clues to why this isn’t working with USDT?

Hi, I develop a web app and I need to receive on newly generated ETH address USDT and then resend it. I am using Infura for ETH transactions and ERC20 transactions too. It’s not a problem to resend USDT when on my address is some ETH to pay gas.

But in this case, I need to send to the address some ETH to resend USDT. I found out, that Infura offers an ITX system with a gas tank. I tried it with the Infura ITX demo example. I modified the example to use the transfer function from the token contract, but on the destination address where I should receive the token, I received only transactions with fees paid by the gas tank. I did not receive the token. And also I did not understand how I can specify from which address the token should be sent. I am not sure if it’s even possible to use the Infura ITX just like that. I am a beginner in this area, so maybe there is something that I overlooked. Thanks for any advice.

I am not certain, but the transfer function of ERC20 tokens likey reference msg.sender, which in this case is the infura relayer’s address, not yours. I don’t think this will work in your case because of this. This problem is referenced in the Limitations section of the Infura ITX documentation.