Let's say we have a non-native contract.
Whenever we call
transfer()/send() or directly manipulate via
balanceOf, how do we know which token (either native or non-native token) will be transferred?
I came across this from looking at this scam contract's decompiled source code. Obviously I didn't see any import of
IERC20 or anything, or decompilation probably won't include them ?
Such decompiled code works with STPT token, and it's on BSC network. As I looked in the code, and transactions, I came to conclusion that
balanceOf works against STPT token. But how can we know this when looking at the code alone without checking elsewhere?
As we have multiple ways to transfer as follows
payable(addr).transfer(amount)- I knew this from here that this is meant to transfer native token
send()- I believe the developer needs to know such that the variable that calls this method needs to be based upon
IERC20or others ?
balanceOf()- I'm not sure about this...
Please feel free to correct me, go in depths or link me articles to read more on this stuff. Thank you very much in advance.