mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update external contracts in compilationTests (to support strict address literals)
This commit is contained in:
@@ -48,7 +48,7 @@ contract Bounty is PullPayment, Destructible {
|
||||
*/
|
||||
function claim(Target target) {
|
||||
address researcher = researchers[target];
|
||||
if (researcher == 0) {
|
||||
if (researcher == address(0)) {
|
||||
throw;
|
||||
}
|
||||
// Check Target contract invariants
|
||||
|
||||
@@ -67,7 +67,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
|
||||
}
|
||||
// determine our operation hash.
|
||||
_r = keccak256(msg.data, block.number);
|
||||
if (!confirm(_r) && txs[_r].to == 0) {
|
||||
if (!confirm(_r) && txs[_r].to == address(0)) {
|
||||
txs[_r].to = _to;
|
||||
txs[_r].value = _value;
|
||||
txs[_r].data = _data;
|
||||
@@ -81,7 +81,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
|
||||
* @param _h The transaction hash to approve.
|
||||
*/
|
||||
function confirm(bytes32 _h) onlymanyowners(_h) returns (bool) {
|
||||
if (txs[_h].to != 0) {
|
||||
if (txs[_h].to != address(0)) {
|
||||
if (!txs[_h].to.call.value(txs[_h].value)(txs[_h].data)) {
|
||||
throw;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ contract Crowdsale {
|
||||
require(_startBlock >= block.number);
|
||||
require(_endBlock >= _startBlock);
|
||||
require(_rate > 0);
|
||||
require(_wallet != 0x0);
|
||||
require(_wallet != address(0x0));
|
||||
|
||||
token = createTokenContract();
|
||||
startBlock = _startBlock;
|
||||
@@ -67,7 +67,7 @@ contract Crowdsale {
|
||||
|
||||
// low level token purchase function
|
||||
function buyTokens(address beneficiary) payable {
|
||||
require(beneficiary != 0x0);
|
||||
require(beneficiary != address(0x0));
|
||||
require(validPurchase());
|
||||
|
||||
uint256 weiAmount = msg.value;
|
||||
|
||||
@@ -23,7 +23,7 @@ contract RefundVault is Ownable {
|
||||
event Refunded(address indexed beneficiary, uint256 weiAmount);
|
||||
|
||||
function RefundVault(address _wallet) {
|
||||
require(_wallet != 0x0);
|
||||
require(_wallet != address(0x0));
|
||||
wallet = _wallet;
|
||||
state = State.Active;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,6 @@ contract Claimable is Ownable {
|
||||
*/
|
||||
function claimOwnership() onlyPendingOwner {
|
||||
owner = pendingOwner;
|
||||
pendingOwner = 0x0;
|
||||
pendingOwner = address(0x0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ contract DelayedClaimable is Claimable {
|
||||
if ((block.number > end) || (block.number < start))
|
||||
throw;
|
||||
owner = pendingOwner;
|
||||
pendingOwner = 0x0;
|
||||
pendingOwner = address(0x0);
|
||||
end = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user