diff options
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r-- | docs/control-structures.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 2f867cb0..ab6f59fb 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -69,6 +69,21 @@ this does not execute a constructor. We could also have used ``function setFeed( only (locally) sets the value and amount of gas sent with the function call and only the parentheses at the end perform the actual call. +.. warning:: + Any interaction with another contract imposes a potential danger, especially + if the source code of the contract is not known in advance. The current + contract hands over control to the called contract and that may potentially + do just about anything. Even if the called contract inherits from a known parent contract, + the inheriting contract is only required to have a correct interface. The + implementation of the contract, however, can be completely arbitrary and thus, + pose a danger. In addition, be prepared in case it calls into other contracts of + your system or even back into the calling contract before the first + call returns. This means + that the called contract can change state variables of the calling contract + via its functions. Write your functions in a way that, for example, calls to + external functions happen after any changes to state variables in your contract + so your contract is not vulnerable to a recursive call exploit. + Named Calls and Anonymous Function Parameters --------------------------------------------- |