aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/zeppelin/token
diff options
context:
space:
mode:
Diffstat (limited to 'test/compilationTests/zeppelin/token')
-rw-r--r--test/compilationTests/zeppelin/token/BasicToken.sol2
-rw-r--r--test/compilationTests/zeppelin/token/ERC20.sol2
-rw-r--r--test/compilationTests/zeppelin/token/ERC20Basic.sol2
-rw-r--r--test/compilationTests/zeppelin/token/LimitedTransferToken.sol4
-rw-r--r--test/compilationTests/zeppelin/token/StandardToken.sol2
-rw-r--r--test/compilationTests/zeppelin/token/VestedToken.sol14
6 files changed, 13 insertions, 13 deletions
diff --git a/test/compilationTests/zeppelin/token/BasicToken.sol b/test/compilationTests/zeppelin/token/BasicToken.sol
index 831f706e..8a3d8ead 100644
--- a/test/compilationTests/zeppelin/token/BasicToken.sol
+++ b/test/compilationTests/zeppelin/token/BasicToken.sol
@@ -30,7 +30,7 @@ contract BasicToken is ERC20Basic {
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
- function balanceOf(address _owner) constant returns (uint256 balance) {
+ function balanceOf(address _owner) view returns (uint256 balance) {
return balances[_owner];
}
diff --git a/test/compilationTests/zeppelin/token/ERC20.sol b/test/compilationTests/zeppelin/token/ERC20.sol
index 1045ac35..ae5aa624 100644
--- a/test/compilationTests/zeppelin/token/ERC20.sol
+++ b/test/compilationTests/zeppelin/token/ERC20.sol
@@ -9,7 +9,7 @@ import './ERC20Basic.sol';
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
- function allowance(address owner, address spender) constant returns (uint256);
+ function allowance(address owner, address spender) view returns (uint256);
function transferFrom(address from, address to, uint256 value);
function approve(address spender, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
diff --git a/test/compilationTests/zeppelin/token/ERC20Basic.sol b/test/compilationTests/zeppelin/token/ERC20Basic.sol
index 0e98779e..94fb7bcf 100644
--- a/test/compilationTests/zeppelin/token/ERC20Basic.sol
+++ b/test/compilationTests/zeppelin/token/ERC20Basic.sol
@@ -8,7 +8,7 @@ pragma solidity ^0.4.11;
*/
contract ERC20Basic {
uint256 public totalSupply;
- function balanceOf(address who) constant returns (uint256);
+ function balanceOf(address who) view returns (uint256);
function transfer(address to, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
diff --git a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol
index ee5032c9..0ccd60b2 100644
--- a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol
+++ b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol
@@ -10,7 +10,7 @@ import "./ERC20.sol";
* LimitedTransferToken has been designed to allow for different limiting factors,
* this can be achieved by recursively calling super.transferableTokens() until the base class is
* hit. For example:
- * function transferableTokens(address holder, uint64 time) constant public returns (uint256) {
+ * function transferableTokens(address holder, uint64 time) view public returns (uint256) {
* return min256(unlockedTokens, super.transferableTokens(holder, time));
* }
* A working example is VestedToken.sol:
@@ -51,7 +51,7 @@ contract LimitedTransferToken is ERC20 {
* @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the
* specific logic for limiting token transferability for a holder over time.
*/
- function transferableTokens(address holder, uint64 time) constant public returns (uint256) {
+ function transferableTokens(address holder, uint64 time) view public returns (uint256) {
return balanceOf(holder);
}
}
diff --git a/test/compilationTests/zeppelin/token/StandardToken.sol b/test/compilationTests/zeppelin/token/StandardToken.sol
index ab9f582e..900a9102 100644
--- a/test/compilationTests/zeppelin/token/StandardToken.sol
+++ b/test/compilationTests/zeppelin/token/StandardToken.sol
@@ -58,7 +58,7 @@ contract StandardToken is ERC20, BasicToken {
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still avaible for the spender.
*/
- function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
+ function allowance(address _owner, address _spender) view returns (uint256 remaining) {
return allowed[_owner][_spender];
}
diff --git a/test/compilationTests/zeppelin/token/VestedToken.sol b/test/compilationTests/zeppelin/token/VestedToken.sol
index e9929018..3953612d 100644
--- a/test/compilationTests/zeppelin/token/VestedToken.sol
+++ b/test/compilationTests/zeppelin/token/VestedToken.sol
@@ -106,7 +106,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @param time uint64 The specific time.
* @return An uint256 representing a holder's total amount of transferable tokens.
*/
- function transferableTokens(address holder, uint64 time) constant public returns (uint256) {
+ function transferableTokens(address holder, uint64 time) view public returns (uint256) {
uint256 grantIndex = tokenGrantsCount(holder);
if (grantIndex == 0) return balanceOf(holder); // shortcut for holder without grants
@@ -130,7 +130,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @param _holder The holder of the grants.
* @return A uint256 representing the total amount of grants.
*/
- function tokenGrantsCount(address _holder) constant returns (uint256 index) {
+ function tokenGrantsCount(address _holder) view returns (uint256 index) {
return grants[_holder].length;
}
@@ -163,7 +163,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
uint256 time,
uint256 start,
uint256 cliff,
- uint256 vesting) constant returns (uint256)
+ uint256 vesting) view returns (uint256)
{
// Shortcuts for before cliff and after vesting cases.
if (time < cliff) return 0;
@@ -192,7 +192,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @return Returns all the values that represent a TokenGrant(address, value, start, cliff,
* revokability, burnsOnRevoke, and vesting) plus the vested value at the current time.
*/
- function tokenGrant(address _holder, uint256 _grantId) constant returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) {
+ function tokenGrant(address _holder, uint256 _grantId) view returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) {
TokenGrant grant = grants[_holder][_grantId];
granter = grant.granter;
@@ -212,7 +212,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @param time The time to be checked
* @return An uint256 representing the amount of vested tokens of a specific grant at a specific time.
*/
- function vestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) {
+ function vestedTokens(TokenGrant grant, uint64 time) private view returns (uint256) {
return calculateVestedTokens(
grant.value,
uint256(time),
@@ -229,7 +229,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @return An uint256 representing the amount of non vested tokens of a specifc grant on the
* passed time frame.
*/
- function nonVestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) {
+ function nonVestedTokens(TokenGrant grant, uint64 time) private view returns (uint256) {
return grant.value.sub(vestedTokens(grant, time));
}
@@ -238,7 +238,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @param holder address The address of the holder
* @return An uint256 representing the date of the last transferable tokens.
*/
- function lastTokenIsTransferableDate(address holder) constant public returns (uint64 date) {
+ function lastTokenIsTransferableDate(address holder) view public returns (uint64 date) {
date = uint64(now);
uint256 grantIndex = grants[holder].length;
for (uint256 i = 0; i < grantIndex; i++) {