being callable by externally owned accounts? My contract would likely be vulnerable to a contract mass creating contracts and then flashloaning / calling the contract a bunch of times in one tx. This is because there are some cooldown mechanics in the game that would be circumvented by a multi-account user.
I know I can use tx.origin == msg.sender but tx.origin is supposed to be on the deprecation path. Are there alternatives?
function isContract(address _addr) private returns (bool isContract){ uint32 size; assembly { size := extcodesize(_addr) } return (size > 0); }
That's bypassable in the constructor tho
Обсуждают сегодня