Documentation.

This commit is contained in:
chriseth
2018-06-25 17:17:18 +02:00
committed by Alex Beregszaszi
parent 237788c0bc
commit 17493e64ed
7 changed files with 57 additions and 64 deletions
+2 -2
View File
@@ -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