Want to get tokens amount sent to my contract address on chain, but don't know address of token.
Can I get through any function ?
Any possible way to so ?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
If you know which address sent the token you can simple look at past transactions on etherscan, if you don't know that, I'm afraid these is no luck? I think if you are recieving an transaction it will show up.
Just go to etherscan using your contract address and look in the tab "ERC20 Token Txns". If some ERC20 were sent to you, these will be shown there.
Hope this helps