aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/contracts/AuctionRegistrar.cpp24
-rw-r--r--test/contracts/FixedFeeRegistrar.cpp20
-rw-r--r--test/contracts/Wallet.cpp4
3 files changed, 24 insertions, 24 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp
index bd996fb1..3d759aa0 100644
--- a/test/contracts/AuctionRegistrar.cpp
+++ b/test/contracts/AuctionRegistrar.cpp
@@ -43,20 +43,20 @@ static char const* registrarCode = R"DELIMITER(
pragma solidity ^0.4.0;
contract NameRegister {
- function addr(string _name) constant returns (address o_owner);
- function name(address _owner) constant returns (string o_name);
+ function addr(string _name) view returns (address o_owner);
+ function name(address _owner) view returns (string o_name);
}
contract Registrar is NameRegister {
event Changed(string indexed name);
event PrimaryChanged(string indexed name, address indexed addr);
- function owner(string _name) constant returns (address o_owner);
- function addr(string _name) constant returns (address o_address);
- function subRegistrar(string _name) constant returns (address o_subRegistrar);
- function content(string _name) constant returns (bytes32 o_content);
+ function owner(string _name) view returns (address o_owner);
+ function addr(string _name) view returns (address o_address);
+ function subRegistrar(string _name) view returns (address o_subRegistrar);
+ function content(string _name) view returns (bytes32 o_content);
- function name(address _owner) constant returns (string o_name);
+ function name(address _owner) view returns (string o_name);
}
contract AuctionSystem {
@@ -201,11 +201,11 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
return true;
}
- function owner(string _name) constant returns (address) { return m_toRecord[_name].owner; }
- function addr(string _name) constant returns (address) { return m_toRecord[_name].primary; }
- function subRegistrar(string _name) constant returns (address) { return m_toRecord[_name].subRegistrar; }
- function content(string _name) constant returns (bytes32) { return m_toRecord[_name].content; }
- function name(address _addr) constant returns (string o_name) { return m_toName[_addr]; }
+ function owner(string _name) view returns (address) { return m_toRecord[_name].owner; }
+ function addr(string _name) view returns (address) { return m_toRecord[_name].primary; }
+ function subRegistrar(string _name) view returns (address) { return m_toRecord[_name].subRegistrar; }
+ function content(string _name) view returns (bytes32) { return m_toRecord[_name].content; }
+ function name(address _addr) view returns (string o_name) { return m_toName[_addr]; }
mapping (address => string) m_toName;
mapping (string => Record) m_toRecord;
diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp
index 630d2ab9..87f801b0 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -58,10 +58,10 @@ pragma solidity ^0.4.0;
contract Registrar {
event Changed(string indexed name);
- function owner(string _name) constant returns (address o_owner);
- function addr(string _name) constant returns (address o_address);
- function subRegistrar(string _name) constant returns (address o_subRegistrar);
- function content(string _name) constant returns (bytes32 o_content);
+ function owner(string _name) view returns (address o_owner);
+ function addr(string _name) view returns (address o_address);
+ function subRegistrar(string _name) view returns (address o_subRegistrar);
+ function content(string _name) view returns (bytes32 o_content);
}
contract FixedFeeRegistrar is Registrar {
@@ -104,20 +104,20 @@ contract FixedFeeRegistrar is Registrar {
emit Changed(_name);
}
- function record(string _name) constant returns (address o_addr, address o_subRegistrar, bytes32 o_content, address o_owner) {
+ function record(string _name) view returns (address o_addr, address o_subRegistrar, bytes32 o_content, address o_owner) {
Record rec = m_record(_name);
o_addr = rec.addr;
o_subRegistrar = rec.subRegistrar;
o_content = rec.content;
o_owner = rec.owner;
}
- function addr(string _name) constant returns (address) { return m_record(_name).addr; }
- function subRegistrar(string _name) constant returns (address) { return m_record(_name).subRegistrar; }
- function content(string _name) constant returns (bytes32) { return m_record(_name).content; }
- function owner(string _name) constant returns (address) { return m_record(_name).owner; }
+ function addr(string _name) view returns (address) { return m_record(_name).addr; }
+ function subRegistrar(string _name) view returns (address) { return m_record(_name).subRegistrar; }
+ function content(string _name) view returns (bytes32) { return m_record(_name).content; }
+ function owner(string _name) view returns (address) { return m_record(_name).owner; }
Record[2**253] m_recordData;
- function m_record(string _name) constant internal returns (Record storage o_record) {
+ function m_record(string _name) view internal returns (Record storage o_record) {
return m_recordData[uint(keccak256(bytes(_name))) / 8];
}
uint constant c_fee = 69 ether;
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index 1db1e4e2..fb104300 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -177,7 +177,7 @@ contract multiowned {
return m_ownerIndex[uint(_addr)] > 0;
}
- function hasConfirmed(bytes32 _operation, address _owner) constant returns (bool) {
+ function hasConfirmed(bytes32 _operation, address _owner) view returns (bool) {
PendingState pending = m_pending[_operation];
uint ownerIndex = m_ownerIndex[uint(_owner)];
@@ -319,7 +319,7 @@ contract daylimit is multiowned {
return false;
}
// determines today's index.
- function today() private constant returns (uint) { return now / 1 days; }
+ function today() private view returns (uint) { return now / 1 days; }
// FIELDS