diff --git a/contracts/DayLimit.sol b/contracts/DayLimit.sol index c76a955a7..3c8d5b0ce 100644 --- a/contracts/DayLimit.sol +++ b/contracts/DayLimit.sol @@ -7,24 +7,24 @@ pragma solidity ^0.4.11; */ contract DayLimit { - uint public dailyLimit; - uint public spentToday; - uint public lastDay; + uint256 public dailyLimit; + uint256 public spentToday; + uint256 public lastDay; /** * @dev Constructor that sets the passed value as a dailyLimit. - * @param _limit Uint to represent the daily limit. + * @param _limit uint256 to represent the daily limit. */ - function DayLimit(uint _limit) { + function DayLimit(uint256 _limit) { dailyLimit = _limit; lastDay = today(); } /** * @dev sets the daily limit. Does not alter the amount already spent today. - * @param _newLimit Uint to represent the new limit. + * @param _newLimit uint256 to represent the new limit. */ - function _setDailyLimit(uint _newLimit) internal { + function _setDailyLimit(uint256 _newLimit) internal { dailyLimit = _newLimit; } @@ -37,10 +37,10 @@ contract DayLimit { /** * @dev Checks to see if there is enough resource to spend today. If true, the resource may be expended. - * @param _value Uint representing the amount of resource to spend. + * @param _value uint256 representing the amount of resource to spend. * @return A boolean that is True if the resource was spended and false otherwise. */ - function underLimit(uint _value) internal returns (bool) { + function underLimit(uint256 _value) internal returns (bool) { // reset the spend limit if we're on a different day to last time. if (today() > lastDay) { spentToday = 0; @@ -57,16 +57,16 @@ contract DayLimit { /** * @dev Private function to determine today's index - * @return Uint of today's index. + * @return uint256 of today's index. */ - function today() private constant returns (uint) { + function today() private constant returns (uint256) { return now / 1 days; } /** * @dev Simple modifier for daily limit. */ - modifier limitedDaily(uint _value) { + modifier limitedDaily(uint256 _value) { if (!underLimit(_value)) { throw; } diff --git a/contracts/LimitBalance.sol b/contracts/LimitBalance.sol index 4071edbea..57477c749 100644 --- a/contracts/LimitBalance.sol +++ b/contracts/LimitBalance.sol @@ -9,13 +9,13 @@ pragma solidity ^0.4.11; */ contract LimitBalance { - uint public limit; + uint256 public limit; /** * @dev Constructor that sets the passed value as a limit. - * @param _limit Uint to represent the limit. + * @param _limit uint256 to represent the limit. */ - function LimitBalance(uint _limit) { + function LimitBalance(uint256 _limit) { limit = _limit; } diff --git a/contracts/MultisigWallet.sol b/contracts/MultisigWallet.sol index fc6fe37f8..939e70f2c 100644 --- a/contracts/MultisigWallet.sol +++ b/contracts/MultisigWallet.sol @@ -16,7 +16,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit { struct Transaction { address to; - uint value; + uint256 value; bytes data; } @@ -25,7 +25,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit { * @param _owners A list of owners. * @param _required The amount required for a transaction to be approved. */ - function MultisigWallet(address[] _owners, uint _required, uint _daylimit) + function MultisigWallet(address[] _owners, uint256 _required, uint256 _daylimit) Shareable(_owners, _required) DayLimit(_daylimit) { } @@ -55,7 +55,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit { * @param _value The value to send * @param _data The data part of the transaction */ - function execute(address _to, uint _value, bytes _data) external onlyOwner returns (bytes32 _r) { + function execute(address _to, uint256 _value, bytes _data) external onlyOwner returns (bytes32 _r) { // first, take the opportunity to check that we're under the daily limit. if (underLimit(_value)) { SingleTransact(msg.sender, _value, _to, _data); @@ -93,9 +93,9 @@ contract MultisigWallet is Multisig, Shareable, DayLimit { /** * @dev Updates the daily limit value. - * @param _newLimit Uint to represent the new limit. + * @param _newLimit uint256 to represent the new limit. */ - function setDailyLimit(uint _newLimit) onlymanyowners(keccak256(msg.data)) external { + function setDailyLimit(uint256 _newLimit) onlymanyowners(keccak256(msg.data)) external { _setDailyLimit(_newLimit); } @@ -112,8 +112,8 @@ contract MultisigWallet is Multisig, Shareable, DayLimit { * @dev Clears the list of transactions pending approval. */ function clearPending() internal { - uint length = pendingsIndex.length; - for (uint i = 0; i < length; ++i) { + uint256 length = pendingsIndex.length; + for (uint256 i = 0; i < length; ++i) { delete txs[pendingsIndex[i]]; } super.clearPending(); diff --git a/contracts/SafeMath.sol b/contracts/SafeMath.sol index 8b203c21a..76e46b784 100644 --- a/contracts/SafeMath.sol +++ b/contracts/SafeMath.sol @@ -5,26 +5,26 @@ pragma solidity ^0.4.11; * Math operations with safety checks */ library SafeMath { - function mul(uint a, uint b) internal returns (uint) { - uint c = a * b; + function mul(uint256 a, uint256 b) internal returns (uint256) { + uint256 c = a * b; assert(a == 0 || c / a == b); return c; } - function div(uint a, uint b) internal returns (uint) { + function div(uint256 a, uint256 b) internal returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 - uint c = a / b; + uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } - function sub(uint a, uint b) internal returns (uint) { + function sub(uint256 a, uint256 b) internal returns (uint256) { assert(b <= a); return a - b; } - function add(uint a, uint b) internal returns (uint) { - uint c = a + b; + function add(uint256 a, uint256 b) internal returns (uint256) { + uint256 c = a + b; assert(c >= a); return c; } diff --git a/contracts/lifecycle/Migrations.sol b/contracts/lifecycle/Migrations.sol index 42ce534ad..d5b053087 100644 --- a/contracts/lifecycle/Migrations.sol +++ b/contracts/lifecycle/Migrations.sol @@ -8,9 +8,9 @@ import '../ownership/Ownable.sol'; * @dev This is a truffle contract, needed for truffle integration, not meant for use by Zeppelin users. */ contract Migrations is Ownable { - uint public lastCompletedMigration; + uint256 public lastCompletedMigration; - function setCompleted(uint completed) onlyOwner { + function setCompleted(uint256 completed) onlyOwner { lastCompletedMigration = completed; } diff --git a/contracts/lifecycle/TokenDestructible.sol b/contracts/lifecycle/TokenDestructible.sol index 46a729519..fe0b46b6d 100644 --- a/contracts/lifecycle/TokenDestructible.sol +++ b/contracts/lifecycle/TokenDestructible.sol @@ -24,7 +24,7 @@ contract TokenDestructible is Ownable { function destroy(address[] tokens) onlyOwner { // Transfer tokens to owner - for(uint i = 0; i < tokens.length; i++) { + for(uint256 i = 0; i < tokens.length; i++) { ERC20Basic token = ERC20Basic(tokens[i]); uint256 balance = token.balanceOf(this); token.transfer(owner, balance); diff --git a/contracts/ownership/DelayedClaimable.sol b/contracts/ownership/DelayedClaimable.sol index 9360931b0..f5fee6146 100644 --- a/contracts/ownership/DelayedClaimable.sol +++ b/contracts/ownership/DelayedClaimable.sol @@ -11,8 +11,8 @@ import './Claimable.sol'; */ contract DelayedClaimable is Claimable { - uint public end; - uint public start; + uint256 public end; + uint256 public start; /** * @dev Used to specify the time period during which a pending @@ -20,7 +20,7 @@ contract DelayedClaimable is Claimable { * @param _start The earliest time ownership can be claimed. * @param _end The latest time ownership can be claimed. */ - function setLimits(uint _start, uint _end) onlyOwner { + function setLimits(uint256 _start, uint256 _end) onlyOwner { if (_start > _end) throw; end = _end; diff --git a/contracts/ownership/HasNoTokens.sol b/contracts/ownership/HasNoTokens.sol index 46cea2936..d1dc4b3e9 100644 --- a/contracts/ownership/HasNoTokens.sol +++ b/contracts/ownership/HasNoTokens.sol @@ -15,10 +15,10 @@ contract HasNoTokens is Ownable { /** * @dev Reject all ERC23 compatible tokens * @param from_ address The address that is transferring the tokens - * @param value_ Uint the amount of the specified token + * @param value_ uint256 the amount of the specified token * @param data_ Bytes The data passed from the caller. */ - function tokenFallback(address from_, uint value_, bytes data_) external { + function tokenFallback(address from_, uint256 value_, bytes data_) external { throw; } diff --git a/contracts/ownership/Multisig.sol b/contracts/ownership/Multisig.sol index a9a03ef4f..76c78411b 100644 --- a/contracts/ownership/Multisig.sol +++ b/contracts/ownership/Multisig.sol @@ -10,19 +10,19 @@ contract Multisig { // logged events: // Funds has arrived into the wallet (record how much). - event Deposit(address _from, uint value); + event Deposit(address _from, uint256 value); // Single transaction going out of the wallet (record who signed for it, how much, and to whom it's going). - event SingleTransact(address owner, uint value, address to, bytes data); + event SingleTransact(address owner, uint256 value, address to, bytes data); // Multi-sig transaction going out of the wallet (record who signed for it last, the operation hash, how much, and to whom it's going). - event MultiTransact(address owner, bytes32 operation, uint value, address to, bytes data); + event MultiTransact(address owner, bytes32 operation, uint256 value, address to, bytes data); // Confirmation still needed for a transaction. - event ConfirmationNeeded(bytes32 operation, address initiator, uint value, address to, bytes data); + event ConfirmationNeeded(bytes32 operation, address initiator, uint256 value, address to, bytes data); // FUNCTIONS // TODO: document function changeOwner(address _from, address _to) external; - function execute(address _to, uint _value, bytes _data) external returns (bytes32); + function execute(address _to, uint256 _value, bytes _data) external returns (bytes32); function confirm(bytes32 _h) returns (bool); } diff --git a/contracts/ownership/Shareable.sol b/contracts/ownership/Shareable.sol index cd2e8422e..9fdaccfd5 100644 --- a/contracts/ownership/Shareable.sol +++ b/contracts/ownership/Shareable.sol @@ -11,18 +11,18 @@ contract Shareable { // struct for the status of a pending operation. struct PendingState { - uint yetNeeded; - uint ownersDone; - uint index; + uint256 yetNeeded; + uint256 ownersDone; + uint256 index; } // the number of owners that must confirm the same operation before it is run. - uint public required; + uint256 public required; // list of owners address[256] owners; // index on the list of owners to allow reverse lookup - mapping(address => uint) ownerIndex; + mapping(address => uint256) ownerIndex; // the ongoing operations. mapping(bytes32 => PendingState) pendings; bytes32[] pendingsIndex; @@ -59,10 +59,10 @@ contract Shareable { * @param _owners A list of owners. * @param _required The amount required for a transaction to be approved. */ - function Shareable(address[] _owners, uint _required) { + function Shareable(address[] _owners, uint256 _required) { owners[1] = msg.sender; ownerIndex[msg.sender] = 1; - for (uint i = 0; i < _owners.length; ++i) { + for (uint256 i = 0; i < _owners.length; ++i) { owners[2 + i] = _owners[i]; ownerIndex[_owners[i]] = 2 + i; } @@ -77,12 +77,12 @@ contract Shareable { * @param _operation A string identifying the operation. */ function revoke(bytes32 _operation) external { - uint index = ownerIndex[msg.sender]; + uint256 index = ownerIndex[msg.sender]; // make sure they're an owner if (index == 0) { return; } - uint ownerIndexBit = 2**index; + uint256 ownerIndexBit = 2**index; var pending = pendings[_operation]; if (pending.ownersDone & ownerIndexBit > 0) { pending.yetNeeded++; @@ -93,10 +93,10 @@ contract Shareable { /** * @dev Gets an owner by 0-indexed position (using numOwners as the count) - * @param ownerIndex Uint The index of the owner + * @param ownerIndex uint256 The index of the owner * @return The address of the owner */ - function getOwner(uint ownerIndex) external constant returns (address) { + function getOwner(uint256 ownerIndex) external constant returns (address) { return address(owners[ownerIndex + 1]); } @@ -117,7 +117,7 @@ contract Shareable { */ function hasConfirmed(bytes32 _operation, address _owner) constant returns (bool) { var pending = pendings[_operation]; - uint index = ownerIndex[_owner]; + uint256 index = ownerIndex[_owner]; // make sure they're an owner if (index == 0) { @@ -125,7 +125,7 @@ contract Shareable { } // determine the bit to set for this owner. - uint ownerIndexBit = 2**index; + uint256 ownerIndexBit = 2**index; return !(pending.ownersDone & ownerIndexBit == 0); } @@ -136,7 +136,7 @@ contract Shareable { */ function confirmAndCheck(bytes32 _operation) internal returns (bool) { // determine what index the present sender is: - uint index = ownerIndex[msg.sender]; + uint256 index = ownerIndex[msg.sender]; // make sure they're an owner if (index == 0) { throw; @@ -153,7 +153,7 @@ contract Shareable { pendingsIndex[pending.index] = _operation; } // determine the bit to set for this owner. - uint ownerIndexBit = 2**index; + uint256 ownerIndexBit = 2**index; // make sure we (the message sender) haven't confirmed this operation previously. if (pending.ownersDone & ownerIndexBit == 0) { Confirmation(msg.sender, _operation); @@ -177,8 +177,8 @@ contract Shareable { * @dev Clear the pending list. */ function clearPending() internal { - uint length = pendingsIndex.length; - for (uint i = 0; i < length; ++i) { + uint256 length = pendingsIndex.length; + for (uint256 i = 0; i < length; ++i) { if (pendingsIndex[i] != 0) { delete pendings[pendingsIndex[i]]; } diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.sol index 1c59a390d..2c9210004 100644 --- a/contracts/payment/PullPayment.sol +++ b/contracts/payment/PullPayment.sol @@ -10,17 +10,17 @@ import '../SafeMath.sol'; * contract and use asyncSend instead of send. */ contract PullPayment { - using SafeMath for uint; + using SafeMath for uint256; - mapping(address => uint) public payments; - uint public totalPayments; + mapping(address => uint256) public payments; + uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ - function asyncSend(address dest, uint amount) internal { + function asyncSend(address dest, uint256 amount) internal { payments[dest] = payments[dest].add(amount); totalPayments = totalPayments.add(amount); } @@ -30,7 +30,7 @@ contract PullPayment { */ function withdrawPayments() { address payee = msg.sender; - uint payment = payments[payee]; + uint256 payment = payments[payee]; if (payment == 0) { throw; diff --git a/contracts/token/BasicToken.sol b/contracts/token/BasicToken.sol index b0f06923f..bb6553bf0 100644 --- a/contracts/token/BasicToken.sol +++ b/contracts/token/BasicToken.sol @@ -10,14 +10,14 @@ import '../SafeMath.sol'; * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { - using SafeMath for uint; + using SafeMath for uint256; - mapping(address => uint) balances; + mapping(address => uint256) balances; /** * @dev Fix for the ERC20 short address attack. */ - modifier onlyPayloadSize(uint size) { + modifier onlyPayloadSize(uint256 size) { if(msg.data.length < size + 4) { throw; } @@ -29,7 +29,7 @@ contract BasicToken is ERC20Basic { * @param _to The address to transfer to. * @param _value The amount to be transferred. */ - function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) { + function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); @@ -38,9 +38,9 @@ contract BasicToken is ERC20Basic { /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. - * @return An uint representing the amount owned by the passed address. + * @return An uint256 representing the amount owned by the passed address. */ - function balanceOf(address _owner) constant returns (uint balance) { + function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } diff --git a/contracts/token/CrowdsaleToken.sol b/contracts/token/CrowdsaleToken.sol index 0f5bca546..0f75d3275 100644 --- a/contracts/token/CrowdsaleToken.sol +++ b/contracts/token/CrowdsaleToken.sol @@ -15,13 +15,13 @@ contract CrowdsaleToken is StandardToken { string public constant name = "CrowdsaleToken"; string public constant symbol = "CRW"; - uint public constant decimals = 18; + uint256 public constant decimals = 18; // replace with your fund collection multisig address address public constant multisig = 0x0; // 1 ether = 500 example tokens - uint public constant PRICE = 500; + uint256 public constant PRICE = 500; /** * @dev Fallback function which receives ether and sends the appropriate number of tokens to the @@ -40,7 +40,7 @@ contract CrowdsaleToken is StandardToken { throw; } - uint tokens = msg.value.mul(getPrice()); + uint256 tokens = msg.value.mul(getPrice()); totalSupply = totalSupply.add(tokens); balances[recipient] = balances[recipient].add(tokens); @@ -54,7 +54,7 @@ contract CrowdsaleToken is StandardToken { * @dev replace this with any other price function * @return The price per unit of token. */ - function getPrice() constant returns (uint result) { + function getPrice() constant returns (uint256 result) { return PRICE; } } diff --git a/contracts/token/ERC20.sol b/contracts/token/ERC20.sol index 34de0fc98..1045ac357 100644 --- a/contracts/token/ERC20.sol +++ b/contracts/token/ERC20.sol @@ -9,8 +9,8 @@ import './ERC20Basic.sol'; * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { - function allowance(address owner, address spender) constant returns (uint); - function transferFrom(address from, address to, uint value); - function approve(address spender, uint value); - event Approval(address indexed owner, address indexed spender, uint value); + function allowance(address owner, address spender) constant 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/contracts/token/ERC20Basic.sol b/contracts/token/ERC20Basic.sol index 4f8d38f03..0e98779e3 100644 --- a/contracts/token/ERC20Basic.sol +++ b/contracts/token/ERC20Basic.sol @@ -7,8 +7,8 @@ pragma solidity ^0.4.11; * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Basic { - uint public totalSupply; - function balanceOf(address who) constant returns (uint); - function transfer(address to, uint value); - event Transfer(address indexed from, address indexed to, uint value); + uint256 public totalSupply; + function balanceOf(address who) constant returns (uint256); + function transfer(address to, uint256 value); + event Transfer(address indexed from, address indexed to, uint256 value); } diff --git a/contracts/token/LimitedTransferToken.sol b/contracts/token/LimitedTransferToken.sol index a353eac95..ee5032c9b 100644 --- a/contracts/token/LimitedTransferToken.sol +++ b/contracts/token/LimitedTransferToken.sol @@ -22,7 +22,7 @@ contract LimitedTransferToken is ERC20 { /** * @dev Checks whether it can transfer or otherwise throws. */ - modifier canTransfer(address _sender, uint _value) { + modifier canTransfer(address _sender, uint256 _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } @@ -32,7 +32,7 @@ contract LimitedTransferToken is ERC20 { * @param _to The address that will recieve the tokens. * @param _value The amount of tokens to be transferred. */ - function transfer(address _to, uint _value) canTransfer(msg.sender, _value) { + function transfer(address _to, uint256 _value) canTransfer(msg.sender, _value) { super.transfer(_to, _value); } @@ -42,7 +42,7 @@ contract LimitedTransferToken is ERC20 { * @param _to The address that will recieve the tokens. * @param _value The amount of tokens to be transferred. */ - function transferFrom(address _from, address _to, uint _value) canTransfer(_from, _value) { + function transferFrom(address _from, address _to, uint256 _value) canTransfer(_from, _value) { super.transferFrom(_from, _to, _value); } diff --git a/contracts/token/MintableToken.sol b/contracts/token/MintableToken.sol index 9e8b59308..505d13c33 100644 --- a/contracts/token/MintableToken.sol +++ b/contracts/token/MintableToken.sol @@ -14,7 +14,7 @@ import '../ownership/Ownable.sol'; */ contract MintableToken is StandardToken, Ownable { - event Mint(address indexed to, uint amount); + event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; @@ -31,7 +31,7 @@ contract MintableToken is StandardToken, Ownable { * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ - function mint(address _to, uint _amount) onlyOwner canMint returns (bool) { + function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); diff --git a/contracts/token/PausableToken.sol b/contracts/token/PausableToken.sol index aeddfe3d9..4372a80a8 100644 --- a/contracts/token/PausableToken.sol +++ b/contracts/token/PausableToken.sol @@ -15,11 +15,11 @@ import '../lifecycle/Pausable.sol'; contract PausableToken is Pausable, StandardToken { - function transfer(address _to, uint _value) whenNotPaused { + function transfer(address _to, uint256 _value) whenNotPaused { super.transfer(_to, _value); } - function transferFrom(address _from, address _to, uint _value) whenNotPaused { + function transferFrom(address _from, address _to, uint256 _value) whenNotPaused { super.transferFrom(_from, _to, _value); } } diff --git a/contracts/token/SimpleToken.sol b/contracts/token/SimpleToken.sol index 63c6210cd..898cb21dd 100644 --- a/contracts/token/SimpleToken.sol +++ b/contracts/token/SimpleToken.sol @@ -14,8 +14,8 @@ contract SimpleToken is StandardToken { string public name = "SimpleToken"; string public symbol = "SIM"; - uint public decimals = 18; - uint public INITIAL_SUPPLY = 10000; + uint256 public decimals = 18; + uint256 public INITIAL_SUPPLY = 10000; /** * @dev Contructor that gives msg.sender all of existing tokens. diff --git a/contracts/token/StandardToken.sol b/contracts/token/StandardToken.sol index 22a2de157..36b214a9b 100644 --- a/contracts/token/StandardToken.sol +++ b/contracts/token/StandardToken.sol @@ -14,16 +14,16 @@ import './ERC20.sol'; */ contract StandardToken is BasicToken, ERC20 { - mapping (address => mapping (address => uint)) allowed; + mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to - * @param _value uint the amout of tokens to be transfered + * @param _value uint256 the amout of tokens to be transfered */ - function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) { + function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met @@ -40,7 +40,7 @@ contract StandardToken is BasicToken, ERC20 { * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ - function approve(address _spender, uint _value) { + function approve(address _spender, uint256 _value) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not @@ -56,9 +56,9 @@ contract StandardToken is BasicToken, ERC20 { * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. - * @return A uint specifing the amount of tokens still avaible for the spender. + * @return A uint256 specifing the amount of tokens still avaible for the spender. */ - function allowance(address _owner, address _spender) constant returns (uint remaining) { + function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } diff --git a/contracts/token/VestedToken.sol b/contracts/token/VestedToken.sol index ff2e6caa6..df2d1f4b4 100644 --- a/contracts/token/VestedToken.sol +++ b/contracts/token/VestedToken.sol @@ -50,7 +50,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { if (tokenGrantsCount(_to) > MAX_GRANTS_PER_ADDRESS) throw; // To prevent a user being spammed and have his balance locked (out of gas attack when calculating vesting). - uint count = grants[_to].push( + uint256 count = grants[_to].push( TokenGrant( _revokable ? msg.sender : 0, // avoid storing an extra 20 bytes when it is non-revokable _value, @@ -72,7 +72,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @param _holder The address which will have its tokens revoked. * @param _grantId The id of the token grant. */ - function revokeTokenGrant(address _holder, uint _grantId) public { + function revokeTokenGrant(address _holder, uint256 _grantId) public { TokenGrant grant = grants[_holder][_grantId]; if (!grant.revokable) { // Check if grant was revokable @@ -103,7 +103,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @dev Calculate the total amount of transferable tokens of a holder at a given time * @param holder address The address of the holder * @param time uint64 The specific time. - * @return An uint representing a holder's total amount of transferable tokens. + * @return An uint256 representing a holder's total amount of transferable tokens. */ function transferableTokens(address holder, uint64 time) constant public returns (uint256) { uint256 grantIndex = tokenGrantsCount(holder); @@ -127,9 +127,9 @@ contract VestedToken is StandardToken, LimitedTransferToken { /** * @dev Check the amount of grants that an address has. * @param _holder The holder of the grants. - * @return A uint representing the total amount of grants. + * @return A uint256 representing the total amount of grants. */ - function tokenGrantsCount(address _holder) constant returns (uint index) { + function tokenGrantsCount(address _holder) constant returns (uint256 index) { return grants[_holder].length; } @@ -140,7 +140,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @param start uint64 A time representing the begining of the grant * @param cliff uint64 The cliff period. * @param vesting uint64 The vesting period. - * @return An uint representing the amount of vested tokensof a specif grant. + * @return An uint256 representing the amount of vested tokensof a specif grant. * transferableTokens * | _/-------- vestedTokens rect * | _/ @@ -191,7 +191,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, uint _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) constant 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; @@ -209,7 +209,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @dev Get the amount of vested tokens at a specific time. * @param grant TokenGrant The grant to be checked. * @param time The time to be checked - * @return An uint representing the amount of vested tokens of a specific grant at a specific time. + * @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) { return calculateVestedTokens( @@ -225,7 +225,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @dev Calculate the amount of non vested tokens at a specific time. * @param grant TokenGrant The grant to be checked. * @param time uint64 The time to be checked - * @return An uint representing the amount of non vested tokens of a specifc grant on the + * @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) { @@ -235,7 +235,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { /** * @dev Calculate the date when the holder can trasfer all its tokens * @param holder address The address of the holder - * @return An uint representing the date of the last transferable tokens. + * @return An uint256 representing the date of the last transferable tokens. */ function lastTokenIsTransferableDate(address holder) constant public returns (uint64 date) { date = uint64(now);