You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Technically, caller_is_origin might not be required as is_contract(self.caller()) could be used for that. However, caller_is_origin can be implemented without any storage lookup and therefore uses less gas. Sometimes it is useful to check whether a contract is called by another contract or the origin. caller_is_origin is a cheap way to do so.
Please note that when being called as RPC the origin can indeed be a contract just because the RPC allows the sender to be specified freely. This does not matter here because during on-chain execution the origin can never be a contract and therefore no interaction with dry-running can occur.