Merge pull request #673 from Shrugs/feat/solium

Solium Integration, Linting Refactor
pull/677/head^2
Francisco Giordano 7 years ago committed by GitHub
commit ec2f7ba8d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/PULL_REQUEST_TEMPLATE.md
  2. 26
      .soliumrc.json
  3. 1
      .travis.yml
  4. 16
      contracts/Bounty.sol
  5. 1
      contracts/DayLimit.sol
  6. 5
      contracts/MerkleProof.sol
  7. 1
      contracts/ReentrancyGuard.sol
  8. 19
      contracts/crowdsale/CappedCrowdsale.sol
  9. 38
      contracts/crowdsale/Crowdsale.sol
  10. 7
      contracts/crowdsale/FinalizableCrowdsale.sol
  11. 5
      contracts/crowdsale/RefundVault.sol
  12. 24
      contracts/crowdsale/RefundableCrowdsale.sol
  13. 8
      contracts/examples/SampleCrowdsale.sol
  14. 6
      contracts/examples/SimpleToken.sol
  15. 2
      contracts/lifecycle/Migrations.sol
  16. 4
      contracts/lifecycle/TokenDestructible.sol
  17. 2
      contracts/math/Math.sol
  18. 2
      contracts/mocks/BasicTokenMock.sol
  19. 3
      contracts/mocks/BurnableTokenMock.sol
  20. 2
      contracts/mocks/CappedCrowdsaleImpl.sol
  21. 2
      contracts/mocks/DayLimitMock.sol
  22. 5
      contracts/mocks/DetailedERC20Mock.sol
  23. 2
      contracts/mocks/ECRecoveryMock.sol
  24. 5
      contracts/mocks/ERC23TokenMock.sol
  25. 2
      contracts/mocks/FinalizableCrowdsaleImpl.sol
  26. 3
      contracts/mocks/ForceEther.sol
  27. 1
      contracts/mocks/HasNoEtherTest.sol
  28. 4
      contracts/mocks/InsecureTargetBounty.sol
  29. 2
      contracts/mocks/LimitBalanceMock.sol
  30. 2
      contracts/mocks/PausableMock.sol
  31. 3
      contracts/mocks/PausableTokenMock.sol
  32. 2
      contracts/mocks/PullPaymentMock.sol
  33. 104
      contracts/mocks/RBACMock.sol
  34. 1
      contracts/mocks/ReentrancyAttack.sol
  35. 17
      contracts/mocks/ReentrancyMock.sol
  36. 2
      contracts/mocks/RefundableCrowdsaleImpl.sol
  37. 7
      contracts/mocks/SafeERC20Helper.sol
  38. 2
      contracts/mocks/SafeMathMock.sol
  39. 2
      contracts/mocks/SecureTargetBounty.sol
  40. 2
      contracts/mocks/StandardTokenMock.sol
  41. 1
      contracts/ownership/CanReclaimToken.sol
  42. 2
      contracts/ownership/Claimable.sol
  43. 21
      contracts/ownership/Contactable.sol
  44. 4
      contracts/ownership/DelayedClaimable.sol
  45. 1
      contracts/ownership/HasNoContracts.sol
  46. 1
      contracts/ownership/HasNoEther.sol
  47. 1
      contracts/ownership/HasNoTokens.sol
  48. 1
      contracts/ownership/NoOwner.sol
  49. 2
      contracts/ownership/Ownable.sol
  50. 279
      contracts/ownership/rbac/RBAC.sol
  51. 80
      contracts/ownership/rbac/Roles.sol
  52. 22
      contracts/payment/PullPayment.sol
  53. 31
      contracts/payment/SplitPayment.sol
  54. 4
      contracts/token/BasicToken.sol
  55. 31
      contracts/token/BurnableToken.sol
  56. 3
      contracts/token/CappedToken.sol
  57. 3
      contracts/token/DetailedERC20.sol
  58. 2
      contracts/token/ERC20.sol
  59. 4
      contracts/token/MintableToken.sol
  60. 6
      contracts/token/PausableToken.sol
  61. 5
      contracts/token/SafeERC20.sol
  62. 4
      contracts/token/StandardToken.sol
  63. 4
      contracts/token/TokenTimelock.sol
  64. 9
      contracts/token/TokenVesting.sol
  65. 1200
      package-lock.json
  66. 5
      package.json
  67. 2
      test/mocks/MathMock.sol

@ -3,7 +3,7 @@
- [ ] 📘 I've reviewed the [OpenZeppelin Contributor Guidelines](/docs/CONTRIBUTING.md) - [ ] 📘 I've reviewed the [OpenZeppelin Contributor Guidelines](/docs/CONTRIBUTING.md)
- [ ] ✅ I've added tests where applicable to test my new functionality. - [ ] ✅ I've added tests where applicable to test my new functionality.
- [ ] 📖 I've made sure that my contracts are well-documented. - [ ] 📖 I've made sure that my contracts are well-documented.
- [ ] 🎨 I've run the JavaScript linter (`npm run lint:fix`) and fixed all issues. - [ ] 🎨 I've run the JS/Solidity linters (`npm run lint:all:fix`) and fixed any issues.
<!-- **Does this close any open issues?** If so, list them here. --> <!-- **Does this close any open issues?** If so, list them here. -->

@ -1,22 +1,12 @@
{ {
"custom-rules-filename": null, "extends": "solium:all",
"plugins": ["security"],
"rules": { "rules": {
"imports-on-top": true, "quotes": ["error", "double"],
"variable-declarations": true, "indentation": ["error", 2],
"array-declarations": true, "arg-overflow": ["warning", 3],
"operator-whitespace": true, "security/enforce-explicit-visibility": ["error"],
"lbrace": true, "security/no-block-members": ["warning"],
"mixedcase": false, "security/no-inline-assembly": ["warning"]
"camelcase": true,
"uppercase": true,
"no-with": true,
"no-empty-blocks": true,
"no-unused-vars": true,
"double-quotes": true,
"blank-lines": true,
"indentation": true,
"whitespace": true,
"deprecated-suicide": true,
"pragma-on-top": true
} }
} }

@ -18,6 +18,7 @@ before_script:
- truffle version - truffle version
script: script:
- npm run lint - npm run lint
- npm run lint:sol
- npm run test - npm run test
notifications: notifications:
slack: slack:

@ -1,8 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './payment/PullPayment.sol'; import "./payment/PullPayment.sol";
import './lifecycle/Destructible.sol'; import "./lifecycle/Destructible.sol";
/** /**
@ -34,12 +34,6 @@ contract Bounty is PullPayment, Destructible {
return target; return target;
} }
/**
* @dev Internal function to deploy the target contract.
* @return A target contract address
*/
function deployContract() internal returns(address);
/** /**
* @dev Sends the contract funds to the researcher that proved the contract is broken. * @dev Sends the contract funds to the researcher that proved the contract is broken.
* @param target contract * @param target contract
@ -53,6 +47,12 @@ contract Bounty is PullPayment, Destructible {
claimed = true; claimed = true;
} }
/**
* @dev Internal function to deploy the target contract.
* @return A target contract address
*/
function deployContract() internal returns(address);
} }

@ -1,5 +1,6 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
/** /**
* @title DayLimit * @title DayLimit
* @dev Base contract that enables methods to be protected by placing a linear limit (specifiable) * @dev Base contract that enables methods to be protected by placing a linear limit (specifiable)

@ -1,5 +1,6 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
/* /*
* @title MerkleProof * @title MerkleProof
* @dev Merkle proof verification * @dev Merkle proof verification
@ -15,7 +16,9 @@ library MerkleProof {
*/ */
function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) { function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) {
// Check if proof length is a multiple of 32 // Check if proof length is a multiple of 32
if (_proof.length % 32 != 0) return false; if (_proof.length % 32 != 0) {
return false;
}
bytes32 proofElement; bytes32 proofElement;
bytes32 computedHash = _leaf; bytes32 computedHash = _leaf;

@ -1,5 +1,6 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
/** /**
* @title Helps contracts guard agains reentrancy attacks. * @title Helps contracts guard agains reentrancy attacks.
* @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
import './Crowdsale.sol'; import "./Crowdsale.sol";
/** /**
* @title CappedCrowdsale * @title CappedCrowdsale
@ -17,13 +18,6 @@ contract CappedCrowdsale is Crowdsale {
cap = _cap; cap = _cap;
} }
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function validPurchase() internal view returns (bool) {
bool withinCap = weiRaised.add(msg.value) <= cap;
return super.validPurchase() && withinCap;
}
// overriding Crowdsale#hasEnded to add cap logic // overriding Crowdsale#hasEnded to add cap logic
// @return true if crowdsale event has ended // @return true if crowdsale event has ended
function hasEnded() public view returns (bool) { function hasEnded() public view returns (bool) {
@ -31,4 +25,11 @@ contract CappedCrowdsale is Crowdsale {
return super.hasEnded() || capReached; return super.hasEnded() || capReached;
} }
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function validPurchase() internal view returns (bool) {
bool withinCap = weiRaised.add(msg.value) <= cap;
return super.validPurchase() && withinCap;
}
} }

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/MintableToken.sol'; import "../token/MintableToken.sol";
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
/** /**
* @title Crowdsale * @title Crowdsale
@ -53,22 +54,11 @@ contract Crowdsale {
wallet = _wallet; wallet = _wallet;
} }
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
}
// fallback function can be used to buy tokens // fallback function can be used to buy tokens
function () external payable { function () external payable {
buyTokens(msg.sender); buyTokens(msg.sender);
} }
// Override this method to have a way to add business logic to your crowdsale when buying
function getTokenAmount(uint256 weiAmount) internal view returns(uint256) {
return weiAmount.mul(rate);
}
// low level token purchase function // low level token purchase function
function buyTokens(address beneficiary) public payable { function buyTokens(address beneficiary) public payable {
require(beneficiary != address(0)); require(beneficiary != address(0));
@ -88,6 +78,22 @@ contract Crowdsale {
forwardFunds(); forwardFunds();
} }
// @return true if crowdsale event has ended
function hasEnded() public view returns (bool) {
return now > endTime;
}
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
}
// Override this method to have a way to add business logic to your crowdsale when buying
function getTokenAmount(uint256 weiAmount) internal view returns(uint256) {
return weiAmount.mul(rate);
}
// send ether to the fund collection wallet // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms // override to create custom fund forwarding mechanisms
function forwardFunds() internal { function forwardFunds() internal {
@ -101,10 +107,4 @@ contract Crowdsale {
return withinPeriod && nonZeroPurchase; return withinPeriod && nonZeroPurchase;
} }
// @return true if crowdsale event has ended
function hasEnded() public view returns (bool) {
return now > endTime;
}
} }

@ -1,8 +1,9 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
import '../ownership/Ownable.sol'; import "../ownership/Ownable.sol";
import './Crowdsale.sol'; import "./Crowdsale.sol";
/** /**
* @title FinalizableCrowdsale * @title FinalizableCrowdsale

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
import '../ownership/Ownable.sol'; import "../ownership/Ownable.sol";
/** /**
* @title RefundVault * @title RefundVault

@ -1,9 +1,9 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
import './FinalizableCrowdsale.sol'; import "./FinalizableCrowdsale.sol";
import './RefundVault.sol'; import "./RefundVault.sol";
/** /**
@ -27,13 +27,6 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
goal = _goal; goal = _goal;
} }
// We're overriding the fund forwarding from Crowdsale.
// In addition to sending the funds, we want to call
// the RefundVault deposit function
function forwardFunds() internal {
vault.deposit.value(msg.value)(msg.sender);
}
// if crowdsale is unsuccessful, investors can claim refunds here // if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public { function claimRefund() public {
require(isFinalized); require(isFinalized);
@ -42,6 +35,10 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
vault.refund(msg.sender); vault.refund(msg.sender);
} }
function goalReached() public view returns (bool) {
return weiRaised >= goal;
}
// vault finalization task, called when owner calls finalize() // vault finalization task, called when owner calls finalize()
function finalization() internal { function finalization() internal {
if (goalReached()) { if (goalReached()) {
@ -53,8 +50,11 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
super.finalization(); super.finalization();
} }
function goalReached() public view returns (bool) { // We're overriding the fund forwarding from Crowdsale.
return weiRaised >= goal; // In addition to sending the funds, we want to call
// the RefundVault deposit function
function forwardFunds() internal {
vault.deposit.value(msg.value)(msg.sender);
} }
} }

@ -4,6 +4,7 @@ import "../crowdsale/CappedCrowdsale.sol";
import "../crowdsale/RefundableCrowdsale.sol"; import "../crowdsale/RefundableCrowdsale.sol";
import "../token/MintableToken.sol"; import "../token/MintableToken.sol";
/** /**
* @title SampleCrowdsaleToken * @title SampleCrowdsaleToken
* @dev Very simple ERC20 Token that can be minted. * @dev Very simple ERC20 Token that can be minted.
@ -11,12 +12,13 @@ import "../token/MintableToken.sol";
*/ */
contract SampleCrowdsaleToken is MintableToken { contract SampleCrowdsaleToken is MintableToken {
string public constant name = "Sample Crowdsale Token"; string public constant name = "Sample Crowdsale Token"; // solium-disable-line uppercase
string public constant symbol = "SCT"; string public constant symbol = "SCT"; // solium-disable-line uppercase
uint8 public constant decimals = 18; uint8 public constant decimals = 18; // solium-disable-line uppercase
} }
/** /**
* @title SampleCrowdsale * @title SampleCrowdsale
* @dev This is an example of a fully fledged crowdsale. * @dev This is an example of a fully fledged crowdsale.

@ -12,9 +12,9 @@ import "../token/StandardToken.sol";
*/ */
contract SimpleToken is StandardToken { contract SimpleToken is StandardToken {
string public constant name = "SimpleToken"; string public constant name = "SimpleToken"; // solium-disable-line uppercase
string public constant symbol = "SIM"; string public constant symbol = "SIM"; // solium-disable-line uppercase
uint8 public constant decimals = 18; uint8 public constant decimals = 18; // solium-disable-line uppercase
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals)); uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import "../ownership/Ownable.sol";
import '../ownership/Ownable.sol';
/** /**
* @title Migrations * @title Migrations

@ -1,9 +1,9 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
import "../token/ERC20Basic.sol"; import "../token/ERC20Basic.sol";
/** /**
* @title TokenDestructible: * @title TokenDestructible:
* @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>
@ -24,7 +24,7 @@ contract TokenDestructible is Ownable {
function destroy(address[] tokens) onlyOwner public { function destroy(address[] tokens) onlyOwner public {
// Transfer tokens to owner // Transfer tokens to owner
for(uint256 i = 0; i < tokens.length; i++) { for (uint256 i = 0; i < tokens.length; i++) {
ERC20Basic token = ERC20Basic(tokens[i]); ERC20Basic token = ERC20Basic(tokens[i]);
uint256 balance = token.balanceOf(this); uint256 balance = token.balanceOf(this);
token.transfer(owner, balance); token.transfer(owner, balance);

@ -1,10 +1,10 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
/** /**
* @title Math * @title Math
* @dev Assorted math operations * @dev Assorted math operations
*/ */
library Math { library Math {
function max64(uint64 a, uint64 b) internal pure returns (uint64) { function max64(uint64 a, uint64 b) internal pure returns (uint64) {
return a >= b ? a : b; return a >= b ? a : b;

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/BasicToken.sol'; import "../token/BasicToken.sol";
// mock class using BasicToken // mock class using BasicToken

@ -1,6 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/BurnableToken.sol'; import "../token/BurnableToken.sol";
contract BurnableTokenMock is BurnableToken { contract BurnableTokenMock is BurnableToken {

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../crowdsale/CappedCrowdsale.sol'; import "../crowdsale/CappedCrowdsale.sol";
contract CappedCrowdsaleImpl is CappedCrowdsale { contract CappedCrowdsaleImpl is CappedCrowdsale {

@ -1,6 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import "../../contracts/DayLimit.sol"; import "../../contracts/DayLimit.sol";
contract DayLimitMock is DayLimit { contract DayLimitMock is DayLimit {
uint256 public totalSpending; uint256 public totalSpending;

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/StandardToken.sol'; import "../token/StandardToken.sol";
import '../token/DetailedERC20.sol'; import "../token/DetailedERC20.sol";
contract DetailedERC20Mock is StandardToken, DetailedERC20 { contract DetailedERC20Mock is StandardToken, DetailedERC20 {
function DetailedERC20Mock(string _name, string _symbol, uint8 _decimals) DetailedERC20(_name, _symbol, _decimals) public {} function DetailedERC20Mock(string _name, string _symbol, uint8 _decimals) DetailedERC20(_name, _symbol, _decimals) public {}

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../ECRecovery.sol'; import "../ECRecovery.sol";
contract ECRecoveryMock { contract ECRecoveryMock {

@ -1,13 +1,14 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/BasicToken.sol'; import "../token/BasicToken.sol";
contract ERC23ContractInterface { contract ERC23ContractInterface {
function tokenFallback(address _from, uint256 _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, uint256 initialBalance) public { function ERC23TokenMock(address initialAccount, uint256 initialBalance) public {
@ -24,7 +25,7 @@ contract ERC23TokenMock is BasicToken {
assembly { assembly {
is_contract := not(iszero(extcodesize(_to))) is_contract := not(iszero(extcodesize(_to)))
} }
if(is_contract) { if (is_contract) {
ERC23ContractInterface receiver = ERC23ContractInterface(_to); ERC23ContractInterface receiver = ERC23ContractInterface(_to);
receiver.tokenFallback(msg.sender, _value, _data); receiver.tokenFallback(msg.sender, _value, _data);
} }

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../crowdsale/FinalizableCrowdsale.sol'; import "../crowdsale/FinalizableCrowdsale.sol";
contract FinalizableCrowdsaleImpl is FinalizableCrowdsale { contract FinalizableCrowdsaleImpl is FinalizableCrowdsale {

@ -1,11 +1,12 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
// @title Force Ether into a contract. // @title Force Ether into a contract.
// @notice even // @notice even
// if the contract is not payable. // if the contract is not payable.
// @notice To use, construct the contract with the target as argument. // @notice To use, construct the contract with the target as argument.
// @author Remco Bloemen <remco@neufund.org> // @author Remco Bloemen <remco@neufund.org>
contract ForceEther { contract ForceEther {
function ForceEther() public payable { } function ForceEther() public payable { }

@ -2,6 +2,7 @@ pragma solidity ^0.4.18;
import "../../contracts/ownership/HasNoEther.sol"; import "../../contracts/ownership/HasNoEther.sol";
contract HasNoEtherTest is HasNoEther { contract HasNoEtherTest is HasNoEther {
// Constructor with explicit payable should still fail // Constructor with explicit payable should still fail

@ -1,15 +1,15 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import {Bounty, Target} from "../../contracts/Bounty.sol"; import {Bounty, Target} from "../../contracts/Bounty.sol";
contract InsecureTargetMock is Target { contract InsecureTargetMock is Target {
function checkInvariant() public returns(bool){ function checkInvariant() public returns(bool) {
return false; return false;
} }
} }
contract InsecureTargetBounty is Bounty { contract InsecureTargetBounty is Bounty {
function deployContract() internal returns (address) { function deployContract() internal returns (address) {
return new InsecureTargetMock(); return new InsecureTargetMock();

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../LimitBalance.sol'; import "../LimitBalance.sol";
// mock class using LimitBalance // mock class using LimitBalance

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../lifecycle/Pausable.sol'; import "../lifecycle/Pausable.sol";
// mock class using Pausable // mock class using Pausable

@ -1,6 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/PausableToken.sol'; import "../token/PausableToken.sol";
// mock class using PausableToken // mock class using PausableToken
contract PausableTokenMock is PausableToken { contract PausableTokenMock is PausableToken {

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../payment/PullPayment.sol'; import "../payment/PullPayment.sol";
// mock class using PullPayment // mock class using PullPayment

@ -1,69 +1,69 @@
pragma solidity ^0.4.8; pragma solidity ^0.4.8;
import '../ownership/rbac/RBAC.sol'; import "../ownership/rbac/RBAC.sol";
contract RBACMock is RBAC { contract RBACMock is RBAC {
string constant ROLE_ADVISOR = "advisor"; string constant ROLE_ADVISOR = "advisor";
modifier onlyAdminOrAdvisor() modifier onlyAdminOrAdvisor()
{ {
require( require(
hasRole(msg.sender, ROLE_ADMIN) || hasRole(msg.sender, ROLE_ADMIN) ||
hasRole(msg.sender, ROLE_ADVISOR) hasRole(msg.sender, ROLE_ADVISOR)
); );
_; _;
} }
function RBACMock(address[] _advisors) function RBACMock(address[] _advisors)
public public
{ {
addRole(msg.sender, ROLE_ADVISOR); addRole(msg.sender, ROLE_ADVISOR);
for (uint256 i = 0; i < _advisors.length; i++) { for (uint256 i = 0; i < _advisors.length; i++) {
addRole(_advisors[i], ROLE_ADVISOR); addRole(_advisors[i], ROLE_ADVISOR);
}
} }
}
function onlyAdminsCanDoThis() function onlyAdminsCanDoThis()
onlyAdmin onlyAdmin
view view
external external
{ {
} }
function onlyAdvisorsCanDoThis() function onlyAdvisorsCanDoThis()
onlyRole(ROLE_ADVISOR) onlyRole(ROLE_ADVISOR)
view view
external external
{ {
} }
function eitherAdminOrAdvisorCanDoThis() function eitherAdminOrAdvisorCanDoThis()
onlyAdminOrAdvisor onlyAdminOrAdvisor
view view
external external
{ {
} }
function nobodyCanDoThis() function nobodyCanDoThis()
onlyRole("unknown") onlyRole("unknown")
view view
external external
{ {
} }
// admins can remove advisor's role // admins can remove advisor's role
function removeAdvisor(address _addr) function removeAdvisor(address _addr)
onlyAdmin onlyAdmin
public public
{ {
// revert if the user isn't an advisor // revert if the user isn't an advisor
// (perhaps you want to soft-fail here instead?) // (perhaps you want to soft-fail here instead?)
checkRole(_addr, ROLE_ADVISOR); checkRole(_addr, ROLE_ADVISOR);
// remove the advisor's role // remove the advisor's role
removeRole(_addr, ROLE_ADVISOR); removeRole(_addr, ROLE_ADVISOR);
} }
} }

@ -1,5 +1,6 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
contract ReentrancyAttack { contract ReentrancyAttack {
function callSender(bytes4 data) public { function callSender(bytes4 data) public {

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../ReentrancyGuard.sol'; import "../ReentrancyGuard.sol";
import './ReentrancyAttack.sol'; import "./ReentrancyAttack.sol";
contract ReentrancyMock is ReentrancyGuard { contract ReentrancyMock is ReentrancyGuard {
@ -11,12 +12,12 @@ contract ReentrancyMock is ReentrancyGuard {
counter = 0; counter = 0;
} }
function count() private { function callback() external nonReentrant {
counter += 1; count();
} }
function countLocalRecursive(uint256 n) public nonReentrant { function countLocalRecursive(uint256 n) public nonReentrant {
if(n > 0) { if (n > 0) {
count(); count();
countLocalRecursive(n - 1); countLocalRecursive(n - 1);
} }
@ -24,7 +25,7 @@ contract ReentrancyMock is ReentrancyGuard {
function countThisRecursive(uint256 n) public nonReentrant { function countThisRecursive(uint256 n) public nonReentrant {
bytes4 func = bytes4(keccak256("countThisRecursive(uint256)")); bytes4 func = bytes4(keccak256("countThisRecursive(uint256)"));
if(n > 0) { if (n > 0) {
count(); count();
bool result = this.call(func, n - 1); bool result = this.call(func, n - 1);
require(result == true); require(result == true);
@ -37,8 +38,8 @@ contract ReentrancyMock is ReentrancyGuard {
attacker.callSender(func); attacker.callSender(func);
} }
function callback() external nonReentrant { function count() private {
count(); counter += 1;
} }
} }

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../crowdsale/RefundableCrowdsale.sol'; import "../crowdsale/RefundableCrowdsale.sol";
contract RefundableCrowdsaleImpl is RefundableCrowdsale { contract RefundableCrowdsaleImpl is RefundableCrowdsale {

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/ERC20.sol'; import "../token/ERC20.sol";
import '../token/SafeERC20.sol'; import "../token/SafeERC20.sol";
contract ERC20FailingMock is ERC20 { contract ERC20FailingMock is ERC20 {
function transfer(address, uint256) public returns (bool) { function transfer(address, uint256) public returns (bool) {
@ -25,6 +26,7 @@ contract ERC20FailingMock is ERC20 {
} }
} }
contract ERC20SucceedingMock is ERC20 { contract ERC20SucceedingMock is ERC20 {
function transfer(address, uint256) public returns (bool) { function transfer(address, uint256) public returns (bool) {
return true; return true;
@ -47,6 +49,7 @@ contract ERC20SucceedingMock is ERC20 {
} }
} }
contract SafeERC20Helper { contract SafeERC20Helper {
using SafeERC20 for ERC20; using SafeERC20 for ERC20;

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
contract SafeMathMock { contract SafeMathMock {

@ -1,6 +1,5 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import {Bounty, Target} from "../../contracts/Bounty.sol"; import {Bounty, Target} from "../../contracts/Bounty.sol";
@ -10,6 +9,7 @@ contract SecureTargetMock is Target {
} }
} }
contract SecureTargetBounty is Bounty { contract SecureTargetBounty is Bounty {
function deployContract() internal returns (address) { function deployContract() internal returns (address) {
return new SecureTargetMock(); return new SecureTargetMock();

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../token/StandardToken.sol'; import "../token/StandardToken.sol";
// mock class using StandardToken // mock class using StandardToken

@ -4,6 +4,7 @@ import "./Ownable.sol";
import "../token/ERC20Basic.sol"; import "../token/ERC20Basic.sol";
import "../token/SafeERC20.sol"; import "../token/SafeERC20.sol";
/** /**
* @title Contracts that should be able to recover tokens * @title Contracts that should be able to recover tokens
* @author SylTi * @author SylTi

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './Ownable.sol'; import "./Ownable.sol";
/** /**

@ -1,21 +1,22 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './Ownable.sol'; import "./Ownable.sol";
/** /**
* @title Contactable token * @title Contactable token
* @dev Basic version of a contactable contract, allowing the owner to provide a string with their * @dev Basic version of a contactable contract, allowing the owner to provide a string with their
* contact information. * contact information.
*/ */
contract Contactable is Ownable{ contract Contactable is Ownable {
string public contactInformation; string public contactInformation;
/** /**
* @dev Allows the owner to set a string with their contact information. * @dev Allows the owner to set a string with their contact information.
* @param info The contact information to attach to the contract. * @param info The contact information to attach to the contract.
*/ */
function setContactInformation(string info) onlyOwner public { function setContactInformation(string info) onlyOwner public {
contactInformation = info; contactInformation = info;
} }
} }

@ -1,7 +1,6 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import "./Claimable.sol";
import './Claimable.sol';
/** /**
@ -26,7 +25,6 @@ contract DelayedClaimable is Claimable {
start = _start; start = _start;
} }
/** /**
* @dev Allows the pendingOwner address to finalize the transfer, as long as it is called within * @dev Allows the pendingOwner address to finalize the transfer, as long as it is called within
* the specified start and end time. * the specified start and end time.

@ -2,6 +2,7 @@ pragma solidity ^0.4.18;
import "./Ownable.sol"; import "./Ownable.sol";
/** /**
* @title Contracts that should not own Contracts * @title Contracts that should not own Contracts
* @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>

@ -2,6 +2,7 @@ pragma solidity ^0.4.18;
import "./Ownable.sol"; import "./Ownable.sol";
/** /**
* @title Contracts that should not own Ether * @title Contracts that should not own Ether
* @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>

@ -2,6 +2,7 @@ pragma solidity ^0.4.18;
import "./CanReclaimToken.sol"; import "./CanReclaimToken.sol";
/** /**
* @title Contracts that should not own Tokens * @title Contracts that should not own Tokens
* @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>

@ -4,6 +4,7 @@ import "./HasNoEther.sol";
import "./HasNoTokens.sol"; import "./HasNoTokens.sol";
import "./HasNoContracts.sol"; import "./HasNoContracts.sol";
/** /**
* @title Base contract for contracts that should not own things. * @title Base contract for contracts that should not own things.
* @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>

@ -21,7 +21,6 @@ contract Ownable {
owner = msg.sender; owner = msg.sender;
} }
/** /**
* @dev Throws if called by any account other than the owner. * @dev Throws if called by any account other than the owner.
*/ */
@ -30,7 +29,6 @@ contract Ownable {
_; _;
} }
/** /**
* @dev Allows the current owner to transfer control of the contract to a newOwner. * @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to. * @param newOwner The address to transfer ownership to.

@ -1,6 +1,6 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './Roles.sol'; import "./Roles.sol";
/** /**
@ -15,143 +15,142 @@ import './Roles.sol';
* to avoid typos. * to avoid typos.
*/ */
contract RBAC { contract RBAC {
using Roles for Roles.Role; using Roles for Roles.Role;
mapping (string => Roles.Role) private roles; mapping (string => Roles.Role) private roles;
event RoleAdded(address addr, string roleName); event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName); event RoleRemoved(address addr, string roleName);
/** /**
* A constant role name for indicating admins. * A constant role name for indicating admins.
*/ */
string public constant ROLE_ADMIN = "admin"; string public constant ROLE_ADMIN = "admin";
/** /**
* @dev constructor. Sets msg.sender as admin by default * @dev constructor. Sets msg.sender as admin by default
*/ */
function RBAC() function RBAC()
public public
{ {
addRole(msg.sender, ROLE_ADMIN); addRole(msg.sender, ROLE_ADMIN);
} }
/** /**
* @dev add a role to an address * @dev reverts if addr does not have role
* @param addr address * @param addr address
* @param roleName the name of the role * @param roleName the name of the role
*/ * // reverts
function addRole(address addr, string roleName) */
internal function checkRole(address addr, string roleName)
{ view
roles[roleName].add(addr); public
RoleAdded(addr, roleName); {
} roles[roleName].check(addr);
}
/**
* @dev remove a role from an address /**
* @param addr address * @dev determine if addr has role
* @param roleName the name of the role * @param addr address
*/ * @param roleName the name of the role
function removeRole(address addr, string roleName) * @return bool
internal */
{ function hasRole(address addr, string roleName)
roles[roleName].remove(addr); view
RoleRemoved(addr, roleName); public
} returns (bool)
{
/** return roles[roleName].has(addr);
* @dev reverts if addr does not have role }
* @param addr address
* @param roleName the name of the role /**
* // reverts * @dev add a role to an address
*/ * @param addr address
function checkRole(address addr, string roleName) * @param roleName the name of the role
view */
public function adminAddRole(address addr, string roleName)
{ onlyAdmin
roles[roleName].check(addr); public
} {
addRole(addr, roleName);
/** }
* @dev determine if addr has role
* @param addr address /**
* @param roleName the name of the role * @dev remove a role from an address
* @return bool * @param addr address
*/ * @param roleName the name of the role
function hasRole(address addr, string roleName) */
view function adminRemoveRole(address addr, string roleName)
public onlyAdmin
returns (bool) public
{ {
return roles[roleName].has(addr); removeRole(addr, roleName);
} }
/** /**
* @dev add a role to an address * @dev add a role to an address
* @param addr address * @param addr address
* @param roleName the name of the role * @param roleName the name of the role
*/ */
function adminAddRole(address addr, string roleName) function addRole(address addr, string roleName)
onlyAdmin internal
public {
{ roles[roleName].add(addr);
addRole(addr, roleName); RoleAdded(addr, roleName);
} }
/** /**
* @dev remove a role from an address * @dev remove a role from an address
* @param addr address * @param addr address
* @param roleName the name of the role * @param roleName the name of the role
*/ */
function adminRemoveRole(address addr, string roleName) function removeRole(address addr, string roleName)
onlyAdmin internal
public {
{ roles[roleName].remove(addr);
removeRole(addr, roleName); RoleRemoved(addr, roleName);
} }
/**
/** * @dev modifier to scope access to a single role (uses msg.sender as addr)
* @dev modifier to scope access to a single role (uses msg.sender as addr) * @param roleName the name of the role
* @param roleName the name of the role * // reverts
* // reverts */
*/ modifier onlyRole(string roleName)
modifier onlyRole(string roleName) {
{ checkRole(msg.sender, roleName);
checkRole(msg.sender, roleName); _;
_; }
}
/**
/** * @dev modifier to scope access to admins
* @dev modifier to scope access to admins * // reverts
* // reverts */
*/ modifier onlyAdmin()
modifier onlyAdmin() {
{ checkRole(msg.sender, ROLE_ADMIN);
checkRole(msg.sender, ROLE_ADMIN); _;
_; }
}
/**
/** * @dev modifier to scope access to a set of roles (uses msg.sender as addr)
* @dev modifier to scope access to a set of roles (uses msg.sender as addr) * @param roleNames the names of the roles to scope access to
* @param roleNames the names of the roles to scope access to * // reverts
* // reverts *
* * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this * see: https://github.com/ethereum/solidity/issues/2467
* see: https://github.com/ethereum/solidity/issues/2467 */
*/ // modifier onlyRoles(string[] roleNames) {
// modifier onlyRoles(string[] roleNames) { // bool hasAnyRole = false;
// bool hasAnyRole = false; // for (uint8 i = 0; i < roleNames.length; i++) {
// for (uint8 i = 0; i < roleNames.length; i++) { // if (hasRole(msg.sender, roleNames[i])) {
// if (hasRole(msg.sender, roleNames[i])) { // hasAnyRole = true;
// hasAnyRole = true; // break;
// break; // }
// } // }
// }
// require(hasAnyRole);
// require(hasAnyRole);
// _;
// _; // }
// }
} }

@ -8,48 +8,48 @@ pragma solidity ^0.4.18;
* See RBAC.sol for example usage. * See RBAC.sol for example usage.
*/ */
library Roles { library Roles {
struct Role { struct Role {
mapping (address => bool) bearer; mapping (address => bool) bearer;
} }
/** /**
* @dev give an address access to this role * @dev give an address access to this role
*/ */
function add(Role storage role, address addr) function add(Role storage role, address addr)
internal internal
{ {
role.bearer[addr] = true; role.bearer[addr] = true;
} }
/** /**
* @dev remove an address' access to this role * @dev remove an address' access to this role
*/ */
function remove(Role storage role, address addr) function remove(Role storage role, address addr)
internal internal
{ {
role.bearer[addr] = false; role.bearer[addr] = false;
} }
/** /**
* @dev check if an address has this role * @dev check if an address has this role
* // reverts * // reverts
*/ */
function check(Role storage role, address addr) function check(Role storage role, address addr)
view view
internal internal
{ {
require(has(role, addr)); require(has(role, addr));
} }
/** /**
* @dev check if an address has this role * @dev check if an address has this role
* @return bool * @return bool
*/ */
function has(Role storage role, address addr) function has(Role storage role, address addr)
view view
internal internal
returns (bool) returns (bool)
{ {
return role.bearer[addr]; return role.bearer[addr];
} }
} }

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
/** /**
@ -15,16 +15,6 @@ contract PullPayment {
mapping(address => uint256) public payments; mapping(address => uint256) public payments;
uint256 public totalPayments; 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, uint256 amount) internal {
payments[dest] = payments[dest].add(amount);
totalPayments = totalPayments.add(amount);
}
/** /**
* @dev withdraw accumulated balance, called by payee. * @dev withdraw accumulated balance, called by payee.
*/ */
@ -40,4 +30,14 @@ contract PullPayment {
assert(payee.send(payment)); assert(payee.send(payment));
} }
/**
* @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, uint256 amount) internal {
payments[dest] = payments[dest].add(amount);
totalPayments = totalPayments.add(amount);
}
} }

@ -1,6 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
/** /**
* @title SplitPayment * @title SplitPayment
@ -29,19 +30,9 @@ contract SplitPayment {
} }
/** /**
* @dev Add a new payee to the contract. * @dev payable fallback
* @param _payee The address of the payee to add.
* @param _shares The number of shares owned by the payee.
*/ */
function addPayee(address _payee, uint256 _shares) internal { function () public payable {}
require(_payee != address(0));
require(_shares > 0);
require(shares[_payee] == 0);
payees.push(_payee);
shares[_payee] = _shares;
totalShares = totalShares.add(_shares);
}
/** /**
* @dev Claim your share of the balance. * @dev Claim your share of the balance.
@ -64,7 +55,17 @@ contract SplitPayment {
} }
/** /**
* @dev payable fallback * @dev Add a new payee to the contract.
* @param _payee The address of the payee to add.
* @param _shares The number of shares owned by the payee.
*/ */
function () public payable {} function addPayee(address _payee, uint256 _shares) internal {
require(_payee != address(0));
require(_shares > 0);
require(shares[_payee] == 0);
payees.push(_payee);
shares[_payee] = _shares;
totalShares = totalShares.add(_shares);
}
} }

@ -1,8 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './ERC20Basic.sol'; import "./ERC20Basic.sol";
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
/** /**

@ -1,6 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './BasicToken.sol'; import "./BasicToken.sol";
/** /**
* @title Burnable Token * @title Burnable Token
@ -8,20 +9,20 @@ import './BasicToken.sol';
*/ */
contract BurnableToken is BasicToken { contract BurnableToken is BasicToken {
event Burn(address indexed burner, uint256 value); event Burn(address indexed burner, uint256 value);
/** /**
* @dev Burns a specific amount of tokens. * @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned. * @param _value The amount of token to be burned.
*/ */
function burn(uint256 _value) public { function burn(uint256 _value) public {
require(_value <= balances[msg.sender]); require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the // no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure // sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender; address burner = msg.sender;
balances[burner] = balances[burner].sub(_value); balances[burner] = balances[burner].sub(_value);
totalSupply = totalSupply.sub(_value); totalSupply = totalSupply.sub(_value);
Burn(burner, _value); Burn(burner, _value);
} }
} }

@ -1,6 +1,7 @@
pragma solidity ^0.4.11; pragma solidity ^0.4.11;
import './MintableToken.sol'; import "./MintableToken.sol";
/** /**
* @title Capped token * @title Capped token

@ -1,6 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './ERC20.sol'; import "./ERC20.sol";
contract DetailedERC20 is ERC20 { contract DetailedERC20 is ERC20 {
string public name; string public name;

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './ERC20Basic.sol'; import "./ERC20Basic.sol";
/** /**

@ -1,8 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './StandardToken.sol'; import "./StandardToken.sol";
import '../ownership/Ownable.sol'; import "../ownership/Ownable.sol";

@ -1,14 +1,14 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './StandardToken.sol'; import "./StandardToken.sol";
import '../lifecycle/Pausable.sol'; import "../lifecycle/Pausable.sol";
/** /**
* @title Pausable token * @title Pausable token
* *
* @dev StandardToken modified with pausable transfers. * @dev StandardToken modified with pausable transfers.
**/ **/
contract PausableToken is StandardToken, Pausable { contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {

@ -1,7 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './ERC20Basic.sol'; import "./ERC20Basic.sol";
import './ERC20.sol'; import "./ERC20.sol";
/** /**
* @title SafeERC20 * @title SafeERC20

@ -1,8 +1,8 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './BasicToken.sol'; import "./BasicToken.sol";
import './ERC20.sol'; import "./ERC20.sol";
/** /**

@ -1,9 +1,9 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import "./ERC20Basic.sol";
import './ERC20Basic.sol';
import "../token/SafeERC20.sol"; import "../token/SafeERC20.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

@ -1,9 +1,10 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import './ERC20Basic.sol'; import "./ERC20Basic.sol";
import './SafeERC20.sol'; import "./SafeERC20.sol";
import '../ownership/Ownable.sol'; import "../ownership/Ownable.sol";
import '../math/SafeMath.sol'; import "../math/SafeMath.sol";
/** /**
* @title TokenVesting * @title TokenVesting

1200
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -6,6 +6,10 @@
"test": "scripts/test.sh", "test": "scripts/test.sh",
"lint": "eslint .", "lint": "eslint .",
"lint:fix": "eslint . --fix", "lint:fix": "eslint . --fix",
"lint:sol": "solium -d .",
"lint:sol:fix": "solium -d . --fix",
"lint:all": "npm run lint && npm run lint:sol",
"lint:all:fix": "npm run lint:fix && npm run lint:sol:fix",
"console": "truffle console", "console": "truffle console",
"coverage": "scripts/coverage.sh" "coverage": "scripts/coverage.sh"
}, },
@ -47,6 +51,7 @@
"ethereumjs-util": "^5.1.2", "ethereumjs-util": "^5.1.2",
"mocha-lcov-reporter": "^1.3.0", "mocha-lcov-reporter": "^1.3.0",
"solidity-coverage": "^0.4.3", "solidity-coverage": "^0.4.3",
"solium": "^1.1.2",
"truffle": "^4.0.0", "truffle": "^4.0.0",
"truffle-hdwallet-provider": "0.0.3" "truffle-hdwallet-provider": "0.0.3"
}, },

@ -1,7 +1,7 @@
pragma solidity ^0.4.18; pragma solidity ^0.4.18;
import '../../contracts/math/Math.sol'; import "../../contracts/math/Math.sol";
contract MathMock { contract MathMock {

Loading…
Cancel
Save