I created a token in Mumbai Polygon Testnet.
Token: 0xe6fABBF30a2aDc850E507aCbcF7D0BAFFe64A4Ad
Transfering etc. works well.
Then I created a contract interacting with that token.
Contract: 0x0f90681902C8d003E9C57180C86539F04e7226e4
Contract successfully transfers token from an externally owned address to the contract address. Balances are changing accordingly but in transaction details, no ERC20 transfer is shown.
Tx: 0x7af11809b202ccb205d3c9a4a9f176c3b585e9a9a2f9b9cb332a828b056d75d9
Even if I check the ERC-20 Token Txns tab of the account that transfer is not showing.
Below example, that address receives 1,000 token then spends 300 on the contract then receives 10,000 more. Total balance 10,700 is true, but why we can't see the "OUT 300" transaction?
Address: 0x533Da0798C36C4b2C72A5308D6837805845c80A2
Best Answer
Your
transferFrom
function doesn't emit aTransfer
event. Polygon Scan only showsTransfer
events on the ERC20 Token Txns page. If you look at the OpenZeppelin ERC20 contract, you'll see that thetransferFrom
event will emit a Transfer event.