aboutsummaryrefslogtreecommitdiffstats
path: root/test/contracts
diff options
context:
space:
mode:
authorJason Cobb <jason.e.cobb@gmail.com>2018-05-31 05:02:47 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-25 22:17:50 +0800
commit98c9ca257568e8f281a5d8857a45ef2c8aef2c77 (patch)
tree728ebe462c3ec65a90e44d7c3d6558a03418de6b /test/contracts
parent48b003d4d4e4ebddf8922fb06a47c1634203d0bc (diff)
downloaddexon-solidity-98c9ca257568e8f281a5d8857a45ef2c8aef2c77.tar.gz
dexon-solidity-98c9ca257568e8f281a5d8857a45ef2c8aef2c77.tar.zst
dexon-solidity-98c9ca257568e8f281a5d8857a45ef2c8aef2c77.zip
Update tests for strict address literals
Diffstat (limited to 'test/contracts')
-rw-r--r--test/contracts/AuctionRegistrar.cpp4
-rw-r--r--test/contracts/FixedFeeRegistrar.cpp2
-rw-r--r--test/contracts/Wallet.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp
index 33b392d4..ef84efed 100644
--- a/test/contracts/AuctionRegistrar.cpp
+++ b/test/contracts/AuctionRegistrar.cpp
@@ -123,7 +123,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
record.renewalDate = now + c_renewalInterval;
record.owner = auction.highestBidder;
Changed(_name);
- if (previousOwner != 0) {
+ if (previousOwner != 0x0000000000000000000000000000000000000000) {
if (!record.owner.send(auction.sumOfBids - auction.highestBid / 100))
throw;
} else {
@@ -143,7 +143,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
bid(_name, msg.sender, msg.value);
} else {
Record record = m_toRecord[_name];
- if (record.owner != 0)
+ if (record.owner != 0x0000000000000000000000000000000000000000)
throw;
m_toRecord[_name].owner = msg.sender;
Changed(_name);
diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp
index a3a27c37..1fd58403 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -76,7 +76,7 @@ contract FixedFeeRegistrar is Registrar {
function reserve(string _name) payable {
Record rec = m_record(_name);
- if (rec.owner == 0 && msg.value >= c_fee) {
+ if (rec.owner == 0x0000000000000000000000000000000000000000 && msg.value >= c_fee) {
rec.owner = msg.sender;
Changed(_name);
}
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index 1031e8f1..f8ee007d 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -399,7 +399,7 @@ contract Wallet is multisig, multiowned, daylimit {
}
// determine our operation hash.
_r = keccak256(msg.data, block.number);
- if (!confirm(_r) && m_txs[_r].to == 0) {
+ if (!confirm(_r) && m_txs[_r].to == 0x0000000000000000000000000000000000000000) {
m_txs[_r].to = _to;
m_txs[_r].value = _value;
m_txs[_r].data = _data;
@@ -410,7 +410,7 @@ contract Wallet is multisig, multiowned, daylimit {
// confirm a transaction through just the hash. we use the previous transactions map, m_txs, in order
// to determine the body of the transaction from the hash provided.
function confirm(bytes32 _h) onlymanyowners(_h) returns (bool) {
- if (m_txs[_h].to != 0) {
+ if (m_txs[_h].to != 0x0000000000000000000000000000000000000000) {
m_txs[_h].to.call.value(m_txs[_h].value)(m_txs[_h].data);
MultiTransact(msg.sender, _h, m_txs[_h].value, m_txs[_h].to, m_txs[_h].data);
delete m_txs[_h];