I am looking for solution why transaction reverted
My address TUX9813ndeSYAfmNdC39z9H5Re5hRsHVQd
There is a contract that acts as a wallet, which has an authorised address that can call the transfer functions from the contract balance we can transfer
- native currency
- tokens
in my case, the contact has a balance in TRX, USDT, USDC
the problem arises when I try to call the sendTokenTo method - it takes three parameters
- recipient
- currency (the token to be sent)
- amount
when I set the USDT address, it gives an error on the screen
when I set the USDC address the transaction goes through
Contract deployed at mainnet https://tronscan.org/#/contract/TFMPg1ifkuKtYmvW3fXHaSfWFqiBha3qEm/code
Failed transaction https://tronscan.org/#/transaction/7a1d54fd5eb2f25a5c428cb42c7edfcbf40c4c261cd5b79e353d4939fd6428ad
Contract code
/**
* @dev only authorized address can send tokens
*
* @param receiver - address to send tokens
* @param token - token address
* @param amount - amount of tokens to send
*/
function sendTokenTo(
address receiver,
IERC20 token,
uint256 amount
) external onlyKeeper nonReentrant zeroAddress(receiver) onlyActive {
if (getTokenBalance(token) <= amount) revert InsufficientBalance();
if (amount <= 0) revert IncorrectAmount();
_safeWithdrawToken(receiver, token, amount);
emit TransferredTokenAmount(token, receiver, amount);
}
` enter image description here
I am tryin to transfer another token as USDC and tansaction passed well https://tronscan.org/#/transaction/5047c638e431bfe96c119430342cd02bd85a1c12492d7babd9b4812aace0f31a