diff options
author | chriseth <chris@ethereum.org> | 2018-06-13 23:49:41 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-25 23:17:18 +0800 |
commit | 17493e64ed986c33bb5562eabafca2d52b212f19 (patch) | |
tree | 25ac5961633e2813bd4a6bc53b883f690f61f506 /docs/security-considerations.rst | |
parent | 237788c0bc204eb08ba7000cd51c0c62ecb777c6 (diff) | |
download | dexon-solidity-17493e64ed986c33bb5562eabafca2d52b212f19.tar.gz dexon-solidity-17493e64ed986c33bb5562eabafca2d52b212f19.tar.zst dexon-solidity-17493e64ed986c33bb5562eabafca2d52b212f19.zip |
Documentation.
Diffstat (limited to 'docs/security-considerations.rst')
-rw-r--r-- | docs/security-considerations.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst index 4133edb1..52a755ca 100644 --- a/docs/security-considerations.rst +++ b/docs/security-considerations.rst @@ -86,7 +86,7 @@ as it uses ``call`` which forwards all remaining gas by default: mapping(address => uint) shares; /// Withdraw your share. function withdraw() public { - if (msg.sender.call.value(shares[msg.sender])()) + if (msg.sender.call.value(shares[msg.sender])("")) shares[msg.sender] = 0; } } @@ -140,7 +140,7 @@ Sending and Receiving Ether (for example in the "details" section in Remix). - There is a way to forward more gas to the receiving contract using - ``addr.call.value(x)()``. This is essentially the same as ``addr.transfer(x)``, + ``addr.call.value(x)("")``. This is essentially the same as ``addr.transfer(x)``, only that it forwards all remaining gas and opens up the ability for the recipient to perform more expensive actions (and it only returns a failure code and does not automatically propagate the error). This might include calling back |