mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests, Docs and Changelog
This commit is contained in:
@@ -587,7 +587,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
|
||||
// multiple times out of the DAO
|
||||
p.proposalPassed = true;
|
||||
|
||||
(bool success,) = p.recipient.call.value(p.amount)(_transactionData);
|
||||
(bool success,) = p.recipient.call{value: p.amount}(_transactionData);
|
||||
if (!success)
|
||||
revert();
|
||||
|
||||
@@ -663,7 +663,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
|
||||
uint fundsToBeMoved =
|
||||
(balances[msg.sender] * p.splitData[0].splitBalance) /
|
||||
p.splitData[0].totalSupply;
|
||||
if (p.splitData[0].newDAO.createTokenProxy.value(fundsToBeMoved)(msg.sender) == false)
|
||||
if (p.splitData[0].newDAO.createTokenProxy{value: fundsToBeMoved}(msg.sender) == false)
|
||||
revert();
|
||||
|
||||
|
||||
@@ -697,7 +697,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
|
||||
function newContract(address payable _newContract) public override {
|
||||
if (msg.sender != address(this) || !allowedRecipients[_newContract]) return;
|
||||
// move all ether
|
||||
(bool success,) = _newContract.call.value(address(this).balance)("");
|
||||
(bool success,) = _newContract.call{value: address(this).balance}("");
|
||||
if (!success) {
|
||||
revert();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ contract ManagedAccount is ManagedAccountInterface{
|
||||
function payOut(address payable _recipient, uint _amount) public override returns (bool) {
|
||||
if (msg.sender != owner || (payOwnerOnly && _recipient != owner))
|
||||
revert();
|
||||
(bool success,) = _recipient.call.value(_amount)("");
|
||||
(bool success,) = _recipient.call{value: _amount}("");
|
||||
if (success) {
|
||||
emit PayOut(_recipient, _amount);
|
||||
return true;
|
||||
|
||||
@@ -106,7 +106,7 @@ override returns (bool success) {
|
||||
&& (privateCreation == 0x0000000000000000000000000000000000000000 || privateCreation == msg.sender)) {
|
||||
|
||||
uint token = (msg.value * 20) / divisor();
|
||||
address(extraBalance).call.value(msg.value - token)("");
|
||||
address(extraBalance).call{value: msg.value - token}("");
|
||||
balances[_tokenHolder] += token;
|
||||
totalSupply += token;
|
||||
weiGiven[_tokenHolder] += msg.value;
|
||||
@@ -127,7 +127,7 @@ override returns (bool success) {
|
||||
extraBalance.payOut(address(this), extraBalance.accumulatedInput());
|
||||
|
||||
// Execute refund
|
||||
(bool success,) = msg.sender.call.value(weiGiven[msg.sender])("");
|
||||
(bool success,) = msg.sender.call{value: weiGiven[msg.sender]}("");
|
||||
if (success) {
|
||||
emit Refund(msg.sender, weiGiven[msg.sender]);
|
||||
totalSupply -= balances[msg.sender];
|
||||
|
||||
Reference in New Issue
Block a user