From d74dbabc73e9373e97849c84cba45d6c1458ecf7 Mon Sep 17 00:00:00 2001 From: Martin Schenck Date: Tue, 7 May 2019 14:52:43 +0200 Subject: [PATCH 1/4] Use npm and git submodules Code deduplication by getting dependencies from npm and git submodules. * `UtilityToken` contracts are now imported as a git submodule. * `Organization` contracst are now imported as a git submodule inside the `UtilityToken` submodule. * `SafeMath` is now imported as open zeppelin npm package. Note that inside the utility token repository, `token` has not been renamed to `value token`, and therefore some tests needed to be updated. Also, some tests required updating as `SafeMath` does not give an error message anymore. `Organiation` contracts cannot be imported as a separate git submodule dependency, as then the solidity compiler will complain that there are multiple definitions of the same symbol (e.g. `contract Organization`). For now it is fine to import organization from inside utility tokens, but that will lead to an error latest when there is a diamond dependency: ``` Organization / \ UtilityToken SomethingElse \ / NewRepository ``` In this case, it couldn't be avoided that `Organization` was defined multiple times. To fix this, I created follow-up ticket: https://github.com/OpenST/developer-guidelines/issues/27 Deduplicating EIP20Token is out-of-scope, as it requires changing UtilityToken contracts (which has an EIP20Token) and all consumers of UtilityToken, which currently may or may not rely on the EIP20Token from there. Simply adding the npm package does not work, as there will be an error about multiple definitions of the same Symbol (`contract EIP20Token`). To fix this, I created a follow-up ticket: https://github.com/OpenST/developer-guidelines/issues/28 Fixes #712 --- .gitignore | 2 + .gitmodules | 3 + contracts/anchor/Anchor.sol | 6 +- contracts/core/AuxiliaryBlockStore.sol | 7 +- contracts/core/BlockStore.sol | 2 +- contracts/core/KernelGateway.sol | 4 +- contracts/core/MosaicCore.sol | 2 +- contracts/core/PollingPlace.sol | 2 +- contracts/core/Stake.sol | 4 +- .../CoGatewayUtilityTokenInterface.sol | 33 - contracts/gateway/EIP20CoGateway.sol | 4 +- contracts/gateway/EIP20Gateway.sol | 2 +- contracts/gateway/EIP20Token.sol | 4 +- contracts/gateway/GatewayBase.sol | 8 +- contracts/gateway/OSTPrime.sol | 8 +- contracts/gateway/SimpleStake.sol | 2 +- contracts/gateway/UtilityToken.sol | 272 --- contracts/gateway/UtilityTokenInterface.sol | 87 - contracts/lib/MessageBus.sol | 2 +- contracts/lib/MetaBlock.sol | 2 +- contracts/lib/Organization.sol | 361 ---- contracts/lib/OrganizationInterface.sol | 54 - contracts/lib/Organized.sol | 79 - contracts/lib/SafeMath.sol | 143 -- contracts/test/gateway/MockEIP20CoGateway.sol | 2 +- contracts/test/gateway/MockGatewayBase.sol | 2 +- contracts/test/gateway/MockToken.sol | 6 +- contracts/test/gateway/MockUtilityToken.sol | 100 - contracts/test/gateway/TestGatewayBase.sol | 2 +- contracts/test/gateway/TestUtilityToken.sol | 82 - contracts/test/lib/MockMessageBus.sol | 2 +- contracts/test/lib/MockOrganization.sol | 87 - contracts/test/lib/TestSafeMath.sol | 86 - contracts/utilitytoken | 1 + package-lock.json | 1736 +++++++++-------- package.json | 1 + test/gateway/eip20_cogateway/redeem.js | 8 +- test/gateway/eip20_gateway/revert_stake.js | 1 - test/gateway/ost_prime/constructor.js | 17 +- test/gateway/simple_stake/release_to.js | 1 - 40 files changed, 923 insertions(+), 2304 deletions(-) create mode 100644 .gitmodules delete mode 100644 contracts/gateway/CoGatewayUtilityTokenInterface.sol delete mode 100644 contracts/gateway/UtilityToken.sol delete mode 100644 contracts/gateway/UtilityTokenInterface.sol delete mode 100644 contracts/lib/Organization.sol delete mode 100644 contracts/lib/OrganizationInterface.sol delete mode 100644 contracts/lib/Organized.sol delete mode 100644 contracts/lib/SafeMath.sol delete mode 100644 contracts/test/gateway/MockUtilityToken.sol delete mode 100644 contracts/test/gateway/TestUtilityToken.sol delete mode 100644 contracts/test/lib/MockOrganization.sol delete mode 100644 contracts/test/lib/TestSafeMath.sol create mode 160000 contracts/utilitytoken diff --git a/.gitignore b/.gitignore index 8b6b6c34..ade3937f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ build/ .idea/ .vscode/ *.iml +*.swp +tags # LaTeX auxiliary files *.aux diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..2c9a6ec9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "contracts/utilitytoken"] + path = contracts/utilitytoken + url = https://github.com/OpenST/utilitytoken-contracts.git diff --git a/contracts/anchor/Anchor.sol b/contracts/anchor/Anchor.sol index 48749556..a7884532 100644 --- a/contracts/anchor/Anchor.sol +++ b/contracts/anchor/Anchor.sol @@ -22,10 +22,10 @@ pragma solidity ^0.5.0; import "../lib/CircularBufferUint.sol"; import "../lib/MerklePatriciaProof.sol"; -import "../lib/OrganizationInterface.sol"; -import "../lib/Organized.sol"; +import "../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; +import "../utilitytoken/contracts/organization/contracts/Organized.sol"; import "../lib/RLP.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../lib/StateRootInterface.sol"; /** diff --git a/contracts/core/AuxiliaryBlockStore.sol b/contracts/core/AuxiliaryBlockStore.sol index 24ef405e..5fc06082 100644 --- a/contracts/core/AuxiliaryBlockStore.sol +++ b/contracts/core/AuxiliaryBlockStore.sol @@ -22,7 +22,7 @@ pragma solidity ^0.5.0; import "../lib/Block.sol"; import "../lib/MetaBlock.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./BlockStore.sol"; import "./PollingPlaceInterface.sol"; import "./KernelGatewayInterface.sol"; @@ -269,8 +269,8 @@ contract AuxiliaryBlockStore is coreIdentifier_ = coreIdentifier; kernelHash_ = kernelHashes[_blockHash]; - auxiliaryDynasty_= checkpoints[_blockHash].dynasty; - auxiliaryBlockHash_=checkpoints[_blockHash].blockHash; + auxiliaryDynasty_ = checkpoints[_blockHash].dynasty; + auxiliaryBlockHash_ = checkpoints[_blockHash].blockHash; accumulatedGas_ = accumulatedGases[_blockHash]; originDynasty_ = originDynasties[_blockHash]; originBlockHash_ = originBlockHashes[_blockHash]; @@ -497,5 +497,4 @@ contract AuxiliaryBlockStore is isAncestor_ = currentCheckpoint.blockHash == _ancestor; } - } diff --git a/contracts/core/BlockStore.sol b/contracts/core/BlockStore.sol index d387397c..e31e308c 100644 --- a/contracts/core/BlockStore.sol +++ b/contracts/core/BlockStore.sol @@ -22,7 +22,7 @@ pragma solidity ^0.5.0; import "../lib/Block.sol"; import "../lib/MetaBlock.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./BlockStoreInterface.sol"; import "./OriginTransitionObjectInterface.sol"; /** diff --git a/contracts/core/KernelGateway.sol b/contracts/core/KernelGateway.sol index 19cf6f5d..c8ec7f37 100644 --- a/contracts/core/KernelGateway.sol +++ b/contracts/core/KernelGateway.sol @@ -24,7 +24,7 @@ import "../lib/RLP.sol"; import "./BlockStoreInterface.sol"; import "../lib/MerklePatriciaProof.sol"; import "../lib/BytesLib.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../lib/MetaBlock.sol"; import "./AuxiliaryTransitionObjectInterface.sol"; import "./KernelGatewayInterface.sol"; @@ -666,7 +666,7 @@ contract KernelGateway is KernelGatewayInterface { { bytes32 transitionHash = AuxiliaryTransitionObjectInterface(address(auxiliaryBlockStore)) - .auxiliaryTransitionHashAtBlock(_blockHash); + .auxiliaryTransitionHashAtBlock(_blockHash); metaBlockHash_ = MetaBlock.hashMetaBlock( activeKernelHash, diff --git a/contracts/core/MosaicCore.sol b/contracts/core/MosaicCore.sol index 633ccd67..53b0da37 100644 --- a/contracts/core/MosaicCore.sol +++ b/contracts/core/MosaicCore.sol @@ -25,7 +25,7 @@ import "./MosaicCoreInterface.sol"; import "./Stake.sol"; import "../lib/MetaBlock.sol"; import "../lib/OstInterface.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../lib/StateRootInterface.sol"; /** diff --git a/contracts/core/PollingPlace.sol b/contracts/core/PollingPlace.sol index 793335cd..19c29972 100644 --- a/contracts/core/PollingPlace.sol +++ b/contracts/core/PollingPlace.sol @@ -20,7 +20,7 @@ pragma solidity ^0.5.0; // // ---------------------------------------------------------------------------- -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../lib/MetaBlock.sol"; import "./BlockStoreInterface.sol"; import "./PollingPlaceInterface.sol"; diff --git a/contracts/core/Stake.sol b/contracts/core/Stake.sol index 1addb21a..b19d8194 100644 --- a/contracts/core/Stake.sol +++ b/contracts/core/Stake.sol @@ -22,7 +22,7 @@ pragma solidity ^0.5.0; import "../lib/EIP20Interface.sol"; import "./StakeInterface.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** * @title The Stake contract tracks deposits, logouts, slashings etc. on origin. @@ -60,7 +60,7 @@ contract Stake is StakeInterface { /** * The stake initially equals the deposit. It can decrease due to - * withdrawal or slashing. Initially, the weight on auxiliary will + * withdrawal or slashing. Initially, the weight on auxiliary will * equal the stake. */ uint256 stake; diff --git a/contracts/gateway/CoGatewayUtilityTokenInterface.sol b/contracts/gateway/CoGatewayUtilityTokenInterface.sol deleted file mode 100644 index 70899432..00000000 --- a/contracts/gateway/CoGatewayUtilityTokenInterface.sol +++ /dev/null @@ -1,33 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -contract CoGatewayUtilityTokenInterface { - - /** - * @notice Get the utility token address. - * - * @return utilityToken_ Address of utility token. - */ - function utilityToken() - public - returns (address utilityToken_); -} diff --git a/contracts/gateway/EIP20CoGateway.sol b/contracts/gateway/EIP20CoGateway.sol index 1a06e547..16d5d006 100644 --- a/contracts/gateway/EIP20CoGateway.sol +++ b/contracts/gateway/EIP20CoGateway.sol @@ -52,9 +52,9 @@ pragma solidity ^0.5.0; ------------------------------------------------------------------------------- */ -import "./UtilityTokenInterface.sol"; +import "../utilitytoken/contracts/UtilityTokenInterface.sol"; import "./GatewayBase.sol"; -import "../lib/OrganizationInterface.sol"; +import "../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; /** * @title EIP20CoGateway Contract diff --git a/contracts/gateway/EIP20Gateway.sol b/contracts/gateway/EIP20Gateway.sol index 143a19ee..405f5e4a 100644 --- a/contracts/gateway/EIP20Gateway.sol +++ b/contracts/gateway/EIP20Gateway.sol @@ -55,7 +55,7 @@ pragma solidity ^0.5.0; import "./SimpleStake.sol"; import "./GatewayBase.sol"; -import "../lib/OrganizationInterface.sol"; +import "../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; /** * @title EIP20Gateway Contract diff --git a/contracts/gateway/EIP20Token.sol b/contracts/gateway/EIP20Token.sol index efeb418e..f31778fb 100644 --- a/contracts/gateway/EIP20Token.sol +++ b/contracts/gateway/EIP20Token.sol @@ -13,7 +13,7 @@ pragma solidity ^0.5.0; // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ---------------------------------------------------------------------------- // // http://www.simpletoken.org/ @@ -21,7 +21,7 @@ pragma solidity ^0.5.0; // ---------------------------------------------------------------------------- import "../lib/EIP20Interface.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** * @title EIP20Token contract. diff --git a/contracts/gateway/GatewayBase.sol b/contracts/gateway/GatewayBase.sol index 5140957b..c922ab64 100644 --- a/contracts/gateway/GatewayBase.sol +++ b/contracts/gateway/GatewayBase.sol @@ -23,9 +23,9 @@ pragma solidity ^0.5.0; import "../lib/EIP20Interface.sol"; import "../lib/GatewayLib.sol"; import "../lib/MessageBus.sol"; -import "../lib/OrganizationInterface.sol"; -import "../lib/Organized.sol"; -import "../lib/SafeMath.sol"; +import "../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; +import "../utilitytoken/contracts/organization/contracts/Organized.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../lib/StateRootInterface.sol"; /** @@ -178,7 +178,7 @@ contract GatewayBase is Organized { // The following variables are not known at construction: messageBox = MessageBus.MessageBox(); - encodedGatewayPath = ''; + encodedGatewayPath = ""; remoteGateway = address(0); } diff --git a/contracts/gateway/OSTPrime.sol b/contracts/gateway/OSTPrime.sol index 030c634a..ac05f7ee 100644 --- a/contracts/gateway/OSTPrime.sol +++ b/contracts/gateway/OSTPrime.sol @@ -28,10 +28,10 @@ pragma solidity ^0.5.0; * the auxiliary chain. */ import "./OSTPrimeConfig.sol"; -import "./UtilityToken.sol"; +import "../utilitytoken/contracts/UtilityToken.sol"; import "../lib/Mutex.sol"; -import "../lib/OrganizationInterface.sol"; -import "../lib/SafeMath.sol"; +import "../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** * @title OSTPrime contract implements UtilityToken and @@ -121,7 +121,7 @@ contract OSTPrime is UtilityToken, OSTPrimeConfig, Mutex { * minted as base coin. * * @return success_ `true` if initialize was successful. - */ + */ function initialize() external payable diff --git a/contracts/gateway/SimpleStake.sol b/contracts/gateway/SimpleStake.sol index 1bf96750..5ae10e30 100644 --- a/contracts/gateway/SimpleStake.sol +++ b/contracts/gateway/SimpleStake.sol @@ -21,7 +21,7 @@ pragma solidity ^0.5.0; // ---------------------------------------------------------------------------- import "../lib/EIP20Interface.sol"; -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** * @title SimpleStake contract diff --git a/contracts/gateway/UtilityToken.sol b/contracts/gateway/UtilityToken.sol deleted file mode 100644 index a39f2a07..00000000 --- a/contracts/gateway/UtilityToken.sol +++ /dev/null @@ -1,272 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -import "./UtilityTokenInterface.sol"; -import "./EIP20Token.sol"; -import "./CoGatewayUtilityTokenInterface.sol"; -import "../lib/OrganizationInterface.sol"; -import "../lib/Organized.sol"; - -/** - * @title UtilityToken is an EIP20Token and implements UtilityTokenInterface. - * - * @notice This contract has increaseSupply and decreaseSupply functions that - * can be called only by CoGateway. - * - */ -contract UtilityToken is EIP20Token, Organized, UtilityTokenInterface { - - /* events */ - - /** Emitted whenever a CoGateway address is set */ - event CoGatewaySet(address _coGateway); - - - /* Storage */ - - /** Address of the EIP20 token (value token) in origin chain. */ - address public valueToken; - - /** Address of CoGateway contract. */ - address public coGateway; - - - /* Modifiers */ - - /** Checks that only CoGateway can call a particular function. */ - modifier onlyCoGateway() { - - require( - msg.sender == address(coGateway), - "Only CoGateway can call the function." - ); - - _; - } - - - /* Constructor */ - - /** - * @notice Contract constructor. - * - * @param _valueToken Address of value token. - * @param _symbol Symbol of value token. - * @param _name Name of value token. - * @param _decimals Decimal of value token. - * @param _organization Address of a contract that manages organization. - */ - constructor( - address _valueToken, - string memory _symbol, - string memory _name, - uint8 _decimals, - OrganizationInterface _organization - ) - public - Organized(_organization) - EIP20Token(_symbol, _name, _decimals) - { - require( - address(_valueToken) != address(0), - "Value token address should not be zero." - ); - - valueToken = _valueToken; - } - - - /* External functions */ - - /** - * @notice Sets the CoGateway contract address. This can be called only by - * an organization address. This can be set only once. - * - * @param _coGatewayAddress CoGateway contract address - * - * @return success_ `true` if CoGateway address was set - */ - function setCoGateway( - address _coGatewayAddress - ) - external - onlyOrganization - returns (bool success_) - { - require( - coGateway == address(0), - "CoGateway address is already set." - ); - - require( - _coGatewayAddress != address(0), - "CoGateway address should not be zero." - ); - - // protect against reentrancy by setting the coGateway - // before querying the contract. - coGateway = _coGatewayAddress; - - require( - CoGatewayUtilityTokenInterface(_coGatewayAddress).utilityToken() - == address(this), - "CoGateway should be linked with this utility token." - ); - - emit CoGatewaySet(coGateway); - - success_ = true; - } - - /** - * @notice Increases the total token supply. Also, adds the number of - * tokens to the beneficiary balance. - * - * @param _account Account address for which the balance will be increased. - This is payable so that it provides flexibility of - * transferring base token to account on increase supply. - * @param _amount Amount of tokens. - * - * @return success_ `true` if increase supply is successful, false otherwise. - */ - function increaseSupply( - address payable _account, - uint256 _amount - ) - external - onlyCoGateway - returns (bool success_) - { - success_ = increaseSupplyInternal(_account, _amount); - } - - /** - * @notice Decreases the token supply. - * - * @param _amount Amount of tokens. - * - * @return success_ `true` if decrease supply is successful, false otherwise. - */ - function decreaseSupply( - uint256 _amount - ) - external - onlyCoGateway - returns (bool success_) - { - success_ = decreaseSupplyInternal(_amount); - } - - /** - * @notice Checks if an address exists. - * - * @dev For standard ethereum all account addresses exist by default, - * so it returns true for all addresses. - * - * @return exists_ `true` for all given address - */ - function exists(address) external returns (bool exists_) { - exists_ = true; - } - - /** - * @notice Returns the value of valueToken. - * - * @dev This function supports previous versions of this contract's ABI - * that expect a public function, token, that returns the address - * of the value token. - */ - function token() - external - view - returns (address valueToken_) - { - valueToken_ = address(valueToken); - } - - /* Internal functions. */ - - /** - * @notice Internal function to increases the total token supply. - * - * @dev Adds number of tokens to beneficiary balance and increases the - * total token supply. - * - * @param _account Account address for which the balance will be increased. - * @param _amount Amount of tokens. - * - * @return success_ `true` if increase supply is successful, false otherwise. - */ - function increaseSupplyInternal( - address _account, - uint256 _amount - ) - internal - returns (bool success_) - { - // Increase the balance of the _account - balances[_account] = balances[_account].add(_amount); - totalTokenSupply = totalTokenSupply.add(_amount); - - /* - * Creation of the new tokens should trigger a Transfer event with - * _from as 0x0. - */ - emit Transfer(address(0), _account, _amount); - - success_ = true; - } - - /** - * @notice Internal function to decreases the token supply. - * - * @dev Decreases the token balance from the msg.sender address and - * decreases the total token supply count. - * - * @param _amount Amount of tokens. - * - * @return success_ `true` if decrease supply is successful, false otherwise. - */ - function decreaseSupplyInternal( - uint256 _amount - ) - internal - returns (bool success_) - { - require( - balances[msg.sender] >= _amount, - "Insufficient balance." - ); - - // Decrease the balance of the msg.sender account. - balances[msg.sender] = balances[msg.sender].sub(_amount); - totalTokenSupply = totalTokenSupply.sub(_amount); - - /* - * Burning of the tokens should trigger a Transfer event with _to - * as 0x0. - */ - emit Transfer(msg.sender, address(0), _amount); - - success_ = true; - } -} diff --git a/contracts/gateway/UtilityTokenInterface.sol b/contracts/gateway/UtilityTokenInterface.sol deleted file mode 100644 index b86c7af0..00000000 --- a/contracts/gateway/UtilityTokenInterface.sol +++ /dev/null @@ -1,87 +0,0 @@ -/* solhint-disable-next-line compiler-fixed */ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -/** - * @title UtilityTokenInterface contract. - * - * @notice Provides the interface to utility token contract. - */ -contract UtilityTokenInterface { - - - /* External functions */ - - /** - * @notice Increases the total token supply. - * - * @dev Adds number of tokens to beneficiary balance and increases the - * total token supply. - * - * @param _account Account address for which the balance will be increased. - * This is payable so that it provides flexibility of - * transferring base token to account on increase supply. - * @param _amount Amount of tokens. - * - * @return success_ `true` if increase supply is successful, false otherwise. - */ - function increaseSupply( - address payable _account, - uint256 _amount - ) - external - returns (bool success_); - - /** - * @notice Decreases the token supply. - * - * @dev Decreases the token balance from the msg.sender address and - * decreases the total token supply count. - * - * @param _amount Amount of tokens. - * - * @return success_ `true` if decrease supply is successful, false otherwise. - */ - function decreaseSupply(uint256 _amount) external returns (bool success_); - - /** - * @notice Sets the CoGateway contract address. - * - * @dev Function requires: - * - It is called by whitelisted workers. - * - coGateway address is set only once. - * - coGateway.utilityToken must match this contract. - * - * @param _coGateway CoGateway contract address. - * - */ - function setCoGateway(address _coGateway) external returns (bool); - - /** - * @notice Checks if an address exists. - * - * @param _actor Address that needs to be checked - * - * @return exists_ `true` if the address is allowed otherwise `false` - */ - function exists(address _actor) external returns (bool exists_); -} diff --git a/contracts/lib/MessageBus.sol b/contracts/lib/MessageBus.sol index f08779e7..28a995a5 100644 --- a/contracts/lib/MessageBus.sol +++ b/contracts/lib/MessageBus.sol @@ -21,7 +21,7 @@ pragma solidity ^0.5.0; // ---------------------------------------------------------------------------- import "./MerklePatriciaProof.sol"; -import "./SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./BytesLib.sol"; library MessageBus { diff --git a/contracts/lib/MetaBlock.sol b/contracts/lib/MetaBlock.sol index f47b2418..b6c9a9c8 100644 --- a/contracts/lib/MetaBlock.sol +++ b/contracts/lib/MetaBlock.sol @@ -20,7 +20,7 @@ pragma solidity ^0.5.0; // // ---------------------------------------------------------------------------- -import "../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** @title A meta-block of the meta-chain. */ library MetaBlock { diff --git a/contracts/lib/Organization.sol b/contracts/lib/Organization.sol deleted file mode 100644 index 1d75974d..00000000 --- a/contracts/lib/Organization.sol +++ /dev/null @@ -1,361 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -import "./SafeMath.sol"; -import "./OrganizationInterface.sol"; - - -/** - * @title Organization contract handles an organization and its workers. - * - * @notice The organization represents an entity that manages other contracts - * and therefore the `Organization.sol` contract holds all the keys - * required to administer the other contracts. - * This contract supports the notion of an "admin" that can act on - * behalf of the organization. When seen from the outside by consumers - * of the `OrganizationInterface`, a notion of an admin does not exist. - */ -contract Organization is OrganizationInterface { - - - /* Using */ - - using SafeMath for uint256; - - - /* Events */ - - /** Emitted when a current owner initiates a change of ownership. */ - event OwnershipTransferInitiated( - address indexed proposedOwner, - address currentOwner - ); - - /** Emitted when a new owner accepts the ownership transfer. */ - event OwnershipTransferCompleted(address newOwner, address previousOwner); - - /** Emitted whenever an owner or admin changes the address of the admin. */ - event AdminAddressChanged(address indexed newAdmin, address previousAdmin); - - /** Emitted when a worker address was set. */ - event WorkerSet(address indexed worker, uint256 expirationHeight); - - /** Emitted when a worker address is deleted from the contract. */ - event WorkerUnset(address worker); - - - /* Storage */ - - /** Address for which private key will be owned by the organization. */ - address public owner; - - /** - * Proposed Owner is the newly proposed address that was proposed by the - * current owner for ownership transfer. - */ - address public proposedOwner; - - /** - * Admin address set by owner to facilitate operations of an economy on - * behalf of the owner. - * While this contract includes details that regard the admin, e.g. a - * modifier, when looking at the `OrganizationInterface`, the existence of - * an admin is a concrete implementation detail and not known to the - * consumers of the interface. - */ - address public admin; - - /** - * Map of whitelisted worker addresses to their expiration block height. - */ - mapping(address => uint256) public workers; - - - /* Modifiers */ - - /** - * onlyOwner functions can only be called from the address that is - * registered as the owner. - */ - modifier onlyOwner() { - require( - msg.sender == owner, - "Only owner is allowed to call this method." - ); - - _; - } - - /** - * onlyOwnerOrAdmin functions can only be called from an address that is - * registered as owner or as admin. - */ - modifier onlyOwnerOrAdmin() { - require( - msg.sender == owner || msg.sender == admin, - "Only owner and admin are allowed to call this method." - ); - - _; - } - - - /* Constructor */ - - /** - * @notice Creates a new organization. When you first initialize the - * organization, you can specify owner, admin, and workers. The - * owner is mandatory as it will be the only address able to make - * all later changes. An admin and workers can be added at - * construction or they can be set by the owner later. - * - * @param _owner The address that shall be registered as the owner of the - * organization. - * @param _admin The address that shall be registered as the admin of the - * organization. Can be address(0) if no admin is desired. - * @param _workers An array of initial worker addresses. Can be an empty - * array if no workers are desired or known at construction. - * @param _expirationHeight If any workers are given, this will be the - * block height at which they expire. - */ - constructor( - address _owner, - address _admin, - address[] memory _workers, - uint256 _expirationHeight - ) - public - { - require( - _owner != address(0), - "The owner must not be the zero address." - ); - - owner = _owner; - admin = _admin; - - for(uint256 i = 0; i < _workers.length; i++) { - setWorkerInternal(_workers[i], _expirationHeight); - } - } - - - /* External Functions */ - - /** - * @notice Proposes a new owner of this contract. Ownership will not be - * transferred until the new, proposed owner accepts the proposal. - * Allows resetting of proposed owner to address(0). - * - * @param _proposedOwner Proposed owner address. - * - * @return success_ True on successful execution. - */ - function initiateOwnershipTransfer( - address _proposedOwner - ) - external - onlyOwner - returns (bool success_) - { - require( - _proposedOwner != owner, - "Proposed owner address can't be current owner address." - ); - - proposedOwner = _proposedOwner; - - emit OwnershipTransferInitiated(_proposedOwner, owner); - - success_ = true; - } - - /** - * @notice Complete ownership transfer to proposed owner. Must be called by - * the proposed owner. - * - * @return success_ True on successful execution. - */ - function completeOwnershipTransfer() external returns (bool success_) - { - require( - msg.sender == proposedOwner, - "Caller is not proposed owner address." - ); - - emit OwnershipTransferCompleted(proposedOwner, owner); - - owner = proposedOwner; - proposedOwner = address(0); - - success_ = true; - } - - /** - * @notice Sets the admin address. Can only be called by owner or current - * admin. If called by the current admin, adminship is transferred - * to the given address immediately. - * It is discouraged to set the admin address to be the same as the - * address of the owner. The point of the admin is to act on behalf - * of the organization without requiring the possibly very safely - * stored owner key(s). - * Admin can be set to `address(0)` if no admin is desired. - * - * @param _admin Admin address to be set. - * - * @return success_ True on successful execution. - */ - function setAdmin( - address _admin - ) - external - onlyOwnerOrAdmin - returns (bool success_) - { - /* - * If the address does not change, the call is considered a success, - * but we don't need to emit an event as it did not actually change. - */ - if (admin != _admin) { - emit AdminAddressChanged(_admin, admin); - admin = _admin; - } - - success_ = true; - } - - /** - * @notice Sets worker and its expiration block height. - * Admin/Owner has the flexibility to extend/reduce worker - * expiration height. This way, a worker activation/deactivation - * can be controlled without adding/removing worker keys. - * - * @param _worker Worker address to be added. - * @param _expirationHeight Expiration block height of worker. - * - * @return remainingBlocks_ Remaining number of blocks for which worker is - * active. - */ - function setWorker( - address _worker, - uint256 _expirationHeight - ) - external - onlyOwnerOrAdmin - { - setWorkerInternal(_worker, _expirationHeight); - } - - /** - * @notice Removes a worker. - * - * @param _worker Worker address to be removed. - * - * @return isUnset_ True if the worker existed else returns false. - */ - function unsetWorker( - address _worker - ) - external - onlyOwnerOrAdmin - returns (bool isUnset_) - { - if (workers[_worker] > 0) { - delete workers[_worker]; - emit WorkerUnset(_worker); - - isUnset_ = true; - } - } - - /** - * @notice Checks if an address is currently registered as the organization. - * - * @dev It is an implementation detail of this contract that the admin can - * act on behalf of the organization. To the outside, an "admin" - * doesn't exist. See also the `admin` storage variable. - * - * @param _organization Address to check. - * - * @return isOrganization_ True if the given address represents the - * organization. Returns false otherwise. - */ - function isOrganization( - address _organization - ) - external - view - returns (bool isOrganization_) - { - isOrganization_ = _organization == owner || _organization == admin; - } - - /** - * @notice Checks if an address is currently registered as an active worker. - * - * @param _worker Address to check. - * - * @return isWorker_ True if the worker is already added and expiration - * height is more than or equal to current block number. - * Returns false otherwise. - */ - function isWorker(address _worker) external view returns (bool isWorker_) - { - isWorker_ = workers[_worker] > block.number; - } - - - /* Private Functions */ - - /** - * @notice Sets worker and its expiration block height. If the worker - * already exists, then its expiration height will be overwritten - * with the given one. - * - * @param _worker Worker address to be added. - * @param _expirationHeight Expiration block height of worker. - * - * @return remainingBlocks_ Remaining number of blocks for which worker is - * active. - */ - function setWorkerInternal( - address _worker, - uint256 _expirationHeight - ) - private - { - require( - _worker != address(0), - "Worker address cannot be null." - ); - - require( - _expirationHeight > block.number, - "Expiration height must be in the future." - ); - - workers[_worker] = _expirationHeight; - - emit WorkerSet(_worker, _expirationHeight); - } - -} diff --git a/contracts/lib/OrganizationInterface.sol b/contracts/lib/OrganizationInterface.sol deleted file mode 100644 index ed7eccab..00000000 --- a/contracts/lib/OrganizationInterface.sol +++ /dev/null @@ -1,54 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -/** - * @title OrganizationInterface provides methods to check if an address is - * currently registered as an active participant in the organization. - */ -interface OrganizationInterface { - - /** - * @notice Checks if an address is currently registered as the organization. - * - * @param _organization Address to check. - * - * @return isOrganization_ True if the given address represents the - * organization. Returns false otherwise. - */ - function isOrganization( - address _organization - ) - external - view - returns (bool isOrganization_); - - /** - * @notice Checks if an address is currently registered as an active worker. - * - * @param _worker Address to check. - * - * @return isWorker_ True if the given address is a registered, active - * worker. Returns false otherwise. - */ - function isWorker(address _worker) external view returns (bool isWorker_); - -} diff --git a/contracts/lib/Organized.sol b/contracts/lib/Organized.sol deleted file mode 100644 index f759b01a..00000000 --- a/contracts/lib/Organized.sol +++ /dev/null @@ -1,79 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -import "./OrganizationInterface.sol"; - -/** - * @title Organized contract. - * - * @notice The Organized contract facilitates integration of - * organization administration keys with different contracts. - */ -contract Organized { - - - /* Storage */ - - /** Organization which holds all the keys needed to administer the economy. */ - OrganizationInterface public organization; - - - /* Modifiers */ - - modifier onlyOrganization() - { - require( - organization.isOrganization(msg.sender), - "Only the organization is allowed to call this method." - ); - - _; - } - - modifier onlyWorker() - { - require( - organization.isWorker(msg.sender), - "Only whitelisted workers are allowed to call this method." - ); - - _; - } - - - /* Constructor */ - - /** - * @notice Sets the address of the organization contract. - * - * @param _organization A contract that manages worker keys. - */ - constructor(OrganizationInterface _organization) public { - require( - address(_organization) != address(0), - "Organization contract address must not be zero." - ); - - organization = _organization; - } - -} diff --git a/contracts/lib/SafeMath.sol b/contracts/lib/SafeMath.sol deleted file mode 100644 index 755b950b..00000000 --- a/contracts/lib/SafeMath.sol +++ /dev/null @@ -1,143 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// Based on the SafeMath library by the OpenZeppelin team. -// Copyright (c) 2018 Smart Contract Solutions, Inc. -// https://github.com/OpenZeppelin/zeppelin-solidity -// The MIT License. -// ---------------------------------------------------------------------------- - - -/** - * @title SafeMath library. - * - * @notice Based on the SafeMath library by the OpenZeppelin team. - * - * @dev Math operations with safety checks that revert on error. - */ -library SafeMath { - - /* Internal Functions */ - - /** - * @notice Multiplies two numbers, reverts on overflow. - * - * @param a Unsigned integer multiplicand. - * @param b Unsigned integer multiplier. - * - * @return uint256 Product. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - /* - * Gas optimization: this is cheaper than requiring 'a' not being zero, - * but the benefit is lost if 'b' is also tested. - * See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - */ - if (a == 0) { - return 0; - } - - uint256 c = a * b; - require( - c / a == b, - "Overflow when multiplying." - ); - - return c; - } - - /** - * @notice Integer division of two numbers truncating the quotient, reverts - * on division by zero. - * - * @param a Unsigned integer dividend. - * @param b Unsigned integer divisor. - * - * @return uint256 Quotient. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - // Solidity only automatically asserts when dividing by 0. - require( - b > 0, - "Cannot do attempted division by less than or equal to zero." - ); - uint256 c = a / b; - - // There is no case in which the following doesn't hold: - // assert(a == b * c + a % b); - - return c; - } - - /** - * @notice Subtracts two numbers, reverts on underflow (i.e. if subtrahend - * is greater than minuend). - * - * @param a Unsigned integer minuend. - * @param b Unsigned integer subtrahend. - * - * @return uint256 Difference. - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - require( - b <= a, - "Underflow when subtracting." - ); - uint256 c = a - b; - - return c; - } - - /** - * @notice Adds two numbers, reverts on overflow. - * - * @param a Unsigned integer augend. - * @param b Unsigned integer addend. - * - * @return uint256 Sum. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 c = a + b; - require( - c >= a, - "Overflow when adding." - ); - - return c; - } - - /** - * @notice Divides two numbers and returns the remainder (unsigned integer - * modulo), reverts when dividing by zero. - * - * @param a Unsigned integer dividend. - * @param b Unsigned integer divisor. - * - * @return uint256 Remainder. - */ - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - require( - b != 0, - "Cannot do attempted division by zero (in `mod()`)." - ); - - return a % b; - } -} diff --git a/contracts/test/gateway/MockEIP20CoGateway.sol b/contracts/test/gateway/MockEIP20CoGateway.sol index 38e498bc..02151f13 100644 --- a/contracts/test/gateway/MockEIP20CoGateway.sol +++ b/contracts/test/gateway/MockEIP20CoGateway.sol @@ -20,7 +20,7 @@ pragma solidity ^0.5.0; // // ---------------------------------------------------------------------------- -import "../../gateway/CoGatewayUtilityTokenInterface.sol"; +import "../../utilitytoken/contracts/CoGatewayUtilityTokenInterface.sol"; /** * @title MockEIP20CoGateway contract. diff --git a/contracts/test/gateway/MockGatewayBase.sol b/contracts/test/gateway/MockGatewayBase.sol index ed6ff62b..c5717358 100644 --- a/contracts/test/gateway/MockGatewayBase.sol +++ b/contracts/test/gateway/MockGatewayBase.sol @@ -2,7 +2,7 @@ pragma solidity ^0.5.0; import "../lib/MockGatewayLib.sol"; import "../../gateway/GatewayBase.sol"; -import "../../lib/OrganizationInterface.sol"; +import "../../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; import "../../lib/StateRootInterface.sol"; /** diff --git a/contracts/test/gateway/MockToken.sol b/contracts/test/gateway/MockToken.sol index c6a9447e..e2a0e84e 100644 --- a/contracts/test/gateway/MockToken.sol +++ b/contracts/test/gateway/MockToken.sol @@ -13,9 +13,9 @@ pragma solidity ^0.5.0; // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ---------------------------------------------------------------------------- -// Contracts: MockToken +// Contracts: MockToken // // http://www.simpletoken.org/ // @@ -24,7 +24,7 @@ pragma solidity ^0.5.0; import "./MockTokenConfig.sol"; import "../../lib/EIP20Interface.sol"; -import "../../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; contract MockToken is EIP20Interface, MockTokenConfig { diff --git a/contracts/test/gateway/MockUtilityToken.sol b/contracts/test/gateway/MockUtilityToken.sol deleted file mode 100644 index 8292c8c1..00000000 --- a/contracts/test/gateway/MockUtilityToken.sol +++ /dev/null @@ -1,100 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -import "../../gateway/UtilityToken.sol"; - -/** - * @title MockUtilityToken contract. - * - * @notice This contract is used to mock certain functions of UtilityToken - * contract. - */ -contract MockUtilityToken is UtilityToken { - - // Total initial balance of the deployer. - uint256 constant INITIAL_BALANCE = 1000000000000000000; - - // This variable is used to mock the return of function exists() - bool existsValue; - - /* Constructor */ - - /** - * @notice Constructor. - * - * @dev This is used for testing only. - * - * @param _valueToken Address of value token. - * @param _symbol Symbol of value token. - * @param _name Name of value token. - * @param _decimals Decimal of value token. - * @param _organization Address of a contract that manages organization. - */ - constructor( - address _valueToken, - string memory _symbol, - string memory _name, - uint8 _decimals, - OrganizationInterface _organization - ) - public - UtilityToken(_valueToken, _symbol, _name, _decimals, _organization) - { - balances[msg.sender] = INITIAL_BALANCE; - totalTokenSupply = totalTokenSupply.add(INITIAL_BALANCE); - - existsValue = true; - } - - /** - * @notice Checks if the given address is registered in the economy - * - * @dev This function is overridden to mock return value for exists - * function for testing. - * - * @return exists_ `true` if the address is registered in the economy, - * otherwise `false` - */ - function exists(address) external returns (bool exists_) { - exists_ = existsValue; - } - - /** - * @notice Set the CoGateway address for testing. - * - * @param _coGatewayAddress CoGateway address. - */ - function setCoGatewayAddress(address _coGatewayAddress) external { - coGateway = _coGatewayAddress; - } - - /** - * @notice Set the addressExists variable to mock return value of - * function exists(). This is only for testing. - * - * @param _exists Boolean value - */ - function setExists(bool _exists) external { - existsValue = _exists; - } - -} diff --git a/contracts/test/gateway/TestGatewayBase.sol b/contracts/test/gateway/TestGatewayBase.sol index be2a36ab..2368d735 100644 --- a/contracts/test/gateway/TestGatewayBase.sol +++ b/contracts/test/gateway/TestGatewayBase.sol @@ -21,7 +21,7 @@ pragma solidity ^0.5.0; // ---------------------------------------------------------------------------- import "../../gateway/GatewayBase.sol"; -import "../../lib/OrganizationInterface.sol"; +import "../../utilitytoken/contracts/organization/contracts/OrganizationInterface.sol"; import "../../lib/StateRootInterface.sol"; /** diff --git a/contracts/test/gateway/TestUtilityToken.sol b/contracts/test/gateway/TestUtilityToken.sol deleted file mode 100644 index 14afac2e..00000000 --- a/contracts/test/gateway/TestUtilityToken.sol +++ /dev/null @@ -1,82 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -import "../../gateway/UtilityToken.sol"; - -/** - * @title TestUtilityToken contract - * - * @notice This contract is used to mock certain functions of UtilityToken - * contract. - */ -contract TestUtilityToken is UtilityToken { - - /* Constructor */ - - /** - * @dev This is used for testing by mocking certain variables. - * - * @param _valueToken Address of value token. - * @param _symbol Symbol of value token. - * @param _name Name of value token. - * @param _decimals Decimal of value token. - * @param _organization Address of an organization contract. - */ - constructor( - address _valueToken, - string memory _symbol, - string memory _name, - uint8 _decimals, - OrganizationInterface _organization - ) - public - UtilityToken(_valueToken, _symbol, _name, _decimals, _organization) - {} - - /** - * @notice Set the CoGateway address for testing. - * - * @param _coGatewayAddress CoGateway address. - */ - function setCoGatewayAddress(address _coGatewayAddress) public { - coGateway = _coGatewayAddress; - } - - /** - * @notice Set the balance of an account address for testing. - * - * @param _account Address of an account for which the balance is to be set. - * @param _balance The balance amount that should be set for the account. - */ - function setBalance(address _account, uint256 _balance) public { - balances[_account] = _balance; - } - - /** - * @notice Set the total supply count for testing. - * - * @param _amount The supply amount. - */ - function setTotalSupply(uint256 _amount) public { - totalTokenSupply = _amount; - } -} diff --git a/contracts/test/lib/MockMessageBus.sol b/contracts/test/lib/MockMessageBus.sol index 56a7307c..75b80738 100644 --- a/contracts/test/lib/MockMessageBus.sol +++ b/contracts/test/lib/MockMessageBus.sol @@ -21,7 +21,7 @@ pragma solidity ^0.5.0; // ---------------------------------------------------------------------------- import "./MockMerklePatriciaProof.sol"; -import "../../lib/SafeMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../../lib/BytesLib.sol"; library MockMessageBus { diff --git a/contracts/test/lib/MockOrganization.sol b/contracts/test/lib/MockOrganization.sol deleted file mode 100644 index fe4eab16..00000000 --- a/contracts/test/lib/MockOrganization.sol +++ /dev/null @@ -1,87 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -import "../../lib/OrganizationInterface.sol"; - -/** - * @title Mocks an organization interface implementation. - * - * @notice The only valid registered owner and worker are given at - * construction and cannot be changed or removed. - */ -contract MockOrganization is OrganizationInterface { - - - /* Storage */ - - /** The address of the registered owner. */ - address owner; - - /** The address of the registered worker. */ - address worker; - - - /* Constructor */ - - /** - * @notice Sets the address of the owner and the worker. - * - * @param _owner Address that should be used as a registered owner. - * @param _worker Address that should be used as a registered worker. - */ - constructor(address _owner, address _worker) public { - owner = _owner; - worker = _worker; - } - - - /* External functions */ - - /** - * @notice Checks if an address is currently registered as the organization. - * - * @param _organization Address to check. - * - * @return isOrganization_ True if the given address represents the - * organization. Returns false otherwise. - */ - function isOrganization( - address _organization - ) - external - view - returns (bool isOrganization_) - { - isOrganization_ = owner == _organization; - } - - /** - * @notice Checks if an address is currently registered as an active worker. - * - * @param _worker Address to check. - * - * @return isWorker_ True if the given address is a registered worker. - */ - function isWorker(address _worker) external view returns (bool isWorker_) { - isWorker_ = worker == _worker; - } -} diff --git a/contracts/test/lib/TestSafeMath.sol b/contracts/test/lib/TestSafeMath.sol deleted file mode 100644 index df46c920..00000000 --- a/contracts/test/lib/TestSafeMath.sol +++ /dev/null @@ -1,86 +0,0 @@ -pragma solidity ^0.5.0; - -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// Common: SafeMath Library Implementation -// -// http://www.simpletoken.org/ -// -// Based on the SafeMath library by the OpenZeppelin team. -// Copyright (c) 2016 Smart Contract Solutions, Inc. -// https://github.com/OpenZeppelin/zeppelin-solidity -// The MIT License. -// ---------------------------------------------------------------------------- - -import "../../lib/SafeMath.sol"; - -/** - * @title TestSafeMath library. - * - * @notice Based on the SafeMath library by the OpenZeppelin team. - * Mock used for testing. - */ -contract TestSafeMath { - - /** Storage */ - - uint256 public result; - - /* Public functions */ - - /** - * @notice Public function multiply. - * - * @dev Public wrapper for SafeMath function mul. - * - * @param a Unsigned integer multiplicand. - * @param b Unsigned integer multiplier. - * - * @return uint256 Product. - */ - function multiply(uint256 a, uint256 b) public { - result = SafeMath.mul(a, b); - } - - /** - * @notice Public function subtract. - * - * @dev Public wrapper for SafeMath function sub. - * - * @param a Unsigned integer minuend. - * @param b Unsigned integer subtrahend. - * - * @return uint256 Difference. - */ - function subtract(uint256 a, uint256 b) public { - result = SafeMath.sub(a, b); - } - - /** - * @notice Public function add. - * - * @dev Public wrapper for SafeMath function add. - * - * @param a Unsigned integer augend. - * @param b Unsigned integer addend. - * - * @return uint256 Sum. - */ - function add(uint256 a, uint256 b) public { - result = SafeMath.add(a, b); - } -} - diff --git a/contracts/utilitytoken b/contracts/utilitytoken new file mode 160000 index 00000000..621ca497 --- /dev/null +++ b/contracts/utilitytoken @@ -0,0 +1 @@ +Subproject commit 621ca497990a6ff0dfb174668b38779f91cf938c diff --git a/package-lock.json b/package-lock.json index 9cb7834c..7603c21a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", "dev": true, "requires": { - "@babel/highlight": "7.0.0" + "@babel/highlight": "^7.0.0" } }, "@babel/highlight": { @@ -19,9 +19,9 @@ "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", "dev": true, "requires": { - "chalk": "2.4.2", - "esutils": "2.0.2", - "js-tokens": "4.0.0" + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@types/node": { @@ -42,7 +42,7 @@ "integrity": "sha512-y2OKSEW4gf2838Eavc56vQY9V46zaXkf3Jl1WpTfUBbzAVrXSr4JRZAAWv55Tv9s5WNz1rVgBgz5d2aJIL1QCg==", "dev": true, "requires": { - "web3": "0.18.4" + "web3": "^0.18.4" }, "dependencies": { "web3": { @@ -51,11 +51,11 @@ "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "crypto-js": "3.1.8", - "utf8": "2.1.2", - "xhr2": "0.1.4", - "xmlhttprequest": "1.8.0" + "bignumber.js": "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "crypto-js": "^3.1.4", + "utf8": "^2.1.1", + "xhr2": "*", + "xmlhttprequest": "*" } } } @@ -66,7 +66,7 @@ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "dev": true, "requires": { - "mime-types": "2.1.24", + "mime-types": "~2.1.18", "negotiator": "0.6.1" } }, @@ -94,10 +94,10 @@ "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "amdefine": { @@ -125,7 +125,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.3" + "color-convert": "^1.9.0" } }, "any-promise": { @@ -140,7 +140,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "array-flatten": { @@ -155,7 +155,7 @@ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "~2.1.0" } }, "asn1.js": { @@ -164,9 +164,9 @@ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.1", - "minimalistic-assert": "1.0.1" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -198,7 +198,7 @@ }, "async": { "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, @@ -244,11 +244,12 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "bignumber.js": { "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "from": "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", "dev": true }, "bindings": { @@ -266,8 +267,8 @@ "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", "dev": true, "requires": { - "readable-stream": "2.3.6", - "safe-buffer": "5.1.2" + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" } }, "block-stream": { @@ -276,7 +277,7 @@ "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "requires": { - "inherits": "2.0.1" + "inherits": "~2.0.0" } }, "bluebird": { @@ -298,15 +299,15 @@ "dev": true, "requires": { "bytes": "3.0.0", - "content-type": "1.0.4", + "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "1.1.2", - "http-errors": "1.6.3", + "depd": "~1.1.2", + "http-errors": "~1.6.3", "iconv-lite": "0.4.23", - "on-finished": "2.3.0", + "on-finished": "~2.3.0", "qs": "6.5.2", "raw-body": "2.3.3", - "type-is": "1.6.16" + "type-is": "~1.6.16" }, "dependencies": { "debug": { @@ -324,7 +325,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ms": { @@ -341,7 +342,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -359,16 +360,16 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "browserify-cipher": { @@ -377,9 +378,9 @@ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "browserify-aes": "1.2.0", - "browserify-des": "1.0.2", - "evp_bytestokey": "1.0.3" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { @@ -388,20 +389,20 @@ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "4.11.8", - "randombytes": "2.1.0" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sha3": { @@ -410,8 +411,8 @@ "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", "dev": true, "requires": { - "js-sha3": "0.6.1", - "safe-buffer": "5.1.2" + "js-sha3": "^0.6.1", + "safe-buffer": "^5.1.1" } }, "browserify-sign": { @@ -420,13 +421,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "elliptic": "6.4.1", - "inherits": "2.0.1", - "parse-asn1": "5.1.4" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, "buffer": { @@ -435,8 +436,8 @@ "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", "dev": true, "requires": { - "base64-js": "1.3.0", - "ieee754": "1.1.13" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" } }, "buffer-alloc": { @@ -445,8 +446,8 @@ "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, "requires": { - "buffer-alloc-unsafe": "1.1.0", - "buffer-fill": "1.0.0" + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" } }, "buffer-alloc-unsafe": { @@ -497,12 +498,12 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, @@ -524,12 +525,12 @@ "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", "dev": true, "requires": { - "assertion-error": "1.1.0", - "check-error": "1.0.2", - "deep-eql": "3.0.1", - "get-func-name": "2.0.0", - "pathval": "1.1.0", - "type-detect": "4.0.8" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" } }, "chalk": { @@ -538,9 +539,9 @@ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "chardet": { @@ -561,8 +562,8 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "circular-json": { @@ -577,7 +578,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-width": { @@ -592,9 +593,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -609,7 +610,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -618,9 +619,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -629,7 +630,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -667,7 +668,7 @@ "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "dev": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "command-exists": { @@ -736,8 +737,8 @@ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, "requires": { - "object-assign": "4.1.1", - "vary": "1.1.2" + "object-assign": "^4", + "vary": "^1" } }, "create-ecdh": { @@ -746,35 +747,35 @@ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.1" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-hash": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.1", - "md5.js": "1.3.5", - "ripemd160": "2.0.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, "create-hmac": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "inherits": "2.0.1", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "cross-spawn": { @@ -783,11 +784,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "1.0.5", - "path-key": "2.0.1", - "semver": "5.7.0", - "shebang-command": "1.2.0", - "which": "1.3.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-browserify": { @@ -796,17 +797,17 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "1.0.1", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.3", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "diffie-hellman": "5.0.3", - "inherits": "2.0.1", - "pbkdf2": "3.0.17", - "public-encrypt": "4.0.3", - "randombytes": "2.1.0", - "randomfill": "1.0.4" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" } }, "crypto-js": { @@ -821,7 +822,7 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "death": { @@ -836,7 +837,7 @@ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "ms": "2.1.1" + "ms": "^2.1.1" } }, "decamelize": { @@ -857,14 +858,14 @@ "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", "dev": true, "requires": { - "decompress-tar": "4.1.1", - "decompress-tarbz2": "4.1.1", - "decompress-targz": "4.1.1", - "decompress-unzip": "4.0.1", - "graceful-fs": "4.1.15", - "make-dir": "1.3.0", - "pify": "2.3.0", - "strip-dirs": "2.1.0" + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" } }, "decompress-response": { @@ -873,7 +874,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "1.0.1" + "mimic-response": "^1.0.0" } }, "decompress-tar": { @@ -882,9 +883,9 @@ "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", "dev": true, "requires": { - "file-type": "5.2.0", - "is-stream": "1.1.0", - "tar-stream": "1.6.2" + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" } }, "decompress-tarbz2": { @@ -893,11 +894,11 @@ "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", "dev": true, "requires": { - "decompress-tar": "4.1.1", - "file-type": "6.2.0", - "is-stream": "1.1.0", - "seek-bzip": "1.0.5", - "unbzip2-stream": "1.3.3" + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" }, "dependencies": { "file-type": { @@ -914,9 +915,9 @@ "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", "dev": true, "requires": { - "decompress-tar": "4.1.1", - "file-type": "5.2.0", - "is-stream": "1.1.0" + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" } }, "decompress-unzip": { @@ -925,10 +926,10 @@ "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", "dev": true, "requires": { - "file-type": "3.9.0", - "get-stream": "2.3.1", - "pify": "2.3.0", - "yauzl": "2.10.0" + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" }, "dependencies": { "file-type": { @@ -943,8 +944,8 @@ "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", "dev": true, "requires": { - "object-assign": "4.1.1", - "pinkie-promise": "2.0.1" + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" } } } @@ -955,7 +956,7 @@ "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "type-detect": "4.0.8" + "type-detect": "^4.0.0" } }, "deep-is": { @@ -970,7 +971,7 @@ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "object-keys": "1.1.1" + "object-keys": "^1.0.12" } }, "delayed-stream": { @@ -991,8 +992,8 @@ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "dev": true, "requires": { - "inherits": "2.0.1", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "destroy": { @@ -1009,13 +1010,13 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.1.0" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, "doctrine": { @@ -1024,7 +1025,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-walk": { @@ -1045,8 +1046,8 @@ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "requires": { - "jsbn": "0.1.1", - "safer-buffer": "2.1.2" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "ee-first": { @@ -1061,13 +1062,13 @@ "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.7", - "hmac-drbg": "1.0.1", - "inherits": "2.0.1", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } }, "emoji-regex": { @@ -1088,7 +1089,7 @@ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "error-ex": { @@ -1097,7 +1098,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -1106,12 +1107,12 @@ "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "dev": true, "requires": { - "es-to-primitive": "1.2.0", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.4", - "is-regex": "1.0.4", - "object-keys": "1.1.1" + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" } }, "es-to-primitive": { @@ -1120,9 +1121,9 @@ "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", "dev": true, "requires": { - "is-callable": "1.1.4", - "is-date-object": "1.0.1", - "is-symbol": "1.0.2" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, "escape-html": { @@ -1143,11 +1144,11 @@ "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "dev": true, "requires": { - "esprima": "2.7.3", - "estraverse": "1.9.3", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.2.0" + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" }, "dependencies": { "esprima": { @@ -1169,7 +1170,7 @@ "dev": true, "optional": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -1180,43 +1181,43 @@ "integrity": "sha512-HpqzC+BHULKlnPwWae9MaVZ5AXJKpkxCVXQHrFaRw3hbDj26V/9ArYM4Rr/SQ8pi6qUPLXSSXC4RBJlyq2Z2OQ==", "dev": true, "requires": { - "@babel/code-frame": "7.0.0", - "ajv": "6.10.0", - "chalk": "2.4.2", - "cross-spawn": "6.0.5", - "debug": "4.1.1", - "doctrine": "2.1.0", - "eslint-scope": "4.0.3", - "eslint-utils": "1.3.1", - "eslint-visitor-keys": "1.0.0", - "espree": "5.0.1", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.3", - "globals": "11.11.0", - "ignore": "4.0.6", - "imurmurhash": "0.1.4", - "inquirer": "6.2.1", - "js-yaml": "3.13.1", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.11", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.3", - "regexpp": "2.0.1", - "require-uncached": "1.0.3", - "semver": "5.7.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "5.2.3", - "text-table": "0.2.0" + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "imurmurhash": "^0.1.4", + "inquirer": "^6.1.0", + "js-yaml": "^3.12.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.0.2", + "text-table": "^0.2.0" } }, "eslint-config-airbnb-base": { @@ -1225,9 +1226,9 @@ "integrity": "sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw==", "dev": true, "requires": { - "eslint-restricted-globals": "0.1.1", - "object.assign": "4.1.0", - "object.entries": "1.1.0" + "eslint-restricted-globals": "^0.1.1", + "object.assign": "^4.1.0", + "object.entries": "^1.0.4" } }, "eslint-import-resolver-node": { @@ -1236,8 +1237,8 @@ "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "2.6.9", - "resolve": "1.10.1" + "debug": "^2.6.9", + "resolve": "^1.5.0" }, "dependencies": { "debug": { @@ -1263,8 +1264,8 @@ "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", "dev": true, "requires": { - "debug": "2.6.9", - "pkg-dir": "2.0.0" + "debug": "^2.6.8", + "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { @@ -1290,16 +1291,16 @@ "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", "dev": true, "requires": { - "contains-path": "0.1.0", - "debug": "2.6.9", + "contains-path": "^0.1.0", + "debug": "^2.6.8", "doctrine": "1.5.0", - "eslint-import-resolver-node": "0.3.2", - "eslint-module-utils": "2.4.0", - "has": "1.0.3", - "lodash": "4.17.11", - "minimatch": "3.0.4", - "read-pkg-up": "2.0.0", - "resolve": "1.10.1" + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" }, "dependencies": { "debug": { @@ -1313,12 +1314,12 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } }, "ms": { @@ -1341,8 +1342,8 @@ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-utils": { @@ -1363,9 +1364,9 @@ "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", "dev": true, "requires": { - "acorn": "6.1.1", - "acorn-jsx": "5.0.1", - "eslint-visitor-keys": "1.0.0" + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" } }, "esprima": { @@ -1380,7 +1381,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -1389,7 +1390,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -1416,8 +1417,8 @@ "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", "dev": true, "requires": { - "idna-uts46-hx": "2.3.1", - "js-sha3": "0.5.7" + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" }, "dependencies": { "js-sha3": { @@ -1434,13 +1435,13 @@ "integrity": "sha512-B8czsfkJYzn2UIEMwjc7Mbj+Cy72V+/OXH/tb44LV8jhrjizQJJ325xMOMyk3+ETa6r6oi0jsUY14+om8mQMWA==", "dev": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.1", - "keccakjs": "0.2.3", - "nano-json-stream-parser": "0.1.2", - "servify": "0.1.12", - "ws": "3.3.3", - "xhr-request-promise": "0.1.2" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "keccakjs": "^0.2.1", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" } }, "ethereumjs-testrpc-sc": { @@ -1449,7 +1450,7 @@ "integrity": "sha512-iv2qiGBFgk9mn5Nq2enX8dG5WQ7Lk+FCqpnxfPfH4Ns8KLPwttmNOy264nh3SXDJJvcQwz/XnlLteDQVILotbg==", "dev": true, "requires": { - "source-map-support": "0.5.12" + "source-map-support": "^0.5.3" } }, "ethers": { @@ -1458,9 +1459,9 @@ "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", "dev": true, "requires": { - "@types/node": "10.14.5", + "@types/node": "^10.3.2", "aes-js": "3.0.0", - "bn.js": "4.11.8", + "bn.js": "^4.4.0", "elliptic": "6.3.3", "hash.js": "1.1.3", "js-sha3": "0.5.7", @@ -1476,10 +1477,10 @@ "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "inherits": "2.0.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" } }, "hash.js": { @@ -1488,8 +1489,8 @@ "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" }, "dependencies": { "inherits": { @@ -1514,7 +1515,7 @@ }, "uuid": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", "dev": true } @@ -1550,8 +1551,8 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "1.3.5", - "safe-buffer": "5.1.2" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, "execa": { @@ -1560,13 +1561,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -1575,9 +1576,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.5", - "shebang-command": "1.2.0", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -1588,36 +1589,36 @@ "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", "dev": true, "requires": { - "accepts": "1.3.5", + "accepts": "~1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.3", "content-disposition": "0.5.2", - "content-type": "1.0.4", + "content-type": "~1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "1.1.2", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "etag": "1.8.1", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", "finalhandler": "1.1.1", "fresh": "0.5.2", "merge-descriptors": "1.0.1", - "methods": "1.1.2", - "on-finished": "2.3.0", - "parseurl": "1.3.3", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.5", + "proxy-addr": "~2.0.4", "qs": "6.5.2", - "range-parser": "1.2.0", + "range-parser": "~1.2.0", "safe-buffer": "5.1.2", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", - "statuses": "1.4.0", - "type-is": "1.6.16", + "statuses": "~1.4.0", + "type-is": "~1.6.16", "utils-merge": "1.0.1", - "vary": "1.1.2" + "vary": "~1.1.2" }, "dependencies": { "debug": { @@ -1655,9 +1656,9 @@ "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", "dev": true, "requires": { - "chardet": "0.7.0", - "iconv-lite": "0.4.24", - "tmp": "0.0.33" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" } }, "extsprintf": { @@ -1690,7 +1691,7 @@ "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "requires": { - "pend": "1.2.0" + "pend": "~1.2.0" } }, "figures": { @@ -1699,7 +1700,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -1708,8 +1709,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.4", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "file-type": { @@ -1726,17 +1727,17 @@ }, "finalhandler": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "dev": true, "requires": { "debug": "2.6.9", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.3", - "statuses": "1.4.0", - "unpipe": "1.0.0" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" }, "dependencies": { "debug": { @@ -1768,7 +1769,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -1777,10 +1778,10 @@ "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", "dev": true, "requires": { - "circular-json": "0.3.3", - "graceful-fs": "4.1.15", - "rimraf": "2.6.3", - "write": "0.2.1" + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" } }, "for-each": { @@ -1789,7 +1790,7 @@ "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "requires": { - "is-callable": "1.1.4" + "is-callable": "^1.1.3" } }, "forever-agent": { @@ -1804,9 +1805,9 @@ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.7", - "mime-types": "2.1.24" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" } }, "forwarded": { @@ -1833,11 +1834,11 @@ "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "jsonfile": "2.4.0", - "klaw": "1.3.1", - "path-is-absolute": "1.0.1", - "rimraf": "2.6.3" + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" } }, "fs-promise": { @@ -1846,10 +1847,10 @@ "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", "dev": true, "requires": { - "any-promise": "1.3.0", - "fs-extra": "2.1.2", - "mz": "2.7.0", - "thenify-all": "1.6.0" + "any-promise": "^1.3.0", + "fs-extra": "^2.0.0", + "mz": "^2.6.0", + "thenify-all": "^1.6.0" }, "dependencies": { "fs-extra": { @@ -1858,8 +1859,8 @@ "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "jsonfile": "2.4.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" } } } @@ -1876,10 +1877,10 @@ "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "inherits": "2.0.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.3" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" } }, "function-bind": { @@ -1900,7 +1901,7 @@ "integrity": "sha512-yXzteu4SIgUL31mnpm9j+x6dpHUw0p/nsRVkcySKq0w+1vDxH9jMErP1QhZAJuTVE6ni4nfvGSNkaQx5cD3jfg==", "dev": true, "requires": { - "source-map-support": "0.5.12" + "source-map-support": "^0.5.3" } }, "get-caller-file": { @@ -1927,7 +1928,7 @@ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -1936,12 +1937,12 @@ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.1", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "global": { @@ -1950,8 +1951,8 @@ "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "dev": true, "requires": { - "min-document": "2.19.0", - "process": "0.5.2" + "min-document": "^2.19.0", + "process": "~0.5.1" } }, "globals": { @@ -1966,20 +1967,20 @@ "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", "dev": true, "requires": { - "decompress-response": "3.3.0", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-plain-obj": "1.1.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "isurl": "1.0.0", - "lowercase-keys": "1.0.1", - "p-cancelable": "0.3.0", - "p-timeout": "1.2.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "url-parse-lax": "1.0.0", - "url-to-options": "1.0.1" + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" } }, "graceful-fs": { @@ -2006,10 +2007,10 @@ "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", "dev": true, "requires": { - "neo-async": "2.6.0", - "optimist": "0.6.1", - "source-map": "0.6.1", - "uglify-js": "3.5.7" + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" } }, "har-schema": { @@ -2024,8 +2025,8 @@ "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { - "ajv": "6.10.0", - "har-schema": "2.0.0" + "ajv": "^6.5.5", + "har-schema": "^2.0.0" } }, "has": { @@ -2034,7 +2035,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -2043,7 +2044,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -2078,7 +2079,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "1.4.2" + "has-symbol-support-x": "^1.4.1" } }, "hash-base": { @@ -2087,8 +2088,8 @@ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "hash.js": { @@ -2097,8 +2098,8 @@ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" }, "dependencies": { "inherits": { @@ -2121,9 +2122,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "1.1.7", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "hosted-git-info": { @@ -2134,14 +2135,14 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dev": true, "requires": { - "depd": "1.1.2", + "depd": "~1.1.2", "inherits": "2.0.3", "setprototypeof": "1.1.0", - "statuses": "1.5.0" + "statuses": ">= 1.4.0 < 2" }, "dependencies": { "inherits": { @@ -2164,9 +2165,9 @@ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.16.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "iconv-lite": { @@ -2175,7 +2176,7 @@ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "idna-uts46-hx": { @@ -2219,8 +2220,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -2235,19 +2236,19 @@ "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", "dev": true, "requires": { - "ansi-escapes": "3.2.0", - "chalk": "2.4.2", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "3.0.3", - "figures": "2.0.0", - "lodash": "4.17.11", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.10", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rxjs": "6.5.1", - "string-width": "2.1.1", - "strip-ansi": "5.2.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -2262,7 +2263,7 @@ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "4.1.0" + "ansi-regex": "^4.1.0" } } } @@ -2351,7 +2352,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.3" + "has": "^1.0.1" } }, "is-retry-allowed": { @@ -2372,7 +2373,7 @@ "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", "dev": true, "requires": { - "has-symbols": "1.0.0" + "has-symbols": "^1.0.0" } }, "is-typedarray": { @@ -2411,20 +2412,20 @@ "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", "dev": true, "requires": { - "abbrev": "1.0.9", - "async": "1.5.2", - "escodegen": "1.8.1", - "esprima": "2.7.3", - "glob": "5.0.15", - "handlebars": "4.1.2", - "js-yaml": "3.13.1", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "once": "1.4.0", - "resolve": "1.1.7", - "supports-color": "3.2.3", - "which": "1.3.1", - "wordwrap": "1.0.0" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" }, "dependencies": { "esprima": { @@ -2439,11 +2440,11 @@ "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "dev": true, "requires": { - "inflight": "1.0.6", - "inherits": "2.0.1", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-flag": { @@ -2464,7 +2465,7 @@ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -2475,8 +2476,8 @@ "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "1.4.1", - "is-object": "1.0.1" + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, "js-sha3": { @@ -2497,8 +2498,8 @@ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "jsbn": { @@ -2533,11 +2534,11 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { - "graceful-fs": "4.1.15" + "graceful-fs": "^4.1.6" } }, "jsprim": { @@ -2558,10 +2559,10 @@ "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", "dev": true, "requires": { - "bindings": "1.5.0", - "inherits": "2.0.3", - "nan": "2.13.2", - "safe-buffer": "5.1.2" + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" }, "dependencies": { "inherits": { @@ -2578,8 +2579,8 @@ "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", "dev": true, "requires": { - "browserify-sha3": "0.0.4", - "sha3": "1.2.2" + "browserify-sha3": "^0.0.4", + "sha3": "^1.2.2" } }, "klaw": { @@ -2588,7 +2589,7 @@ "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", "dev": true, "requires": { - "graceful-fs": "4.1.15" + "graceful-fs": "^4.1.9" } }, "lcid": { @@ -2597,7 +2598,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "levn": { @@ -2606,8 +2607,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -2616,10 +2617,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" } }, "locate-path": { @@ -2628,8 +2629,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -2656,8 +2657,8 @@ "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "make-dir": { @@ -2666,7 +2667,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" }, "dependencies": { "pify": { @@ -2683,9 +2684,9 @@ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "media-typer": { @@ -2700,7 +2701,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "memorystream": { @@ -2727,8 +2728,8 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "mime": { @@ -2770,7 +2771,7 @@ "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "dev": true, "requires": { - "dom-walk": "0.1.1" + "dom-walk": "^0.1.0" } }, "minimalistic-assert": { @@ -2791,7 +2792,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2802,7 +2803,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -2815,7 +2816,7 @@ "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "*" } }, "mocha": { @@ -2852,12 +2853,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.1", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "ms": { @@ -2872,7 +2873,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } } } @@ -2907,9 +2908,9 @@ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "dev": true, "requires": { - "any-promise": "1.3.0", - "object-assign": "4.1.1", - "thenify-all": "1.6.0" + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" } }, "nan": { @@ -2954,7 +2955,7 @@ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, "requires": { - "abbrev": "1.0.9" + "abbrev": "1" } }, "normalize-package-data": { @@ -2963,10 +2964,10 @@ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { - "hosted-git-info": "2.7.1", - "resolve": "1.10.1", - "semver": "5.7.0", - "validate-npm-package-license": "3.0.4" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { @@ -2975,7 +2976,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -3026,10 +3027,10 @@ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "requires": { - "define-properties": "1.1.3", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "object-keys": "1.1.1" + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, "object.entries": { @@ -3038,10 +3039,10 @@ "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", "dev": true, "requires": { - "define-properties": "1.1.3", - "es-abstract": "1.13.0", - "function-bind": "1.1.1", - "has": "1.0.3" + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" } }, "oboe": { @@ -3050,7 +3051,7 @@ "integrity": "sha1-K0hl29Rr6BIlcT9Om/5Lz09oCk8=", "dev": true, "requires": { - "http-https": "1.0.0" + "http-https": "^1.0.0" } }, "on-finished": { @@ -3068,7 +3069,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -3077,17 +3078,23 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, + "openzeppelin-solidity": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.1.1.tgz", + "integrity": "sha512-kvVI/2n3oYfVYP53rUw+q6QNPlorwYRFaGu/Zs+TWFw2tKlnrz7UXh0UTWYd3Sfbq6eOo4XXnGv4bgcKguOrWg==", + "dev": true + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" }, "dependencies": { "wordwrap": { @@ -3104,12 +3111,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "original-require": { @@ -3120,16 +3127,16 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -3151,7 +3158,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -3160,7 +3167,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.3.0" + "p-limit": "^1.1.0" } }, "p-timeout": { @@ -3169,7 +3176,7 @@ "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", "dev": true, "requires": { - "p-finally": "1.0.0" + "p-finally": "^1.0.0" } }, "p-try": { @@ -3184,12 +3191,12 @@ "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", "dev": true, "requires": { - "asn1.js": "4.10.1", - "browserify-aes": "1.2.0", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.17", - "safe-buffer": "5.1.2" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "parse-headers": { @@ -3198,8 +3205,8 @@ "integrity": "sha512-/LypJhzFmyBIDYP9aDVgeyEb5sQfbfY5mnDq4hVhlQ69js87wXfmEI5V3xI6vvXasqebp0oCytYFLxsBVfCzSg==", "dev": true, "requires": { - "for-each": "0.3.3", - "string.prototype.trim": "1.1.2" + "for-each": "^0.3.3", + "string.prototype.trim": "^1.1.2" } }, "parse-json": { @@ -3208,7 +3215,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.2" + "error-ex": "^1.2.0" } }, "parseurl": { @@ -3259,7 +3266,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pathval": { @@ -3274,16 +3281,16 @@ "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "pegjs": { "version": "0.10.0", - "resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", + "resolved": "http://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=", "dev": true }, @@ -3317,7 +3324,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -3326,7 +3333,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "pluralize": { @@ -3371,7 +3378,7 @@ "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", "dev": true, "requires": { - "forwarded": "0.1.2", + "forwarded": "~0.1.2", "ipaddr.js": "1.9.0" } }, @@ -3393,12 +3400,12 @@ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "parse-asn1": "5.1.4", - "randombytes": "2.1.0", - "safe-buffer": "5.1.2" + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "punycode": { @@ -3419,9 +3426,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "0.2.0", - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, "randombytes": { @@ -3430,7 +3437,7 @@ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.1.0" } }, "randomfill": { @@ -3439,8 +3446,8 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "2.1.0", - "safe-buffer": "5.1.2" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, "randomhex": { @@ -3473,7 +3480,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } } } @@ -3484,9 +3491,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.5.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" } }, "read-pkg-up": { @@ -3495,23 +3502,23 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" }, "dependencies": { "inherits": { @@ -3528,7 +3535,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "1.10.1" + "resolve": "^1.1.6" } }, "regexpp": { @@ -3543,7 +3550,7 @@ "integrity": "sha1-DXOurpJm5penj3l2AZZ352rPD/8=", "dev": true, "requires": { - "req-from": "1.0.1" + "req-from": "^1.0.1" } }, "req-from": { @@ -3552,7 +3559,7 @@ "integrity": "sha1-v4HaUUeUfTLRO5R9wSpYrUWHNQ4=", "dev": true, "requires": { - "resolve-from": "2.0.0" + "resolve-from": "^2.0.0" }, "dependencies": { "resolve-from": { @@ -3569,26 +3576,26 @@ "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.8.0", - "caseless": "0.12.0", - "combined-stream": "1.0.7", - "extend": "3.0.2", - "forever-agent": "0.6.1", - "form-data": "2.3.3", - "har-validator": "5.1.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.24", - "oauth-sign": "0.9.0", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.4.3", - "tunnel-agent": "0.6.0", - "uuid": "3.3.2" + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" } }, "require-directory": { @@ -3611,12 +3618,12 @@ }, "require-uncached": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" } }, "resolve": { @@ -3625,7 +3632,7 @@ "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", "dev": true, "requires": { - "path-parse": "1.0.6" + "path-parse": "^1.0.6" } }, "resolve-from": { @@ -3640,8 +3647,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "rimraf": { @@ -3650,7 +3657,7 @@ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "7.1.3" + "glob": "^7.1.3" } }, "ripemd160": { @@ -3659,8 +3666,8 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.1" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, "rlp": { @@ -3669,7 +3676,7 @@ "integrity": "sha512-93U7IKH5j7nmXFVg19MeNBGzQW5uXW1pmCuKY8veeKIhYTE32C2d0mOegfiIAfXcHOKJjjPlJisn8iHDF5AezA==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.1.1" } }, "run-async": { @@ -3678,7 +3685,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "rxjs": { @@ -3687,7 +3694,7 @@ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==", "dev": true, "requires": { - "tslib": "1.9.3" + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -3708,7 +3715,7 @@ "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", "dev": true, "requires": { - "nan": "2.13.2" + "nan": "^2.0.8" } }, "scrypt-js": { @@ -3723,8 +3730,8 @@ "integrity": "sha1-r40UZbcemZARC+38WTuUeeA6ito=", "dev": true, "requires": { - "scrypt": "6.0.3", - "scryptsy": "1.2.1" + "scrypt": "^6.0.2", + "scryptsy": "^1.2.1" } }, "scryptsy": { @@ -3733,7 +3740,7 @@ "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", "dev": true, "requires": { - "pbkdf2": "3.0.17" + "pbkdf2": "^3.0.3" } }, "seek-bzip": { @@ -3742,16 +3749,16 @@ "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", "dev": true, "requires": { - "commander": "2.8.1" + "commander": "~2.8.1" }, "dependencies": { "commander": { "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz", "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", "dev": true, "requires": { - "graceful-readlink": "1.0.1" + "graceful-readlink": ">= 1.0.0" } } } @@ -3769,18 +3776,18 @@ "dev": true, "requires": { "debug": "2.6.9", - "depd": "1.1.2", - "destroy": "1.0.4", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "etag": "1.8.1", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.6.3", + "http-errors": "~1.6.2", "mime": "1.4.1", "ms": "2.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.4.0" + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" }, "dependencies": { "debug": { @@ -3812,9 +3819,9 @@ "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "dev": true, "requires": { - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "parseurl": "1.3.3", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", "send": "0.16.2" } }, @@ -3824,11 +3831,11 @@ "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", "dev": true, "requires": { - "body-parser": "1.18.3", - "cors": "2.8.5", - "express": "4.16.4", - "request": "2.88.0", - "xhr": "2.5.0" + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" } }, "set-blocking": { @@ -3851,12 +3858,12 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "sha3": { @@ -3870,7 +3877,7 @@ "dependencies": { "nan": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "resolved": "http://registry.npmjs.org/nan/-/nan-2.10.0.tgz", "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", "dev": true } @@ -3882,7 +3889,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -3897,9 +3904,9 @@ "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", "dev": true, "requires": { - "glob": "7.1.3", - "interpret": "1.2.0", - "rechoir": "0.6.2" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" } }, "signal-exit": { @@ -3920,9 +3927,9 @@ "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", "dev": true, "requires": { - "decompress-response": "3.3.0", - "once": "1.4.0", - "simple-concat": "1.0.0" + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" } }, "slice-ansi": { @@ -3931,9 +3938,9 @@ "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "astral-regex": "1.0.0", - "is-fullwidth-code-point": "2.0.0" + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" } }, "sol-explore": { @@ -3943,19 +3950,19 @@ "dev": true }, "solc": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.7.tgz", - "integrity": "sha512-DaYFzB3AAYjzPtgUl9LenPY2xjI3wG9k8U8T8YE/sXHVIoCirCY5MB6mhcFPgk/VyUtaWZPUCWiYS1E6RSiiqw==", + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.8.tgz", + "integrity": "sha512-RQ2SlwPBOBSV7ktNQJkvbiQks3t+3V9dsqD014EdstxnJzSxBuOvbt3P5QXpNPYW1DsEmF7dhOaT3JL7yEae/A==", "dev": true, "requires": { - "command-exists": "1.2.8", - "fs-extra": "0.30.0", - "keccak": "1.4.0", - "memorystream": "0.3.1", - "require-from-string": "2.0.2", - "semver": "5.7.0", + "command-exists": "^1.2.8", + "fs-extra": "^0.30.0", + "keccak": "^1.0.2", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", "tmp": "0.0.33", - "yargs": "11.1.0" + "yargs": "^11.0.0" }, "dependencies": { "camelcase": { @@ -3970,9 +3977,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "os-locale": { @@ -3981,9 +3988,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "which-module": { @@ -3998,18 +4005,18 @@ "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.3", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" } }, "yargs-parser": { @@ -4018,7 +4025,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -4029,16 +4036,16 @@ "integrity": "sha512-qikdsSi6+9XbfvwA0aI7HUVpF9fIFNqRWTw23M89GMDY+b6Gj0wWU9IngJS0fimoZIAdEp3bfChxvpfVcrUesg==", "dev": true, "requires": { - "death": "1.1.0", + "death": "^1.1.0", "ethereumjs-testrpc-sc": "6.1.6", - "istanbul": "0.4.5", - "keccakjs": "0.2.3", - "req-cwd": "1.0.1", - "shelljs": "0.7.8", - "sol-explore": "1.6.2", + "istanbul": "^0.4.5", + "keccakjs": "^0.2.1", + "req-cwd": "^1.0.1", + "shelljs": "^0.7.4", + "sol-explore": "^1.6.2", "solidity-parser-sc": "0.4.11", - "tree-kill": "1.2.1", - "web3": "0.18.4" + "tree-kill": "^1.2.0", + "web3": "^0.18.4" }, "dependencies": { "browser-stdout": { @@ -4074,12 +4081,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.1", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "growl": { @@ -4124,9 +4131,9 @@ "integrity": "sha512-1kV5iC7m3CtMDfmHaVNwz2saSGQVIuF16rIxU417Al38MVCWHMQQ5vT6cmLsNwDe60S74auobWij9vNawSeOyw==", "dev": true, "requires": { - "mocha": "4.1.0", - "pegjs": "0.10.0", - "yargs": "4.8.1" + "mocha": "^4.1.0", + "pegjs": "^0.10.0", + "yargs": "^4.6.0" } }, "supports-color": { @@ -4135,7 +4142,7 @@ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } }, "web3": { @@ -4144,11 +4151,11 @@ "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "crypto-js": "3.1.8", - "utf8": "2.1.2", - "xhr2": "0.1.4", - "xmlhttprequest": "1.8.0" + "bignumber.js": "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "crypto-js": "^3.1.4", + "utf8": "^2.1.1", + "xhr2": "*", + "xmlhttprequest": "*" } } } @@ -4159,9 +4166,9 @@ "integrity": "sha512-t7tvtR6KU6QfPYLMv1nlCh9DA8HYIu5tbjHpKu0fhGFZ1NuSp0KKDHfFHv07g6v1xgcuUY3rVqNFjZt5b9+5qA==", "dev": true, "requires": { - "mocha": "4.1.0", - "pegjs": "0.10.0", - "yargs": "10.1.2" + "mocha": "^4.0.1", + "pegjs": "^0.10.0", + "yargs": "^10.0.3" }, "dependencies": { "browser-stdout": { @@ -4182,9 +4189,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "commander": { @@ -4214,12 +4221,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.1", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "growl": { @@ -4264,9 +4271,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "supports-color": { @@ -4275,7 +4282,7 @@ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } }, "which-module": { @@ -4290,18 +4297,18 @@ "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.3", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.1.0" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.1.0" } }, "yargs-parser": { @@ -4310,7 +4317,7 @@ "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -4327,8 +4334,8 @@ "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "dev": true, "requires": { - "buffer-from": "1.1.1", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, "spdx-correct": { @@ -4337,8 +4344,8 @@ "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.4" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -4353,8 +4360,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.2.0", - "spdx-license-ids": "3.0.4" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -4375,15 +4382,15 @@ "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { - "asn1": "0.2.4", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.2", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.2", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "safer-buffer": "2.1.2", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, "statuses": { @@ -4404,8 +4411,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "string.prototype.trim": { @@ -4414,9 +4421,9 @@ "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", "dev": true, "requires": { - "define-properties": "1.1.3", - "es-abstract": "1.13.0", - "function-bind": "1.1.1" + "define-properties": "^1.1.2", + "es-abstract": "^1.5.0", + "function-bind": "^1.0.2" } }, "string_decoder": { @@ -4425,7 +4432,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -4434,7 +4441,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -4449,7 +4456,7 @@ "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", "dev": true, "requires": { - "is-natural-number": "4.0.1" + "is-natural-number": "^4.0.1" } }, "strip-eof": { @@ -4479,7 +4486,7 @@ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } }, "swarm-js": { @@ -4488,19 +4495,19 @@ "integrity": "sha512-G8gi5fcXP/2upwiuOShJ258sIufBVztekgobr3cVgYXObZwJ5AXLqZn52AI+/ffft29pJexF9WNdUxjlkVehoQ==", "dev": true, "requires": { - "bluebird": "3.5.4", - "buffer": "5.2.1", - "decompress": "4.2.0", - "eth-lib": "0.1.27", - "fs-extra": "2.1.2", - "fs-promise": "2.0.3", - "got": "7.1.0", - "mime-types": "2.1.24", - "mkdirp-promise": "5.0.1", - "mock-fs": "4.9.0", - "setimmediate": "1.0.5", - "tar.gz": "1.0.7", - "xhr-request-promise": "0.1.2" + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "decompress": "^4.0.0", + "eth-lib": "^0.1.26", + "fs-extra": "^2.1.2", + "fs-promise": "^2.0.0", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar.gz": "^1.0.5", + "xhr-request-promise": "^0.1.2" }, "dependencies": { "fs-extra": { @@ -4509,8 +4516,8 @@ "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "jsonfile": "2.4.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" } } } @@ -4521,10 +4528,10 @@ "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", "dev": true, "requires": { - "ajv": "6.10.0", - "lodash": "4.17.11", - "slice-ansi": "2.1.0", - "string-width": "3.1.0" + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" }, "dependencies": { "ansi-regex": { @@ -4539,9 +4546,9 @@ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "emoji-regex": "7.0.3", - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "5.2.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, "strip-ansi": { @@ -4550,7 +4557,7 @@ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "4.1.0" + "ansi-regex": "^4.1.0" } } } @@ -4561,9 +4568,9 @@ "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.1" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } }, "tar-stream": { @@ -4572,13 +4579,13 @@ "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", "dev": true, "requires": { - "bl": "1.2.2", - "buffer-alloc": "1.2.0", - "end-of-stream": "1.4.1", - "fs-constants": "1.0.0", - "readable-stream": "2.3.6", - "to-buffer": "1.1.1", - "xtend": "4.0.1" + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" } }, "tar.gz": { @@ -4587,16 +4594,16 @@ "integrity": "sha512-uhGatJvds/3diZrETqMj4RxBR779LKlIE74SsMcn5JProZsfs9j0QBwWO1RW+IWNJxS2x8Zzra1+AW6OQHWphg==", "dev": true, "requires": { - "bluebird": "2.11.0", - "commander": "2.15.1", - "fstream": "1.0.11", - "mout": "0.11.1", - "tar": "2.2.1" + "bluebird": "^2.9.34", + "commander": "^2.8.1", + "fstream": "^1.0.8", + "mout": "^0.11.0", + "tar": "^2.1.1" }, "dependencies": { "bluebird": { "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "resolved": "http://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=", "dev": true } @@ -4614,7 +4621,7 @@ "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", "dev": true, "requires": { - "any-promise": "1.3.0" + "any-promise": "^1.0.0" } }, "thenify-all": { @@ -4623,12 +4630,12 @@ "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", "dev": true, "requires": { - "thenify": "3.3.0" + "thenify": ">= 3.1.0 < 4" } }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, @@ -4644,7 +4651,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-buffer": { @@ -4659,8 +4666,8 @@ "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { - "psl": "1.1.31", - "punycode": "1.4.1" + "psl": "^1.1.24", + "punycode": "^1.4.1" }, "dependencies": { "punycode": { @@ -4683,9 +4690,9 @@ "integrity": "sha512-D15MsJeKWRNxbx2Vmy50gH8z4gjBYecJIUADBBBL593hkVnhZ1ADgkIujCvvrbD6Pj69Vg5Ky/nJXl7M9TCjsg==", "dev": true, "requires": { - "mocha": "4.1.0", + "mocha": "^4.1.0", "original-require": "1.0.1", - "solc": "0.5.7" + "solc": "^0.5.0" }, "dependencies": { "browser-stdout": { @@ -4721,12 +4728,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.1", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "growl": { @@ -4771,7 +4778,7 @@ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } } } @@ -4788,7 +4795,7 @@ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -4803,7 +4810,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -4819,7 +4826,7 @@ "dev": true, "requires": { "media-typer": "0.3.0", - "mime-types": "2.1.24" + "mime-types": "~2.1.18" } }, "typedarray-to-buffer": { @@ -4828,7 +4835,7 @@ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "requires": { - "is-typedarray": "1.0.0" + "is-typedarray": "^1.0.0" } }, "uglify-js": { @@ -4838,8 +4845,8 @@ "dev": true, "optional": true, "requires": { - "commander": "2.20.0", - "source-map": "0.6.1" + "commander": "~2.20.0", + "source-map": "~0.6.1" }, "dependencies": { "commander": { @@ -4863,8 +4870,8 @@ "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", "dev": true, "requires": { - "buffer": "5.2.1", - "through": "2.3.8" + "buffer": "^5.2.1", + "through": "^2.3.8" } }, "underscore": { @@ -4885,7 +4892,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" } }, "url-parse-lax": { @@ -4894,7 +4901,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "url-set-query": { @@ -4948,8 +4955,8 @@ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { - "spdx-correct": "3.1.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "vary": { @@ -4964,9 +4971,9 @@ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "wait-port": { @@ -4975,9 +4982,9 @@ "integrity": "sha1-1RpJHkhKF791qUfnEaLwErTm8uM=", "dev": true, "requires": { - "chalk": "1.1.3", - "commander": "2.15.1", - "debug": "2.6.9" + "chalk": "^1.1.3", + "commander": "^2.9.0", + "debug": "^2.6.6" }, "dependencies": { "ansi-regex": { @@ -4998,11 +5005,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "debug": { @@ -5026,7 +5033,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "supports-color": { @@ -5189,14 +5196,14 @@ "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", "dev": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.1", - "xhr-request-promise": "0.1.2" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, "uuid": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", "dev": true } @@ -5305,7 +5312,7 @@ "requires": { "underscore": "1.8.3", "web3-core-helpers": "1.0.0-beta.36", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + "websocket": "websocket@git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" } }, "web3-shh": { @@ -5351,12 +5358,13 @@ }, "websocket": { "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "from": "websocket@git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "dev": true, "requires": { - "debug": "2.6.9", - "nan": "2.13.2", - "typedarray-to-buffer": "3.1.5", - "yaeti": "0.0.6" + "debug": "^2.2.0", + "nan": "^2.3.3", + "typedarray-to-buffer": "^3.1.2", + "yaeti": "^0.0.6" }, "dependencies": { "debug": { @@ -5382,7 +5390,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -5405,12 +5413,12 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "ansi-regex": { @@ -5425,7 +5433,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -5434,9 +5442,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -5445,7 +5453,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -5462,7 +5470,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "ws": { @@ -5471,9 +5479,9 @@ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "dev": true, "requires": { - "async-limiter": "1.0.0", - "safe-buffer": "5.1.2", - "ultron": "1.1.1" + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" } }, "xhr": { @@ -5482,10 +5490,10 @@ "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", "dev": true, "requires": { - "global": "4.3.2", - "is-function": "1.0.1", - "parse-headers": "2.0.2", - "xtend": "4.0.1" + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" } }, "xhr-request": { @@ -5494,13 +5502,13 @@ "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", "dev": true, "requires": { - "buffer-to-arraybuffer": "0.0.5", - "object-assign": "4.1.1", - "query-string": "5.1.1", - "simple-get": "2.8.1", - "timed-out": "4.0.1", - "url-set-query": "1.0.0", - "xhr": "2.5.0" + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" } }, "xhr-request-promise": { @@ -5509,7 +5517,7 @@ "integrity": "sha1-NDxE0e53JrhkgGloLQ+EDIO0Jh0=", "dev": true, "requires": { - "xhr-request": "1.1.0" + "xhr-request": "^1.0.1" } }, "xhr2": { @@ -5524,7 +5532,7 @@ "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", "dev": true, "requires": { - "cookiejar": "2.1.2" + "cookiejar": "^2.1.1" } }, "xmlhttprequest": { @@ -5559,24 +5567,24 @@ }, "yargs": { "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.3", - "lodash.assign": "4.2.0", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "window-size": "0.2.0", - "y18n": "3.2.1", - "yargs-parser": "2.4.1" + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" }, "dependencies": { "ansi-regex": { @@ -5591,8 +5599,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "is-fullwidth-code-point": { @@ -5601,7 +5609,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "load-json-file": { @@ -5610,11 +5618,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "path-exists": { @@ -5623,7 +5631,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-type": { @@ -5632,9 +5640,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "read-pkg": { @@ -5643,9 +5651,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.5.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -5654,8 +5662,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" } }, "string-width": { @@ -5664,9 +5672,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -5675,7 +5683,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -5684,7 +5692,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -5695,8 +5703,8 @@ "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { - "camelcase": "3.0.0", - "lodash.assign": "4.2.0" + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" } }, "yauzl": { @@ -5705,8 +5713,8 @@ "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, "requires": { - "buffer-crc32": "0.2.13", - "fd-slicer": "1.1.0" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } } } diff --git a/package.json b/package.json index 50b553aa..f7a632e7 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "inquirer": "6.2.1", "keccak": "1.4.0", "mocha": "5.2.0", + "openzeppelin-solidity": "2.1.1", "rlp": "2.1.0", "solidity-coverage": "0.5.11", "solparse": "2.2.5", diff --git a/test/gateway/eip20_cogateway/redeem.js b/test/gateway/eip20_cogateway/redeem.js index dc2eab3e..923946b4 100644 --- a/test/gateway/eip20_cogateway/redeem.js +++ b/test/gateway/eip20_cogateway/redeem.js @@ -19,9 +19,11 @@ // ---------------------------------------------------------------------------- const BN = require('bn.js'); -const Utils = require('../../test_lib/utils'); -const messageBus = require('../../test_lib/message_bus.js'); + const CoGatewayUtils = require('./helpers/co_gateway_utils.js'); +const messageBus = require('../../test_lib/message_bus.js'); +const Utils = require('../../test_lib/utils'); +const web3 = require('../../test_lib/web3'); const EIP20CoGateway = artifacts.require('TestEIP20CoGateway'); const MockToken = artifacts.require('MockToken'); @@ -222,7 +224,6 @@ contract('EIP20CoGateway.redeem()', (accounts) => { hashLock, { from: redeemer, value: bountyAmount }, ), - 'Underflow when subtracting.', ); }); @@ -261,7 +262,6 @@ contract('EIP20CoGateway.redeem()', (accounts) => { hashLock, { from: redeemer, value: bountyAmount }, ), - 'Underflow when subtracting.', ); }); diff --git a/test/gateway/eip20_gateway/revert_stake.js b/test/gateway/eip20_gateway/revert_stake.js index b1732ad8..fb31a0b2 100644 --- a/test/gateway/eip20_gateway/revert_stake.js +++ b/test/gateway/eip20_gateway/revert_stake.js @@ -344,7 +344,6 @@ contract('EIP20Gateway.revertStake()', (accounts) => { gateway.revertStake(stakeMessage.messageHash, { from: stakeMessage.staker, }), - 'Underflow when subtracting.', ); }); }); diff --git a/test/gateway/ost_prime/constructor.js b/test/gateway/ost_prime/constructor.js index b9dbcb3d..cf9c9f60 100644 --- a/test/gateway/ost_prime/constructor.js +++ b/test/gateway/ost_prime/constructor.js @@ -39,30 +39,21 @@ contract('OSTPrime.constructor()', (accounts) => { let worker; beforeEach(async () => { - valueTokenAddress = accounts[2]; - owner = accounts[3]; - worker = accounts[4]; + // Starting at accounts[2]: + [,, valueTokenAddress, owner, worker] = accounts; organization = await MockOrganization.new(owner, worker); }); it('should pass with right set of parameters', async () => { ostPrime = await OSTPrime.new(valueTokenAddress, organization.address); - const valueToken = await ostPrime.valueToken.call(); + const valueToken = await ostPrime.token.call(); assert.strictEqual( valueToken, valueTokenAddress, `Token address from contract must be ${valueTokenAddress}.`, ); - // token supports previous ABIs - const token = await ostPrime.token.call(); - assert.strictEqual( - token, - valueTokenAddress, - `Token address from contract must be ${valueTokenAddress}.`, - ); - const name = await ostPrime.name.call(); assert.strictEqual( name, @@ -105,7 +96,7 @@ contract('OSTPrime.constructor()', (accounts) => { valueTokenAddress = NullAddress; await Utils.expectRevert( OSTPrime.new(valueTokenAddress, organization.address), - 'Value token address should not be zero.', + 'Token address should not be zero.', ); }); diff --git a/test/gateway/simple_stake/release_to.js b/test/gateway/simple_stake/release_to.js index 1ea55b35..11b68a08 100644 --- a/test/gateway/simple_stake/release_to.js +++ b/test/gateway/simple_stake/release_to.js @@ -116,7 +116,6 @@ contract('SimpleStake.releaseTo()', (accounts) => { await Utils.expectRevert( simpleStake.releaseTo(beneficiary, releasedAmount, { from: gateway }), - 'Underflow when subtracting.', ); }); From a7cedb113950a3cbd18914dd1c1803947f8296eb Mon Sep 17 00:00:00 2001 From: Martin Schenck Date: Tue, 7 May 2019 15:19:28 +0200 Subject: [PATCH 2/4] Use ci to install npm dependencies --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 70aa9274..be52ab47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_install: - sudo apt-get install nodejs - sudo apt-get install npm install: - - npm install + - npm ci before_script: - ./tools/runGanacheCli.sh /dev/null 2>&1 & - npm run compile From f071549e44fdc3407b86a2c2ae8b146436b6ed94 Mon Sep 17 00:00:00 2001 From: Martin Schenck Date: Tue, 7 May 2019 15:39:41 +0200 Subject: [PATCH 3/4] Add MockUtilityToken for Gateway test --- contracts/test/gateway/MockUtilityToken.sol | 101 ++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 contracts/test/gateway/MockUtilityToken.sol diff --git a/contracts/test/gateway/MockUtilityToken.sol b/contracts/test/gateway/MockUtilityToken.sol new file mode 100644 index 00000000..b81115ec --- /dev/null +++ b/contracts/test/gateway/MockUtilityToken.sol @@ -0,0 +1,101 @@ +pragma solidity ^0.5.0; + +// Copyright 2019 OpenST Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ---------------------------------------------------------------------------- +// +// http://www.simpletoken.org/ +// +// ---------------------------------------------------------------------------- + +import "../../utilitytoken/contracts/UtilityToken.sol"; + +/** + * @title MockUtilityToken contract. + * + * @notice This contract is used to mock certain functions of UtilityToken + * contract. + */ +contract MockUtilityToken is UtilityToken { + + // Total initial balance of the deployer. + uint256 constant INITIAL_BALANCE = 1000000000000000000; + + // This variable is used to mock the return of function exists() + bool existsValue; + + /* Constructor */ + + /** + * @notice Constructor. + * + * @dev This is used for testing only. + * + * @param _valueToken Address of value token. + * @param _symbol Symbol of value token. + * @param _name Name of value token. + * @param _decimals Decimal of value token. + * @param _organization Address of a contract that manages organization. + */ + constructor( + address _valueToken, + string memory _symbol, + string memory _name, + uint8 _decimals, + OrganizationInterface _organization + ) + public + UtilityToken(_valueToken, _symbol, _name, _decimals, _organization) + { + balances[msg.sender] = INITIAL_BALANCE; + totalTokenSupply = totalTokenSupply.add(INITIAL_BALANCE); + + existsValue = true; + } + + /** + * @notice Checks if the given address is registered in the economy + * + * @dev This function is overridden to mock return value for exists + * function for testing. + * + * @return exists_ `true` if the address is registered in the economy, + * otherwise `false` + */ + function exists(address) external returns (bool exists_) { + exists_ = existsValue; + } + + /** + * @notice Set the CoGateway address for testing. + * + * @param _coGatewayAddress CoGateway address. + */ + function setCoGatewayAddress(address _coGatewayAddress) external { + coGateway = _coGatewayAddress; + } + + /** + * @notice Set the addressExists variable to mock return value of + * function exists(). This is only for testing. + * + * @param _exists Boolean value + */ + function setExists(bool _exists) external { + existsValue = _exists; + } + +} + From 65dbac03b0fe8dcbe962a05882a347b735d4687b Mon Sep 17 00:00:00 2001 From: Martin Schenck Date: Tue, 7 May 2019 15:58:13 +0200 Subject: [PATCH 4/4] Remove utility token tests --- test/gateway/utility_token/constructor.js | 140 ------------------ test/gateway/utility_token/decrease_supply.js | 138 ----------------- test/gateway/utility_token/exists.js | 66 --------- test/gateway/utility_token/increase_supply.js | 127 ---------------- test/gateway/utility_token/set_co_gateway.js | 137 ----------------- 5 files changed, 608 deletions(-) delete mode 100644 test/gateway/utility_token/constructor.js delete mode 100644 test/gateway/utility_token/decrease_supply.js delete mode 100644 test/gateway/utility_token/exists.js delete mode 100644 test/gateway/utility_token/increase_supply.js delete mode 100644 test/gateway/utility_token/set_co_gateway.js diff --git a/test/gateway/utility_token/constructor.js b/test/gateway/utility_token/constructor.js deleted file mode 100644 index 7c42515c..00000000 --- a/test/gateway/utility_token/constructor.js +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -const UtilityToken = artifacts.require('UtilityToken'); -const MockOrganization = artifacts.require('MockOrganization'); - -const Utils = require('./../../test_lib/utils'); - -const NullAddress = Utils.NULL_ADDRESS; - -const TOKEN_SYMBOL = 'UT'; -const TOKEN_NAME = 'Utility Token'; -const TOKEN_DECIMALS = 18; - -contract('UtilityToken.constructor()', (accounts) => { - let valueTokenAddress; - let organization; - let owner; - let worker; - - beforeEach(async () => { - owner = accounts[2]; - worker = accounts[3]; - valueTokenAddress = accounts[4]; - organization = await MockOrganization.new(owner, worker); - }); - - it('should fail to deploy when value token address is zero', async () => { - valueTokenAddress = NullAddress; - - await Utils.expectRevert( - UtilityToken.new( - valueTokenAddress, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - organization.address, - ), - 'Value token address should not be zero.', - ); - }); - - it('should fail to deploy when organization address is zero', async () => { - await Utils.expectRevert( - UtilityToken.new( - valueTokenAddress, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - NullAddress, - ), - 'Organization contract address must not be zero.', - ); - }); - - it('should pass with correct parameters.', async () => { - const utilityToken = await UtilityToken.new( - valueTokenAddress, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - organization.address, - ); - - assert.strictEqual( - web3.utils.isAddress(utilityToken.address), - true, - 'Utility token contract address must not be zero.', - ); - - const valueToken = await utilityToken.valueToken.call(); - assert.strictEqual( - valueToken, - valueTokenAddress, - `Token address from contract must be equal to ${valueTokenAddress}.`, - ); - - // token supports previous ABIs - const token = await utilityToken.token.call(); - assert.strictEqual( - token, - valueTokenAddress, - `Token address from contract must be equal to ${valueTokenAddress}.`, - ); - - const name = await utilityToken.name(); - assert.strictEqual( - name, - TOKEN_NAME, - `Token name from contract must be equal to ${TOKEN_NAME}.`, - ); - - const symbol = await utilityToken.symbol(); - assert.strictEqual( - symbol, - TOKEN_SYMBOL, - `Token symbol from contract must be equal to ${TOKEN_SYMBOL}.`, - ); - - const decimals = await utilityToken.decimals(); - assert.strictEqual( - decimals.eqn(TOKEN_DECIMALS), - true, - `Token decimals from contract must be equal to ${TOKEN_DECIMALS}.`, - ); - - const totalSupply = await utilityToken.totalSupply(); - assert.strictEqual( - totalSupply.eqn(0), - true, - 'Token total supply from contract must be equal to zero.', - ); - - const organizationAddress = await utilityToken.organization(); - assert.strictEqual( - organizationAddress, - organization.address, - `Organization address from the contract must be equal to ${ - organization.address - }.`, - ); - }); -}); diff --git a/test/gateway/utility_token/decrease_supply.js b/test/gateway/utility_token/decrease_supply.js deleted file mode 100644 index f621ae29..00000000 --- a/test/gateway/utility_token/decrease_supply.js +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -const UtilityToken = artifacts.require('TestUtilityToken'); -const MockEIP20CoGateway = artifacts.require('MockEIP20CoGateway'); - -const BN = require('bn.js'); -const Utils = require('./../../test_lib/utils'); - -const EventDecoder = require('../../test_lib/event_decoder.js'); - -const NullAddress = Utils.NULL_ADDRESS; - -const TOKEN_SYMBOL = 'UT'; -const TOKEN_NAME = 'Utility Token'; -const TOKEN_DECIMALS = 18; - -contract('UtilityToken.decreaseSupply()', (accounts) => { - let valueToken; - let organization; - let utilityToken; - let coGatewayAddress; - let amount; - - beforeEach(async () => { - valueToken = accounts[4]; - organization = accounts[0]; - amount = new BN(1000); - utilityToken = await UtilityToken.new( - valueToken, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - organization, - ); - - coGatewayAddress = accounts[1]; - - await utilityToken.setCoGatewayAddress(coGatewayAddress); - await utilityToken.setBalance(coGatewayAddress, amount); - await utilityToken.setTotalSupply(amount); - }); - - it('should fail when caller is not cogateway address', async () => { - await Utils.expectRevert( - utilityToken.decreaseSupply(amount, { from: accounts[5] }), - 'Only CoGateway can call the function.', - ); - }); - - it( - 'should fail when decrease supply amount is greater than the available' - + ' balance', - async () => { - amount = new BN(2000); - - await Utils.expectRevert( - utilityToken.decreaseSupply(amount, { from: coGatewayAddress }), - 'Insufficient balance.', - ); - }, - ); - - it('should pass when called with valid params', async () => { - amount = new BN(500); - - const result = await utilityToken.decreaseSupply.call(amount, { - from: coGatewayAddress, - }); - - assert.strictEqual(result, true, 'Contract should return true.'); - - await utilityToken.decreaseSupply(amount, { from: coGatewayAddress }); - - const coGatewayBalance = await utilityToken.balanceOf.call( - coGatewayAddress, - ); - assert.strictEqual( - coGatewayBalance.eq(amount), - true, - 'CoGateway address balance should be zero.', - ); - - const totalSupply = await utilityToken.totalSupply(); - assert.strictEqual( - totalSupply.eq(amount), - true, - 'Token total supply from contract must be equal to zero.', - ); - }); - - it('should emit transfer event', async () => { - const tx = await utilityToken.decreaseSupply(amount, { - from: coGatewayAddress, - }); - - const event = EventDecoder.getEvents(tx, utilityToken); - - assert.isDefined(event.Transfer, 'Event `Transfer` must be emitted.'); - - const eventData = event.Transfer; - - assert.strictEqual( - eventData._from, - coGatewayAddress, - `The _from address in the event should be equal to ${coGatewayAddress}.`, - ); - - assert.strictEqual( - eventData._to, - NullAddress, - 'The _to address in the event should be equal to zero.', - ); - - assert.strictEqual( - amount.eq(eventData._value), - true, - `The _value amount in the event should be equal to ${amount}.`, - ); - }); -}); diff --git a/test/gateway/utility_token/exists.js b/test/gateway/utility_token/exists.js deleted file mode 100644 index 45034a4e..00000000 --- a/test/gateway/utility_token/exists.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -const UtilityToken = artifacts.require('TestUtilityToken'); -const MockOrganization = artifacts.require('MockOrganization'); - -const Utils = require('./../../test_lib/utils'); - -const NullAddress = Utils.NULL_ADDRESS; - -const TOKEN_SYMBOL = 'UT'; -const TOKEN_NAME = 'Utility Token'; -const TOKEN_DECIMALS = 18; - -contract('UtilityToken.exists()', (accounts) => { - - let utilityToken; - - beforeEach(async () => { - let valueToken = accounts[4]; - let organization = await MockOrganization.new(accounts[2], accounts[3]); - utilityToken = await UtilityToken.new( - valueToken, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - organization.address, - ) - - }); - - it('should always return true for any given address', async () => { - const account5ExistsResult = await utilityToken.exists.call(accounts[5]); - assert.strictEqual( - account5ExistsResult, - true, - 'Contract should return true.', - ); - - const account6ExistsResult = await utilityToken.exists.call(accounts[6]); - assert.strictEqual( - account6ExistsResult, - true, - 'Contract should return true.', - ); - - }); - -}); diff --git a/test/gateway/utility_token/increase_supply.js b/test/gateway/utility_token/increase_supply.js deleted file mode 100644 index 4605dee5..00000000 --- a/test/gateway/utility_token/increase_supply.js +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -const UtilityToken = artifacts.require('TestUtilityToken'); -const MockEIP20CoGateway = artifacts.require('MockEIP20CoGateway'); - -const BN = require('bn.js'); -const Utils = require('./../../test_lib/utils'); - -const EventDecoder = require('../../test_lib/event_decoder.js'); - -const NullAddress = Utils.NULL_ADDRESS; - -const TOKEN_SYMBOL = 'UT'; -const TOKEN_NAME = 'Utility Token'; -const TOKEN_DECIMALS = 18; - -contract('UtilityToken.increaseSupply()', (accounts) => { - let valueToken; - let organization; - let utilityToken; - let coGatewayAddress; - let beneficiary; - let amount; - - beforeEach(async () => { - valueToken = accounts[4]; - organization = accounts[0]; - beneficiary = accounts[6]; - amount = new BN(1000); - utilityToken = await UtilityToken.new( - valueToken, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - organization, - ); - - coGatewayAddress = accounts[1]; - - await utilityToken.setCoGatewayAddress(coGatewayAddress); - }); - - it('should fail when caller is not CoGateway address', async () => { - await Utils.expectRevert( - utilityToken.increaseSupply(beneficiary, amount, { from: accounts[7] }), - 'Only CoGateway can call the function.', - ); - }); - - it('should pass with correct params', async () => { - const result = await utilityToken.increaseSupply.call( - beneficiary, - amount, - { - from: coGatewayAddress, - }, - ); - - assert.strictEqual(result, true, 'Contract should return true.'); - - await utilityToken.increaseSupply(beneficiary, amount, { - from: coGatewayAddress, - }); - - const beneficiaryBalance = await utilityToken.balanceOf.call(beneficiary); - assert.strictEqual( - amount.eq(beneficiaryBalance), - true, - `Beneficiary address balance should be ${amount}.`, - ); - - const totalSupply = await utilityToken.totalSupply(); - assert.strictEqual( - totalSupply.eq(amount), - true, - `Token total supply from contract must be equal to ${amount}.`, - ); - }); - - it('should emit Transfer event', async () => { - const tx = await utilityToken.increaseSupply(beneficiary, amount, { - from: coGatewayAddress, - }); - - const event = EventDecoder.getEvents(tx, utilityToken); - - assert.isDefined(event.Transfer, 'Event Transfer must be emitted.'); - - const eventData = event.Transfer; - - assert.strictEqual( - eventData._from, - NullAddress, - 'The _from address in the event should be zero.', - ); - - assert.strictEqual( - eventData._to, - beneficiary, - `The _to address in the event should be equal to ${beneficiary}.`, - ); - - assert.strictEqual( - amount.eq(eventData._value), - true, - `The _value amount in the event should be equal to ${amount}.`, - ); - }); -}); diff --git a/test/gateway/utility_token/set_co_gateway.js b/test/gateway/utility_token/set_co_gateway.js deleted file mode 100644 index e5d74ab3..00000000 --- a/test/gateway/utility_token/set_co_gateway.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019 OpenST Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ---------------------------------------------------------------------------- -// -// http://www.simpletoken.org/ -// -// ---------------------------------------------------------------------------- - -const UtilityToken = artifacts.require('UtilityToken'); -const MockOrganization = artifacts.require('MockOrganization'); -const MockEIP20CoGateway = artifacts.require('MockEIP20CoGateway'); - -const Utils = require('./../../test_lib/utils'); - -const EventDecoder = require('../../test_lib/event_decoder.js'); - -const NullAddress = Utils.NULL_ADDRESS; - -const TOKEN_SYMBOL = 'UT'; -const TOKEN_NAME = 'Utility Token'; -const TOKEN_DECIMALS = 18; - -contract('UtilityToken.setCoGateway() ', (accounts) => { - let valueToken; - let organization; - let owner; - let worker; - let utilityToken; - let coGateway; - - beforeEach(async () => { - owner = accounts[2]; - worker = accounts[3]; - valueToken = accounts[4]; - organization = await MockOrganization.new(owner, worker); - - utilityToken = await UtilityToken.new( - valueToken, - TOKEN_SYMBOL, - TOKEN_NAME, - TOKEN_DECIMALS, - organization.address, - ); - - coGateway = await MockEIP20CoGateway.new(); - await coGateway.setUtilityToken(utilityToken.address); - }); - - it('should fail when called by non organization address', async () => { - await Utils.expectRevert( - utilityToken.setCoGateway(coGateway.address, { from: accounts[5] }), - 'Only the organization is allowed to call this method.', - ); - }); - - it('should fail when cogateway address is zero', async () => { - await Utils.expectRevert( - utilityToken.setCoGateway(NullAddress, { from: owner }), - 'CoGateway address should not be zero.', - ); - }); - - it( - 'should fail when cogateway address is not linked with current ' - + 'utility token', - async () => { - await coGateway.setUtilityToken(NullAddress); - - await Utils.expectRevert( - utilityToken.setCoGateway(coGateway.address, { from: owner }), - 'CoGateway should be linked with this utility token.', - ); - }, - ); - - it('should pass with correct params', async () => { - const result = await utilityToken.setCoGateway.call(coGateway.address, { - from: owner, - }); - - assert.strictEqual(result, true, 'Contract should return true.'); - - await utilityToken.setCoGateway(coGateway.address, { from: owner }); - - const coGatewayAddress = await utilityToken.coGateway.call(); - - assert.strictEqual( - coGatewayAddress, - coGateway.address, - `CoGateway address from contract should be ${coGateway.address}.`, - ); - }); - - it('should fail when cogateway address is already set once', async () => { - await utilityToken.setCoGateway(coGateway.address, { from: owner }); - - await Utils.expectRevert( - utilityToken.setCoGateway(coGateway.address, { from: owner }), - 'CoGateway address is already set.', - ); - }); - - it('should emit CoGatewaySet event', async () => { - const tx = await utilityToken.setCoGateway(coGateway.address, { - from: owner, - }); - - const event = EventDecoder.getEvents(tx, utilityToken); - - assert.isDefined( - event.CoGatewaySet, - 'Event `CoGatewaySet` must be emitted.', - ); - - const eventData = event.CoGatewaySet; - - assert.strictEqual( - eventData._coGateway, - coGateway.address, - `The _coGateway address in the event should be equal to ${ - coGateway.address - }.`, - ); - }); -});