mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Documentation.
This commit is contained in:
committed by
Alex Beregszaszi
parent
237788c0bc
commit
17493e64ed
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user