I wanted to know how to distinguish between a function call from an externally owned user account and a function call from another smart contract in solidity. Can anyone help me with this?
Asked
Active
Viewed 88 times
1 Answers
0
Yes, check if tx.origin == msg.sender. In this case msg.sender must be an externally owned account. Otherwise msg.sender can't be an externally owned account.
Check What's the difference between 'msg.sender' and 'tx.origin'?
Claudio
- 1