tx.origin usage is discouraged in many places. But as of now, it seems like the best way to avoid receiving a transaction from a contract.
This article proposes tx.origin usage as best approach for certain scenarios such as non contract check:
On the other hand it has been mentioned that tx.origin might be deprecated in the future: https://ethereum.stackexchange.com/questions/196/how-do-i-make-my-dapp-serenity-proof
So I have two questions:
- Are there any plans to remove tx.origin?
And if anyone could point out a better way to create an onlyNonContract modifier.
Thanks in advance.