Hi, guys.

Anyone should any idea why that code can fail

address user = msg.sender;
address me = address(this);

require(usdt.allowance(user, me) >= _amount,
"INSUFFICIENT_USDT_ALLOWANCE"
);
usdt.transferFrom(user, me, uint(_amount));


It fails in transferFrom and I’m unable to understand why. I’m using Rinkeby testnet, and interacting with testnet’s test USDT
https://kovan.etherscan.io/tx/0x91d3a66ff1859385c9c6321c217dcf75424f706e60efb5d9e8022a81ab97f2ad#internal

Here is failing transactions

Mar 12, 2021, 12:54 PM
It drives me kind of mad. I do have allowance, I check it, it works, but transferFrom reverts with no meaningful error
Also using transferFrom with two user accouns works as expected, and the code above works with other tokens/contracts on other testnets.
Any ideas on why can it not work?
Mar 12, 2021, 1:04 PM

© 2024 Draquery.com All rights reserved.