changed instances of uint to uint256; fixes issue #226
This commit is contained in:
@ -11,11 +11,11 @@ import '../lifecycle/Pausable.sol';
|
|||||||
|
|
||||||
contract PausableToken is StandardToken, Pausable {
|
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);
|
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);
|
return super.transferFrom(_from, _to, _value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,11 +5,11 @@ import './ERC20Basic.sol';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @title TokenTimelock
|
* @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
|
* beneficiary to extract the tokens after a given release time
|
||||||
*/
|
*/
|
||||||
contract TokenTimelock {
|
contract TokenTimelock {
|
||||||
|
|
||||||
// ERC20 basic token contract being held
|
// ERC20 basic token contract being held
|
||||||
ERC20Basic token;
|
ERC20Basic token;
|
||||||
|
|
||||||
@ -17,9 +17,9 @@ contract TokenTimelock {
|
|||||||
address beneficiary;
|
address beneficiary;
|
||||||
|
|
||||||
// timestamp when token release is enabled
|
// 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);
|
require(_releaseTime > now);
|
||||||
token = _token;
|
token = _token;
|
||||||
beneficiary = _beneficiary;
|
beneficiary = _beneficiary;
|
||||||
@ -41,7 +41,7 @@ contract TokenTimelock {
|
|||||||
function release() {
|
function release() {
|
||||||
require(now >= releaseTime);
|
require(now >= releaseTime);
|
||||||
|
|
||||||
uint amount = token.balanceOf(this);
|
uint256 amount = token.balanceOf(this);
|
||||||
require(amount > 0);
|
require(amount > 0);
|
||||||
|
|
||||||
token.transfer(beneficiary, amount);
|
token.transfer(beneficiary, amount);
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import '../../contracts/token/BasicToken.sol';
|
|||||||
// mock class using BasicToken
|
// mock class using BasicToken
|
||||||
contract BasicTokenMock is BasicToken {
|
contract BasicTokenMock is BasicToken {
|
||||||
|
|
||||||
function BasicTokenMock(address initialAccount, uint initialBalance) {
|
function BasicTokenMock(address initialAccount, uint256 initialBalance) {
|
||||||
balances[initialAccount] = initialBalance;
|
balances[initialAccount] = initialBalance;
|
||||||
totalSupply = initialBalance;
|
totalSupply = initialBalance;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,17 +2,17 @@ pragma solidity ^0.4.11;
|
|||||||
import "../../contracts/DayLimit.sol";
|
import "../../contracts/DayLimit.sol";
|
||||||
|
|
||||||
contract DayLimitMock is DayLimit {
|
contract DayLimitMock is DayLimit {
|
||||||
uint public totalSpending;
|
uint256 public totalSpending;
|
||||||
|
|
||||||
function DayLimitMock(uint _value) DayLimit(_value) {
|
function DayLimitMock(uint256 _value) DayLimit(_value) {
|
||||||
totalSpending = 0;
|
totalSpending = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function attemptSpend(uint _value) external limitedDaily(_value) {
|
function attemptSpend(uint256 _value) external limitedDaily(_value) {
|
||||||
totalSpending += _value;
|
totalSpending += _value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDailyLimit(uint _newLimit) external {
|
function setDailyLimit(uint256 _newLimit) external {
|
||||||
_setDailyLimit(_newLimit);
|
_setDailyLimit(_newLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,18 +5,18 @@ import '../../contracts/token/BasicToken.sol';
|
|||||||
|
|
||||||
|
|
||||||
contract ERC23ContractInterface {
|
contract ERC23ContractInterface {
|
||||||
function tokenFallback(address _from, uint _value, bytes _data) external;
|
function tokenFallback(address _from, uint256 _value, bytes _data) external;
|
||||||
}
|
}
|
||||||
|
|
||||||
contract ERC23TokenMock is BasicToken {
|
contract ERC23TokenMock is BasicToken {
|
||||||
|
|
||||||
function ERC23TokenMock(address initialAccount, uint initialBalance) {
|
function ERC23TokenMock(address initialAccount, uint256 initialBalance) {
|
||||||
balances[initialAccount] = initialBalance;
|
balances[initialAccount] = initialBalance;
|
||||||
totalSupply = initialBalance;
|
totalSupply = initialBalance;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ERC23 compatible transfer function (except the name)
|
// 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)
|
returns (bool success)
|
||||||
{
|
{
|
||||||
transfer(_to, _value);
|
transfer(_to, _value);
|
||||||
|
|||||||
@ -2,9 +2,9 @@ pragma solidity ^0.4.11;
|
|||||||
import "../../contracts/MultisigWallet.sol";
|
import "../../contracts/MultisigWallet.sol";
|
||||||
|
|
||||||
contract MultisigWalletMock is MultisigWallet {
|
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 { }
|
MultisigWallet(_owners, _required, _daylimit) payable { }
|
||||||
|
|
||||||
function changeOwner(address _from, address _to) external { }
|
function changeOwner(address _from, address _to) external { }
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import '../../contracts/lifecycle/Pausable.sol';
|
|||||||
// mock class using Pausable
|
// mock class using Pausable
|
||||||
contract PausableMock is Pausable {
|
contract PausableMock is Pausable {
|
||||||
bool public drasticMeasureTaken;
|
bool public drasticMeasureTaken;
|
||||||
uint public count;
|
uint256 public count;
|
||||||
|
|
||||||
function PausableMock() {
|
function PausableMock() {
|
||||||
drasticMeasureTaken = false;
|
drasticMeasureTaken = false;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ contract PullPaymentMock is PullPayment {
|
|||||||
function PullPaymentMock() payable { }
|
function PullPaymentMock() payable { }
|
||||||
|
|
||||||
// test helper function to call asyncSend
|
// test helper function to call asyncSend
|
||||||
function callSend(address dest, uint amount) {
|
function callSend(address dest, uint256 amount) {
|
||||||
asyncSend(dest, amount);
|
asyncSend(dest, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ contract ReentrancyMock is ReentrancyGuard {
|
|||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function countLocalRecursive(uint n) public nonReentrant {
|
function countLocalRecursive(uint256 n) public nonReentrant {
|
||||||
if(n > 0) {
|
if(n > 0) {
|
||||||
count();
|
count();
|
||||||
countLocalRecursive(n - 1);
|
countLocalRecursive(n - 1);
|
||||||
|
|||||||
@ -5,17 +5,17 @@ import '../../contracts/math/SafeMath.sol';
|
|||||||
|
|
||||||
|
|
||||||
contract SafeMathMock {
|
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);
|
result = SafeMath.mul(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
function subtract(uint a, uint b) {
|
function subtract(uint256 a, uint256 b) {
|
||||||
result = SafeMath.sub(a, b);
|
result = SafeMath.sub(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
function add(uint a, uint b) {
|
function add(uint256 a, uint256 b) {
|
||||||
result = SafeMath.add(a, b);
|
result = SafeMath.add(a, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,9 +3,9 @@ import "../../contracts/ownership/Shareable.sol";
|
|||||||
|
|
||||||
contract ShareableMock is Shareable {
|
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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import '../../contracts/token/StandardToken.sol';
|
|||||||
// mock class using StandardToken
|
// mock class using StandardToken
|
||||||
contract StandardTokenMock is StandardToken {
|
contract StandardTokenMock is StandardToken {
|
||||||
|
|
||||||
function StandardTokenMock(address initialAccount, uint initialBalance) {
|
function StandardTokenMock(address initialAccount, uint256 initialBalance) {
|
||||||
balances[initialAccount] = initialBalance;
|
balances[initialAccount] = initialBalance;
|
||||||
totalSupply = initialBalance;
|
totalSupply = initialBalance;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import '../../contracts/token/VestedToken.sol';
|
|||||||
|
|
||||||
// mock class using StandardToken
|
// mock class using StandardToken
|
||||||
contract VestedTokenMock is VestedToken {
|
contract VestedTokenMock is VestedToken {
|
||||||
function VestedTokenMock(address initialAccount, uint initialBalance) {
|
function VestedTokenMock(address initialAccount, uint256 initialBalance) {
|
||||||
balances[initialAccount] = initialBalance;
|
balances[initialAccount] = initialBalance;
|
||||||
totalSupply = initialBalance;
|
totalSupply = initialBalance;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user