From 96bcd46cb58e994529c1a4d1015df2ffa884fbed Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 15 Jul 2019 15:13:46 +0200 Subject: [PATCH 01/33] Introduce Keep Vendor contract Introduced Keep Vendor contract according to Keep RFC 12. A vendor is a smart contract with which the application interacts to obtain the new instance of a keep of the given type backed by enough stakers so that all operations on the created keep can go smoothly. Vendor interacts with keep factories choosing the one most recent if it is backed by enough stakers. Each vendor is a service contract and does not have to be sanctioned by stakers. Each vendor can operate on several versions of keep factory to allow for a smooth upgrade process. --- solidity/contracts/ECDSAKeepVendor.sol | 72 +++++++++++++++++++ .../contracts/utils/AddressArrayUtils.sol | 34 +++++++++ 2 files changed, 106 insertions(+) create mode 100644 solidity/contracts/ECDSAKeepVendor.sol create mode 100644 solidity/contracts/utils/AddressArrayUtils.sol diff --git a/solidity/contracts/ECDSAKeepVendor.sol b/solidity/contracts/ECDSAKeepVendor.sol new file mode 100644 index 000000000..8dd7e6103 --- /dev/null +++ b/solidity/contracts/ECDSAKeepVendor.sol @@ -0,0 +1,72 @@ +pragma solidity ^0.5.4; + +import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; +import "./utils/AddressArrayUtils.sol"; +import "./ECDSAKeepFactory.sol"; + +/// @title ECDSA Keep Vendor +/// @notice The contract can be used to obtain a new ECDSA keep. +/// @dev Interacts with ECDSA keep factory to obtain a new instance of the ECDSA +/// keep. Several versions of ECDSA keep factories can be registered for the vendor. +/// TODO: This is a stub contract - needs to be implemented. +/// TODO: When more keep types are added consider extracting registration and +/// selection to a separate inheritable contract. +contract ECDSAKeepVendor is Ownable { + using AddressArrayUtils for address[]; + + // List of ECDSA keep factories. + address[] public factories; + + /// @notice Register new ECDSA keep factory. + /// @dev Adds a factory address to the list of registered factories. Address + /// cannot be zero and cannot be already registered. + /// @param _factory ECDSA keep factory address. + function registerFactory(address _factory) public onlyOwner { + require(_factory != address(0), "Factory address cannot be zero"); + require(!factories.contains(_factory), "Factory address already registered"); + + factories.push(_factory); + } + + /// @notice Unregister ECDSA keep factory. + /// @dev Removes a factory address from the list of registered factories. + /// @param _factory ECDSA keep factory address. + function removeFactory(address _factory) public onlyOwner { + factories.removeAddress(_factory); + } + + /// @notice Get registered ECDSA keep factories. + /// @return List of registered ECDSA keep factory addresses. + function getFactories() public view returns (address[] memory) { + return factories; + } + + /// @notice Select a recommended ECDSA keep factory from all registered + /// ECDSA keep factories. + /// @dev This is a stub implementation returning first factory on the list. + /// @return Selected ECDSA keep factory address. + function selectFactory() public view returns (address) { + // TODO: Implement factory selection mechanism. + return factories[0]; + } + + /// @notice Open a new ECDSA keep. + /// @dev Calls a recommended ECDSA keep factory to open a new keep. + /// @param _groupSize Number of members in the keep. + /// @param _honestThreshold Minimum number of honest keep members. + /// @param _owner Address of the keep owner. + /// @return Opened keep address. + function openKeep( + uint256 _groupSize, + uint256 _honestThreshold, + address _owner + ) public payable returns (address keepAddress) { + address factory = selectFactory(); + + return ECDSAKeepFactory(factory).openKeep( + _groupSize, + _honestThreshold, + _owner + ); + } +} diff --git a/solidity/contracts/utils/AddressArrayUtils.sol b/solidity/contracts/utils/AddressArrayUtils.sol new file mode 100644 index 000000000..7e8214b68 --- /dev/null +++ b/solidity/contracts/utils/AddressArrayUtils.sol @@ -0,0 +1,34 @@ +pragma solidity ^0.5.4; + +library AddressArrayUtils { + function contains(address[] memory self, address _address) + internal + pure + returns (bool) + { + for (uint i = 0; i < self.length; i++) { + if (_address == self[i]) { + return true; + } + } + return false; + } + + function removeAddress(address[] storage self, address _addressToRemove) + internal + returns (address[] storage) + { + for (uint i = 0; i < self.length; i++) { + // If address is found in array. + if (_addressToRemove == self[i]) { + // Delete element at index and shift array. + for (uint j = i; j < self.length-1; j++) { + self[j] = self[j+1]; + } + self.length--; + i--; + } + } + return self; + } +} From 69a2786d5e98227a42cbb395937bcbe5bc6aa452 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 15 Jul 2019 16:50:37 +0200 Subject: [PATCH 02/33] Redesign Keep Registry to register vendors Implemented Keep Registry contract according to Keep RFC 12 The keep registry serves the role of the master list and tracks sanctioned staking contracts, operator contracts (including keep factories) and vendors. It ensures that only approved contracts are used. A new type of keep can be added without upgradeable registry. --- solidity/contracts/KeepRegistry.sol | 63 +++++++++++------------------ 1 file changed, 23 insertions(+), 40 deletions(-) diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index 0f38f81af..4fb6008aa 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -1,55 +1,38 @@ pragma solidity ^0.5.4; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; -// TODO: For simplification we use import for the other contracts. `ECDSAKeepFactory.sol` -// and `KeepRegistry.sol` will be kept in different repos in the future so a better -// way of calling another contract from this contract should be introduced. -import "./ECDSAKeepFactory.sol"; /// @title Keep Registry /// @notice Contract handling keeps registry. -/// @dev TODO: This is a stub contract - needs to be implemented. +/// @dev The keep registry serves the role of the master list and tracks sanctioned +/// vendors. It ensures that only approved contracts are used. A new type of keep +/// can be added without upgradeable registry. +/// TODO: This is a stub contract - needs to be implemented. contract KeepRegistry is Ownable { - // Enumeration of supported keeps types. - enum KeepTypes {ECDSA, BondedECDSA} + // Registered keep vendors. Mapping of a keep type to a keep vendor address. + mapping (string => address) internal keepVendors; - // Structure holding keep details. - struct Keep { - address owner; // owner of the keep - address keepAddress; // address of the keep contract - KeepTypes keepType; // type of the keep - } - - // Factory handling ECDSA keeps. - address internal ecdsaKeepFactory; + /// @notice Set a keep vendor contract address for a keep type. + /// @dev Only contract owner can call this function. + /// @param _keepType Keep type. + /// @param _vendorAddress Keep Vendor contract address. + function setKeepTypeVendor(string memory _keepType, address _vendorAddress) public onlyOwner { + require(_vendorAddress != address(0), "Vendor address cannot be zero"); - // List of created keeps. - Keep[] keeps; - - constructor(address _ecdsaKeepFactory) public { - require(_ecdsaKeepFactory != address(0), "Implementation address can't be zero."); - setECDSAKeepFactory(_ecdsaKeepFactory); + keepVendors[_keepType] = _vendorAddress; } - function setECDSAKeepFactory(address _ecdsaKeepFactory) public onlyOwner { - ecdsaKeepFactory = _ecdsaKeepFactory; + /// @notice Get a keep vendor contract address for a keep type. + /// @param _keepType Keep type. + /// @return Keep vendor contract address. + function getKeepVendor(string memory _keepType) public view returns (address) { + return keepVendors[_keepType]; } - /// @notice Create a new ECDSA keep. - /// @dev Calls ECDSA Keep Factory to create a keep. - /// @param _groupSize Number of members in the keep. - /// @param _honestThreshold Minimum number of honest keep members. - /// @return Created keep address. - function createECDSAKeep( - uint256 _groupSize, - uint256 _honestThreshold - ) public payable returns (address keep) { - keep = ECDSAKeepFactory(ecdsaKeepFactory).createNewKeep( - _groupSize, - _honestThreshold, - msg.sender - ); - - keeps.push(Keep(msg.sender, keep, KeepTypes.ECDSA)); + /// @notice Remove a keep type from the registry. + /// @dev Only contract owner can call this function. + /// @param _keepType Keep type. + function removeKeepType(string memory _keepType) public onlyOwner { + delete keepVendors[_keepType]; } } From 3e3d62827482ca44ffa922e86e6634a30d70ff96 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 09:10:04 +0200 Subject: [PATCH 03/33] Rename createNewKeep to openKeep --- solidity/contracts/ECDSAKeepFactory.sol | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/solidity/contracts/ECDSAKeepFactory.sol b/solidity/contracts/ECDSAKeepFactory.sol index 76dfa06cc..ef8eab3e3 100644 --- a/solidity/contracts/ECDSAKeepFactory.sol +++ b/solidity/contracts/ECDSAKeepFactory.sol @@ -14,13 +14,13 @@ contract ECDSAKeepFactory { address keepAddress ); - /// @notice Create a new ECDSA keep. + /// @notice Open a new ECDSA keep. /// @dev Selects a list of members for the keep based on provided parameters. /// @param _groupSize Number of members in the keep. /// @param _honestThreshold Minimum number of honest keep members. - /// @param _owner Owner of the keep. + /// @param _owner Address of the keep owner. /// @return Created keep. - function createNewKeep( + function openKeep( uint256 _groupSize, uint256 _honestThreshold, address _owner @@ -30,7 +30,7 @@ contract ECDSAKeepFactory { ECDSAKeep keep = new ECDSAKeep( _owner, _members, - _honestThreshold + _honestThreshold ); keeps.push(keep); @@ -44,14 +44,12 @@ contract ECDSAKeepFactory { /// @param _groupSize Number of members to be selected. /// @return List of selected members addresses. function selectECDSAKeepMembers( - uint256 _groupSize + uint256 _groupSize ) internal pure returns (address[] memory members){ + // TODO: Implement _groupSize; members = new address[](1); members[0] = 0xE1d6c440DC87476242F313aA1179196fAE89B93e; - - // TODO: Currently it assumes members are identified by ID, we should - // consider changing it to an account address or other unique identfier. } } From 3f2a1913583d45274e299f4ec5f36281b4ce50bd Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 09:19:29 +0200 Subject: [PATCH 04/33] npm clean command --- solidity/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/solidity/package.json b/solidity/package.json index 8af1e6bfd..655492246 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -8,6 +8,7 @@ }, "scripts": { "truffle": "truffle", + "clean": "rm -rf build/", "build": "truffle compile", "test": "truffle test" }, From ddb30e7ddc91c5b66846faf6aedc83bc0ba72d67 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 09:20:41 +0200 Subject: [PATCH 05/33] npm package lock file update --- solidity/package-lock.json | 3950 +++++++++++++++++++++++++++++++++++- 1 file changed, 3885 insertions(+), 65 deletions(-) diff --git a/solidity/package-lock.json b/solidity/package-lock.json index f18ddeb12..6f06da402 100644 --- a/solidity/package-lock.json +++ b/solidity/package-lock.json @@ -4,16 +4,1274 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/cli": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.5.0.tgz", + "integrity": "sha512-qNH55fWbKrEsCwID+Qc/3JDPnsSGpIIiMDbppnR8Z6PxLAqMQCFNqBctkIkBrMH49Nx+qqVTrHRWUR+ho2k+qQ==", + "dev": true, + "requires": { + "chokidar": "^2.0.4", + "commander": "^2.8.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.0.0", + "lodash": "^4.17.11", + "mkdirp": "^0.5.1", + "output-file-sync": "^2.0.0", + "slash": "^2.0.0", + "source-map": "^0.5.0" + } + }, + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/core": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.4.tgz", + "integrity": "sha512-+DaeBEpYq6b2+ZmHx3tHspC+ZRflrvLqwfv8E3hNr5LVQoyBnL8RPKSBCg+rK2W2My9PWlujBiqd0ZPsR9Q6zQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.5.0", + "@babel/helpers": "^7.5.4", + "@babel/parser": "^7.5.0", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.5.0", + "@babel/types": "^7.5.0", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.11", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", + "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==", + "dev": true, + "requires": { + "@babel/types": "^7.5.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", + "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-call-delegate": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", + "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-define-map": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", + "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/types": "^7.4.4", + "lodash": "^4.17.11" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", + "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", + "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", + "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-transforms": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", + "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/types": "^7.4.4", + "lodash": "^4.17.11" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", + "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", + "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", + "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-wrap-function": "^7.1.0", + "@babel/template": "^7.1.0", + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-replace-supers": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", + "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.0.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", + "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", + "dev": true, + "requires": { + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-wrap-function": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", + "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/template": "^7.1.0", + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.2.0" + } + }, + "@babel/helpers": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.4.tgz", + "integrity": "sha512-6LJ6xwUEJP51w0sIgKyfvFMJvIb9mWAfohJp0+m6eHJigkFdcH8duZ1sfhn0ltJRzwUIT/yqqhdSfRpCpL7oow==", + "dev": true, + "requires": { + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.5.0", + "@babel/types": "^7.5.0" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/node": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/node/-/node-7.5.0.tgz", + "integrity": "sha512-VBlCrbJp7HDrKt4HRbtfq4Rs/XjBokvkfxXRQs4qA1C6eV3JycSOMELx4BFTPFRd9QnNA4PsIRfnvJqe/3tHow==", + "dev": true, + "requires": { + "@babel/polyfill": "^7.0.0", + "@babel/register": "^7.0.0", + "commander": "^2.8.1", + "lodash": "^4.17.11", + "node-environment-flags": "^1.0.5", + "v8flags": "^3.1.1" + } + }, + "@babel/parser": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", + "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0", + "@babel/plugin-syntax-async-generators": "^7.2.0" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz", + "integrity": "sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", + "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-json-strings": "^7.2.0" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.4.tgz", + "integrity": "sha512-KCx0z3y7y8ipZUMAEEJOyNi11lMb/FOPUjjB113tfowgw0c16EGYos7worCKBcUAh2oG+OBnoUhsnTSoLpV9uA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz", + "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", + "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz", + "integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", + "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", + "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", + "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", + "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", + "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", + "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "lodash": "^4.17.11" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", + "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-define-map": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.4.4", + "@babel/helper-split-export-declaration": "^7.4.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", + "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz", + "integrity": "sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz", + "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz", + "integrity": "sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", + "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", + "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", + "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", + "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz", + "integrity": "sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz", + "integrity": "sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz", + "integrity": "sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", + "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz", + "integrity": "sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg==", + "dev": true, + "requires": { + "regexp-tree": "^0.1.6" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", + "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", + "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.1.0" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", + "dev": true, + "requires": { + "@babel/helper-call-delegate": "^7.4.4", + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", + "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", + "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.0" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", + "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", + "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", + "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", + "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.0.0" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", + "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", + "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/polyfill": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.4.tgz", + "integrity": "sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg==", + "dev": true, + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.2" + } + }, + "@babel/preset-env": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.5.4.tgz", + "integrity": "sha512-hFnFnouyRNiH1rL8YkX1ANCNAUVC8Djwdqfev8i1415tnAG+7hlA5zhZ0Q/3Q5gkop4HioIPbCEWAalqcbxRoQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-async-generator-functions": "^7.2.0", + "@babel/plugin-proposal-dynamic-import": "^7.5.0", + "@babel/plugin-proposal-json-strings": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.5.4", + "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", + "@babel/plugin-transform-arrow-functions": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.5.0", + "@babel/plugin-transform-block-scoped-functions": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.4.4", + "@babel/plugin-transform-classes": "^7.4.4", + "@babel/plugin-transform-computed-properties": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.5.0", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/plugin-transform-duplicate-keys": "^7.5.0", + "@babel/plugin-transform-exponentiation-operator": "^7.2.0", + "@babel/plugin-transform-for-of": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.4.4", + "@babel/plugin-transform-literals": "^7.2.0", + "@babel/plugin-transform-member-expression-literals": "^7.2.0", + "@babel/plugin-transform-modules-amd": "^7.5.0", + "@babel/plugin-transform-modules-commonjs": "^7.5.0", + "@babel/plugin-transform-modules-systemjs": "^7.5.0", + "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.5", + "@babel/plugin-transform-new-target": "^7.4.4", + "@babel/plugin-transform-object-super": "^7.2.0", + "@babel/plugin-transform-parameters": "^7.4.4", + "@babel/plugin-transform-property-literals": "^7.2.0", + "@babel/plugin-transform-regenerator": "^7.4.5", + "@babel/plugin-transform-reserved-words": "^7.2.0", + "@babel/plugin-transform-shorthand-properties": "^7.2.0", + "@babel/plugin-transform-spread": "^7.2.0", + "@babel/plugin-transform-sticky-regex": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.4.4", + "@babel/plugin-transform-typeof-symbol": "^7.2.0", + "@babel/plugin-transform-unicode-regex": "^7.4.4", + "@babel/types": "^7.5.0", + "browserslist": "^4.6.0", + "core-js-compat": "^3.1.1", + "invariant": "^2.2.2", + "js-levenshtein": "^1.1.3", + "semver": "^5.5.0" + } + }, + "@babel/register": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.4.4.tgz", + "integrity": "sha512-sn51H88GRa00+ZoMqCVgOphmswG4b7mhf9VOB0LUBAieykq2GnRFerlN+JQkO/ntT7wz4jaHNSRPg9IdMPEUkA==", + "dev": true, + "requires": { + "core-js": "^3.0.0", + "find-cache-dir": "^2.0.0", + "lodash": "^4.17.11", + "mkdirp": "^0.5.1", + "pirates": "^4.0.0", + "source-map-support": "^0.5.9" + }, + "dependencies": { + "core-js": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", + "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==", + "dev": true + } + } + }, + "@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/traverse": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", + "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.5.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.5.0", + "@babel/types": "^7.5.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", + "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "app-module-path": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", - "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", + "dev": true + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true, + "optional": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "optional": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true, + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true, + "optional": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true, + "optional": true + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true, + "optional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "optional": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "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" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", + "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, "balanced-match": { @@ -22,6 +1280,73 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "optional": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "optional": true + }, "bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", @@ -41,18 +1366,184 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "browser-stdout": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", "dev": true }, + "browserslist": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.6.tgz", + "integrity": "sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000984", + "electron-to-chromium": "^1.3.191", + "node-releases": "^1.1.25" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "optional": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, + "caniuse-lite": { + "version": "1.0.30000984", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", + "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==", + "dev": true + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "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.5" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "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.3.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -70,6 +1561,32 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "optional": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "command-exists": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", @@ -82,12 +1599,79 @@ "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", "dev": true }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true, + "optional": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true, + "optional": true + }, + "core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==", + "dev": true + }, + "core-js-compat": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.4.tgz", + "integrity": "sha512-Z5zbO9f1d0YrJdoaQhphVAnKPimX92D6z8lCGphH89MNRxlL1prI9ExJPqVwP0/kgkQCv8c4GJGT8X16yUncOg==", + "dev": true, + "requires": { + "browserslist": "^4.6.2", + "core-js-pure": "3.1.4", + "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.1.4.tgz", + "integrity": "sha512-uJ4Z7iPNwiu1foygbcZYJsJs1jiXrTTCvxfLDXNhI/I+NHbSIEyr548y4fcsCEyWY0XgfAG/qqaunJ1SThHenA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true, + "optional": true + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -99,33 +1683,149 @@ "which": "^1.2.9" } }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "optional": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "ms": "2.0.0" + "repeating": "^2.0.0" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, "diff": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", "dev": true }, + "electron-to-chromium": { + "version": "1.3.191", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.191.tgz", + "integrity": "sha512-jasjtY5RUy/TOyiUYM2fb4BDaPZfm6CXRFeJDMfFsXYADGxUN49RBqtgB7EL2RmJXeIRUk9lM1U6A5yk2YJMPQ==", + "dev": true + }, + "es-abstract": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "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.0.12" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "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" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, "execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", @@ -141,12 +1841,190 @@ "strip-eof": "^1.0.0" } }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "optional": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "optional": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "optional": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -156,6 +2034,23 @@ "locate-path": "^2.0.0" } }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true, + "optional": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "optional": true, + "requires": { + "map-cache": "^0.2.2" + } + }, "fs-extra": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", @@ -169,10 +2064,570 @@ "rimraf": "^2.2.8" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "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" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "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" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "get-caller-file": { @@ -181,12 +2636,25 @@ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true, + "optional": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -201,6 +2669,35 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", @@ -213,18 +2710,104 @@ "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, "has-flag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "optional": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "optional": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -241,30 +2824,278 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "optional": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "optional": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "optional": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "optional": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "optional": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "optional": true + }, + "js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "jsonfile": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", @@ -286,6 +3117,13 @@ "safe-buffer": "^5.1.0" } }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "optional": true + }, "klaw": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", @@ -314,6 +3152,27 @@ "path-exists": "^3.0.0" } }, + "lodash": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -324,6 +3183,33 @@ "yallist": "^2.1.2" } }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true, + "optional": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "optional": true, + "requires": { + "object-visit": "^1.0.0" + } + }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -339,6 +3225,28 @@ "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", "dev": true }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -360,6 +3268,29 @@ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "optional": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -415,6 +3346,58 @@ "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-releases": { + "version": "1.1.25", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.25.tgz", + "integrity": "sha512-fI5BXuk83lKEoZDdH3gRhtsNgh05/wZacuXkgbiYkceE7+QIMXOg98n9ZV7mz27B+kFHnqHcUpscZZlGRSmTpQ==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "optional": true + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -430,6 +3413,88 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "optional": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "optional": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "optional": true, + "requires": { + "isobject": "^3.0.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -450,76 +3515,356 @@ "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=", "dev": true }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", "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" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz", + "integrity": "sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "is-plain-obj": "^1.1.0", + "mkdirp": "^0.5.1" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true, + "optional": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true, + "optional": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true, + "optional": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "optional": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "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" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", + "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", + "dev": true, + "requires": { + "private": "^0.1.6" } }, - "os-tmpdir": { + "regex-not": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "regexp-tree": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.11.tgz", + "integrity": "sha512-7/l/DgapVVDzZobwMCCgMlqiqyLFJ0cduo/j+3BcDJIB+yJdsYCfKuI3l/04NV+H/rfNRdPIDbXNZHM9XvQatg==", "dev": true }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "regexpu-core": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", + "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", "dev": true, "requires": { - "p-try": "^1.0.0" + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.0.2", + "regjsgen": "^0.5.0", + "regjsparser": "^0.6.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.1.0" } }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "regjsgen": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", + "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==", + "dev": true + }, + "regjsparser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", + "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true, + "optional": true }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true, + "optional": true }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "optional": true }, - "path-key": { + "repeating": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } }, "require-directory": { "version": "2.1.1", @@ -539,6 +3884,29 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, + "resolve": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true, + "optional": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "optional": true + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -554,6 +3922,16 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "optional": true, + "requires": { + "ret": "~0.1.10" + } + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", @@ -566,6 +3944,31 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -587,6 +3990,139 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "optional": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "optional": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "solc": { "version": "0.5.8", "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.8.tgz", @@ -603,6 +4139,84 @@ "yargs": "^11.0.0" } }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "optional": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true, + "optional": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "optional": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -613,6 +4227,16 @@ "strip-ansi": "^4.0.0" } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -646,6 +4270,64 @@ "os-tmpdir": "~1.0.2" } }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "optional": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "optional": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "truffle": { "version": "5.0.18", "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.0.18.tgz", @@ -674,6 +4356,144 @@ } } }, + "truffle-assertions": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/truffle-assertions/-/truffle-assertions-0.9.1.tgz", + "integrity": "sha512-MtcyXMTzRfg8WfE3TfrbVJm9HWMTPFksWg0K/8ZhajaxzFyPJ56/9AzNjQCROQluI0X1vs6XDsegwMlT1UFUNw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "lodash.isequal": "^4.5.0" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "optional": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "optional": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "optional": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true, + "optional": true + } + } + }, + "upath": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "dev": true, + "optional": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true, + "optional": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "optional": true + }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", From c057f2d28e9be76081a664bb9c5d02486f41d6d6 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 09:26:21 +0200 Subject: [PATCH 06/33] Update keep factory unit test --- solidity/test/ECDSAKeepFactoryTest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solidity/test/ECDSAKeepFactoryTest.js b/solidity/test/ECDSAKeepFactoryTest.js index dac5c3d9a..abee48d79 100644 --- a/solidity/test/ECDSAKeepFactoryTest.js +++ b/solidity/test/ECDSAKeepFactoryTest.js @@ -7,7 +7,7 @@ contract("ECDSAKeepFactory", async accounts => { let keepFactory = await ECDSAKeepFactory.deployed(); - let keepAddress = await keepFactory.createNewKeep.call( + let keepAddress = await keepFactory.openKeep.call( 10, // _groupSize, 5, // _honestThreshold, "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner @@ -15,7 +15,7 @@ contract("ECDSAKeepFactory", async accounts => { assert.fail(`ecdsa keep creation failed: ${err}`); }); - await keepFactory.createNewKeep( + await keepFactory.openKeep( 10, // _groupSize, 5, // _honestThreshold, "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner From 182d5fc89c5dd7bc351d01e665612db89435935f Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 13:17:26 +0200 Subject: [PATCH 07/33] Update truffle contract deployment script --- solidity/migrations/2_deploy_contracts.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index d42748208..b8a629d39 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -1,7 +1,19 @@ const ECDSAKeepFactory = artifacts.require("./ECDSAKeepFactory.sol"); +const ECDSAKeepVendor = artifacts.require("./ECDSAKeepVendor.sol"); const KeepRegistry = artifacts.require("./KeepRegistry.sol"); module.exports = async function (deployer) { - await deployer.deploy(ECDSAKeepFactory); - await deployer.deploy(KeepRegistry, ECDSAKeepFactory.address); -}; + await deployer.deploy(ECDSAKeepFactory) + let ecdsaKeepFactory = await ECDSAKeepFactory.deployed() + + await deployer.deploy(ECDSAKeepVendor) + .then((instance) => { + instance.registerFactory(ecdsaKeepFactory.address) + }) + let ecdsaKeepVendor = await ECDSAKeepVendor.deployed() + + await deployer.deploy(KeepRegistry) + .then((instance) => { + instance.setKeepTypeVendor('ECDSAKeep', ecdsaKeepVendor.address) + }) +} From 25c6fbe9cea515f9619c59cbe847f42b0444ed02 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 13:18:48 +0200 Subject: [PATCH 08/33] Upgrade openzeppelin version --- solidity/package-lock.json | 6 +++--- solidity/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/solidity/package-lock.json b/solidity/package-lock.json index 6f06da402..602a92e26 100644 --- a/solidity/package-lock.json +++ b/solidity/package-lock.json @@ -3505,9 +3505,9 @@ } }, "openzeppelin-solidity": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.2.0.tgz", - "integrity": "sha512-HfQq0xyT+EPs/lTWEd5Odu4T7CYdYe+qwf54EH28FQZthp4Bs6IWvOlOumTdS2dvpwZoTXURAopHn2LN1pwAGQ==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.3.0.tgz", + "integrity": "sha512-QYeiPLvB1oSbDt6lDQvvpx7k8ODczvE474hb2kLXZBPKMsxKT1WxTCHBYrCU7kS7hfAku4DcJ0jqOyL+jvjwQw==" }, "original-require": { "version": "1.0.1", diff --git a/solidity/package.json b/solidity/package.json index 655492246..04e148a10 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -19,7 +19,7 @@ }, "homepage": "https://github.com/keep-network/keep-tecdsa", "dependencies": { - "openzeppelin-solidity": "^2.2.0" + "openzeppelin-solidity": "^2.3.0" }, "devDependencies": { "@babel/cli": "^7.4.4", From 27da1cad22c7150d238d2227bde67132aeb37360 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 13:27:13 +0200 Subject: [PATCH 09/33] Add unit tests --- solidity/test/ECDSAKeepFactoryTest.js | 8 +- solidity/test/ECDSAKeepVendorTest.js | 182 ++++++++++++++++++++++++++ solidity/test/KeepRegistryTest.js | 137 +++++++++++++++++++ 3 files changed, 323 insertions(+), 4 deletions(-) create mode 100644 solidity/test/ECDSAKeepVendorTest.js create mode 100644 solidity/test/KeepRegistryTest.js diff --git a/solidity/test/ECDSAKeepFactoryTest.js b/solidity/test/ECDSAKeepFactoryTest.js index abee48d79..0824bdfff 100644 --- a/solidity/test/ECDSAKeepFactoryTest.js +++ b/solidity/test/ECDSAKeepFactoryTest.js @@ -8,16 +8,16 @@ contract("ECDSAKeepFactory", async accounts => { let keepFactory = await ECDSAKeepFactory.deployed(); let keepAddress = await keepFactory.openKeep.call( - 10, // _groupSize, - 5, // _honestThreshold, + 10, // _groupSize + 5, // _honestThreshold "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner ).catch((err) => { assert.fail(`ecdsa keep creation failed: ${err}`); }); await keepFactory.openKeep( - 10, // _groupSize, - 5, // _honestThreshold, + 10, // _groupSize + 5, // _honestThreshold "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner ).catch((err) => { assert.fail(`ecdsa keep creation failed: ${err}`); diff --git a/solidity/test/ECDSAKeepVendorTest.js b/solidity/test/ECDSAKeepVendorTest.js new file mode 100644 index 000000000..e951384cc --- /dev/null +++ b/solidity/test/ECDSAKeepVendorTest.js @@ -0,0 +1,182 @@ +var ECDSAKeepVendor = artifacts.require('ECDSAKeepVendor') +var ECDSAKeepFactoryStub = artifacts.require('ECDSAKeepFactoryStub') + + +contract("ECDSAKeepVendor", async accounts => { + const address0 = "0x0000000000000000000000000000000000000000" + const address1 = "0xF2D3Af2495E286C7820643B963FB9D34418c871d" + const address2 = "0x4566716c07617c5854fe7dA9aE5a1219B19CCd27" + + let keepVendor + + describe("register, remove and get factories", async () => { + let expectedResult + + beforeEach(async () => { + keepVendor = await ECDSAKeepVendor.new() + }) + + afterEach(async () => { + let result = await keepVendor.getFactories.call() + assert.deepEqual(result, expectedResult, "unexpected registered factories list") + }) + + describe("registerFactory", async () => { + it("registers one factory address", async () => { + expectedResult = [address1] + + await keepVendor.registerFactory(address1) + .catch((err) => { + assert.fail(`factory registration failed: ${err}`) + }) + }) + + it("registers two factory addresses", async () => { + expectedResult = [address1, address2] + + try { + await keepVendor.registerFactory(address1) + await keepVendor.registerFactory(address2) + } catch (err) { + assert.fail(`factory registration failed: ${err}`) + } + }) + + it("fails with zero address", async () => { + expectedResult = [] + + try { + await keepVendor.registerFactory(address0) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Factory address cannot be zero') + } + }) + + it("fails if address already exists", async () => { + expectedResult = [address1] + + await keepVendor.registerFactory(address1) + .catch((err) => { + assert.fail(`factory registration failed: ${err}`) + }) + + try { + await keepVendor.registerFactory(address1) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Factory address already registered') + } + }) + + it("cannot be called by non owner", async () => { + expectedResult = [] + + try { + await keepVendor.registerFactory.call(address1, { from: accounts[1] }) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Ownable: caller is not the owner') + } + }) + }) + + describe("removeFactory", async () => { + beforeEach(async () => { + await keepVendor.registerFactory(address1) + .catch((err) => { + assert.fail(`factory registration failed: ${err}`) + }) + }) + + it("remove factory address", async () => { + expectedResult = [] + + await keepVendor.removeFactory(address1) + .catch((err) => { + assert.fail(`factory removal failed: ${err}`) + }) + }) + + it("remove factory address which was not registered", async () => { + expectedResult = [address1] + + // If address2 has not been registered we don't expect to + // get any error on it's removal. + await keepVendor.removeFactory(address2) + .catch((err) => { + assert.fail(`factory removal failed: ${err}`) + }) + }) + + it("cannot be called by non owner", async () => { + expectedResult = [address1] + + try { + await keepVendor.removeFactory.call(address1, { from: accounts[1] }) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Ownable: caller is not the owner') + } + }) + }) + }) + + describe("selectFactory", async () => { + before(async () => { + keepVendor = await ECDSAKeepVendor.new() + + try { + await keepVendor.registerFactory(address1) + await keepVendor.registerFactory(address2) + } catch (err) { + assert.fail(`factory registration failed: ${err}`) + } + }) + + it("returns first factory from the list", async () => { + let expectedResult = address1 + + let result = await keepVendor.selectFactory.call() + .catch((err) => { + assert.fail(`factory selection failed: ${err}`) + }) + + assert.equal(result, expectedResult, "unexpected factory selected") + }) + }) + + describe("openKeep", async () => { + before(async () => { + keepVendor = await ECDSAKeepVendor.new() + let factoryStub1 = await ECDSAKeepFactoryStub.new() + let factoryStub2 = await ECDSAKeepFactoryStub.new() + + try { + await keepVendor.registerFactory(factoryStub1.address) + await keepVendor.registerFactory(factoryStub2.address) + } catch (err) { + assert.fail(`factory registration failed: ${err}`) + } + }) + + it("calls selected factory", async () => { + let selectedFactory = await ECDSAKeepFactoryStub.at( + await keepVendor.selectFactory.call() + ) + + let expectedResult = await selectedFactory.calculateKeepAddress.call() + + let result = await keepVendor.openKeep.call( + 10, // _groupSize + 5, // _honestThreshold + "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner + ) + .catch((err) => { + assert.fail(`factory selection failed: ${err}`) + }) + + assert.equal(result, expectedResult, "unexpected opened keep address") + }) + }) +}) diff --git a/solidity/test/KeepRegistryTest.js b/solidity/test/KeepRegistryTest.js new file mode 100644 index 000000000..d8841a87e --- /dev/null +++ b/solidity/test/KeepRegistryTest.js @@ -0,0 +1,137 @@ +var KeepRegistry = artifacts.require('KeepRegistry') + +contract("KeepRegistry", async accounts => { + const keepType1 = "ECDSA" + const keepType2 = "BondedECDSA" + const address0 = "0x0000000000000000000000000000000000000000" + const address1 = "0xF2D3Af2495E286C7820643B963FB9D34418c871d" + const address2 = "0x4566716c07617c5854fe7dA9aE5a1219B19CCd27" + + let keepRegistry + + before(async () => { + keepRegistry = await KeepRegistry.deployed() + }) + + describe("setKeepTypeVendor", async () => { + it("sets vendor address for new keep type", async () => { + keepRegistry = await KeepRegistry.new() + + await keepRegistry.setKeepTypeVendor(keepType1, address1) + .catch((err) => { + assert.fail(`vendor registration failed: ${err}`) + }) + + let result = await keepRegistry.getKeepVendor.call(keepType1) + assert.deepEqual(result, address1, "unexpected keep vendor address") + }) + + it("replaces vendor address for keep type", async () => { + try { + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType1, address2) + } catch (err) { + assert.fail(`vendor registration failed: ${err}`) + } + + let result = await keepRegistry.getKeepVendor.call(keepType1) + assert.deepEqual(result, address2, "unexpected keep vendor address") + }) + + it("sets two keep types with different addresses", async () => { + try { + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType2, address2) + } catch (err) { + assert.fail(`vendor registration failed: ${err}`) + } + + let result1 = await keepRegistry.getKeepVendor.call(keepType1) + assert.deepEqual(result1, address1, "unexpected keep vendor address") + + let result2 = await keepRegistry.getKeepVendor.call(keepType2) + assert.deepEqual(result2, address2, "unexpected keep vendor address") + }) + + it("sets two keep types with the same addresses", async () => { + try { + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType2, address1) + } catch (err) { + assert.fail(`vendor registration failed: ${err}`) + } + + let result1 = await keepRegistry.getKeepVendor.call(keepType1) + assert.deepEqual(result1, address1, "unexpected keep vendor address") + + let result2 = await keepRegistry.getKeepVendor.call(keepType2) + assert.deepEqual(result2, address1, "unexpected keep vendor address") + }) + + it("fails with zero address", async () => { + try { + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType1, address0) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Vendor address cannot be zero') + } + + let result = await keepRegistry.getKeepVendor.call(keepType1) + assert.deepEqual(result, address1, "unexpected keep vendor address") + }) + + it("cannot be called by non owner", async () => { + try { + await keepRegistry.setKeepTypeVendor.call(keepType1, address1, { from: accounts[1] }) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Ownable: caller is not the owner') + } + }) + }) + + describe("getKeepVendor", async () => { + it("returns zero for not registered keep type", async () => { + let result = await keepRegistry.getKeepVendor.call("NOT EXISTING") + assert.deepEqual(result, address0, "unexpected keep vendor address") + }) + }) + + describe("removeKeepType", async () => { + before(async () => { + try { + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType2, address2) + } catch (err) { + assert.fail(`vendor registration failed: ${err}`) + } + }) + + it("removes keep type address", async () => { + await keepRegistry.removeKeepType(keepType1) + .catch((err) => { + assert.fail(`vendor removal failed: ${err}`) + }) + + let result = await keepRegistry.getKeepVendor.call(keepType1) + assert.deepEqual(result, address0, "unexpected keep vendor address") + }) + + it("doesn't fail for not registered keep type", async () => { + await keepRegistry.removeKeepType("NOT EXISTING") + .catch((err) => { + assert.fail(`vendor removal failed: ${err}`) + }) + }) + + it("cannot be called by non owner", async () => { + try { + await keepRegistry.removeKeepType.call(keepType1, { from: accounts[1] }) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Ownable: caller is not the owner') + } + }) + }) +}) From 03ab1d5cff07a25ce2f327710edece485a4711ac Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 13:27:32 +0200 Subject: [PATCH 10/33] ECDSAKeepFactory stub for testing --- .../test/contracts/ECDSAKeepFactoryStub.sol | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 solidity/test/contracts/ECDSAKeepFactoryStub.sol diff --git a/solidity/test/contracts/ECDSAKeepFactoryStub.sol b/solidity/test/contracts/ECDSAKeepFactoryStub.sol new file mode 100644 index 000000000..79c8ad230 --- /dev/null +++ b/solidity/test/contracts/ECDSAKeepFactoryStub.sol @@ -0,0 +1,28 @@ +pragma solidity ^0.5.4; + +import "../../contracts/ECDSAKeepFactory.sol"; + +/// @title ECDSA Keep Factory Stub +/// @dev This contract is for testing purposes only. +contract ECDSAKeepFactoryStub is ECDSAKeepFactory { + + /// @dev Returns calculated keep address. + function openKeep( + uint256 _groupSize, + uint256 _honestThreshold, + address _owner + ) public payable returns (address) { + _groupSize; + _honestThreshold; + _owner; + + return calculateKeepAddress(); + } + + /// @dev Calculates an address for a keep based on the address of the factory. + /// We need it to have predictable addresses for factories verification. + function calculateKeepAddress() public view returns (address) { + uint256 factoryAddressInt = uint256(address(this)); + return address(factoryAddressInt % 1000000000000); + } +} From c20716ea10d07e543ddc5b967a851f2a5e39ec38 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 13:36:17 +0200 Subject: [PATCH 11/33] Remove empty line --- solidity/test/ECDSAKeepVendorTest.js | 1 - 1 file changed, 1 deletion(-) diff --git a/solidity/test/ECDSAKeepVendorTest.js b/solidity/test/ECDSAKeepVendorTest.js index e951384cc..52a42db9a 100644 --- a/solidity/test/ECDSAKeepVendorTest.js +++ b/solidity/test/ECDSAKeepVendorTest.js @@ -1,7 +1,6 @@ var ECDSAKeepVendor = artifacts.require('ECDSAKeepVendor') var ECDSAKeepFactoryStub = artifacts.require('ECDSAKeepFactoryStub') - contract("ECDSAKeepVendor", async accounts => { const address0 = "0x0000000000000000000000000000000000000000" const address1 = "0xF2D3Af2495E286C7820643B963FB9D34418c871d" From ad78b91fef3e517e150bc11158e1b5699fae2aab Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 13:42:34 +0200 Subject: [PATCH 12/33] create new keep -> open keep --- solidity/test/integration/keep_signature_requested.js | 6 +++--- tests/smoketest/smoketest.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/solidity/test/integration/keep_signature_requested.js b/solidity/test/integration/keep_signature_requested.js index 1f779d1c8..59f850692 100644 --- a/solidity/test/integration/keep_signature_requested.js +++ b/solidity/test/integration/keep_signature_requested.js @@ -6,7 +6,7 @@ const truffleAssert = require('truffle-assertions'); // ECDSAKeep // signature request // creates a new keep and calls .sign -module.exports = async function() { +module.exports = async function () { let accounts = await web3.eth.getAccounts(); let factoryInstance = await ECDSAKeepFactory.deployed(); @@ -16,7 +16,7 @@ module.exports = async function() { let honestThreshold = 1; let owner = accounts[0]; - let createKeepTx = await factoryInstance.createNewKeep( + let createKeepTx = await factoryInstance.openKeep( groupSize, honestThreshold, owner @@ -39,4 +39,4 @@ module.exports = async function() { }); process.exit(0) -} \ No newline at end of file +} diff --git a/tests/smoketest/smoketest.go b/tests/smoketest/smoketest.go index 6b1763100..2304efde0 100644 --- a/tests/smoketest/smoketest.go +++ b/tests/smoketest/smoketest.go @@ -52,7 +52,7 @@ func Execute(config *ethereum.Config) error { honestThreshold := big.NewInt(5) // Request a new keep creation. - transaction, err := ecdsaKeepFactory.CreateNewKeep( + transaction, err := ecdsaKeepFactory.OpenKeep( transactorOpts, groupSize, honestThreshold, From 1999183335532c0cc97595fba7b69e11900218a3 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 14:05:40 +0200 Subject: [PATCH 13/33] Update name of getKeepTypeVendor func --- solidity/contracts/KeepRegistry.sol | 2 +- solidity/test/KeepRegistryTest.js | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index 4fb6008aa..c5d524826 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -25,7 +25,7 @@ contract KeepRegistry is Ownable { /// @notice Get a keep vendor contract address for a keep type. /// @param _keepType Keep type. /// @return Keep vendor contract address. - function getKeepVendor(string memory _keepType) public view returns (address) { + function getKeepTypeVendor(string memory _keepType) public view returns (address) { return keepVendors[_keepType]; } diff --git a/solidity/test/KeepRegistryTest.js b/solidity/test/KeepRegistryTest.js index d8841a87e..f21aa481d 100644 --- a/solidity/test/KeepRegistryTest.js +++ b/solidity/test/KeepRegistryTest.js @@ -22,7 +22,7 @@ contract("KeepRegistry", async accounts => { assert.fail(`vendor registration failed: ${err}`) }) - let result = await keepRegistry.getKeepVendor.call(keepType1) + let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address1, "unexpected keep vendor address") }) @@ -34,7 +34,7 @@ contract("KeepRegistry", async accounts => { assert.fail(`vendor registration failed: ${err}`) } - let result = await keepRegistry.getKeepVendor.call(keepType1) + let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address2, "unexpected keep vendor address") }) @@ -46,10 +46,10 @@ contract("KeepRegistry", async accounts => { assert.fail(`vendor registration failed: ${err}`) } - let result1 = await keepRegistry.getKeepVendor.call(keepType1) + let result1 = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") - let result2 = await keepRegistry.getKeepVendor.call(keepType2) + let result2 = await keepRegistry.getKeepTypeVendor.call(keepType2) assert.deepEqual(result2, address2, "unexpected keep vendor address") }) @@ -61,10 +61,10 @@ contract("KeepRegistry", async accounts => { assert.fail(`vendor registration failed: ${err}`) } - let result1 = await keepRegistry.getKeepVendor.call(keepType1) + let result1 = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") - let result2 = await keepRegistry.getKeepVendor.call(keepType2) + let result2 = await keepRegistry.getKeepTypeVendor.call(keepType2) assert.deepEqual(result2, address1, "unexpected keep vendor address") }) @@ -77,7 +77,7 @@ contract("KeepRegistry", async accounts => { assert.include(e.message, 'Vendor address cannot be zero') } - let result = await keepRegistry.getKeepVendor.call(keepType1) + let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address1, "unexpected keep vendor address") }) @@ -91,9 +91,9 @@ contract("KeepRegistry", async accounts => { }) }) - describe("getKeepVendor", async () => { + describe("getKeepTypeVendor", async () => { it("returns zero for not registered keep type", async () => { - let result = await keepRegistry.getKeepVendor.call("NOT EXISTING") + let result = await keepRegistry.getKeepTypeVendor.call("NOT EXISTING") assert.deepEqual(result, address0, "unexpected keep vendor address") }) }) @@ -114,7 +114,7 @@ contract("KeepRegistry", async accounts => { assert.fail(`vendor removal failed: ${err}`) }) - let result = await keepRegistry.getKeepVendor.call(keepType1) + let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address0, "unexpected keep vendor address") }) From 7600be6c12975d72024ec2e6c3e77a98b762efac Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 14:56:40 +0200 Subject: [PATCH 14/33] Remove unnecessary error catches Truffle is catching unexpected errors in test so no need to declare catches for functions execution. --- solidity/test/ECDSAKeepFactoryTest.js | 8 +- solidity/test/ECDSAKeepTest.js | 117 ++++++++++++-------------- solidity/test/ECDSAKeepVendorTest.js | 45 ++-------- solidity/test/KeepRegistryTest.js | 44 +++------- 4 files changed, 73 insertions(+), 141 deletions(-) diff --git a/solidity/test/ECDSAKeepFactoryTest.js b/solidity/test/ECDSAKeepFactoryTest.js index 0824bdfff..3becf8657 100644 --- a/solidity/test/ECDSAKeepFactoryTest.js +++ b/solidity/test/ECDSAKeepFactoryTest.js @@ -11,17 +11,13 @@ contract("ECDSAKeepFactory", async accounts => { 10, // _groupSize 5, // _honestThreshold "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner - ).catch((err) => { - assert.fail(`ecdsa keep creation failed: ${err}`); - }); + ) await keepFactory.openKeep( 10, // _groupSize 5, // _honestThreshold "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner - ).catch((err) => { - assert.fail(`ecdsa keep creation failed: ${err}`); - }); + ) let eventList = await keepFactory.getPastEvents('ECDSAKeepCreated', { fromBlock: blockNumber, diff --git a/solidity/test/ECDSAKeepTest.js b/solidity/test/ECDSAKeepTest.js index ee0f76fc4..ffde18c20 100644 --- a/solidity/test/ECDSAKeepTest.js +++ b/solidity/test/ECDSAKeepTest.js @@ -3,79 +3,72 @@ const ECDSAKeep = artifacts.require('./ECDSAKeep.sol'); const truffleAssert = require('truffle-assertions'); -contract('ECDSAKeep', function(accounts) { - describe("#constructor", async function() { - it('succeeds', async () => { - let owner = accounts[0] - let members = [ owner ]; - let threshold = 1; - - let instance = await ECDSAKeep.new( - owner, - members, - threshold - ); - - expect(instance.address).to.be.not.empty; - }) - }); - - describe('#sign', async function () { - let instance; +contract('ECDSAKeep', function (accounts) { + describe("#constructor", async function () { + it('succeeds', async () => { + let owner = accounts[0] + let members = [owner]; + let threshold = 1; + + let instance = await ECDSAKeep.new( + owner, + members, + threshold + ); + + expect(instance.address).to.be.not.empty; + }) + }); - before(async () => { - let owner = accounts[0] - let members = [ owner ]; - let threshold = 1; + describe('#sign', async function () { + let instance; - instance = await ECDSAKeep.new( - owner, - members, - threshold - ); - }); + before(async () => { + let owner = accounts[0] + let members = [owner]; + let threshold = 1; - it('emits event', async () => { - let res = await instance.sign('0x00') - truffleAssert.eventEmitted(res, 'SignatureRequested', (ev) => { - return ev.digest == '0x00' + instance = await ECDSAKeep.new( + owner, + members, + threshold + ); }); + + it('emits event', async () => { + let res = await instance.sign('0x00') + truffleAssert.eventEmitted(res, 'SignatureRequested', (ev) => { + return ev.digest == '0x00' + }); + }) }) - }) - describe("public key", () => { - let expectedPublicKey = web3.utils.hexToBytes("0x67656e657261746564207075626c6963206b6579") - let owner = "0xbc4862697a1099074168d54A555c4A60169c18BD"; - let members = ["0x774700a36A96037936B8666dCFdd3Fb6687b08cb"]; - let honestThreshold = 5; + describe("public key", () => { + let expectedPublicKey = web3.utils.hexToBytes("0x67656e657261746564207075626c6963206b6579") + let owner = "0xbc4862697a1099074168d54A555c4A60169c18BD"; + let members = ["0x774700a36A96037936B8666dCFdd3Fb6687b08cb"]; + let honestThreshold = 5; + + it("get public key before it is set", async () => { + let keep = await ECDSAKeep.new(owner, members, honestThreshold); - it("get public key before it is set", async () => { - let keep = await ECDSAKeep.new(owner, members, honestThreshold); + let publicKey = await keep.getPublicKey.call() - let publicKey = await keep.getPublicKey.call().catch((err) => { - assert.fail(`ecdsa keep creation failed: ${err}`); + assert.equal(publicKey, undefined, "incorrect public key") }); - assert.equal(publicKey, undefined, "incorrect public key") - }); + it("set public key and get it", async () => { + let keep = await ECDSAKeep.new(owner, members, honestThreshold); - it("set public key and get it", async () => { - let keep = await ECDSAKeep.new(owner, members, honestThreshold); + await keep.setPublicKey(expectedPublicKey) - await keep.setPublicKey(expectedPublicKey).catch((err) => { - assert.fail(`ecdsa keep creation failed: ${err}`); - }); + let publicKey = await keep.getPublicKey.call() - let publicKey = await keep.getPublicKey.call().catch((err) => { - assert.fail(`cannot get public key: ${err}`); + assert.equal( + publicKey, + web3.utils.bytesToHex(expectedPublicKey), + "incorrect public key" + ) }); - - assert.equal( - publicKey, - web3.utils.bytesToHex(expectedPublicKey), - "incorrect public key" - ) - }); - }) - -}); \ No newline at end of file + }) +}); diff --git a/solidity/test/ECDSAKeepVendorTest.js b/solidity/test/ECDSAKeepVendorTest.js index 52a42db9a..30f4b424b 100644 --- a/solidity/test/ECDSAKeepVendorTest.js +++ b/solidity/test/ECDSAKeepVendorTest.js @@ -25,20 +25,13 @@ contract("ECDSAKeepVendor", async accounts => { expectedResult = [address1] await keepVendor.registerFactory(address1) - .catch((err) => { - assert.fail(`factory registration failed: ${err}`) - }) }) it("registers two factory addresses", async () => { expectedResult = [address1, address2] - try { - await keepVendor.registerFactory(address1) - await keepVendor.registerFactory(address2) - } catch (err) { - assert.fail(`factory registration failed: ${err}`) - } + await keepVendor.registerFactory(address1) + await keepVendor.registerFactory(address2) }) it("fails with zero address", async () => { @@ -56,9 +49,6 @@ contract("ECDSAKeepVendor", async accounts => { expectedResult = [address1] await keepVendor.registerFactory(address1) - .catch((err) => { - assert.fail(`factory registration failed: ${err}`) - }) try { await keepVendor.registerFactory(address1) @@ -83,18 +73,12 @@ contract("ECDSAKeepVendor", async accounts => { describe("removeFactory", async () => { beforeEach(async () => { await keepVendor.registerFactory(address1) - .catch((err) => { - assert.fail(`factory registration failed: ${err}`) - }) }) it("remove factory address", async () => { expectedResult = [] await keepVendor.removeFactory(address1) - .catch((err) => { - assert.fail(`factory removal failed: ${err}`) - }) }) it("remove factory address which was not registered", async () => { @@ -103,9 +87,6 @@ contract("ECDSAKeepVendor", async accounts => { // If address2 has not been registered we don't expect to // get any error on it's removal. await keepVendor.removeFactory(address2) - .catch((err) => { - assert.fail(`factory removal failed: ${err}`) - }) }) it("cannot be called by non owner", async () => { @@ -125,21 +106,14 @@ contract("ECDSAKeepVendor", async accounts => { before(async () => { keepVendor = await ECDSAKeepVendor.new() - try { - await keepVendor.registerFactory(address1) - await keepVendor.registerFactory(address2) - } catch (err) { - assert.fail(`factory registration failed: ${err}`) - } + await keepVendor.registerFactory(address1) + await keepVendor.registerFactory(address2) }) it("returns first factory from the list", async () => { let expectedResult = address1 let result = await keepVendor.selectFactory.call() - .catch((err) => { - assert.fail(`factory selection failed: ${err}`) - }) assert.equal(result, expectedResult, "unexpected factory selected") }) @@ -151,12 +125,8 @@ contract("ECDSAKeepVendor", async accounts => { let factoryStub1 = await ECDSAKeepFactoryStub.new() let factoryStub2 = await ECDSAKeepFactoryStub.new() - try { - await keepVendor.registerFactory(factoryStub1.address) - await keepVendor.registerFactory(factoryStub2.address) - } catch (err) { - assert.fail(`factory registration failed: ${err}`) - } + await keepVendor.registerFactory(factoryStub1.address) + await keepVendor.registerFactory(factoryStub2.address) }) it("calls selected factory", async () => { @@ -171,9 +141,6 @@ contract("ECDSAKeepVendor", async accounts => { 5, // _honestThreshold "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner ) - .catch((err) => { - assert.fail(`factory selection failed: ${err}`) - }) assert.equal(result, expectedResult, "unexpected opened keep address") }) diff --git a/solidity/test/KeepRegistryTest.js b/solidity/test/KeepRegistryTest.js index f21aa481d..1b5e8b061 100644 --- a/solidity/test/KeepRegistryTest.js +++ b/solidity/test/KeepRegistryTest.js @@ -18,33 +18,22 @@ contract("KeepRegistry", async accounts => { keepRegistry = await KeepRegistry.new() await keepRegistry.setKeepTypeVendor(keepType1, address1) - .catch((err) => { - assert.fail(`vendor registration failed: ${err}`) - }) let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address1, "unexpected keep vendor address") }) it("replaces vendor address for keep type", async () => { - try { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType1, address2) - } catch (err) { - assert.fail(`vendor registration failed: ${err}`) - } + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType1, address2) let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address2, "unexpected keep vendor address") }) it("sets two keep types with different addresses", async () => { - try { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType2, address2) - } catch (err) { - assert.fail(`vendor registration failed: ${err}`) - } + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType2, address2) let result1 = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") @@ -54,12 +43,8 @@ contract("KeepRegistry", async accounts => { }) it("sets two keep types with the same addresses", async () => { - try { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType2, address1) - } catch (err) { - assert.fail(`vendor registration failed: ${err}`) - } + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType2, address1) let result1 = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") @@ -69,8 +54,9 @@ contract("KeepRegistry", async accounts => { }) it("fails with zero address", async () => { + await keepRegistry.setKeepTypeVendor(keepType1, address1) + try { - await keepRegistry.setKeepTypeVendor(keepType1, address1) await keepRegistry.setKeepTypeVendor(keepType1, address0) assert(false, 'Test call did not error as expected') } catch (e) { @@ -100,19 +86,12 @@ contract("KeepRegistry", async accounts => { describe("removeKeepType", async () => { before(async () => { - try { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType2, address2) - } catch (err) { - assert.fail(`vendor registration failed: ${err}`) - } + await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setKeepTypeVendor(keepType2, address2) }) it("removes keep type address", async () => { await keepRegistry.removeKeepType(keepType1) - .catch((err) => { - assert.fail(`vendor removal failed: ${err}`) - }) let result = await keepRegistry.getKeepTypeVendor.call(keepType1) assert.deepEqual(result, address0, "unexpected keep vendor address") @@ -120,9 +99,6 @@ contract("KeepRegistry", async accounts => { it("doesn't fail for not registered keep type", async () => { await keepRegistry.removeKeepType("NOT EXISTING") - .catch((err) => { - assert.fail(`vendor removal failed: ${err}`) - }) }) it("cannot be called by non owner", async () => { From 7f77147131206b437a08085c3c9c29361828e1f1 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jul 2019 18:31:03 +0200 Subject: [PATCH 15/33] Simplify truffle deploy scripts --- solidity/migrations/2_deploy_contracts.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index b8a629d39..14329bccf 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -4,16 +4,11 @@ const KeepRegistry = artifacts.require("./KeepRegistry.sol"); module.exports = async function (deployer) { await deployer.deploy(ECDSAKeepFactory) - let ecdsaKeepFactory = await ECDSAKeepFactory.deployed() + const ecdsaKeepFactory = await ECDSAKeepFactory.deployed() - await deployer.deploy(ECDSAKeepVendor) - .then((instance) => { - instance.registerFactory(ecdsaKeepFactory.address) - }) - let ecdsaKeepVendor = await ECDSAKeepVendor.deployed() + const ecdsaKeepVendor = await deployer.deploy(ECDSAKeepVendor) + ecdsaKeepVendor.registerFactory(ecdsaKeepFactory.address) - await deployer.deploy(KeepRegistry) - .then((instance) => { - instance.setKeepTypeVendor('ECDSAKeep', ecdsaKeepVendor.address) - }) + const keepRegistry = await deployer.deploy(KeepRegistry) + keepRegistry.setKeepTypeVendor('ECDSAKeep', ecdsaKeepVendor.address) } From e97c2134949362b5e3a223ffb0b80ba817c4bf57 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Thu, 18 Jul 2019 11:41:00 +0200 Subject: [PATCH 16/33] Rename set/get vendor for keep type functions --- solidity/contracts/KeepRegistry.sol | 4 +- solidity/migrations/2_deploy_contracts.js | 2 +- solidity/test/KeepRegistryTest.js | 46 +++++++++++------------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index c5d524826..effc2dc0e 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -16,7 +16,7 @@ contract KeepRegistry is Ownable { /// @dev Only contract owner can call this function. /// @param _keepType Keep type. /// @param _vendorAddress Keep Vendor contract address. - function setKeepTypeVendor(string memory _keepType, address _vendorAddress) public onlyOwner { + function setVendorForKeepType(string memory _keepType, address _vendorAddress) public onlyOwner { require(_vendorAddress != address(0), "Vendor address cannot be zero"); keepVendors[_keepType] = _vendorAddress; @@ -25,7 +25,7 @@ contract KeepRegistry is Ownable { /// @notice Get a keep vendor contract address for a keep type. /// @param _keepType Keep type. /// @return Keep vendor contract address. - function getKeepTypeVendor(string memory _keepType) public view returns (address) { + function getVendorForKeepType(string memory _keepType) public view returns (address) { return keepVendors[_keepType]; } diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index 14329bccf..6f2da59d0 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -10,5 +10,5 @@ module.exports = async function (deployer) { ecdsaKeepVendor.registerFactory(ecdsaKeepFactory.address) const keepRegistry = await deployer.deploy(KeepRegistry) - keepRegistry.setKeepTypeVendor('ECDSAKeep', ecdsaKeepVendor.address) + keepRegistry.setVendorForKeepType('ECDSAKeep', ecdsaKeepVendor.address) } diff --git a/solidity/test/KeepRegistryTest.js b/solidity/test/KeepRegistryTest.js index 1b5e8b061..cdee2c616 100644 --- a/solidity/test/KeepRegistryTest.js +++ b/solidity/test/KeepRegistryTest.js @@ -13,63 +13,63 @@ contract("KeepRegistry", async accounts => { keepRegistry = await KeepRegistry.deployed() }) - describe("setKeepTypeVendor", async () => { + describe("setVendorForKeepType", async () => { it("sets vendor address for new keep type", async () => { keepRegistry = await KeepRegistry.new() - await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setVendorForKeepType(keepType1, address1) - let result = await keepRegistry.getKeepTypeVendor.call(keepType1) + let result = await keepRegistry.getVendorForKeepType.call(keepType1) assert.deepEqual(result, address1, "unexpected keep vendor address") }) it("replaces vendor address for keep type", async () => { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType1, address2) + await keepRegistry.setVendorForKeepType(keepType1, address1) + await keepRegistry.setVendorForKeepType(keepType1, address2) - let result = await keepRegistry.getKeepTypeVendor.call(keepType1) + let result = await keepRegistry.getVendorForKeepType.call(keepType1) assert.deepEqual(result, address2, "unexpected keep vendor address") }) it("sets two keep types with different addresses", async () => { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType2, address2) + await keepRegistry.setVendorForKeepType(keepType1, address1) + await keepRegistry.setVendorForKeepType(keepType2, address2) - let result1 = await keepRegistry.getKeepTypeVendor.call(keepType1) + let result1 = await keepRegistry.getVendorForKeepType.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") - let result2 = await keepRegistry.getKeepTypeVendor.call(keepType2) + let result2 = await keepRegistry.getVendorForKeepType.call(keepType2) assert.deepEqual(result2, address2, "unexpected keep vendor address") }) it("sets two keep types with the same addresses", async () => { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType2, address1) + await keepRegistry.setVendorForKeepType(keepType1, address1) + await keepRegistry.setVendorForKeepType(keepType2, address1) - let result1 = await keepRegistry.getKeepTypeVendor.call(keepType1) + let result1 = await keepRegistry.getVendorForKeepType.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") - let result2 = await keepRegistry.getKeepTypeVendor.call(keepType2) + let result2 = await keepRegistry.getVendorForKeepType.call(keepType2) assert.deepEqual(result2, address1, "unexpected keep vendor address") }) it("fails with zero address", async () => { - await keepRegistry.setKeepTypeVendor(keepType1, address1) + await keepRegistry.setVendorForKeepType(keepType1, address1) try { - await keepRegistry.setKeepTypeVendor(keepType1, address0) + await keepRegistry.setVendorForKeepType(keepType1, address0) assert(false, 'Test call did not error as expected') } catch (e) { assert.include(e.message, 'Vendor address cannot be zero') } - let result = await keepRegistry.getKeepTypeVendor.call(keepType1) + let result = await keepRegistry.getVendorForKeepType.call(keepType1) assert.deepEqual(result, address1, "unexpected keep vendor address") }) it("cannot be called by non owner", async () => { try { - await keepRegistry.setKeepTypeVendor.call(keepType1, address1, { from: accounts[1] }) + await keepRegistry.setVendorForKeepType.call(keepType1, address1, { from: accounts[1] }) assert(false, 'Test call did not error as expected') } catch (e) { assert.include(e.message, 'Ownable: caller is not the owner') @@ -77,23 +77,23 @@ contract("KeepRegistry", async accounts => { }) }) - describe("getKeepTypeVendor", async () => { + describe("getVendorForKeepType", async () => { it("returns zero for not registered keep type", async () => { - let result = await keepRegistry.getKeepTypeVendor.call("NOT EXISTING") + let result = await keepRegistry.getVendorForKeepType.call("NOT EXISTING") assert.deepEqual(result, address0, "unexpected keep vendor address") }) }) describe("removeKeepType", async () => { before(async () => { - await keepRegistry.setKeepTypeVendor(keepType1, address1) - await keepRegistry.setKeepTypeVendor(keepType2, address2) + await keepRegistry.setVendorForKeepType(keepType1, address1) + await keepRegistry.setVendorForKeepType(keepType2, address2) }) it("removes keep type address", async () => { await keepRegistry.removeKeepType(keepType1) - let result = await keepRegistry.getKeepTypeVendor.call(keepType1) + let result = await keepRegistry.getVendorForKeepType.call(keepType1) assert.deepEqual(result, address0, "unexpected keep vendor address") }) From 98d65ef66f3c0a62b1fb1d2634123f1d716b4382 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 15:42:10 +0200 Subject: [PATCH 17/33] Remove address 0 validation from Keep Registry --- solidity/contracts/KeepRegistry.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index effc2dc0e..108670dd1 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -17,8 +17,6 @@ contract KeepRegistry is Ownable { /// @param _keepType Keep type. /// @param _vendorAddress Keep Vendor contract address. function setVendorForKeepType(string memory _keepType, address _vendorAddress) public onlyOwner { - require(_vendorAddress != address(0), "Vendor address cannot be zero"); - keepVendors[_keepType] = _vendorAddress; } From c0897a083bae714308d18fae98fe8f383acc0c12 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 15:42:55 +0200 Subject: [PATCH 18/33] Delete vendor removal function --- solidity/contracts/KeepRegistry.sol | 7 ------- 1 file changed, 7 deletions(-) diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index 108670dd1..2ba09f5a4 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -26,11 +26,4 @@ contract KeepRegistry is Ownable { function getVendorForKeepType(string memory _keepType) public view returns (address) { return keepVendors[_keepType]; } - - /// @notice Remove a keep type from the registry. - /// @dev Only contract owner can call this function. - /// @param _keepType Keep type. - function removeKeepType(string memory _keepType) public onlyOwner { - delete keepVendors[_keepType]; - } } From 847bb3c222b02b7bb5b8aa4bddda98098c94ae81 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 17:05:23 +0200 Subject: [PATCH 19/33] Delete removeFactory and address(0) check --- solidity/contracts/ECDSAKeepVendor.sol | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/solidity/contracts/ECDSAKeepVendor.sol b/solidity/contracts/ECDSAKeepVendor.sol index 8dd7e6103..51e9d0f93 100644 --- a/solidity/contracts/ECDSAKeepVendor.sol +++ b/solidity/contracts/ECDSAKeepVendor.sol @@ -22,25 +22,11 @@ contract ECDSAKeepVendor is Ownable { /// cannot be zero and cannot be already registered. /// @param _factory ECDSA keep factory address. function registerFactory(address _factory) public onlyOwner { - require(_factory != address(0), "Factory address cannot be zero"); require(!factories.contains(_factory), "Factory address already registered"); factories.push(_factory); } - /// @notice Unregister ECDSA keep factory. - /// @dev Removes a factory address from the list of registered factories. - /// @param _factory ECDSA keep factory address. - function removeFactory(address _factory) public onlyOwner { - factories.removeAddress(_factory); - } - - /// @notice Get registered ECDSA keep factories. - /// @return List of registered ECDSA keep factory addresses. - function getFactories() public view returns (address[] memory) { - return factories; - } - /// @notice Select a recommended ECDSA keep factory from all registered /// ECDSA keep factories. /// @dev This is a stub implementation returning first factory on the list. From cdf427bd1574522fc4b0f6eaeb4d82961198acc5 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 17:05:47 +0200 Subject: [PATCH 20/33] Make selectFactory internal --- solidity/contracts/ECDSAKeepVendor.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity/contracts/ECDSAKeepVendor.sol b/solidity/contracts/ECDSAKeepVendor.sol index 51e9d0f93..23be2b925 100644 --- a/solidity/contracts/ECDSAKeepVendor.sol +++ b/solidity/contracts/ECDSAKeepVendor.sol @@ -31,7 +31,7 @@ contract ECDSAKeepVendor is Ownable { /// ECDSA keep factories. /// @dev This is a stub implementation returning first factory on the list. /// @return Selected ECDSA keep factory address. - function selectFactory() public view returns (address) { + function selectFactory() internal view returns (address) { // TODO: Implement factory selection mechanism. return factories[0]; } From cfad47cc9654bd3608a8239e7ea4ab9869920764 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 17:06:00 +0200 Subject: [PATCH 21/33] Rename get/set vendor functions --- solidity/contracts/KeepRegistry.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index 2ba09f5a4..86d0ccf7a 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -16,14 +16,14 @@ contract KeepRegistry is Ownable { /// @dev Only contract owner can call this function. /// @param _keepType Keep type. /// @param _vendorAddress Keep Vendor contract address. - function setVendorForKeepType(string memory _keepType, address _vendorAddress) public onlyOwner { + function setVendor(string memory _keepType, address _vendorAddress) public onlyOwner { keepVendors[_keepType] = _vendorAddress; } /// @notice Get a keep vendor contract address for a keep type. /// @param _keepType Keep type. /// @return Keep vendor contract address. - function getVendorForKeepType(string memory _keepType) public view returns (address) { + function getVendor(string memory _keepType) public view returns (address) { return keepVendors[_keepType]; } } From bc6338c4226d09060c937bcfd0379c2b1837d678 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 17:07:27 +0200 Subject: [PATCH 22/33] ECDSA keep vendor stub contract --- .../test/contracts/ECDSAKeepVendorStub.sol | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 solidity/test/contracts/ECDSAKeepVendorStub.sol diff --git a/solidity/test/contracts/ECDSAKeepVendorStub.sol b/solidity/test/contracts/ECDSAKeepVendorStub.sol new file mode 100644 index 000000000..9e4899cbb --- /dev/null +++ b/solidity/test/contracts/ECDSAKeepVendorStub.sol @@ -0,0 +1,23 @@ +pragma solidity ^0.5.4; + +import "../../contracts/ECDSAKeepVendor.sol"; + +/// @title ECDSA Keep Vendor Stub +/// @dev This contract is for testing purposes only. +contract ECDSAKeepVendorStub is ECDSAKeepVendor { + + /// @notice Get registered ECDSA keep factories. + /// @dev This is a stub implementation to validate the factories list. + /// @return List of registered ECDSA keep factory addresses. + function getFactories() public view returns (address[] memory) { + return factories; + } + + /// @notice Select a recommended ECDSA keep factory from all registered + /// ECDSA keep factories. + /// @dev This is a stub implementation to expose the function for testing. + /// @return Selected ECDSA keep factory address. + function selectFactoryPublic() public view returns (address) { + return selectFactory(); + } +} From ca5dd0693073b215d2b0e834fdd301a067771772 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 17:07:54 +0200 Subject: [PATCH 23/33] Update deployment script --- solidity/migrations/2_deploy_contracts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index 6f2da59d0..8c093cb2f 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -10,5 +10,5 @@ module.exports = async function (deployer) { ecdsaKeepVendor.registerFactory(ecdsaKeepFactory.address) const keepRegistry = await deployer.deploy(KeepRegistry) - keepRegistry.setVendorForKeepType('ECDSAKeep', ecdsaKeepVendor.address) + keepRegistry.setVendor('ECDSAKeep', ecdsaKeepVendor.address) } From f736128c41584455f7c8d1c613e701598285fda4 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jul 2019 17:08:05 +0200 Subject: [PATCH 24/33] Tests updates --- solidity/test/ECDSAKeepVendorTest.js | 112 +++++++++------------------ solidity/test/KeepRegistryTest.js | 90 +++++++-------------- 2 files changed, 65 insertions(+), 137 deletions(-) diff --git a/solidity/test/ECDSAKeepVendorTest.js b/solidity/test/ECDSAKeepVendorTest.js index 30f4b424b..2d3c15630 100644 --- a/solidity/test/ECDSAKeepVendorTest.js +++ b/solidity/test/ECDSAKeepVendorTest.js @@ -1,4 +1,4 @@ -var ECDSAKeepVendor = artifacts.require('ECDSAKeepVendor') +var ECDSAKeepVendor = artifacts.require('ECDSAKeepVendorStub') var ECDSAKeepFactoryStub = artifacts.require('ECDSAKeepFactoryStub') contract("ECDSAKeepVendor", async accounts => { @@ -8,7 +8,7 @@ contract("ECDSAKeepVendor", async accounts => { let keepVendor - describe("register, remove and get factories", async () => { + describe("registerFactory", async () => { let expectedResult beforeEach(async () => { @@ -20,85 +20,47 @@ contract("ECDSAKeepVendor", async accounts => { assert.deepEqual(result, expectedResult, "unexpected registered factories list") }) - describe("registerFactory", async () => { - it("registers one factory address", async () => { - expectedResult = [address1] + it("registers one factory address", async () => { + expectedResult = [address1] - await keepVendor.registerFactory(address1) - }) - - it("registers two factory addresses", async () => { - expectedResult = [address1, address2] - - await keepVendor.registerFactory(address1) - await keepVendor.registerFactory(address2) - }) - - it("fails with zero address", async () => { - expectedResult = [] - - try { - await keepVendor.registerFactory(address0) - assert(false, 'Test call did not error as expected') - } catch (e) { - assert.include(e.message, 'Factory address cannot be zero') - } - }) + await keepVendor.registerFactory(address1) + }) - it("fails if address already exists", async () => { - expectedResult = [address1] + it("registers factory with zero address", async () => { + expectedResult = [address0] - await keepVendor.registerFactory(address1) - - try { - await keepVendor.registerFactory(address1) - assert(false, 'Test call did not error as expected') - } catch (e) { - assert.include(e.message, 'Factory address already registered') - } - }) - - it("cannot be called by non owner", async () => { - expectedResult = [] - - try { - await keepVendor.registerFactory.call(address1, { from: accounts[1] }) - assert(false, 'Test call did not error as expected') - } catch (e) { - assert.include(e.message, 'Ownable: caller is not the owner') - } - }) + await keepVendor.registerFactory(address0) }) - describe("removeFactory", async () => { - beforeEach(async () => { - await keepVendor.registerFactory(address1) - }) + it("registers two factory addresses", async () => { + expectedResult = [address1, address2] - it("remove factory address", async () => { - expectedResult = [] + await keepVendor.registerFactory(address1) + await keepVendor.registerFactory(address2) + }) - await keepVendor.removeFactory(address1) - }) + it("fails if address already exists", async () => { + expectedResult = [address1] - it("remove factory address which was not registered", async () => { - expectedResult = [address1] + await keepVendor.registerFactory(address1) - // If address2 has not been registered we don't expect to - // get any error on it's removal. - await keepVendor.removeFactory(address2) - }) + try { + await keepVendor.registerFactory(address1) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Factory address already registered') + } + }) - it("cannot be called by non owner", async () => { - expectedResult = [address1] + it("cannot be called by non owner", async () => { + expectedResult = [] - try { - await keepVendor.removeFactory.call(address1, { from: accounts[1] }) - assert(false, 'Test call did not error as expected') - } catch (e) { - assert.include(e.message, 'Ownable: caller is not the owner') - } - }) + try { + await keepVendor.registerFactory.call(address1, { from: accounts[1] }) + assert(false, 'Test call did not error as expected') + } catch (e) { + assert.include(e.message, 'Ownable: caller is not the owner') + } }) }) @@ -113,7 +75,7 @@ contract("ECDSAKeepVendor", async accounts => { it("returns first factory from the list", async () => { let expectedResult = address1 - let result = await keepVendor.selectFactory.call() + let result = await keepVendor.selectFactoryPublic.call() assert.equal(result, expectedResult, "unexpected factory selected") }) @@ -122,16 +84,14 @@ contract("ECDSAKeepVendor", async accounts => { describe("openKeep", async () => { before(async () => { keepVendor = await ECDSAKeepVendor.new() - let factoryStub1 = await ECDSAKeepFactoryStub.new() - let factoryStub2 = await ECDSAKeepFactoryStub.new() + let factoryStub = await ECDSAKeepFactoryStub.new() - await keepVendor.registerFactory(factoryStub1.address) - await keepVendor.registerFactory(factoryStub2.address) + await keepVendor.registerFactory(factoryStub.address) }) it("calls selected factory", async () => { let selectedFactory = await ECDSAKeepFactoryStub.at( - await keepVendor.selectFactory.call() + await keepVendor.selectFactoryPublic.call() ) let expectedResult = await selectedFactory.calculateKeepAddress.call() diff --git a/solidity/test/KeepRegistryTest.js b/solidity/test/KeepRegistryTest.js index cdee2c616..4ef9d5ef7 100644 --- a/solidity/test/KeepRegistryTest.js +++ b/solidity/test/KeepRegistryTest.js @@ -9,67 +9,58 @@ contract("KeepRegistry", async accounts => { let keepRegistry - before(async () => { - keepRegistry = await KeepRegistry.deployed() - }) - - describe("setVendorForKeepType", async () => { - it("sets vendor address for new keep type", async () => { + describe("setVendor", async () => { + beforeEach(async () => { keepRegistry = await KeepRegistry.new() + }) - await keepRegistry.setVendorForKeepType(keepType1, address1) + it("sets vendor address for new keep type", async () => { + await keepRegistry.setVendor(keepType1, address1) - let result = await keepRegistry.getVendorForKeepType.call(keepType1) + let result = await keepRegistry.getVendor.call(keepType1) assert.deepEqual(result, address1, "unexpected keep vendor address") }) + it("sets vendor address to zero", async () => { + await keepRegistry.setVendor(keepType1, address0) + + let result = await keepRegistry.getVendor.call(keepType1) + assert.deepEqual(result, address0, "unexpected keep vendor address") + }) + it("replaces vendor address for keep type", async () => { - await keepRegistry.setVendorForKeepType(keepType1, address1) - await keepRegistry.setVendorForKeepType(keepType1, address2) + await keepRegistry.setVendor(keepType1, address1) + await keepRegistry.setVendor(keepType1, address2) - let result = await keepRegistry.getVendorForKeepType.call(keepType1) + let result = await keepRegistry.getVendor.call(keepType1) assert.deepEqual(result, address2, "unexpected keep vendor address") }) it("sets two keep types with different addresses", async () => { - await keepRegistry.setVendorForKeepType(keepType1, address1) - await keepRegistry.setVendorForKeepType(keepType2, address2) + await keepRegistry.setVendor(keepType1, address1) + await keepRegistry.setVendor(keepType2, address2) - let result1 = await keepRegistry.getVendorForKeepType.call(keepType1) + let result1 = await keepRegistry.getVendor.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") - let result2 = await keepRegistry.getVendorForKeepType.call(keepType2) + let result2 = await keepRegistry.getVendor.call(keepType2) assert.deepEqual(result2, address2, "unexpected keep vendor address") }) it("sets two keep types with the same addresses", async () => { - await keepRegistry.setVendorForKeepType(keepType1, address1) - await keepRegistry.setVendorForKeepType(keepType2, address1) + await keepRegistry.setVendor(keepType1, address1) + await keepRegistry.setVendor(keepType2, address1) - let result1 = await keepRegistry.getVendorForKeepType.call(keepType1) + let result1 = await keepRegistry.getVendor.call(keepType1) assert.deepEqual(result1, address1, "unexpected keep vendor address") - let result2 = await keepRegistry.getVendorForKeepType.call(keepType2) + let result2 = await keepRegistry.getVendor.call(keepType2) assert.deepEqual(result2, address1, "unexpected keep vendor address") }) - it("fails with zero address", async () => { - await keepRegistry.setVendorForKeepType(keepType1, address1) - - try { - await keepRegistry.setVendorForKeepType(keepType1, address0) - assert(false, 'Test call did not error as expected') - } catch (e) { - assert.include(e.message, 'Vendor address cannot be zero') - } - - let result = await keepRegistry.getVendorForKeepType.call(keepType1) - assert.deepEqual(result, address1, "unexpected keep vendor address") - }) - it("cannot be called by non owner", async () => { try { - await keepRegistry.setVendorForKeepType.call(keepType1, address1, { from: accounts[1] }) + await keepRegistry.setVendor.call(keepType1, address1, { from: accounts[1] }) assert(false, 'Test call did not error as expected') } catch (e) { assert.include(e.message, 'Ownable: caller is not the owner') @@ -77,37 +68,14 @@ contract("KeepRegistry", async accounts => { }) }) - describe("getVendorForKeepType", async () => { - it("returns zero for not registered keep type", async () => { - let result = await keepRegistry.getVendorForKeepType.call("NOT EXISTING") - assert.deepEqual(result, address0, "unexpected keep vendor address") - }) - }) - - describe("removeKeepType", async () => { + describe("getVendor", async () => { before(async () => { - await keepRegistry.setVendorForKeepType(keepType1, address1) - await keepRegistry.setVendorForKeepType(keepType2, address2) + keepRegistry = await KeepRegistry.deployed() }) - it("removes keep type address", async () => { - await keepRegistry.removeKeepType(keepType1) - - let result = await keepRegistry.getVendorForKeepType.call(keepType1) + it("returns zero for not registered keep type", async () => { + let result = await keepRegistry.getVendor.call("NOT EXISTING") assert.deepEqual(result, address0, "unexpected keep vendor address") }) - - it("doesn't fail for not registered keep type", async () => { - await keepRegistry.removeKeepType("NOT EXISTING") - }) - - it("cannot be called by non owner", async () => { - try { - await keepRegistry.removeKeepType.call(keepType1, { from: accounts[1] }) - assert(false, 'Test call did not error as expected') - } catch (e) { - assert.include(e.message, 'Ownable: caller is not the owner') - } - }) }) }) From 99e1529e543bf893aeb16d18d09e593e0c8c33bd Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 14:46:48 +0200 Subject: [PATCH 25/33] Rename ECDSA Keep to TECDSA Keep --- README.md | 2 +- configs/config.toml | 2 +- pkg/chain/eth/chain.go | 8 ++--- pkg/chain/eth/ethereum/config.go | 2 +- pkg/chain/eth/ethereum/connect.go | 10 +++---- pkg/chain/eth/ethereum/ecdsa_keep.go | 8 ++--- pkg/chain/eth/ethereum/ecdsa_keep_factory.go | 8 ++--- pkg/chain/eth/ethereum/ethereum.go | 22 +++++++------- pkg/chain/eth/event.go | 4 +-- pkg/chain/eth/local/ecdsa_keep_factory.go | 4 +-- pkg/chain/eth/local/local.go | 10 +++---- pkg/chain/eth/local/local_test.go | 10 +++---- pkg/tecdsa/tecdsa.go | 2 +- solidity/README.md | 4 +-- .../{ECDSAKeep.sol => TECDSAKeep.sol} | 6 ++-- ...AKeepFactory.sol => TECDSAKeepFactory.sol} | 24 +++++++-------- ...DSAKeepVendor.sol => TECDSAKeepVendor.sol} | 30 +++++++++---------- solidity/migrations/2_deploy_contracts.js | 14 ++++----- ...actoryTest.js => TECDSAKeepFactoryTest.js} | 10 +++---- .../{ECDSAKeepTest.js => TECDSAKeepTest.js} | 14 ++++----- ...pVendorTest.js => TECDSAKeepVendorTest.js} | 16 +++++----- ...toryStub.sol => TECDSAKeepFactoryStub.sol} | 6 ++-- ...endorStub.sol => TECDSAKeepVendorStub.sol} | 6 ++-- .../integration/keep_signature_requested.js | 12 ++++---- tests/smoketest/smoketest.go | 20 ++++++------- 25 files changed, 127 insertions(+), 127 deletions(-) rename solidity/contracts/{ECDSAKeep.sol => TECDSAKeep.sol} (94%) rename solidity/contracts/{ECDSAKeepFactory.sol => TECDSAKeepFactory.sol} (72%) rename solidity/contracts/{ECDSAKeepVendor.sol => TECDSAKeepVendor.sol} (64%) rename solidity/test/{ECDSAKeepFactoryTest.js => TECDSAKeepFactoryTest.js} (73%) rename solidity/test/{ECDSAKeepTest.js => TECDSAKeepTest.js} (81%) rename solidity/test/{ECDSAKeepVendorTest.js => TECDSAKeepVendorTest.js} (86%) rename solidity/test/contracts/{ECDSAKeepFactoryStub.sol => TECDSAKeepFactoryStub.sol} (84%) rename solidity/test/contracts/{ECDSAKeepVendorStub.sol => TECDSAKeepVendorStub.sol} (84%) diff --git a/README.md b/README.md index 7f67741e4..4570b0a67 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ configuration CLI supports `--config` flag. **Prerequisites** - contracts deployed: `truffle migrate --reset` - Ethereum account `PrivateKey` provided in `config.toml` -- `ECDSAKeepFactory` contract address provided in `config.toml` +- `TECDSAKeepFactory` contract address provided in `config.toml` - app built: `go build -o keep-tecdsa .` To run a smoke test execute a command: diff --git a/configs/config.toml b/configs/config.toml index ab55e868d..13611c4ee 100644 --- a/configs/config.toml +++ b/configs/config.toml @@ -18,4 +18,4 @@ # Addresses of contracts deployed on ethereum blockchain. [ethereum.ContractAddresses] - ECDSAKeepFactory = "0x6312d9689665DAB22E21b11B6fDf86547E566288" + TECDSAKeepFactory = "0xAF92505961C06C9013176b5ef6569Bd44bE37afA" diff --git a/pkg/chain/eth/chain.go b/pkg/chain/eth/chain.go index e7a67b9a4..9721439f8 100644 --- a/pkg/chain/eth/chain.go +++ b/pkg/chain/eth/chain.go @@ -13,10 +13,10 @@ type KeepAddress = common.Address // Interface is an interface that provides ability to interact with ethereum // contracts. type Interface interface { - // OnECDSAKeepCreated is a callback that is invoked when an on-chain - // notification of a new ECDSA keep creation is seen. - OnECDSAKeepCreated( - handler func(event *ECDSAKeepCreatedEvent), + // OnTECDSAKeepCreated is a callback that is invoked when an on-chain + // notification of a new TECDSA keep creation is seen. + OnTECDSAKeepCreated( + handler func(event *TECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) // OnSignatureRequested is a callback that is invoked when an on-chain diff --git a/pkg/chain/eth/ethereum/config.go b/pkg/chain/eth/ethereum/config.go index 2dc15682e..bbfaac36e 100644 --- a/pkg/chain/eth/ethereum/config.go +++ b/pkg/chain/eth/ethereum/config.go @@ -8,7 +8,7 @@ import ( // Definitions of contract names. const ( - ECDSAKeepFactoryContractName = "ECDSAKeepFactory" + TECDSAKeepFactoryContractName = "TECDSAKeepFactory" ) // Config contains configuration of Ethereum chain. diff --git a/pkg/chain/eth/ethereum/connect.go b/pkg/chain/eth/ethereum/connect.go index 80edfc738..d60fe5876 100644 --- a/pkg/chain/eth/ethereum/connect.go +++ b/pkg/chain/eth/ethereum/connect.go @@ -13,7 +13,7 @@ type EthereumChain struct { config *Config client *ethclient.Client transactorOptions *bind.TransactOpts - ecdsaKeepFactoryContract *abi.ECDSAKeepFactory + tecdsaKeepFactoryContract *abi.TECDSAKeepFactory } // Connect performs initialization for communication with Ethereum blockchain @@ -31,12 +31,12 @@ func Connect(config *Config) (eth.Interface, error) { transactorOptions := bind.NewKeyedTransactor(privateKey) - ecdsaKeepFactoryContractAddress, err := config.ContractAddress(ECDSAKeepFactoryContractName) + tecdsaKeepFactoryContractAddress, err := config.ContractAddress(TECDSAKeepFactoryContractName) if err != nil { return nil, err } - ecdsaKeepFactoryContract, err := abi.NewECDSAKeepFactory( - ecdsaKeepFactoryContractAddress, + tecdsaKeepFactoryContract, err := abi.NewTECDSAKeepFactory( + tecdsaKeepFactoryContractAddress, client, ) if err != nil { @@ -47,6 +47,6 @@ func Connect(config *Config) (eth.Interface, error) { config: config, client: client, transactorOptions: transactorOptions, - ecdsaKeepFactoryContract: ecdsaKeepFactoryContract, + tecdsaKeepFactoryContract: tecdsaKeepFactoryContract, }, nil } diff --git a/pkg/chain/eth/ethereum/ecdsa_keep.go b/pkg/chain/eth/ethereum/ecdsa_keep.go index ba61206cd..d9cb6b566 100644 --- a/pkg/chain/eth/ethereum/ecdsa_keep.go +++ b/pkg/chain/eth/ethereum/ecdsa_keep.go @@ -9,11 +9,11 @@ import ( ) func (ec *EthereumChain) watchSignatureRequested( - keepContract *abi.ECDSAKeep, - success func(event *abi.ECDSAKeepSignatureRequested), + keepContract *abi.TECDSAKeep, + success func(event *abi.TECDSAKeepSignatureRequested), fail func(err error) error, ) (subscription.EventSubscription, error) { - eventChan := make(chan *abi.ECDSAKeepSignatureRequested) + eventChan := make(chan *abi.TECDSAKeepSignatureRequested) eventSubscription, err := keepContract.WatchSignatureRequested( nil, @@ -22,7 +22,7 @@ func (ec *EthereumChain) watchSignatureRequested( if err != nil { close(eventChan) return nil, fmt.Errorf( - "could not create watch for ECDSAKeepSignatureRequested event: [%v]", + "could not create watch for TECDSAKeepSignatureRequested event: [%v]", err, ) } diff --git a/pkg/chain/eth/ethereum/ecdsa_keep_factory.go b/pkg/chain/eth/ethereum/ecdsa_keep_factory.go index 876307db3..f1496964c 100644 --- a/pkg/chain/eth/ethereum/ecdsa_keep_factory.go +++ b/pkg/chain/eth/ethereum/ecdsa_keep_factory.go @@ -8,13 +8,13 @@ import ( "github.com/keep-network/keep-tecdsa/pkg/chain/eth/gen/abi" ) -func (ec *EthereumChain) watchECDSAKeepCreated( - success func(event *abi.ECDSAKeepFactoryECDSAKeepCreated), +func (ec *EthereumChain) watchTECDSAKeepCreated( + success func(event *abi.TECDSAKeepFactoryTECDSAKeepCreated), fail func(err error) error, ) (subscription.EventSubscription, error) { - eventChan := make(chan *abi.ECDSAKeepFactoryECDSAKeepCreated) + eventChan := make(chan *abi.TECDSAKeepFactoryTECDSAKeepCreated) - eventSubscription, err := ec.ecdsaKeepFactoryContract.WatchECDSAKeepCreated( + eventSubscription, err := ec.tecdsaKeepFactoryContract.WatchTECDSAKeepCreated( nil, eventChan, ) diff --git a/pkg/chain/eth/ethereum/ethereum.go b/pkg/chain/eth/ethereum/ethereum.go index 7263d7c8a..54ed6b189 100644 --- a/pkg/chain/eth/ethereum/ethereum.go +++ b/pkg/chain/eth/ethereum/ethereum.go @@ -10,16 +10,16 @@ import ( "github.com/keep-network/keep-tecdsa/pkg/chain/eth/gen/abi" ) -// OnECDSAKeepCreated is a callback that is invoked when an on-chain -// notification of a new ECDSA keep creation is seen. -func (ec *EthereumChain) OnECDSAKeepCreated( - handler func(event *eth.ECDSAKeepCreatedEvent), +// OnTECDSAKeepCreated is a callback that is invoked when an on-chain +// notification of a new TECDSA keep creation is seen. +func (ec *EthereumChain) OnTECDSAKeepCreated( + handler func(event *eth.TECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) { - return ec.watchECDSAKeepCreated( + return ec.watchTECDSAKeepCreated( func( - chainEvent *abi.ECDSAKeepFactoryECDSAKeepCreated, + chainEvent *abi.TECDSAKeepFactoryTECDSAKeepCreated, ) { - handler(ð.ECDSAKeepCreatedEvent{ + handler(ð.TECDSAKeepCreatedEvent{ KeepAddress: chainEvent.KeepAddress, }) }, @@ -43,7 +43,7 @@ func (ec *EthereumChain) OnSignatureRequested( return ec.watchSignatureRequested( keepContract, func( - chainEvent *abi.ECDSAKeepSignatureRequested, + chainEvent *abi.TECDSAKeepSignatureRequested, ) { handler(ð.SignatureRequestedEvent{ Digest: chainEvent.Digest, @@ -76,11 +76,11 @@ func (ec *EthereumChain) SubmitKeepPublicKey( return nil } -func (ec *EthereumChain) getKeepContract(address common.Address) (*abi.ECDSAKeep, error) { - ecdsaKeepContract, err := abi.NewECDSAKeep(address, ec.client) +func (ec *EthereumChain) getKeepContract(address common.Address) (*abi.TECDSAKeep, error) { + tecdsaKeepContract, err := abi.NewTECDSAKeep(address, ec.client) if err != nil { return nil, err } - return ecdsaKeepContract, nil + return tecdsaKeepContract, nil } diff --git a/pkg/chain/eth/event.go b/pkg/chain/eth/event.go index fee4574f8..da151661f 100644 --- a/pkg/chain/eth/event.go +++ b/pkg/chain/eth/event.go @@ -4,8 +4,8 @@ import ( "github.com/ethereum/go-ethereum/common" ) -// ECDSAKeepCreatedEvent is an event emitted on a new keep creation. -type ECDSAKeepCreatedEvent struct { +// TECDSAKeepCreatedEvent is an event emitted on a new keep creation. +type TECDSAKeepCreatedEvent struct { KeepAddress common.Address // keep contract address } diff --git a/pkg/chain/eth/local/ecdsa_keep_factory.go b/pkg/chain/eth/local/ecdsa_keep_factory.go index ae89245c4..674cbe012 100644 --- a/pkg/chain/eth/local/ecdsa_keep_factory.go +++ b/pkg/chain/eth/local/ecdsa_keep_factory.go @@ -23,12 +23,12 @@ func (c *localChain) createKeep(keepAddress eth.KeepAddress) error { } c.keeps[keepAddress] = localKeep - keepCreatedEvent := ð.ECDSAKeepCreatedEvent{ + keepCreatedEvent := ð.TECDSAKeepCreatedEvent{ KeepAddress: keepAddress, } for _, handler := range c.keepCreatedHandlers { - go func(handler func(event *eth.ECDSAKeepCreatedEvent), keepCreatedEvent *eth.ECDSAKeepCreatedEvent) { + go func(handler func(event *eth.TECDSAKeepCreatedEvent), keepCreatedEvent *eth.TECDSAKeepCreatedEvent) { handler(keepCreatedEvent) }(handler, keepCreatedEvent) } diff --git a/pkg/chain/eth/local/local.go b/pkg/chain/eth/local/local.go index a8bf75faf..3412fde25 100644 --- a/pkg/chain/eth/local/local.go +++ b/pkg/chain/eth/local/local.go @@ -18,7 +18,7 @@ type localChain struct { keeps map[eth.KeepAddress]*localKeep - keepCreatedHandlers map[int]func(event *eth.ECDSAKeepCreatedEvent) + keepCreatedHandlers map[int]func(event *eth.TECDSAKeepCreatedEvent) } // Connect performs initialization for communication with Ethereum blockchain @@ -26,14 +26,14 @@ type localChain struct { func Connect() eth.Interface { return &localChain{ keeps: make(map[eth.KeepAddress]*localKeep), - keepCreatedHandlers: make(map[int]func(event *eth.ECDSAKeepCreatedEvent)), + keepCreatedHandlers: make(map[int]func(event *eth.TECDSAKeepCreatedEvent)), } } -// OnECDSAKeepCreated is a callback that is invoked when an on-chain +// OnTECDSAKeepCreated is a callback that is invoked when an on-chain // notification of a new ECDSA keep creation is seen. -func (lc *localChain) OnECDSAKeepCreated( - handler func(event *eth.ECDSAKeepCreatedEvent), +func (lc *localChain) OnTECDSAKeepCreated( + handler func(event *eth.TECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) { lc.handlerMutex.Lock() defer lc.handlerMutex.Unlock() diff --git a/pkg/chain/eth/local/local_test.go b/pkg/chain/eth/local/local_test.go index 619f0ec08..60d18f887 100644 --- a/pkg/chain/eth/local/local_test.go +++ b/pkg/chain/eth/local/local_test.go @@ -11,19 +11,19 @@ import ( "github.com/keep-network/keep-tecdsa/pkg/chain/eth" ) -func TestOnECDSAKeepCreated(t *testing.T) { +func TestOnTECDSAKeepCreated(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() chain := initializeLocalChain() - eventFired := make(chan *eth.ECDSAKeepCreatedEvent) + eventFired := make(chan *eth.TECDSAKeepCreatedEvent) keepAddress := eth.KeepAddress([20]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}) - expectedEvent := ð.ECDSAKeepCreatedEvent{ + expectedEvent := ð.TECDSAKeepCreatedEvent{ KeepAddress: keepAddress, } - subscription, err := chain.OnECDSAKeepCreated( - func(event *eth.ECDSAKeepCreatedEvent) { + subscription, err := chain.OnTECDSAKeepCreated( + func(event *eth.TECDSAKeepCreatedEvent) { eventFired <- event }, ) diff --git a/pkg/tecdsa/tecdsa.go b/pkg/tecdsa/tecdsa.go index 2fdd870f5..4f4f48d46 100644 --- a/pkg/tecdsa/tecdsa.go +++ b/pkg/tecdsa/tecdsa.go @@ -32,7 +32,7 @@ func Initialize( bitcoinNetParams: bitcoinNetParams, } - ethereumChain.OnECDSAKeepCreated(func(event *eth.ECDSAKeepCreatedEvent) { + ethereumChain.OnTECDSAKeepCreated(func(event *eth.TECDSAKeepCreatedEvent) { fmt.Printf("New ECDSA Keep created [%+v]\n", event) go func() { diff --git a/solidity/README.md b/solidity/README.md index f2a47464b..1af17e4a9 100644 --- a/solidity/README.md +++ b/solidity/README.md @@ -58,7 +58,7 @@ for each contract and copy-paste it to [config.toml](../configs/config.toml) fil Unit tests use Truffle's test framework, and redeploy contracts for a clean environment every test. An example: ```sh -truffle test test/ECDSAKeepTest.js +truffle test test/TECDSAKeepTest.js ``` #### Scenarios @@ -67,4 +67,4 @@ Tests in `test/integration/` are for testing different scenarios in the Go clien ```sh truffle exec test/integration/keep_signature_requested.js -``` \ No newline at end of file +``` diff --git a/solidity/contracts/ECDSAKeep.sol b/solidity/contracts/TECDSAKeep.sol similarity index 94% rename from solidity/contracts/ECDSAKeep.sol rename to solidity/contracts/TECDSAKeep.sol index 2a4f588eb..f5ff5596b 100644 --- a/solidity/contracts/ECDSAKeep.sol +++ b/solidity/contracts/TECDSAKeep.sol @@ -1,9 +1,9 @@ pragma solidity ^0.5.4; -/// @title ECDSA Keep -/// @notice Contract reflecting an ECDSA keep. +/// @title TECDSA Keep +/// @notice Contract reflecting an TECDSA keep. /// @dev TODO: This is a stub contract - needs to be implemented. -contract ECDSAKeep { +contract TECDSAKeep { // Owner of the keep. address owner; // List of keep members' addresses. diff --git a/solidity/contracts/ECDSAKeepFactory.sol b/solidity/contracts/TECDSAKeepFactory.sol similarity index 72% rename from solidity/contracts/ECDSAKeepFactory.sol rename to solidity/contracts/TECDSAKeepFactory.sol index ef8eab3e3..39a7b02f2 100644 --- a/solidity/contracts/ECDSAKeepFactory.sol +++ b/solidity/contracts/TECDSAKeepFactory.sol @@ -1,20 +1,20 @@ pragma solidity ^0.5.4; -import "./ECDSAKeep.sol"; +import "./TECDSAKeep.sol"; -/// @title ECDSA Keep Factory -/// @notice Contract creating ECDSA keeps. +/// @title TECDSA Keep Factory +/// @notice Contract creating TECDSA keeps. /// @dev TODO: This is a stub contract - needs to be implemented. -contract ECDSAKeepFactory { +contract TECDSAKeepFactory { // List of keeps. - ECDSAKeep[] keeps; + TECDSAKeep[] keeps; // Notification that a new keep has been created. - event ECDSAKeepCreated( + event TECDSAKeepCreated( address keepAddress ); - /// @notice Open a new ECDSA keep. + /// @notice Open a new TECDSA keep. /// @dev Selects a list of members for the keep based on provided parameters. /// @param _groupSize Number of members in the keep. /// @param _honestThreshold Minimum number of honest keep members. @@ -25,9 +25,9 @@ contract ECDSAKeepFactory { uint256 _honestThreshold, address _owner ) public payable returns (address keepAddress) { - address[] memory _members = selectECDSAKeepMembers(_groupSize); + address[] memory _members = selectMembers(_groupSize); - ECDSAKeep keep = new ECDSAKeep( + TECDSAKeep keep = new TECDSAKeep( _owner, _members, _honestThreshold @@ -36,14 +36,14 @@ contract ECDSAKeepFactory { keepAddress = address(keep); - emit ECDSAKeepCreated(keepAddress); + emit TECDSAKeepCreated(keepAddress); } - /// @notice Runs member selection for an ECDSA keep. + /// @notice Runs member selection for an TECDSA keep. /// @dev Stub implementations gets only one member with a fixed address. /// @param _groupSize Number of members to be selected. /// @return List of selected members addresses. - function selectECDSAKeepMembers( + function selectMembers( uint256 _groupSize ) internal pure returns (address[] memory members){ // TODO: Implement diff --git a/solidity/contracts/ECDSAKeepVendor.sol b/solidity/contracts/TECDSAKeepVendor.sol similarity index 64% rename from solidity/contracts/ECDSAKeepVendor.sol rename to solidity/contracts/TECDSAKeepVendor.sol index 23be2b925..fa61e210a 100644 --- a/solidity/contracts/ECDSAKeepVendor.sol +++ b/solidity/contracts/TECDSAKeepVendor.sol @@ -2,42 +2,42 @@ pragma solidity ^0.5.4; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "./utils/AddressArrayUtils.sol"; -import "./ECDSAKeepFactory.sol"; +import "./TECDSAKeepFactory.sol"; -/// @title ECDSA Keep Vendor -/// @notice The contract can be used to obtain a new ECDSA keep. -/// @dev Interacts with ECDSA keep factory to obtain a new instance of the ECDSA -/// keep. Several versions of ECDSA keep factories can be registered for the vendor. +/// @title TECDSA Keep Vendor +/// @notice The contract can be used to obtain a new TECDSA keep. +/// @dev Interacts with TECDSA keep factory to obtain a new instance of the TECDSA +/// keep. Several versions of TECDSA keep factories can be registered for the vendor. /// TODO: This is a stub contract - needs to be implemented. /// TODO: When more keep types are added consider extracting registration and /// selection to a separate inheritable contract. -contract ECDSAKeepVendor is Ownable { +contract TECDSAKeepVendor is Ownable { using AddressArrayUtils for address[]; - // List of ECDSA keep factories. + // List of TECDSA keep factories. address[] public factories; - /// @notice Register new ECDSA keep factory. + /// @notice Register new TECDSA keep factory. /// @dev Adds a factory address to the list of registered factories. Address /// cannot be zero and cannot be already registered. - /// @param _factory ECDSA keep factory address. + /// @param _factory TECDSA keep factory address. function registerFactory(address _factory) public onlyOwner { require(!factories.contains(_factory), "Factory address already registered"); factories.push(_factory); } - /// @notice Select a recommended ECDSA keep factory from all registered - /// ECDSA keep factories. + /// @notice Select a recommended TECDSA keep factory from all registered + /// TECDSA keep factories. /// @dev This is a stub implementation returning first factory on the list. - /// @return Selected ECDSA keep factory address. + /// @return Selected TECDSA keep factory address. function selectFactory() internal view returns (address) { // TODO: Implement factory selection mechanism. return factories[0]; } - /// @notice Open a new ECDSA keep. - /// @dev Calls a recommended ECDSA keep factory to open a new keep. + /// @notice Open a new TECDSA keep. + /// @dev Calls a recommended TECDSA keep factory to open a new keep. /// @param _groupSize Number of members in the keep. /// @param _honestThreshold Minimum number of honest keep members. /// @param _owner Address of the keep owner. @@ -49,7 +49,7 @@ contract ECDSAKeepVendor is Ownable { ) public payable returns (address keepAddress) { address factory = selectFactory(); - return ECDSAKeepFactory(factory).openKeep( + return TECDSAKeepFactory(factory).openKeep( _groupSize, _honestThreshold, _owner diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index 8c093cb2f..ad936de5f 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -1,14 +1,14 @@ -const ECDSAKeepFactory = artifacts.require("./ECDSAKeepFactory.sol"); -const ECDSAKeepVendor = artifacts.require("./ECDSAKeepVendor.sol"); +const TECDSAKeepFactory = artifacts.require("./TECDSAKeepFactory.sol"); +const TECDSAKeepVendor = artifacts.require("./TECDSAKeepVendor.sol"); const KeepRegistry = artifacts.require("./KeepRegistry.sol"); module.exports = async function (deployer) { - await deployer.deploy(ECDSAKeepFactory) - const ecdsaKeepFactory = await ECDSAKeepFactory.deployed() + await deployer.deploy(TECDSAKeepFactory) + const tecdsaKeepFactory = await TECDSAKeepFactory.deployed() - const ecdsaKeepVendor = await deployer.deploy(ECDSAKeepVendor) - ecdsaKeepVendor.registerFactory(ecdsaKeepFactory.address) + const tecdsaKeepVendor = await deployer.deploy(TECDSAKeepVendor) + tecdsaKeepVendor.registerFactory(tecdsaKeepFactory.address) const keepRegistry = await deployer.deploy(KeepRegistry) - keepRegistry.setVendor('ECDSAKeep', ecdsaKeepVendor.address) + keepRegistry.setVendor('TECDSAKeep', tecdsaKeepVendor.address) } diff --git a/solidity/test/ECDSAKeepFactoryTest.js b/solidity/test/TECDSAKeepFactoryTest.js similarity index 73% rename from solidity/test/ECDSAKeepFactoryTest.js rename to solidity/test/TECDSAKeepFactoryTest.js index 3becf8657..f1c63cfe3 100644 --- a/solidity/test/ECDSAKeepFactoryTest.js +++ b/solidity/test/TECDSAKeepFactoryTest.js @@ -1,11 +1,11 @@ -var ECDSAKeepFactory = artifacts.require('ECDSAKeepFactory'); +var TECDSAKeepFactory = artifacts.require('TECDSAKeepFactory'); -contract("ECDSAKeepFactory", async accounts => { +contract("TECDSAKeepFactory", async accounts => { - it("emits ECDSAKeepCreated event upon keep creation", async () => { + it("emits TECDSAKeepCreated event upon keep creation", async () => { let blockNumber = await web3.eth.getBlockNumber() - let keepFactory = await ECDSAKeepFactory.deployed(); + let keepFactory = await TECDSAKeepFactory.deployed(); let keepAddress = await keepFactory.openKeep.call( 10, // _groupSize @@ -19,7 +19,7 @@ contract("ECDSAKeepFactory", async accounts => { "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner ) - let eventList = await keepFactory.getPastEvents('ECDSAKeepCreated', { + let eventList = await keepFactory.getPastEvents('TECDSAKeepCreated', { fromBlock: blockNumber, toBlock: 'latest' }) diff --git a/solidity/test/ECDSAKeepTest.js b/solidity/test/TECDSAKeepTest.js similarity index 81% rename from solidity/test/ECDSAKeepTest.js rename to solidity/test/TECDSAKeepTest.js index 78ce8ee57..114059bb9 100644 --- a/solidity/test/ECDSAKeepTest.js +++ b/solidity/test/TECDSAKeepTest.js @@ -1,16 +1,16 @@ -const ECDSAKeepFactory = artifacts.require('./ECDSAKeepFactory.sol'); -const ECDSAKeep = artifacts.require('./ECDSAKeep.sol'); +const TECDSAKeepFactory = artifacts.require('./TECDSAKeepFactory.sol'); +const TECDSAKeep = artifacts.require('./TECDSAKeep.sol'); const truffleAssert = require('truffle-assertions'); -contract('ECDSAKeep', function (accounts) { +contract('TECDSAKeep', function (accounts) { describe("#constructor", async function () { it('succeeds', async () => { let owner = accounts[0] let members = [owner]; let threshold = 1; - let instance = await ECDSAKeep.new( + let instance = await TECDSAKeep.new( owner, members, threshold @@ -28,7 +28,7 @@ contract('ECDSAKeep', function (accounts) { let members = [owner]; let threshold = 1; - instance = await ECDSAKeep.new( + instance = await TECDSAKeep.new( owner, members, threshold @@ -52,7 +52,7 @@ contract('ECDSAKeep', function (accounts) { let honestThreshold = 5; it("get public key before it is set", async () => { - let keep = await ECDSAKeep.new(owner, members, honestThreshold); + let keep = await TECDSAKeep.new(owner, members, honestThreshold); let publicKey = await keep.getPublicKey.call() @@ -60,7 +60,7 @@ contract('ECDSAKeep', function (accounts) { }); it("set public key and get it", async () => { - let keep = await ECDSAKeep.new(owner, members, honestThreshold); + let keep = await TECDSAKeep.new(owner, members, honestThreshold); await keep.setPublicKey(expectedPublicKey) diff --git a/solidity/test/ECDSAKeepVendorTest.js b/solidity/test/TECDSAKeepVendorTest.js similarity index 86% rename from solidity/test/ECDSAKeepVendorTest.js rename to solidity/test/TECDSAKeepVendorTest.js index 2d3c15630..867137f53 100644 --- a/solidity/test/ECDSAKeepVendorTest.js +++ b/solidity/test/TECDSAKeepVendorTest.js @@ -1,7 +1,7 @@ -var ECDSAKeepVendor = artifacts.require('ECDSAKeepVendorStub') -var ECDSAKeepFactoryStub = artifacts.require('ECDSAKeepFactoryStub') +var TECDSAKeepVendor = artifacts.require('TECDSAKeepVendorStub') +var TECDSAKeepFactoryStub = artifacts.require('TECDSAKeepFactoryStub') -contract("ECDSAKeepVendor", async accounts => { +contract("TECDSAKeepVendor", async accounts => { const address0 = "0x0000000000000000000000000000000000000000" const address1 = "0xF2D3Af2495E286C7820643B963FB9D34418c871d" const address2 = "0x4566716c07617c5854fe7dA9aE5a1219B19CCd27" @@ -12,7 +12,7 @@ contract("ECDSAKeepVendor", async accounts => { let expectedResult beforeEach(async () => { - keepVendor = await ECDSAKeepVendor.new() + keepVendor = await TECDSAKeepVendor.new() }) afterEach(async () => { @@ -66,7 +66,7 @@ contract("ECDSAKeepVendor", async accounts => { describe("selectFactory", async () => { before(async () => { - keepVendor = await ECDSAKeepVendor.new() + keepVendor = await TECDSAKeepVendor.new() await keepVendor.registerFactory(address1) await keepVendor.registerFactory(address2) @@ -83,14 +83,14 @@ contract("ECDSAKeepVendor", async accounts => { describe("openKeep", async () => { before(async () => { - keepVendor = await ECDSAKeepVendor.new() - let factoryStub = await ECDSAKeepFactoryStub.new() + keepVendor = await TECDSAKeepVendor.new() + let factoryStub = await TECDSAKeepFactoryStub.new() await keepVendor.registerFactory(factoryStub.address) }) it("calls selected factory", async () => { - let selectedFactory = await ECDSAKeepFactoryStub.at( + let selectedFactory = await TECDSAKeepFactoryStub.at( await keepVendor.selectFactoryPublic.call() ) diff --git a/solidity/test/contracts/ECDSAKeepFactoryStub.sol b/solidity/test/contracts/TECDSAKeepFactoryStub.sol similarity index 84% rename from solidity/test/contracts/ECDSAKeepFactoryStub.sol rename to solidity/test/contracts/TECDSAKeepFactoryStub.sol index 79c8ad230..c6d25a5b8 100644 --- a/solidity/test/contracts/ECDSAKeepFactoryStub.sol +++ b/solidity/test/contracts/TECDSAKeepFactoryStub.sol @@ -1,10 +1,10 @@ pragma solidity ^0.5.4; -import "../../contracts/ECDSAKeepFactory.sol"; +import "../../contracts/TECDSAKeepFactory.sol"; -/// @title ECDSA Keep Factory Stub +/// @title TECDSA Keep Factory Stub /// @dev This contract is for testing purposes only. -contract ECDSAKeepFactoryStub is ECDSAKeepFactory { +contract TECDSAKeepFactoryStub is TECDSAKeepFactory { /// @dev Returns calculated keep address. function openKeep( diff --git a/solidity/test/contracts/ECDSAKeepVendorStub.sol b/solidity/test/contracts/TECDSAKeepVendorStub.sol similarity index 84% rename from solidity/test/contracts/ECDSAKeepVendorStub.sol rename to solidity/test/contracts/TECDSAKeepVendorStub.sol index 9e4899cbb..173b68d11 100644 --- a/solidity/test/contracts/ECDSAKeepVendorStub.sol +++ b/solidity/test/contracts/TECDSAKeepVendorStub.sol @@ -1,10 +1,10 @@ pragma solidity ^0.5.4; -import "../../contracts/ECDSAKeepVendor.sol"; +import "../../contracts/TECDSAKeepVendor.sol"; -/// @title ECDSA Keep Vendor Stub +/// @title TECDSA Keep Vendor Stub /// @dev This contract is for testing purposes only. -contract ECDSAKeepVendorStub is ECDSAKeepVendor { +contract TECDSAKeepVendorStub is TECDSAKeepVendor { /// @notice Get registered ECDSA keep factories. /// @dev This is a stub implementation to validate the factories list. diff --git a/solidity/test/integration/keep_signature_requested.js b/solidity/test/integration/keep_signature_requested.js index 59f850692..b9bf54f6d 100644 --- a/solidity/test/integration/keep_signature_requested.js +++ b/solidity/test/integration/keep_signature_requested.js @@ -1,15 +1,15 @@ -const ECDSAKeepFactory = artifacts.require('./ECDSAKeepFactory.sol'); -const ECDSAKeep = artifacts.require('./ECDSAKeep.sol'); +const TECDSAKeepFactory = artifacts.require('./TECDSAKeepFactory.sol'); +const TECDSAKeep = artifacts.require('./TECDSAKeep.sol'); const truffleAssert = require('truffle-assertions'); -// ECDSAKeep +// TECDSAKeep // signature request // creates a new keep and calls .sign module.exports = async function () { let accounts = await web3.eth.getAccounts(); - let factoryInstance = await ECDSAKeepFactory.deployed(); + let factoryInstance = await TECDSAKeepFactory.deployed(); // Deploy Keep let groupSize = 1; @@ -24,14 +24,14 @@ module.exports = async function () { // Get the Keep's address let instanceAddress; - truffleAssert.eventEmitted(createKeepTx, 'ECDSAKeepCreated', (ev) => { + truffleAssert.eventEmitted(createKeepTx, 'TECDSAKeepCreated', (ev) => { instanceAddress = ev.keepAddress; return true; }); expect(instanceAddress.length).to.eq(42); - let instance = await ECDSAKeep.at(instanceAddress) + let instance = await TECDSAKeep.at(instanceAddress) let signTx = await instance.sign('0x00') truffleAssert.eventEmitted(signTx, 'SignatureRequested', (ev) => { diff --git a/tests/smoketest/smoketest.go b/tests/smoketest/smoketest.go index 2304efde0..39930d64c 100644 --- a/tests/smoketest/smoketest.go +++ b/tests/smoketest/smoketest.go @@ -24,7 +24,7 @@ func Execute(config *ethereum.Config) error { } // Setup connection to ECDSA Keep Factory contract. - ecdsaKeepFactory, err := initializeECDSAKeepFactory(config) + tecdsaKeepFactory, err := initializeTECDSAKeepFactory(config) if err != nil { return err } @@ -35,14 +35,14 @@ func Execute(config *ethereum.Config) error { } // Define callback on event. - eventChan := make(chan *eth.ECDSAKeepCreatedEvent) + eventChan := make(chan *eth.TECDSAKeepCreatedEvent) - handle := func(event *eth.ECDSAKeepCreatedEvent) { + handle := func(event *eth.TECDSAKeepCreatedEvent) { eventChan <- event } // Register for events. - subscription, err := chainAPI.OnECDSAKeepCreated(handle) + subscription, err := chainAPI.OnTECDSAKeepCreated(handle) defer subscription.Unsubscribe() if err != nil { return err @@ -52,7 +52,7 @@ func Execute(config *ethereum.Config) error { honestThreshold := big.NewInt(5) // Request a new keep creation. - transaction, err := ecdsaKeepFactory.OpenKeep( + transaction, err := tecdsaKeepFactory.OpenKeep( transactorOpts, groupSize, honestThreshold, @@ -82,25 +82,25 @@ func Execute(config *ethereum.Config) error { return nil } -func initializeECDSAKeepFactory(config *ethereum.Config) (*abi.ECDSAKeepFactory, error) { +func initializeTECDSAKeepFactory(config *ethereum.Config) (*abi.TECDSAKeepFactory, error) { client, err := ethclient.Dial(config.URL) if err != nil { return nil, err } - ecdsaKeepFactoryContractAddress, err := config.ContractAddress(ethereum.ECDSAKeepFactoryContractName) + tecdsaKeepFactoryContractAddress, err := config.ContractAddress(ethereum.TECDSAKeepFactoryContractName) if err != nil { return nil, err } - ecdsaKeepFactoryContract, err := abi.NewECDSAKeepFactory( - ecdsaKeepFactoryContractAddress, + tecdsaKeepFactoryContract, err := abi.NewTECDSAKeepFactory( + tecdsaKeepFactoryContractAddress, client, ) if err != nil { return nil, err } - return ecdsaKeepFactoryContract, nil + return tecdsaKeepFactoryContract, nil } func createTransactorOpts(config *ethereum.Config) (*bind.TransactOpts, error) { From 68c6abcd18346c52f4fde669b9689fc18cbe3e44 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 14:49:26 +0200 Subject: [PATCH 26/33] Select latest registered factory --- solidity/contracts/TECDSAKeepVendor.sol | 2 +- solidity/test/TECDSAKeepVendorTest.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/solidity/contracts/TECDSAKeepVendor.sol b/solidity/contracts/TECDSAKeepVendor.sol index fa61e210a..caeb2537e 100644 --- a/solidity/contracts/TECDSAKeepVendor.sol +++ b/solidity/contracts/TECDSAKeepVendor.sol @@ -33,7 +33,7 @@ contract TECDSAKeepVendor is Ownable { /// @return Selected TECDSA keep factory address. function selectFactory() internal view returns (address) { // TODO: Implement factory selection mechanism. - return factories[0]; + return factories[factories.length - 1]; } /// @notice Open a new TECDSA keep. diff --git a/solidity/test/TECDSAKeepVendorTest.js b/solidity/test/TECDSAKeepVendorTest.js index 867137f53..015f3bd16 100644 --- a/solidity/test/TECDSAKeepVendorTest.js +++ b/solidity/test/TECDSAKeepVendorTest.js @@ -72,8 +72,8 @@ contract("TECDSAKeepVendor", async accounts => { await keepVendor.registerFactory(address2) }) - it("returns first factory from the list", async () => { - let expectedResult = address1 + it("returns last factory from the list", async () => { + let expectedResult = address2 let result = await keepVendor.selectFactoryPublic.call() From 634cc77eecedcc6bae5a233fb36eaa6d67d9a27f Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 15:08:04 +0200 Subject: [PATCH 27/33] Move afterEach assertion to a function --- solidity/test/TECDSAKeepVendorTest.js | 32 +++++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/solidity/test/TECDSAKeepVendorTest.js b/solidity/test/TECDSAKeepVendorTest.js index 015f3bd16..894a454f5 100644 --- a/solidity/test/TECDSAKeepVendorTest.js +++ b/solidity/test/TECDSAKeepVendorTest.js @@ -9,38 +9,37 @@ contract("TECDSAKeepVendor", async accounts => { let keepVendor describe("registerFactory", async () => { - let expectedResult - beforeEach(async () => { keepVendor = await TECDSAKeepVendor.new() }) - afterEach(async () => { - let result = await keepVendor.getFactories.call() - assert.deepEqual(result, expectedResult, "unexpected registered factories list") - }) - it("registers one factory address", async () => { - expectedResult = [address1] + let expectedResult = [address1] await keepVendor.registerFactory(address1) + + assertFactories(expectedResult) }) it("registers factory with zero address", async () => { - expectedResult = [address0] + let expectedResult = [address0] await keepVendor.registerFactory(address0) + + assertFactories(expectedResult) }) it("registers two factory addresses", async () => { - expectedResult = [address1, address2] + let expectedResult = [address1, address2] await keepVendor.registerFactory(address1) await keepVendor.registerFactory(address2) + + assertFactories(expectedResult) }) it("fails if address already exists", async () => { - expectedResult = [address1] + let expectedResult = [] await keepVendor.registerFactory(address1) @@ -50,10 +49,12 @@ contract("TECDSAKeepVendor", async accounts => { } catch (e) { assert.include(e.message, 'Factory address already registered') } + + assertFactories(expectedResult) }) it("cannot be called by non owner", async () => { - expectedResult = [] + let expectedResult = [] try { await keepVendor.registerFactory.call(address1, { from: accounts[1] }) @@ -61,7 +62,14 @@ contract("TECDSAKeepVendor", async accounts => { } catch (e) { assert.include(e.message, 'Ownable: caller is not the owner') } + + assertFactories(expectedResult) }) + + async function assertFactories(expectedFactories) { + let result = await keepVendor.getFactories.call() + assert.deepEqual(result, expectedFactories, "unexpected registered factories list") + } }) describe("selectFactory", async () => { From e07680950031aca3c3cc1b6b477b999ca0dcea5a Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 15:08:15 +0200 Subject: [PATCH 28/33] Await in deploy contracts --- solidity/migrations/2_deploy_contracts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index ad936de5f..0c002df7a 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -7,8 +7,8 @@ module.exports = async function (deployer) { const tecdsaKeepFactory = await TECDSAKeepFactory.deployed() const tecdsaKeepVendor = await deployer.deploy(TECDSAKeepVendor) - tecdsaKeepVendor.registerFactory(tecdsaKeepFactory.address) + await tecdsaKeepVendor.registerFactory(tecdsaKeepFactory.address) const keepRegistry = await deployer.deploy(KeepRegistry) - keepRegistry.setVendor('TECDSAKeep', tecdsaKeepVendor.address) + await keepRegistry.setVendor('TECDSAKeep', tecdsaKeepVendor.address) } From 80a23decaad4dc9beeb4dad6379add2335367e29 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 15:08:37 +0200 Subject: [PATCH 29/33] Deleted removeAddress from array utils --- solidity/contracts/utils/AddressArrayUtils.sol | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/solidity/contracts/utils/AddressArrayUtils.sol b/solidity/contracts/utils/AddressArrayUtils.sol index 7e8214b68..5107109ff 100644 --- a/solidity/contracts/utils/AddressArrayUtils.sol +++ b/solidity/contracts/utils/AddressArrayUtils.sol @@ -13,22 +13,4 @@ library AddressArrayUtils { } return false; } - - function removeAddress(address[] storage self, address _addressToRemove) - internal - returns (address[] storage) - { - for (uint i = 0; i < self.length; i++) { - // If address is found in array. - if (_addressToRemove == self[i]) { - // Delete element at index and shift array. - for (uint j = i; j < self.length-1; j++) { - self[j] = self[j+1]; - } - self.length--; - i--; - } - } - return self; - } } From 86525c9afa59d6102755f68a45020d898ff80ced Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 15:09:13 +0200 Subject: [PATCH 30/33] Documentation update --- configs/config.toml | 2 +- pkg/chain/eth/local/local.go | 2 +- solidity/contracts/KeepRegistry.sol | 4 ++-- solidity/contracts/TECDSAKeepFactory.sol | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/config.toml b/configs/config.toml index 13611c4ee..be06ac34f 100644 --- a/configs/config.toml +++ b/configs/config.toml @@ -14,7 +14,7 @@ # Connection details of ethereum blockchain. [ethereum] URL = "ws://127.0.0.1:8545" - PrivateKey = "bd03a0aa0b96c5cff1accafdc806aa7f655b6a9a13aeb79f4669c9cfad1eb265" + PrivateKey = "0789df7d07e6947a93576b9ef60b97aed9adb944fb3ff6bae5215fd3ab0ad0dd" # ethereum address: 0x1C25f178599d00b3887BF6D9084cf0C6d49a3097 # Addresses of contracts deployed on ethereum blockchain. [ethereum.ContractAddresses] diff --git a/pkg/chain/eth/local/local.go b/pkg/chain/eth/local/local.go index 3412fde25..21078ad6c 100644 --- a/pkg/chain/eth/local/local.go +++ b/pkg/chain/eth/local/local.go @@ -31,7 +31,7 @@ func Connect() eth.Interface { } // OnTECDSAKeepCreated is a callback that is invoked when an on-chain -// notification of a new ECDSA keep creation is seen. +// notification of a new TECDSA keep creation is seen. func (lc *localChain) OnTECDSAKeepCreated( handler func(event *eth.TECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) { diff --git a/solidity/contracts/KeepRegistry.sol b/solidity/contracts/KeepRegistry.sol index 86d0ccf7a..e2a5a0435 100644 --- a/solidity/contracts/KeepRegistry.sol +++ b/solidity/contracts/KeepRegistry.sol @@ -5,8 +5,7 @@ import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; /// @title Keep Registry /// @notice Contract handling keeps registry. /// @dev The keep registry serves the role of the master list and tracks sanctioned -/// vendors. It ensures that only approved contracts are used. A new type of keep -/// can be added without upgradeable registry. +/// vendors. It ensures that only approved contracts are used. /// TODO: This is a stub contract - needs to be implemented. contract KeepRegistry is Ownable { // Registered keep vendors. Mapping of a keep type to a keep vendor address. @@ -24,6 +23,7 @@ contract KeepRegistry is Ownable { /// @param _keepType Keep type. /// @return Keep vendor contract address. function getVendor(string memory _keepType) public view returns (address) { + // TODO: We should probably refer to vendor via proxy - https://github.com/keep-network/keep-tecdsa/pull/43#discussion_r306207111 return keepVendors[_keepType]; } } diff --git a/solidity/contracts/TECDSAKeepFactory.sol b/solidity/contracts/TECDSAKeepFactory.sol index 39a7b02f2..a59f955a6 100644 --- a/solidity/contracts/TECDSAKeepFactory.sol +++ b/solidity/contracts/TECDSAKeepFactory.sol @@ -19,7 +19,7 @@ contract TECDSAKeepFactory { /// @param _groupSize Number of members in the keep. /// @param _honestThreshold Minimum number of honest keep members. /// @param _owner Address of the keep owner. - /// @return Created keep. + /// @return Created keep address. function openKeep( uint256 _groupSize, uint256 _honestThreshold, From 130252d6dcb2dbe9451ffc1da3043411050a4cdd Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 15:24:37 +0200 Subject: [PATCH 31/33] Revert "Rename ECDSA Keep to TECDSA Keep" This reverts commit 99e1529e543bf893aeb16d18d09e593e0c8c33bd. --- README.md | 2 +- configs/config.toml | 2 +- pkg/chain/eth/chain.go | 8 ++--- pkg/chain/eth/ethereum/config.go | 2 +- pkg/chain/eth/ethereum/connect.go | 10 +++---- pkg/chain/eth/ethereum/ecdsa_keep.go | 8 ++--- pkg/chain/eth/ethereum/ecdsa_keep_factory.go | 8 ++--- pkg/chain/eth/ethereum/ethereum.go | 22 +++++++------- pkg/chain/eth/event.go | 4 +-- pkg/chain/eth/local/ecdsa_keep_factory.go | 4 +-- pkg/chain/eth/local/local.go | 12 ++++---- pkg/chain/eth/local/local_test.go | 10 +++---- pkg/tecdsa/tecdsa.go | 2 +- solidity/README.md | 4 +-- .../{TECDSAKeep.sol => ECDSAKeep.sol} | 6 ++-- ...SAKeepFactory.sol => ECDSAKeepFactory.sol} | 24 +++++++-------- ...CDSAKeepVendor.sol => ECDSAKeepVendor.sol} | 30 +++++++++---------- solidity/migrations/2_deploy_contracts.js | 14 ++++----- ...FactoryTest.js => ECDSAKeepFactoryTest.js} | 10 +++---- .../{TECDSAKeepTest.js => ECDSAKeepTest.js} | 14 ++++----- ...epVendorTest.js => ECDSAKeepVendorTest.js} | 16 +++++----- ...ctoryStub.sol => ECDSAKeepFactoryStub.sol} | 6 ++-- ...VendorStub.sol => ECDSAKeepVendorStub.sol} | 6 ++-- .../integration/keep_signature_requested.js | 12 ++++---- tests/smoketest/smoketest.go | 20 ++++++------- 25 files changed, 128 insertions(+), 128 deletions(-) rename solidity/contracts/{TECDSAKeep.sol => ECDSAKeep.sol} (94%) rename solidity/contracts/{TECDSAKeepFactory.sol => ECDSAKeepFactory.sol} (72%) rename solidity/contracts/{TECDSAKeepVendor.sol => ECDSAKeepVendor.sol} (64%) rename solidity/test/{TECDSAKeepFactoryTest.js => ECDSAKeepFactoryTest.js} (73%) rename solidity/test/{TECDSAKeepTest.js => ECDSAKeepTest.js} (81%) rename solidity/test/{TECDSAKeepVendorTest.js => ECDSAKeepVendorTest.js} (87%) rename solidity/test/contracts/{TECDSAKeepFactoryStub.sol => ECDSAKeepFactoryStub.sol} (84%) rename solidity/test/contracts/{TECDSAKeepVendorStub.sol => ECDSAKeepVendorStub.sol} (84%) diff --git a/README.md b/README.md index 4570b0a67..7f67741e4 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ configuration CLI supports `--config` flag. **Prerequisites** - contracts deployed: `truffle migrate --reset` - Ethereum account `PrivateKey` provided in `config.toml` -- `TECDSAKeepFactory` contract address provided in `config.toml` +- `ECDSAKeepFactory` contract address provided in `config.toml` - app built: `go build -o keep-tecdsa .` To run a smoke test execute a command: diff --git a/configs/config.toml b/configs/config.toml index be06ac34f..13008dc91 100644 --- a/configs/config.toml +++ b/configs/config.toml @@ -18,4 +18,4 @@ # Addresses of contracts deployed on ethereum blockchain. [ethereum.ContractAddresses] - TECDSAKeepFactory = "0xAF92505961C06C9013176b5ef6569Bd44bE37afA" + ECDSAKeepFactory = "0x6312d9689665DAB22E21b11B6fDf86547E566288" diff --git a/pkg/chain/eth/chain.go b/pkg/chain/eth/chain.go index 9721439f8..e7a67b9a4 100644 --- a/pkg/chain/eth/chain.go +++ b/pkg/chain/eth/chain.go @@ -13,10 +13,10 @@ type KeepAddress = common.Address // Interface is an interface that provides ability to interact with ethereum // contracts. type Interface interface { - // OnTECDSAKeepCreated is a callback that is invoked when an on-chain - // notification of a new TECDSA keep creation is seen. - OnTECDSAKeepCreated( - handler func(event *TECDSAKeepCreatedEvent), + // OnECDSAKeepCreated is a callback that is invoked when an on-chain + // notification of a new ECDSA keep creation is seen. + OnECDSAKeepCreated( + handler func(event *ECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) // OnSignatureRequested is a callback that is invoked when an on-chain diff --git a/pkg/chain/eth/ethereum/config.go b/pkg/chain/eth/ethereum/config.go index bbfaac36e..2dc15682e 100644 --- a/pkg/chain/eth/ethereum/config.go +++ b/pkg/chain/eth/ethereum/config.go @@ -8,7 +8,7 @@ import ( // Definitions of contract names. const ( - TECDSAKeepFactoryContractName = "TECDSAKeepFactory" + ECDSAKeepFactoryContractName = "ECDSAKeepFactory" ) // Config contains configuration of Ethereum chain. diff --git a/pkg/chain/eth/ethereum/connect.go b/pkg/chain/eth/ethereum/connect.go index d60fe5876..80edfc738 100644 --- a/pkg/chain/eth/ethereum/connect.go +++ b/pkg/chain/eth/ethereum/connect.go @@ -13,7 +13,7 @@ type EthereumChain struct { config *Config client *ethclient.Client transactorOptions *bind.TransactOpts - tecdsaKeepFactoryContract *abi.TECDSAKeepFactory + ecdsaKeepFactoryContract *abi.ECDSAKeepFactory } // Connect performs initialization for communication with Ethereum blockchain @@ -31,12 +31,12 @@ func Connect(config *Config) (eth.Interface, error) { transactorOptions := bind.NewKeyedTransactor(privateKey) - tecdsaKeepFactoryContractAddress, err := config.ContractAddress(TECDSAKeepFactoryContractName) + ecdsaKeepFactoryContractAddress, err := config.ContractAddress(ECDSAKeepFactoryContractName) if err != nil { return nil, err } - tecdsaKeepFactoryContract, err := abi.NewTECDSAKeepFactory( - tecdsaKeepFactoryContractAddress, + ecdsaKeepFactoryContract, err := abi.NewECDSAKeepFactory( + ecdsaKeepFactoryContractAddress, client, ) if err != nil { @@ -47,6 +47,6 @@ func Connect(config *Config) (eth.Interface, error) { config: config, client: client, transactorOptions: transactorOptions, - tecdsaKeepFactoryContract: tecdsaKeepFactoryContract, + ecdsaKeepFactoryContract: ecdsaKeepFactoryContract, }, nil } diff --git a/pkg/chain/eth/ethereum/ecdsa_keep.go b/pkg/chain/eth/ethereum/ecdsa_keep.go index d9cb6b566..ba61206cd 100644 --- a/pkg/chain/eth/ethereum/ecdsa_keep.go +++ b/pkg/chain/eth/ethereum/ecdsa_keep.go @@ -9,11 +9,11 @@ import ( ) func (ec *EthereumChain) watchSignatureRequested( - keepContract *abi.TECDSAKeep, - success func(event *abi.TECDSAKeepSignatureRequested), + keepContract *abi.ECDSAKeep, + success func(event *abi.ECDSAKeepSignatureRequested), fail func(err error) error, ) (subscription.EventSubscription, error) { - eventChan := make(chan *abi.TECDSAKeepSignatureRequested) + eventChan := make(chan *abi.ECDSAKeepSignatureRequested) eventSubscription, err := keepContract.WatchSignatureRequested( nil, @@ -22,7 +22,7 @@ func (ec *EthereumChain) watchSignatureRequested( if err != nil { close(eventChan) return nil, fmt.Errorf( - "could not create watch for TECDSAKeepSignatureRequested event: [%v]", + "could not create watch for ECDSAKeepSignatureRequested event: [%v]", err, ) } diff --git a/pkg/chain/eth/ethereum/ecdsa_keep_factory.go b/pkg/chain/eth/ethereum/ecdsa_keep_factory.go index f1496964c..876307db3 100644 --- a/pkg/chain/eth/ethereum/ecdsa_keep_factory.go +++ b/pkg/chain/eth/ethereum/ecdsa_keep_factory.go @@ -8,13 +8,13 @@ import ( "github.com/keep-network/keep-tecdsa/pkg/chain/eth/gen/abi" ) -func (ec *EthereumChain) watchTECDSAKeepCreated( - success func(event *abi.TECDSAKeepFactoryTECDSAKeepCreated), +func (ec *EthereumChain) watchECDSAKeepCreated( + success func(event *abi.ECDSAKeepFactoryECDSAKeepCreated), fail func(err error) error, ) (subscription.EventSubscription, error) { - eventChan := make(chan *abi.TECDSAKeepFactoryTECDSAKeepCreated) + eventChan := make(chan *abi.ECDSAKeepFactoryECDSAKeepCreated) - eventSubscription, err := ec.tecdsaKeepFactoryContract.WatchTECDSAKeepCreated( + eventSubscription, err := ec.ecdsaKeepFactoryContract.WatchECDSAKeepCreated( nil, eventChan, ) diff --git a/pkg/chain/eth/ethereum/ethereum.go b/pkg/chain/eth/ethereum/ethereum.go index 54ed6b189..7263d7c8a 100644 --- a/pkg/chain/eth/ethereum/ethereum.go +++ b/pkg/chain/eth/ethereum/ethereum.go @@ -10,16 +10,16 @@ import ( "github.com/keep-network/keep-tecdsa/pkg/chain/eth/gen/abi" ) -// OnTECDSAKeepCreated is a callback that is invoked when an on-chain -// notification of a new TECDSA keep creation is seen. -func (ec *EthereumChain) OnTECDSAKeepCreated( - handler func(event *eth.TECDSAKeepCreatedEvent), +// OnECDSAKeepCreated is a callback that is invoked when an on-chain +// notification of a new ECDSA keep creation is seen. +func (ec *EthereumChain) OnECDSAKeepCreated( + handler func(event *eth.ECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) { - return ec.watchTECDSAKeepCreated( + return ec.watchECDSAKeepCreated( func( - chainEvent *abi.TECDSAKeepFactoryTECDSAKeepCreated, + chainEvent *abi.ECDSAKeepFactoryECDSAKeepCreated, ) { - handler(ð.TECDSAKeepCreatedEvent{ + handler(ð.ECDSAKeepCreatedEvent{ KeepAddress: chainEvent.KeepAddress, }) }, @@ -43,7 +43,7 @@ func (ec *EthereumChain) OnSignatureRequested( return ec.watchSignatureRequested( keepContract, func( - chainEvent *abi.TECDSAKeepSignatureRequested, + chainEvent *abi.ECDSAKeepSignatureRequested, ) { handler(ð.SignatureRequestedEvent{ Digest: chainEvent.Digest, @@ -76,11 +76,11 @@ func (ec *EthereumChain) SubmitKeepPublicKey( return nil } -func (ec *EthereumChain) getKeepContract(address common.Address) (*abi.TECDSAKeep, error) { - tecdsaKeepContract, err := abi.NewTECDSAKeep(address, ec.client) +func (ec *EthereumChain) getKeepContract(address common.Address) (*abi.ECDSAKeep, error) { + ecdsaKeepContract, err := abi.NewECDSAKeep(address, ec.client) if err != nil { return nil, err } - return tecdsaKeepContract, nil + return ecdsaKeepContract, nil } diff --git a/pkg/chain/eth/event.go b/pkg/chain/eth/event.go index da151661f..fee4574f8 100644 --- a/pkg/chain/eth/event.go +++ b/pkg/chain/eth/event.go @@ -4,8 +4,8 @@ import ( "github.com/ethereum/go-ethereum/common" ) -// TECDSAKeepCreatedEvent is an event emitted on a new keep creation. -type TECDSAKeepCreatedEvent struct { +// ECDSAKeepCreatedEvent is an event emitted on a new keep creation. +type ECDSAKeepCreatedEvent struct { KeepAddress common.Address // keep contract address } diff --git a/pkg/chain/eth/local/ecdsa_keep_factory.go b/pkg/chain/eth/local/ecdsa_keep_factory.go index 674cbe012..ae89245c4 100644 --- a/pkg/chain/eth/local/ecdsa_keep_factory.go +++ b/pkg/chain/eth/local/ecdsa_keep_factory.go @@ -23,12 +23,12 @@ func (c *localChain) createKeep(keepAddress eth.KeepAddress) error { } c.keeps[keepAddress] = localKeep - keepCreatedEvent := ð.TECDSAKeepCreatedEvent{ + keepCreatedEvent := ð.ECDSAKeepCreatedEvent{ KeepAddress: keepAddress, } for _, handler := range c.keepCreatedHandlers { - go func(handler func(event *eth.TECDSAKeepCreatedEvent), keepCreatedEvent *eth.TECDSAKeepCreatedEvent) { + go func(handler func(event *eth.ECDSAKeepCreatedEvent), keepCreatedEvent *eth.ECDSAKeepCreatedEvent) { handler(keepCreatedEvent) }(handler, keepCreatedEvent) } diff --git a/pkg/chain/eth/local/local.go b/pkg/chain/eth/local/local.go index 21078ad6c..a8bf75faf 100644 --- a/pkg/chain/eth/local/local.go +++ b/pkg/chain/eth/local/local.go @@ -18,7 +18,7 @@ type localChain struct { keeps map[eth.KeepAddress]*localKeep - keepCreatedHandlers map[int]func(event *eth.TECDSAKeepCreatedEvent) + keepCreatedHandlers map[int]func(event *eth.ECDSAKeepCreatedEvent) } // Connect performs initialization for communication with Ethereum blockchain @@ -26,14 +26,14 @@ type localChain struct { func Connect() eth.Interface { return &localChain{ keeps: make(map[eth.KeepAddress]*localKeep), - keepCreatedHandlers: make(map[int]func(event *eth.TECDSAKeepCreatedEvent)), + keepCreatedHandlers: make(map[int]func(event *eth.ECDSAKeepCreatedEvent)), } } -// OnTECDSAKeepCreated is a callback that is invoked when an on-chain -// notification of a new TECDSA keep creation is seen. -func (lc *localChain) OnTECDSAKeepCreated( - handler func(event *eth.TECDSAKeepCreatedEvent), +// OnECDSAKeepCreated is a callback that is invoked when an on-chain +// notification of a new ECDSA keep creation is seen. +func (lc *localChain) OnECDSAKeepCreated( + handler func(event *eth.ECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error) { lc.handlerMutex.Lock() defer lc.handlerMutex.Unlock() diff --git a/pkg/chain/eth/local/local_test.go b/pkg/chain/eth/local/local_test.go index 60d18f887..619f0ec08 100644 --- a/pkg/chain/eth/local/local_test.go +++ b/pkg/chain/eth/local/local_test.go @@ -11,19 +11,19 @@ import ( "github.com/keep-network/keep-tecdsa/pkg/chain/eth" ) -func TestOnTECDSAKeepCreated(t *testing.T) { +func TestOnECDSAKeepCreated(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() chain := initializeLocalChain() - eventFired := make(chan *eth.TECDSAKeepCreatedEvent) + eventFired := make(chan *eth.ECDSAKeepCreatedEvent) keepAddress := eth.KeepAddress([20]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}) - expectedEvent := ð.TECDSAKeepCreatedEvent{ + expectedEvent := ð.ECDSAKeepCreatedEvent{ KeepAddress: keepAddress, } - subscription, err := chain.OnTECDSAKeepCreated( - func(event *eth.TECDSAKeepCreatedEvent) { + subscription, err := chain.OnECDSAKeepCreated( + func(event *eth.ECDSAKeepCreatedEvent) { eventFired <- event }, ) diff --git a/pkg/tecdsa/tecdsa.go b/pkg/tecdsa/tecdsa.go index 4f4f48d46..2fdd870f5 100644 --- a/pkg/tecdsa/tecdsa.go +++ b/pkg/tecdsa/tecdsa.go @@ -32,7 +32,7 @@ func Initialize( bitcoinNetParams: bitcoinNetParams, } - ethereumChain.OnTECDSAKeepCreated(func(event *eth.TECDSAKeepCreatedEvent) { + ethereumChain.OnECDSAKeepCreated(func(event *eth.ECDSAKeepCreatedEvent) { fmt.Printf("New ECDSA Keep created [%+v]\n", event) go func() { diff --git a/solidity/README.md b/solidity/README.md index 1af17e4a9..f2a47464b 100644 --- a/solidity/README.md +++ b/solidity/README.md @@ -58,7 +58,7 @@ for each contract and copy-paste it to [config.toml](../configs/config.toml) fil Unit tests use Truffle's test framework, and redeploy contracts for a clean environment every test. An example: ```sh -truffle test test/TECDSAKeepTest.js +truffle test test/ECDSAKeepTest.js ``` #### Scenarios @@ -67,4 +67,4 @@ Tests in `test/integration/` are for testing different scenarios in the Go clien ```sh truffle exec test/integration/keep_signature_requested.js -``` +``` \ No newline at end of file diff --git a/solidity/contracts/TECDSAKeep.sol b/solidity/contracts/ECDSAKeep.sol similarity index 94% rename from solidity/contracts/TECDSAKeep.sol rename to solidity/contracts/ECDSAKeep.sol index f5ff5596b..2a4f588eb 100644 --- a/solidity/contracts/TECDSAKeep.sol +++ b/solidity/contracts/ECDSAKeep.sol @@ -1,9 +1,9 @@ pragma solidity ^0.5.4; -/// @title TECDSA Keep -/// @notice Contract reflecting an TECDSA keep. +/// @title ECDSA Keep +/// @notice Contract reflecting an ECDSA keep. /// @dev TODO: This is a stub contract - needs to be implemented. -contract TECDSAKeep { +contract ECDSAKeep { // Owner of the keep. address owner; // List of keep members' addresses. diff --git a/solidity/contracts/TECDSAKeepFactory.sol b/solidity/contracts/ECDSAKeepFactory.sol similarity index 72% rename from solidity/contracts/TECDSAKeepFactory.sol rename to solidity/contracts/ECDSAKeepFactory.sol index a59f955a6..78ce4399f 100644 --- a/solidity/contracts/TECDSAKeepFactory.sol +++ b/solidity/contracts/ECDSAKeepFactory.sol @@ -1,20 +1,20 @@ pragma solidity ^0.5.4; -import "./TECDSAKeep.sol"; +import "./ECDSAKeep.sol"; -/// @title TECDSA Keep Factory -/// @notice Contract creating TECDSA keeps. +/// @title ECDSA Keep Factory +/// @notice Contract creating ECDSA keeps. /// @dev TODO: This is a stub contract - needs to be implemented. -contract TECDSAKeepFactory { +contract ECDSAKeepFactory { // List of keeps. - TECDSAKeep[] keeps; + ECDSAKeep[] keeps; // Notification that a new keep has been created. - event TECDSAKeepCreated( + event ECDSAKeepCreated( address keepAddress ); - /// @notice Open a new TECDSA keep. + /// @notice Open a new ECDSA keep. /// @dev Selects a list of members for the keep based on provided parameters. /// @param _groupSize Number of members in the keep. /// @param _honestThreshold Minimum number of honest keep members. @@ -25,9 +25,9 @@ contract TECDSAKeepFactory { uint256 _honestThreshold, address _owner ) public payable returns (address keepAddress) { - address[] memory _members = selectMembers(_groupSize); + address[] memory _members = selectECDSAKeepMembers(_groupSize); - TECDSAKeep keep = new TECDSAKeep( + ECDSAKeep keep = new ECDSAKeep( _owner, _members, _honestThreshold @@ -36,14 +36,14 @@ contract TECDSAKeepFactory { keepAddress = address(keep); - emit TECDSAKeepCreated(keepAddress); + emit ECDSAKeepCreated(keepAddress); } - /// @notice Runs member selection for an TECDSA keep. + /// @notice Runs member selection for an ECDSA keep. /// @dev Stub implementations gets only one member with a fixed address. /// @param _groupSize Number of members to be selected. /// @return List of selected members addresses. - function selectMembers( + function selectECDSAKeepMembers( uint256 _groupSize ) internal pure returns (address[] memory members){ // TODO: Implement diff --git a/solidity/contracts/TECDSAKeepVendor.sol b/solidity/contracts/ECDSAKeepVendor.sol similarity index 64% rename from solidity/contracts/TECDSAKeepVendor.sol rename to solidity/contracts/ECDSAKeepVendor.sol index caeb2537e..8c8e15a12 100644 --- a/solidity/contracts/TECDSAKeepVendor.sol +++ b/solidity/contracts/ECDSAKeepVendor.sol @@ -2,42 +2,42 @@ pragma solidity ^0.5.4; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "./utils/AddressArrayUtils.sol"; -import "./TECDSAKeepFactory.sol"; +import "./ECDSAKeepFactory.sol"; -/// @title TECDSA Keep Vendor -/// @notice The contract can be used to obtain a new TECDSA keep. -/// @dev Interacts with TECDSA keep factory to obtain a new instance of the TECDSA -/// keep. Several versions of TECDSA keep factories can be registered for the vendor. +/// @title ECDSA Keep Vendor +/// @notice The contract can be used to obtain a new ECDSA keep. +/// @dev Interacts with ECDSA keep factory to obtain a new instance of the ECDSA +/// keep. Several versions of ECDSA keep factories can be registered for the vendor. /// TODO: This is a stub contract - needs to be implemented. /// TODO: When more keep types are added consider extracting registration and /// selection to a separate inheritable contract. -contract TECDSAKeepVendor is Ownable { +contract ECDSAKeepVendor is Ownable { using AddressArrayUtils for address[]; - // List of TECDSA keep factories. + // List of ECDSA keep factories. address[] public factories; - /// @notice Register new TECDSA keep factory. + /// @notice Register new ECDSA keep factory. /// @dev Adds a factory address to the list of registered factories. Address /// cannot be zero and cannot be already registered. - /// @param _factory TECDSA keep factory address. + /// @param _factory ECDSA keep factory address. function registerFactory(address _factory) public onlyOwner { require(!factories.contains(_factory), "Factory address already registered"); factories.push(_factory); } - /// @notice Select a recommended TECDSA keep factory from all registered - /// TECDSA keep factories. + /// @notice Select a recommended ECDSA keep factory from all registered + /// ECDSA keep factories. /// @dev This is a stub implementation returning first factory on the list. - /// @return Selected TECDSA keep factory address. + /// @return Selected ECDSA keep factory address. function selectFactory() internal view returns (address) { // TODO: Implement factory selection mechanism. return factories[factories.length - 1]; } - /// @notice Open a new TECDSA keep. - /// @dev Calls a recommended TECDSA keep factory to open a new keep. + /// @notice Open a new ECDSA keep. + /// @dev Calls a recommended ECDSA keep factory to open a new keep. /// @param _groupSize Number of members in the keep. /// @param _honestThreshold Minimum number of honest keep members. /// @param _owner Address of the keep owner. @@ -49,7 +49,7 @@ contract TECDSAKeepVendor is Ownable { ) public payable returns (address keepAddress) { address factory = selectFactory(); - return TECDSAKeepFactory(factory).openKeep( + return ECDSAKeepFactory(factory).openKeep( _groupSize, _honestThreshold, _owner diff --git a/solidity/migrations/2_deploy_contracts.js b/solidity/migrations/2_deploy_contracts.js index 0c002df7a..e86ef1822 100644 --- a/solidity/migrations/2_deploy_contracts.js +++ b/solidity/migrations/2_deploy_contracts.js @@ -1,14 +1,14 @@ -const TECDSAKeepFactory = artifacts.require("./TECDSAKeepFactory.sol"); -const TECDSAKeepVendor = artifacts.require("./TECDSAKeepVendor.sol"); +const ECDSAKeepFactory = artifacts.require("./ECDSAKeepFactory.sol"); +const ECDSAKeepVendor = artifacts.require("./ECDSAKeepVendor.sol"); const KeepRegistry = artifacts.require("./KeepRegistry.sol"); module.exports = async function (deployer) { - await deployer.deploy(TECDSAKeepFactory) - const tecdsaKeepFactory = await TECDSAKeepFactory.deployed() + await deployer.deploy(ECDSAKeepFactory) + const ecdsaKeepFactory = await ECDSAKeepFactory.deployed() - const tecdsaKeepVendor = await deployer.deploy(TECDSAKeepVendor) - await tecdsaKeepVendor.registerFactory(tecdsaKeepFactory.address) + const ecdsaKeepVendor = await deployer.deploy(ECDSAKeepVendor) + await ecdsaKeepVendor.registerFactory(ecdsaKeepFactory.address) const keepRegistry = await deployer.deploy(KeepRegistry) - await keepRegistry.setVendor('TECDSAKeep', tecdsaKeepVendor.address) + await keepRegistry.setVendor('ECDSAKeep', ecdsaKeepVendor.address) } diff --git a/solidity/test/TECDSAKeepFactoryTest.js b/solidity/test/ECDSAKeepFactoryTest.js similarity index 73% rename from solidity/test/TECDSAKeepFactoryTest.js rename to solidity/test/ECDSAKeepFactoryTest.js index f1c63cfe3..3becf8657 100644 --- a/solidity/test/TECDSAKeepFactoryTest.js +++ b/solidity/test/ECDSAKeepFactoryTest.js @@ -1,11 +1,11 @@ -var TECDSAKeepFactory = artifacts.require('TECDSAKeepFactory'); +var ECDSAKeepFactory = artifacts.require('ECDSAKeepFactory'); -contract("TECDSAKeepFactory", async accounts => { +contract("ECDSAKeepFactory", async accounts => { - it("emits TECDSAKeepCreated event upon keep creation", async () => { + it("emits ECDSAKeepCreated event upon keep creation", async () => { let blockNumber = await web3.eth.getBlockNumber() - let keepFactory = await TECDSAKeepFactory.deployed(); + let keepFactory = await ECDSAKeepFactory.deployed(); let keepAddress = await keepFactory.openKeep.call( 10, // _groupSize @@ -19,7 +19,7 @@ contract("TECDSAKeepFactory", async accounts => { "0xbc4862697a1099074168d54A555c4A60169c18BD" // _owner ) - let eventList = await keepFactory.getPastEvents('TECDSAKeepCreated', { + let eventList = await keepFactory.getPastEvents('ECDSAKeepCreated', { fromBlock: blockNumber, toBlock: 'latest' }) diff --git a/solidity/test/TECDSAKeepTest.js b/solidity/test/ECDSAKeepTest.js similarity index 81% rename from solidity/test/TECDSAKeepTest.js rename to solidity/test/ECDSAKeepTest.js index 114059bb9..78ce8ee57 100644 --- a/solidity/test/TECDSAKeepTest.js +++ b/solidity/test/ECDSAKeepTest.js @@ -1,16 +1,16 @@ -const TECDSAKeepFactory = artifacts.require('./TECDSAKeepFactory.sol'); -const TECDSAKeep = artifacts.require('./TECDSAKeep.sol'); +const ECDSAKeepFactory = artifacts.require('./ECDSAKeepFactory.sol'); +const ECDSAKeep = artifacts.require('./ECDSAKeep.sol'); const truffleAssert = require('truffle-assertions'); -contract('TECDSAKeep', function (accounts) { +contract('ECDSAKeep', function (accounts) { describe("#constructor", async function () { it('succeeds', async () => { let owner = accounts[0] let members = [owner]; let threshold = 1; - let instance = await TECDSAKeep.new( + let instance = await ECDSAKeep.new( owner, members, threshold @@ -28,7 +28,7 @@ contract('TECDSAKeep', function (accounts) { let members = [owner]; let threshold = 1; - instance = await TECDSAKeep.new( + instance = await ECDSAKeep.new( owner, members, threshold @@ -52,7 +52,7 @@ contract('TECDSAKeep', function (accounts) { let honestThreshold = 5; it("get public key before it is set", async () => { - let keep = await TECDSAKeep.new(owner, members, honestThreshold); + let keep = await ECDSAKeep.new(owner, members, honestThreshold); let publicKey = await keep.getPublicKey.call() @@ -60,7 +60,7 @@ contract('TECDSAKeep', function (accounts) { }); it("set public key and get it", async () => { - let keep = await TECDSAKeep.new(owner, members, honestThreshold); + let keep = await ECDSAKeep.new(owner, members, honestThreshold); await keep.setPublicKey(expectedPublicKey) diff --git a/solidity/test/TECDSAKeepVendorTest.js b/solidity/test/ECDSAKeepVendorTest.js similarity index 87% rename from solidity/test/TECDSAKeepVendorTest.js rename to solidity/test/ECDSAKeepVendorTest.js index 894a454f5..6f49f271a 100644 --- a/solidity/test/TECDSAKeepVendorTest.js +++ b/solidity/test/ECDSAKeepVendorTest.js @@ -1,7 +1,7 @@ -var TECDSAKeepVendor = artifacts.require('TECDSAKeepVendorStub') -var TECDSAKeepFactoryStub = artifacts.require('TECDSAKeepFactoryStub') +var ECDSAKeepVendor = artifacts.require('ECDSAKeepVendorStub') +var ECDSAKeepFactoryStub = artifacts.require('ECDSAKeepFactoryStub') -contract("TECDSAKeepVendor", async accounts => { +contract("ECDSAKeepVendor", async accounts => { const address0 = "0x0000000000000000000000000000000000000000" const address1 = "0xF2D3Af2495E286C7820643B963FB9D34418c871d" const address2 = "0x4566716c07617c5854fe7dA9aE5a1219B19CCd27" @@ -10,7 +10,7 @@ contract("TECDSAKeepVendor", async accounts => { describe("registerFactory", async () => { beforeEach(async () => { - keepVendor = await TECDSAKeepVendor.new() + keepVendor = await ECDSAKeepVendor.new() }) it("registers one factory address", async () => { @@ -74,7 +74,7 @@ contract("TECDSAKeepVendor", async accounts => { describe("selectFactory", async () => { before(async () => { - keepVendor = await TECDSAKeepVendor.new() + keepVendor = await ECDSAKeepVendor.new() await keepVendor.registerFactory(address1) await keepVendor.registerFactory(address2) @@ -91,14 +91,14 @@ contract("TECDSAKeepVendor", async accounts => { describe("openKeep", async () => { before(async () => { - keepVendor = await TECDSAKeepVendor.new() - let factoryStub = await TECDSAKeepFactoryStub.new() + keepVendor = await ECDSAKeepVendor.new() + let factoryStub = await ECDSAKeepFactoryStub.new() await keepVendor.registerFactory(factoryStub.address) }) it("calls selected factory", async () => { - let selectedFactory = await TECDSAKeepFactoryStub.at( + let selectedFactory = await ECDSAKeepFactoryStub.at( await keepVendor.selectFactoryPublic.call() ) diff --git a/solidity/test/contracts/TECDSAKeepFactoryStub.sol b/solidity/test/contracts/ECDSAKeepFactoryStub.sol similarity index 84% rename from solidity/test/contracts/TECDSAKeepFactoryStub.sol rename to solidity/test/contracts/ECDSAKeepFactoryStub.sol index c6d25a5b8..79c8ad230 100644 --- a/solidity/test/contracts/TECDSAKeepFactoryStub.sol +++ b/solidity/test/contracts/ECDSAKeepFactoryStub.sol @@ -1,10 +1,10 @@ pragma solidity ^0.5.4; -import "../../contracts/TECDSAKeepFactory.sol"; +import "../../contracts/ECDSAKeepFactory.sol"; -/// @title TECDSA Keep Factory Stub +/// @title ECDSA Keep Factory Stub /// @dev This contract is for testing purposes only. -contract TECDSAKeepFactoryStub is TECDSAKeepFactory { +contract ECDSAKeepFactoryStub is ECDSAKeepFactory { /// @dev Returns calculated keep address. function openKeep( diff --git a/solidity/test/contracts/TECDSAKeepVendorStub.sol b/solidity/test/contracts/ECDSAKeepVendorStub.sol similarity index 84% rename from solidity/test/contracts/TECDSAKeepVendorStub.sol rename to solidity/test/contracts/ECDSAKeepVendorStub.sol index 173b68d11..9e4899cbb 100644 --- a/solidity/test/contracts/TECDSAKeepVendorStub.sol +++ b/solidity/test/contracts/ECDSAKeepVendorStub.sol @@ -1,10 +1,10 @@ pragma solidity ^0.5.4; -import "../../contracts/TECDSAKeepVendor.sol"; +import "../../contracts/ECDSAKeepVendor.sol"; -/// @title TECDSA Keep Vendor Stub +/// @title ECDSA Keep Vendor Stub /// @dev This contract is for testing purposes only. -contract TECDSAKeepVendorStub is TECDSAKeepVendor { +contract ECDSAKeepVendorStub is ECDSAKeepVendor { /// @notice Get registered ECDSA keep factories. /// @dev This is a stub implementation to validate the factories list. diff --git a/solidity/test/integration/keep_signature_requested.js b/solidity/test/integration/keep_signature_requested.js index b9bf54f6d..59f850692 100644 --- a/solidity/test/integration/keep_signature_requested.js +++ b/solidity/test/integration/keep_signature_requested.js @@ -1,15 +1,15 @@ -const TECDSAKeepFactory = artifacts.require('./TECDSAKeepFactory.sol'); -const TECDSAKeep = artifacts.require('./TECDSAKeep.sol'); +const ECDSAKeepFactory = artifacts.require('./ECDSAKeepFactory.sol'); +const ECDSAKeep = artifacts.require('./ECDSAKeep.sol'); const truffleAssert = require('truffle-assertions'); -// TECDSAKeep +// ECDSAKeep // signature request // creates a new keep and calls .sign module.exports = async function () { let accounts = await web3.eth.getAccounts(); - let factoryInstance = await TECDSAKeepFactory.deployed(); + let factoryInstance = await ECDSAKeepFactory.deployed(); // Deploy Keep let groupSize = 1; @@ -24,14 +24,14 @@ module.exports = async function () { // Get the Keep's address let instanceAddress; - truffleAssert.eventEmitted(createKeepTx, 'TECDSAKeepCreated', (ev) => { + truffleAssert.eventEmitted(createKeepTx, 'ECDSAKeepCreated', (ev) => { instanceAddress = ev.keepAddress; return true; }); expect(instanceAddress.length).to.eq(42); - let instance = await TECDSAKeep.at(instanceAddress) + let instance = await ECDSAKeep.at(instanceAddress) let signTx = await instance.sign('0x00') truffleAssert.eventEmitted(signTx, 'SignatureRequested', (ev) => { diff --git a/tests/smoketest/smoketest.go b/tests/smoketest/smoketest.go index 39930d64c..2304efde0 100644 --- a/tests/smoketest/smoketest.go +++ b/tests/smoketest/smoketest.go @@ -24,7 +24,7 @@ func Execute(config *ethereum.Config) error { } // Setup connection to ECDSA Keep Factory contract. - tecdsaKeepFactory, err := initializeTECDSAKeepFactory(config) + ecdsaKeepFactory, err := initializeECDSAKeepFactory(config) if err != nil { return err } @@ -35,14 +35,14 @@ func Execute(config *ethereum.Config) error { } // Define callback on event. - eventChan := make(chan *eth.TECDSAKeepCreatedEvent) + eventChan := make(chan *eth.ECDSAKeepCreatedEvent) - handle := func(event *eth.TECDSAKeepCreatedEvent) { + handle := func(event *eth.ECDSAKeepCreatedEvent) { eventChan <- event } // Register for events. - subscription, err := chainAPI.OnTECDSAKeepCreated(handle) + subscription, err := chainAPI.OnECDSAKeepCreated(handle) defer subscription.Unsubscribe() if err != nil { return err @@ -52,7 +52,7 @@ func Execute(config *ethereum.Config) error { honestThreshold := big.NewInt(5) // Request a new keep creation. - transaction, err := tecdsaKeepFactory.OpenKeep( + transaction, err := ecdsaKeepFactory.OpenKeep( transactorOpts, groupSize, honestThreshold, @@ -82,25 +82,25 @@ func Execute(config *ethereum.Config) error { return nil } -func initializeTECDSAKeepFactory(config *ethereum.Config) (*abi.TECDSAKeepFactory, error) { +func initializeECDSAKeepFactory(config *ethereum.Config) (*abi.ECDSAKeepFactory, error) { client, err := ethclient.Dial(config.URL) if err != nil { return nil, err } - tecdsaKeepFactoryContractAddress, err := config.ContractAddress(ethereum.TECDSAKeepFactoryContractName) + ecdsaKeepFactoryContractAddress, err := config.ContractAddress(ethereum.ECDSAKeepFactoryContractName) if err != nil { return nil, err } - tecdsaKeepFactoryContract, err := abi.NewTECDSAKeepFactory( - tecdsaKeepFactoryContractAddress, + ecdsaKeepFactoryContract, err := abi.NewECDSAKeepFactory( + ecdsaKeepFactoryContractAddress, client, ) if err != nil { return nil, err } - return tecdsaKeepFactoryContract, nil + return ecdsaKeepFactoryContract, nil } func createTransactorOpts(config *ethereum.Config) (*bind.TransactOpts, error) { From 86eefbec179a373eecc248dabf67f9cff5ee300c Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 15:27:20 +0200 Subject: [PATCH 32/33] Fix failing vendor test --- solidity/test/ECDSAKeepVendorTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity/test/ECDSAKeepVendorTest.js b/solidity/test/ECDSAKeepVendorTest.js index 6f49f271a..e0732b952 100644 --- a/solidity/test/ECDSAKeepVendorTest.js +++ b/solidity/test/ECDSAKeepVendorTest.js @@ -39,7 +39,7 @@ contract("ECDSAKeepVendor", async accounts => { }) it("fails if address already exists", async () => { - let expectedResult = [] + let expectedResult = [address1] await keepVendor.registerFactory(address1) From 5b7ca78c75b44c7dc65a8f5af1988efd9bb0fbe4 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 24 Jul 2019 18:32:40 +0200 Subject: [PATCH 33/33] Remove zero address and duplicate test cases --- solidity/test/KeepRegistryTest.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/solidity/test/KeepRegistryTest.js b/solidity/test/KeepRegistryTest.js index 4ef9d5ef7..a7d4a0da2 100644 --- a/solidity/test/KeepRegistryTest.js +++ b/solidity/test/KeepRegistryTest.js @@ -21,13 +21,6 @@ contract("KeepRegistry", async accounts => { assert.deepEqual(result, address1, "unexpected keep vendor address") }) - it("sets vendor address to zero", async () => { - await keepRegistry.setVendor(keepType1, address0) - - let result = await keepRegistry.getVendor.call(keepType1) - assert.deepEqual(result, address0, "unexpected keep vendor address") - }) - it("replaces vendor address for keep type", async () => { await keepRegistry.setVendor(keepType1, address1) await keepRegistry.setVendor(keepType1, address2) @@ -47,17 +40,6 @@ contract("KeepRegistry", async accounts => { assert.deepEqual(result2, address2, "unexpected keep vendor address") }) - it("sets two keep types with the same addresses", async () => { - await keepRegistry.setVendor(keepType1, address1) - await keepRegistry.setVendor(keepType2, address1) - - let result1 = await keepRegistry.getVendor.call(keepType1) - assert.deepEqual(result1, address1, "unexpected keep vendor address") - - let result2 = await keepRegistry.getVendor.call(keepType2) - assert.deepEqual(result2, address1, "unexpected keep vendor address") - }) - it("cannot be called by non owner", async () => { try { await keepRegistry.setVendor.call(keepType1, address1, { from: accounts[1] })