From 93b953fb48ebbe538e87d49895b1f60546a698af Mon Sep 17 00:00:00 2001 From: Brian Guo Date: Wed, 19 Jul 2017 09:59:46 -0400 Subject: [PATCH] changed instances of uint to uint256; fixes issue #226 --- contracts/token/PausableToken.sol | 4 ++-- contracts/token/TokenTimelock.sol | 10 +++++----- test/helpers/BasicTokenMock.sol | 2 +- test/helpers/DayLimitMock.sol | 8 ++++---- test/helpers/ERC23TokenMock.sol | 6 +++--- test/helpers/MultisigWalletMock.sol | 4 ++-- test/helpers/PausableMock.sol | 2 +- test/helpers/PullPaymentMock.sol | 2 +- test/helpers/ReentrancyMock.sol | 2 +- test/helpers/SafeMathMock.sol | 8 ++++---- test/helpers/ShareableMock.sol | 4 ++-- test/helpers/StandardTokenMock.sol | 2 +- test/helpers/VestedTokenMock.sol | 2 +- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/contracts/token/PausableToken.sol b/contracts/token/PausableToken.sol index 301b04f37..016f0340e 100644 --- a/contracts/token/PausableToken.sol +++ b/contracts/token/PausableToken.sol @@ -11,11 +11,11 @@ import '../lifecycle/Pausable.sol'; contract PausableToken is StandardToken, Pausable { - function transfer(address _to, uint _value) whenNotPaused returns (bool) { + function transfer(address _to, uint256 _value) whenNotPaused returns (bool) { return super.transfer(_to, _value); } - function transferFrom(address _from, address _to, uint _value) whenNotPaused returns (bool) { + function transferFrom(address _from, address _to, uint256 _value) whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } } diff --git a/contracts/token/TokenTimelock.sol b/contracts/token/TokenTimelock.sol index 7c85063c5..8250083d4 100644 --- a/contracts/token/TokenTimelock.sol +++ b/contracts/token/TokenTimelock.sol @@ -5,11 +5,11 @@ import './ERC20Basic.sol'; /** * @title TokenTimelock - * @dev TokenTimelock is a token holder contract that will allow a + * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */ contract TokenTimelock { - + // ERC20 basic token contract being held ERC20Basic token; @@ -17,9 +17,9 @@ contract TokenTimelock { address beneficiary; // timestamp when token release is enabled - uint releaseTime; + uint64 releaseTime; - function TokenTimelock(ERC20Basic _token, address _beneficiary, uint _releaseTime) { + function TokenTimelock(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) { require(_releaseTime > now); token = _token; beneficiary = _beneficiary; @@ -41,7 +41,7 @@ contract TokenTimelock { function release() { require(now >= releaseTime); - uint amount = token.balanceOf(this); + uint256 amount = token.balanceOf(this); require(amount > 0); token.transfer(beneficiary, amount); diff --git a/test/helpers/BasicTokenMock.sol b/test/helpers/BasicTokenMock.sol index 3e7f63569..f1a0265f0 100644 --- a/test/helpers/BasicTokenMock.sol +++ b/test/helpers/BasicTokenMock.sol @@ -7,7 +7,7 @@ import '../../contracts/token/BasicToken.sol'; // mock class using BasicToken contract BasicTokenMock is BasicToken { - function BasicTokenMock(address initialAccount, uint initialBalance) { + function BasicTokenMock(address initialAccount, uint256 initialBalance) { balances[initialAccount] = initialBalance; totalSupply = initialBalance; } diff --git a/test/helpers/DayLimitMock.sol b/test/helpers/DayLimitMock.sol index c047e7b0f..636b5394f 100644 --- a/test/helpers/DayLimitMock.sol +++ b/test/helpers/DayLimitMock.sol @@ -2,17 +2,17 @@ pragma solidity ^0.4.11; import "../../contracts/DayLimit.sol"; contract DayLimitMock is DayLimit { - uint public totalSpending; + uint256 public totalSpending; - function DayLimitMock(uint _value) DayLimit(_value) { + function DayLimitMock(uint256 _value) DayLimit(_value) { totalSpending = 0; } - function attemptSpend(uint _value) external limitedDaily(_value) { + function attemptSpend(uint256 _value) external limitedDaily(_value) { totalSpending += _value; } - function setDailyLimit(uint _newLimit) external { + function setDailyLimit(uint256 _newLimit) external { _setDailyLimit(_newLimit); } diff --git a/test/helpers/ERC23TokenMock.sol b/test/helpers/ERC23TokenMock.sol index 2d0504ea4..5773e3f56 100644 --- a/test/helpers/ERC23TokenMock.sol +++ b/test/helpers/ERC23TokenMock.sol @@ -5,18 +5,18 @@ import '../../contracts/token/BasicToken.sol'; contract ERC23ContractInterface { - function tokenFallback(address _from, uint _value, bytes _data) external; + function tokenFallback(address _from, uint256 _value, bytes _data) external; } contract ERC23TokenMock is BasicToken { - function ERC23TokenMock(address initialAccount, uint initialBalance) { + function ERC23TokenMock(address initialAccount, uint256 initialBalance) { balances[initialAccount] = initialBalance; totalSupply = initialBalance; } // ERC23 compatible transfer function (except the name) - function transferERC23(address _to, uint _value, bytes _data) + function transferERC23(address _to, uint256 _value, bytes _data) returns (bool success) { transfer(_to, _value); diff --git a/test/helpers/MultisigWalletMock.sol b/test/helpers/MultisigWalletMock.sol index 139d4187d..1b281db81 100644 --- a/test/helpers/MultisigWalletMock.sol +++ b/test/helpers/MultisigWalletMock.sol @@ -2,9 +2,9 @@ pragma solidity ^0.4.11; import "../../contracts/MultisigWallet.sol"; contract MultisigWalletMock is MultisigWallet { - uint public totalSpending; + uint256 public totalSpending; - function MultisigWalletMock(address[] _owners, uint _required, uint _daylimit) + function MultisigWalletMock(address[] _owners, uint256 _required, uint256 _daylimit) MultisigWallet(_owners, _required, _daylimit) payable { } function changeOwner(address _from, address _to) external { } diff --git a/test/helpers/PausableMock.sol b/test/helpers/PausableMock.sol index 4367f4a5c..97a5f28ea 100644 --- a/test/helpers/PausableMock.sol +++ b/test/helpers/PausableMock.sol @@ -7,7 +7,7 @@ import '../../contracts/lifecycle/Pausable.sol'; // mock class using Pausable contract PausableMock is Pausable { bool public drasticMeasureTaken; - uint public count; + uint256 public count; function PausableMock() { drasticMeasureTaken = false; diff --git a/test/helpers/PullPaymentMock.sol b/test/helpers/PullPaymentMock.sol index 83a1d2a53..99800e946 100644 --- a/test/helpers/PullPaymentMock.sol +++ b/test/helpers/PullPaymentMock.sol @@ -10,7 +10,7 @@ contract PullPaymentMock is PullPayment { function PullPaymentMock() payable { } // test helper function to call asyncSend - function callSend(address dest, uint amount) { + function callSend(address dest, uint256 amount) { asyncSend(dest, amount); } diff --git a/test/helpers/ReentrancyMock.sol b/test/helpers/ReentrancyMock.sol index 4b8cca94c..411e72197 100644 --- a/test/helpers/ReentrancyMock.sol +++ b/test/helpers/ReentrancyMock.sol @@ -15,7 +15,7 @@ contract ReentrancyMock is ReentrancyGuard { counter += 1; } - function countLocalRecursive(uint n) public nonReentrant { + function countLocalRecursive(uint256 n) public nonReentrant { if(n > 0) { count(); countLocalRecursive(n - 1); diff --git a/test/helpers/SafeMathMock.sol b/test/helpers/SafeMathMock.sol index a9edd02c4..5a20aefe8 100644 --- a/test/helpers/SafeMathMock.sol +++ b/test/helpers/SafeMathMock.sol @@ -5,17 +5,17 @@ import '../../contracts/math/SafeMath.sol'; contract SafeMathMock { - uint public result; + uint256 public result; - function multiply(uint a, uint b) { + function multiply(uint256 a, uint256 b) { result = SafeMath.mul(a, b); } - function subtract(uint a, uint b) { + function subtract(uint256 a, uint256 b) { result = SafeMath.sub(a, b); } - function add(uint a, uint b) { + function add(uint256 a, uint256 b) { result = SafeMath.add(a, b); } } diff --git a/test/helpers/ShareableMock.sol b/test/helpers/ShareableMock.sol index 031e37ae2..f342e2e82 100644 --- a/test/helpers/ShareableMock.sol +++ b/test/helpers/ShareableMock.sol @@ -3,9 +3,9 @@ import "../../contracts/ownership/Shareable.sol"; contract ShareableMock is Shareable { - uint public count = 0; + uint256 public count = 0; - function ShareableMock(address[] _owners, uint _required) Shareable(_owners, _required) { + function ShareableMock(address[] _owners, uint256 _required) Shareable(_owners, _required) { } diff --git a/test/helpers/StandardTokenMock.sol b/test/helpers/StandardTokenMock.sol index d96626965..6425d2f9e 100644 --- a/test/helpers/StandardTokenMock.sol +++ b/test/helpers/StandardTokenMock.sol @@ -7,7 +7,7 @@ import '../../contracts/token/StandardToken.sol'; // mock class using StandardToken contract StandardTokenMock is StandardToken { - function StandardTokenMock(address initialAccount, uint initialBalance) { + function StandardTokenMock(address initialAccount, uint256 initialBalance) { balances[initialAccount] = initialBalance; totalSupply = initialBalance; } diff --git a/test/helpers/VestedTokenMock.sol b/test/helpers/VestedTokenMock.sol index a3aa4a0e8..c607cae62 100644 --- a/test/helpers/VestedTokenMock.sol +++ b/test/helpers/VestedTokenMock.sol @@ -4,7 +4,7 @@ import '../../contracts/token/VestedToken.sol'; // mock class using StandardToken contract VestedTokenMock is VestedToken { - function VestedTokenMock(address initialAccount, uint initialBalance) { + function VestedTokenMock(address initialAccount, uint256 initialBalance) { balances[initialAccount] = initialBalance; totalSupply = initialBalance; }