Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

contract Migrations {
address public owner;
Expand Down
10 changes: 5 additions & 5 deletions contracts/RegulatedToken.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import 'zeppelin-solidity/contracts/token/DetailedERC20.sol';
import 'zeppelin-solidity/contracts/token/MintableToken.sol';
import 'zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol';
import 'zeppelin-solidity/contracts/token/ERC20/MintableToken.sol';
import './ServiceRegistry.sol';
import './RegulatorService.sol';

Expand Down Expand Up @@ -85,9 +85,9 @@ contract RegulatedToken is DetailedERC20, MintableToken {
* @return `true` if the check was successful and `false` if unsuccessful
*/
function _check(address _from, address _to, uint256 _value) private returns (bool) {
var reason = _service().check(this, msg.sender, _from, _to, _value);
uint8 reason = _service().check(this, msg.sender, _from, _to, _value);

CheckStatus(reason, msg.sender, _from, _to, _value);
emit CheckStatus(reason, msg.sender, _from, _to, _value);

return reason == 0;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/RegulatorService.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

/// @notice Standard interface for `RegulatorService`s
contract RegulatorService {
Expand Down
4 changes: 2 additions & 2 deletions contracts/ServiceRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import './RegulatorService.sol';
import 'zeppelin-solidity/contracts/ownership/Ownable.sol';
Expand Down Expand Up @@ -45,6 +45,6 @@ contract ServiceRegistry is Ownable {
function replaceService(address _service) onlyOwner withContract(_service) public {
address oldService = service;
service = _service;
ReplaceService(oldService, service);
emit ReplaceService(oldService, service);
}
}
12 changes: 6 additions & 6 deletions contracts/TokenRegulatorService.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import 'zeppelin-solidity/contracts/ownership/Ownable.sol';
import 'zeppelin-solidity/contracts/token/DetailedERC20.sol';
import 'zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol';
import './RegulatedToken.sol';
import './RegulatorService.sol';

Expand Down Expand Up @@ -93,7 +93,7 @@ contract TokenRegulatorService is RegulatorService, Ownable {
function setLocked(address _token, bool _locked) onlyOwner public {
settings[_token].locked = _locked;

LogLockSet(_token, _locked);
emit LogLockSet(_token, _locked);
}

/**
Expand All @@ -106,7 +106,7 @@ contract TokenRegulatorService is RegulatorService, Ownable {
function setPartialTransfers(address _token, bool _enabled) onlyOwner public {
settings[_token].partialTransfers = _enabled;

LogPartialTransferSet(_token, _enabled);
emit LogPartialTransferSet(_token, _enabled);
}

/**
Expand All @@ -123,7 +123,7 @@ contract TokenRegulatorService is RegulatorService, Ownable {
function setPermission(address _token, address _participant, uint8 _permission) onlyAdmins public {
participants[_token][_participant] = _permission;

LogPermissionSet(_token, _participant, _permission);
emit LogPermissionSet(_token, _participant, _permission);
}

/**
Expand All @@ -137,7 +137,7 @@ contract TokenRegulatorService is RegulatorService, Ownable {
address oldAdmin = admin;
admin = newAdmin;

LogTransferAdmin(oldAdmin, newAdmin);
emit LogTransferAdmin(oldAdmin, newAdmin);
}

/**
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
"test": "test"
},
"scripts": {
"test": "truffle test"
"compile": "node ./node_modules/truffle/build/cli.bundled.js compile",
"test": "node ./node_modules/truffle/build/cli.bundled.js test",
"test:single": "node ./node_modules/truffle/build/cli.bundled.js test test/helpers/MockRegulatedToken.sol test/helpers/MockRegulatorService.sol"
},
"author": "Bob Remeika",
"license": "MIT",
"devDependencies": {},
"devDependencies": {
"truffle": "^4.1.5"
},
"dependencies": {
"bignumber.js": "^4.1.0",
"zeppelin-solidity": "^1.4.0"
"zeppelin-solidity": "^1.8.0"
}
}
2 changes: 1 addition & 1 deletion test/helpers/MockRegulatedToken.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import '../../contracts/RegulatedToken.sol';
import '../../contracts/RegulatorService.sol';
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/MockRegulatorService.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import '../../contracts/RegulatorService.sol';

Expand Down
Loading