diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-07-05 20:32:32 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-07-12 18:53:49 +0800 |
commit | 3ebfcae8292da1d9f41ff20da1866c424404ee58 (patch) | |
tree | 0b6845c1598d81ed72ebe2b2d44272f6f51f284c /test | |
parent | c438b73f689b904152f4b8b636579317fb55e60a (diff) | |
download | dexon-solidity-3ebfcae8292da1d9f41ff20da1866c424404ee58.tar.gz dexon-solidity-3ebfcae8292da1d9f41ff20da1866c424404ee58.tar.zst dexon-solidity-3ebfcae8292da1d9f41ff20da1866c424404ee58.zip |
Update external tests and docs
Diffstat (limited to 'test')
-rw-r--r-- | test/compilationTests/corion/ico.sol | 2 | ||||
-rw-r--r-- | test/compilationTests/corion/module.sol | 4 | ||||
-rw-r--r-- | test/compilationTests/corion/token.sol | 2 | ||||
-rw-r--r-- | test/compilationTests/zeppelin/Bounty.sol | 2 | ||||
-rw-r--r-- | test/compilationTests/zeppelin/LimitBalance.sol | 2 | ||||
-rw-r--r-- | test/compilationTests/zeppelin/crowdsale/RefundVault.sol | 2 | ||||
-rw-r--r-- | test/compilationTests/zeppelin/ownership/HasNoEther.sol | 2 | ||||
-rw-r--r-- | test/compilationTests/zeppelin/payment/PullPayment.sol | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol index 7b27c201..abb6020b 100644 --- a/test/compilationTests/corion/ico.sol +++ b/test/compilationTests/corion/ico.sol @@ -231,7 +231,7 @@ contract ico is safeMath { require( ! aborted ); require( token(tokenAddr).mint(foundationAddress, token(tokenAddr).totalSupply() * 96 / 100) ); require( premium(premiumAddr).mint(foundationAddress, totalMint / 5000 - totalPremiumMint) ); - require( foundationAddress.send(this.balance) ); + require( foundationAddress.send(address(this).balance) ); require( token(tokenAddr).closeIco() ); require( premium(premiumAddr).closeIco() ); } diff --git a/test/compilationTests/corion/module.sol b/test/compilationTests/corion/module.sol index 62f44af7..e0084ea5 100644 --- a/test/compilationTests/corion/module.sol +++ b/test/compilationTests/corion/module.sol @@ -95,8 +95,8 @@ contract module { if ( _balance > 0 ) { require( abstractModuleHandler(moduleHandlerAddress).transfer(address(this), newModuleAddress, _balance, false) ); } - if ( this.balance > 0 ) { - require( newModuleAddress.send(this.balance) ); + if ( address(this).balance > 0 ) { + require( newModuleAddress.send(address(this).balance) ); } moduleStatus = status.Disconnected; } diff --git a/test/compilationTests/corion/token.sol b/test/compilationTests/corion/token.sol index 195b4ada..8ca18083 100644 --- a/test/compilationTests/corion/token.sol +++ b/test/compilationTests/corion/token.sol @@ -73,7 +73,7 @@ contract token is safeMath, module, announcementTypes { if ( ! forReplace ) { require( db.replaceOwner(this) ); assert( genesisAddr.length == genesisValue.length ); - require( this.balance >= genesisAddr.length * 0.2 ether ); + require( address(this).balance >= genesisAddr.length * 0.2 ether ); for ( uint256 a=0 ; a<genesisAddr.length ; a++ ) { genesis[genesisAddr[a]] = true; require( db.increase(genesisAddr[a], genesisValue[a]) ); diff --git a/test/compilationTests/zeppelin/Bounty.sol b/test/compilationTests/zeppelin/Bounty.sol index 5b2124ca..a5e75cd3 100644 --- a/test/compilationTests/zeppelin/Bounty.sol +++ b/test/compilationTests/zeppelin/Bounty.sol @@ -55,7 +55,7 @@ contract Bounty is PullPayment, Destructible { if (target.checkInvariant()) { throw; } - asyncSend(researcher, this.balance); + asyncSend(researcher, address(this).balance); claimed = true; } diff --git a/test/compilationTests/zeppelin/LimitBalance.sol b/test/compilationTests/zeppelin/LimitBalance.sol index cf040097..9682ff1c 100644 --- a/test/compilationTests/zeppelin/LimitBalance.sol +++ b/test/compilationTests/zeppelin/LimitBalance.sol @@ -23,7 +23,7 @@ contract LimitBalance { * @dev Checks if limit was reached. Case true, it throws. */ modifier limitedPayable() { - if (this.balance > limit) { + if (address(this).balance > limit) { throw; } _; diff --git a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol index 19346c42..b7db8ef2 100644 --- a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol +++ b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol @@ -37,7 +37,7 @@ contract RefundVault is Ownable { require(state == State.Active); state = State.Closed; emit Closed(); - wallet.transfer(this.balance); + wallet.transfer(address(this).balance); } function enableRefunds() public onlyOwner { diff --git a/test/compilationTests/zeppelin/ownership/HasNoEther.sol b/test/compilationTests/zeppelin/ownership/HasNoEther.sol index ffd1d76f..9f294679 100644 --- a/test/compilationTests/zeppelin/ownership/HasNoEther.sol +++ b/test/compilationTests/zeppelin/ownership/HasNoEther.sol @@ -37,7 +37,7 @@ contract HasNoEther is Ownable { * @dev Transfer all Ether held by the contract to the owner. */ function reclaimEther() external onlyOwner { - if(!owner.send(this.balance)) { + if(!owner.send(address(this).balance)) { throw; } } diff --git a/test/compilationTests/zeppelin/payment/PullPayment.sol b/test/compilationTests/zeppelin/payment/PullPayment.sol index 6db7df78..2f3e1b51 100644 --- a/test/compilationTests/zeppelin/payment/PullPayment.sol +++ b/test/compilationTests/zeppelin/payment/PullPayment.sol @@ -36,7 +36,7 @@ contract PullPayment { throw; } - if (this.balance < payment) { + if (address(this).balance < payment) { throw; } |