diff --git a/README.md b/README.md index 52c047b..d21c9bc 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # beakeros -[![CircleCI](https://circleci.com/gh/Daolab/beakeros.svg?style=svg&circle-token=03f33d77aa4de144ba10274b9e4020ffb82f7c95)](https://circleci.com/gh/Daolab/beakeros) +[![CircleCI](https://circleci.com/gh/daohub-io/beakeros.svg?style=svg&circle-token=03f33d77aa4de144ba10274b9e4020ffb82f7c95)](https://circleci.com/gh/Daolab/beakeros) This is the BeakerOS repo. It contains an implementation of the Beaker kernel. The whitepaper for BeakerOS is contained in a separate repository: -[https://github.com/Daolab/beaker-whitepaper](https://github.com/Daolab/beaker-whitepaper). +[https://github.com/daohub-io/beaker-whitepaper](https://github.com/Daolab/beaker-whitepaper). ## Testing You will need Nodejs Installed: diff --git a/contracts/system/ACL.sol b/contracts/system/ACL.sol new file mode 100644 index 0000000..5046e2a --- /dev/null +++ b/contracts/system/ACL.sol @@ -0,0 +1,391 @@ +pragma solidity ^0.4.17; + +import "../BeakerContract.sol"; + +contract ACL is BeakerContract { + + struct WriteCap { + uint256 start; + uint256 len; + } + + uint8 constant ACCOUNT_MAPPING = 0; + uint8 constant ACCOUNT_ARRAY = 1; + uint8 constant GROUP_MAPPING = 2; + uint8 constant GROUP_ARRAY = 3; + + struct AccountMapVal { + uint8 accountIndex; + bytes24 procId; + } + + struct AccountArrVal { + address accountId; + } + + struct GroupMapVal { + uint8 groupIndex; + } + + struct GroupArrVal { + uint8 accountLen; + bytes24 procId; + } + + function AccountMapVal_decode(uint256 _data) internal returns (AccountMapVal) { + return AccountMapVal(uint8(_data >> 24), bytes24(_data)); + } + + function AccountMapVal_encode(AccountMapVal _acc_map_val) internal returns (uint256 data) { + return (uint256(_acc_map_val.accountIndex) << 24) | uint256(_acc_map_val.procId); + } + + + function AccountArrVal_decode(uint256 _data) internal returns (AccountArrVal) { + return AccountArrVal(address(_data)); + } + + function AccountArrVal_encode(AccountArrVal _acc_arr_val) internal returns (uint256 data) { + return uint256(_acc_arr_val.accountId); + } + + + function GroupMapVal_decode(uint256 _data) internal returns (GroupMapVal) { + return GroupMapVal(uint8(_data)); + } + + function GroupMapVal_encode(GroupMapVal _group_map_val) internal returns (uint256 data) { + return (uint256(_group_map_val.groupIndex)); + } + + + function GroupArrVal_decode(uint256 _data) internal returns (GroupArrVal) { + return GroupArrVal(uint8(_data >> 24), bytes24(_data)); + } + + function GroupArrVal_encode(GroupArrVal _group_arr_val) internal returns (uint256 data) { + return (uint256(_group_arr_val.accountLen) << 24) | uint256(_group_arr_val.procId); + } + + function _getStoreCapsLen() internal returns (uint256 nCaps) { + // Storage key of the current procedure on the procedure heap + uint256 currentProcPointer = _getPointerProcHeapByName(_getCurrentProcedure()); + // How many Write capabilities does the current procedure have? + return _get(currentProcPointer | (CAP_STORE_WRITE*0x10000)); + } + + function _getStoreCap(uint256 index) internal returns (WriteCap writer) { + // Storage key of the current procedure on the procedure heap + uint256 currentProcPointer = _getPointerProcHeapByName(_getCurrentProcedure()); + + // A write capability has two values, address and size. Address is at + // 0x00 and size is at 0x01. + writer.start = _get(currentProcPointer | (CAP_STORE_WRITE*0x10000) | (index + 1)*0x100 | 0x00); + writer.len = _get(currentProcPointer | (CAP_STORE_WRITE*0x10000) | (index + 1)*0x100 | 0x01); + } + + function _getGroupByIndex(uint8 _groupIndex) internal returns (bytes24 procId, uint8 accountsLen, uint8 groupIndex) { + WriteCap memory groupsMap = _getStoreCap(GROUP_MAPPING); + assert(groupsMap.len > (2 << 20)); // Must be a mapping + + WriteCap memory groupsArray = _getStoreCap(GROUP_ARRAY); + assert(groupsArray.len >= 256); + + // Get Current Group Data + GroupArrVal memory current_group_arr = GroupArrVal_decode(read(groupsArray.start + 1 + uint256(_groupIndex))); + GroupMapVal memory current_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(current_group_arr.procId))); + + procId = current_group_arr.procId; + accountsLen = current_group_arr.accountLen; + groupIndex = current_group_map.groupIndex; + } + + function _getGroupById(uint8 _procId) internal returns (bytes24 procId, uint8 accountsLen, uint8 groupIndex) { + WriteCap memory groupsMap = _getStoreCap(GROUP_MAPPING); + assert(groupsMap.len > (2 << 20)); // Must be a mapping + + WriteCap memory groupsArray = _getStoreCap(GROUP_ARRAY); + assert(groupsArray.len >= 256); + + // Get Current Group Data + GroupMapVal memory current_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(_procId))); + GroupArrVal memory current_group_arr = GroupArrVal_decode(read(groupsArray.start + 1 + uint256(current_group_map.groupIndex))); + + procId = current_group_arr.procId; + accountsLen = current_group_arr.accountLen; + groupIndex = current_group_map.groupIndex; + } + + function _createGroup(bytes24 _procId) internal returns (uint8 groupIndex) { + // Check that parameters are valid + assert(_procId != 0); + + WriteCap memory groupsMap = _getStoreCap(GROUP_MAPPING); + assert(groupsMap.len >= (2 << 20)); // Must be a mapping + + WriteCap memory groupsArray = _getStoreCap(GROUP_ARRAY); + assert(groupsArray.len >= 256); + + // Check that Groups Array is not full + uint256 groups_len = read(groupsArray.start + 0); + assert(groups_len + 2 < groupsArray.len); + + // Get Current Group Data + GroupMapVal memory current_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(_procId))); + GroupArrVal memory current_group_arr = GroupArrVal_decode(read(groupsArray.start + 1 + uint256(current_group_map.groupIndex))); + + // Check that group with the same procId doesn't exist. + assert(current_group_arr.procId != _procId); + + // Update Group with procId and append to groups array + current_group_map.groupIndex = uint8(groups_len); + current_group_arr.procId = _procId; + current_group_arr.accountLen = 0; + + write(GROUP_MAPPING, groupsMap.start + uint256(_procId), GroupMapVal_encode(current_group_map)); + write(GROUP_ARRAY, groupsArray.start + 1 + uint256(groups_len), GroupArrVal_encode(current_group_arr)); + + // Update Groups Array Length + write(GROUP_ARRAY, groupsArray.start + 0, groups_len + 1); + + return uint8(groups_len); + } + + function _removeGroup(bytes24 _procId) internal returns (uint8 groupIndex) { + WriteCap memory groupsMap = _getStoreCap(GROUP_MAPPING); + assert(groupsMap.len > (2 << 20)); // Must be a mapping + + WriteCap memory groupsArray = _getStoreCap(GROUP_ARRAY); + uint8 groups_len = uint8(read(groupsArray.start + 0)); + assert(groupsArray.len >= 256); + assert(groups_len > 0); + + // Get Current Group Data + GroupMapVal memory current_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(_procId))); + GroupArrVal memory current_group_arr = GroupArrVal_decode(read(groupsArray.start + 1 + uint256(current_group_map.groupIndex))); + + // If Not Last Group, Overwrite with Last data + if (current_group_map.groupIndex +1 != groups_len) { + GroupArrVal memory last_group_arr = GroupArrVal_decode(read(groupsArray.start + groups_len)); + GroupMapVal memory last_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(last_group_arr.procId))); + + // Update Index + last_group_map.groupIndex = current_group_map.groupIndex; + + write(GROUP_ARRAY, groupsArray.start + 1 + last_group_map.groupIndex, GroupArrVal_encode(last_group_arr)); + write(GROUP_MAPPING, groupsMap.start + uint256(last_group_arr.procId), GroupMapVal_encode(last_group_map)); + } + + // Remove Mapping Value + write(GROUP_MAPPING, groupsMap.start + uint256(_procId), 0); + // Remove Last Group + write(GROUP_ARRAY, groupsArray.start + groups_len, 0); + // Decrement Group Length + write(GROUP_ARRAY, groupsArray.start + 0, groups_len -1 ); + + // Return Changed/Deleted Index; + return current_group_map.groupIndex; + } + + function _getAccountById(address _accountId) internal returns (address accountId, bytes24 procId, uint8 accountIndex) { + // Get AccountsArray + WriteCap memory accountsArray = _getStoreCap(ACCOUNT_ARRAY); + assert(accountsArray.len >= 256); + + // Get AccountsMap + WriteCap memory accountsMap = _getStoreCap(ACCOUNT_MAPPING); + assert(accountsMap.len > (2 << 20)); // Must be a mapping + + // Get Current Account Data + AccountMapVal memory current_account_map = AccountMapVal_decode(read(accountsMap.start + uint256(_accountId))); + AccountArrVal memory current_account_arr = AccountArrVal_decode(read(accountsArray.start + 1 + uint256(current_account_map.accountIndex))); + + accountId = current_account_arr.accountId; + procId = current_account_map.procId; + accountIndex = current_account_map.accountIndex; + } + + function _getAccountByIndex(uint8 _accountIndex) internal returns (address accountId, bytes24 procId, uint8 accountIndex) { + // Get AccountsArray + WriteCap memory accountsArray = _getStoreCap(ACCOUNT_ARRAY); + assert(accountsArray.len >= 256); + + // Get AccountsMap + WriteCap memory accountsMap = _getStoreCap(ACCOUNT_MAPPING); + assert(accountsMap.len >= (2 << 20)); // Must be a mapping + + // Get Current Account Data + AccountArrVal memory current_account_arr = AccountArrVal_decode(read(accountsArray.start + 1 + uint256(_accountIndex))); + AccountMapVal memory current_account_map = AccountMapVal_decode(read(accountsMap.start + uint256(current_account_arr.accountId))); + + accountId = current_account_arr.accountId; + procId = current_account_map.procId; + accountIndex = current_account_map.accountIndex; + } + + function _addAccount(address _accountId, bytes24 _procId) internal returns (uint8 accountIndex) { + // Check Paramters + assert(_procId != 0 && _accountId != 0); + + // Check Account Does not Exist + (,bytes24 cpid,) = _getAccountById(_accountId); + assert(cpid == 0); + + // Get AccountsArray + WriteCap memory accountsArray = _getStoreCap(ACCOUNT_ARRAY); + // Get AccountsMap + WriteCap memory accountsMap = _getStoreCap(ACCOUNT_MAPPING); + + // Get GroupArray + WriteCap memory groupArray = _getStoreCap(GROUP_ARRAY); + // Get GroupMap + WriteCap memory groupsMap = _getStoreCap(GROUP_MAPPING); + + // Check that Accounts Array is not full + uint8 acc_len = uint8(read(accountsArray.start + 0)); + assert(acc_len + 2 < accountsArray.len); + + GroupMapVal memory current_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(_procId))); + GroupArrVal memory current_group_arr = GroupArrVal_decode(read(groupArray.start + 1 + uint256(current_group_map.groupIndex))); + + // Check that Group exists and is not full + assert(current_group_arr.procId != 0); + assert(current_group_arr.accountLen + 1 < 256); + + // Set Index to Current Accounts Length + uint256 account_map_data = AccountMapVal_encode(AccountMapVal(acc_len, _procId)); + uint256 account_arr_data = AccountArrVal_encode(AccountArrVal(_accountId)); + + // Create Account + write(ACCOUNT_MAPPING, accountsMap.start + uint256(_accountId), account_map_data); + write(ACCOUNT_ARRAY, accountsArray.start + 1 + acc_len, account_arr_data); + // Update Accounts Length + write(ACCOUNT_ARRAY, accountsArray.start + 0, acc_len + 1); + + // Update Group Length + write(GROUP_ARRAY, groupArray.start + 1 + uint256(current_group_map.groupIndex), GroupArrVal_encode(GroupArrVal(current_group_arr.accountLen + 1, current_group_arr.procId))); + + return acc_len; + } + + function _removeAccount(address _accountId) internal { + // Get AccountsArray + WriteCap memory accountsArray = _getStoreCap(ACCOUNT_ARRAY); + assert(accountsArray.len + 1 > 256); + + // Get AccountsMap + WriteCap memory accountsMap = _getStoreCap(ACCOUNT_MAPPING); + assert(accountsMap.len + 1 > (2 << 20)); // Must be a mapping + + // Get Current Account Data + AccountMapVal memory current_account_map = AccountMapVal_decode(read(accountsMap.start + uint256(_accountId))); + AccountArrVal memory current_account_arr = AccountArrVal_decode(read(accountsArray.start + 1 + uint256(current_account_map.accountIndex))); + + // Check that Account does exist + assert(current_account_arr.accountId != 0 && current_account_arr.accountId == _accountId); + + // Check that Accounts Array is not empty + uint256 acc_len = read(accountsArray.start + 0); + assert(acc_len > 1); + + // Get Group Length + Check Group is not full + WriteCap memory groupArray = _getStoreCap(GROUP_ARRAY); + assert(groupArray.len + 1 > 256); + + WriteCap memory groupsMap = _getStoreCap(GROUP_MAPPING); + assert(groupsMap.len > (2 << 20)); // Must be a mapping + + // Get Group Index + GroupMapVal memory current_group_map = GroupMapVal_decode(read(groupsMap.start + uint256(current_account_map.procId))); + GroupArrVal memory current_group = GroupArrVal_decode(read(groupArray.start + 1 + uint256(current_group_map.groupIndex))); + + assert(current_group.accountLen + 1 < 256); + assert(current_group.accountLen > 0); + + // Clear Mapping Value + write(ACCOUNT_MAPPING, accountsMap.start + uint256(_accountId), 0); + + // If Account Index is not Last take Last Account and Move it to the deleted Account Index + if (current_account_map.accountIndex + 1 != acc_len) { + // Get Current Last Account Data + AccountMapVal memory last_account_map = AccountMapVal_decode(read(accountsMap.start + uint256(_accountId))); + + // Update Account Map Index + last_account_map.accountIndex = current_account_map.accountIndex; + write(ACCOUNT_MAPPING, accountsMap.start + uint256(_accountId), AccountMapVal_encode(last_account_map)); + + // Replace Removed Account Array Value with Last Array Value + uint256 last_account_arr_raw = read(accountsArray.start + 1 + acc_len); + write(ACCOUNT_ARRAY, accountsArray.start + 1 + current_account_map.accountIndex, last_account_arr_raw); + } + + // Delete Last Account and Update Arr Length + write(ACCOUNT_ARRAY, accountsArray.start + 1 + acc_len, 0); + write(ACCOUNT_ARRAY, accountsArray.start + 0, acc_len - 1); + + // Update Group Length + write(GROUP_ARRAY, groupArray.start + current_group_map.groupIndex, GroupArrVal_encode(GroupArrVal(current_group.accountLen - 1, current_group.procId))); + } + + /// Add Account to associate to a group + /// Only Callable by Group Member + // function addAccount(address _account, bytes24 _groupId) public { + + // // Check for Valid Parameters + // assert(_groupId != 0); + // assert(_account != 0); + + // // Check for Valid Caller + // assert(tx.origin != _account); + // assert(getAccountGroup(tx.origin) == _groupId); + + // WriteCap memory accountsArray = _getStoreCap(ACCOUNT_ARRAY); + // assert(accountsArray.len + 1 > 256); + + // // Check that Accounts Array is not full + // uint256 acc_len = _get(accountsArray.start + 0); + // assert(acc_len + 2 < accountsMap.len); + + // WriteCap memory accountsMap = _getStoreCap(ACCOUNT_MAPPING); + // assert(accountsMap.len > (2 << 20)); // Must be a mapping + + // WriteCap memory groupArray = _getStoreCap(GROUP_ARRAY); + // assert(groupArray.len > 256); + + // WriteCap memory groupMap = _getStoreCap(GROUP_MAPPING); + // assert(groupMap.len > (2 << 20)); // Must be a mapping + + // // Get AccountIndex + // AccountMapVal memory account_d = AccountMapVal_decode(read(accountsMap.start + uint256(_account))); + + // // Get AccountId + // AccountArrVal memory account_darr = AccountArrVal_decode(read(accountsArray.start + 1 + uint256(account_d.accountIndex))); + + // // Get GroupId + // uint256 g_arr_data = read(groupArray.start + 1 + uint256(account_d.groupIndex)); + // GroupArrVal memory group_darr = GroupArrVal_decode(g_arr_data); + + // // Get GroupIndex + // uint256 g_index_data = read(groupMap.start + uint256(_groupId)); + // GroupMapVal memory group_dmap = GroupMapVal_decode(g_arr_data); + + // // If Account already exists + // if(account_darr.accountId == _account) { + // // If the Proc Id is the same, do nothing, else error. + // if (group_darr.procId == _groupId) { + // return; + // } else { + // revert("Account already set by other group"); + // } + // } else { + // // If Account is new + // uint256 new_account_arr_data = AccountArrVal_encode(AccountArrVal(_account)); + // uint256 new_account_map_data = AccountMapVal_encode(AccountMapVal(group_dmap.groupIndex, uint8(acc_len) + 1)); + + // write(ACCOUNT_MAPPING, accountsMap.start + uint256(_account), new_account_map_data); + // write(ACCOUNT_ARRAY, accountsArray.start + 1 + acc_len + 1, new_account_arr_data); + // write(ACCOUNT_ARRAY, accountsArray.start + 0, acc_len + 1); + // } + // } + +} \ No newline at end of file diff --git a/contracts/system/TestACL.sol b/contracts/system/TestACL.sol new file mode 100644 index 0000000..9746f7f --- /dev/null +++ b/contracts/system/TestACL.sol @@ -0,0 +1,36 @@ +pragma solidity ^0.4.17; + +import "./ACL.sol"; + +contract TestACL is ACL { + + function getGroupByIndex(uint8 _groupIndex) public returns (bytes24 procId, uint8 accountsLen, uint8 groupIndex) { + return _getGroupByIndex(_groupIndex); + } + + function getAccountById(address _accountId) public returns (address accountId, bytes24 procId, uint8 accountIndex) { + return _getAccountById(_accountId); + } + + function getAccountByIndex(uint8 _accountIndex) public returns (address accountId, bytes24 procId, uint8 accountIndex) { + return _getAccountByIndex(_accountIndex); + } + + function createGroup(bytes24 _procId) public returns (uint8 groupIndex) { + return _createGroup(_procId); + } + + function removeGroup(bytes24 _procId) public returns (uint8 groupIndex) { + return _removeGroup(_procId); + } + + function addAccount(address _accountId, bytes24 _procId) public returns (uint8 accountIndex) { + return _addAccount(_accountId, _procId); + } + + function removeAccount(address _accountId) public { + _removeAccount(_accountId); + } + + +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6bb0a64..c05b774 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,10 +4,34 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/runtime": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", + "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "@types/bn.js": { + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.5.tgz", + "integrity": "sha512-AEAZcIZga0JgVMHNtl1CprA/hXX7/wPt79AgR4XqaDt7jyj3QWYw6LPoOiznPtugDmlubUnAahMs2PFxGcQrng==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/node": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.0.tgz", - "integrity": "sha512-R4Dvw6KjSYn/SpvjRchBOwXr14vVVcFXCtnM3f0aLvlJS8a599rrcEoihcP2/+Z/f75E5GNPd4aWM7j1yei9og==" + "version": "10.14.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz", + "integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg==" + }, + "@zeit/schemas": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-1.1.1.tgz", + "integrity": "sha512-IV08mGz2ZeBq5WuYuxtT05PHpGHpuswW52s7SSeLBl8yPVgdr8CdPr7Dh89Vd5tmffz/EdUHH8FvJTXbVAYC2g==", + "dev": true }, "JSONStream": { "version": "1.3.4", @@ -34,12 +58,6 @@ "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", "dev": true }, - "address": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz", - "integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg==", - "dev": true - }, "aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", @@ -56,43 +74,6 @@ "json-schema-traverse": "^0.3.0" } }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.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, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "^2.0.0" - } - }, "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", @@ -135,12 +116,6 @@ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", - "dev": true - }, "are-we-there-yet": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", @@ -153,41 +128,10 @@ }, "arg": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/arg/-/arg-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/arg/-/arg-2.0.0.tgz", "integrity": "sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==", "dev": true }, - "args": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/args/-/args-4.0.0.tgz", - "integrity": "sha512-4b7lVF58nlo7sNtq8s2OueroOY/UHn0Nt/NVjsx9zn28u6yDVb9bQ/uy/5jKtHCbUDil4MlMyDLF5+OHEgnTug==", - "dev": true, - "requires": { - "camelcase": "5.0.0", - "chalk": "2.3.2", - "leven": "2.1.0", - "mri": "1.1.0" - }, - "dependencies": { - "camelcase": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", - "dev": true - }, - "chalk": { - "version": "2.3.2", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -382,23 +326,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, - "basic-auth": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz", - "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - } - } - }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -483,21 +410,6 @@ } } }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -549,7 +461,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "^1.0.3", @@ -583,7 +495,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { "bn.js": "^4.1.0", @@ -723,17 +635,6 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -810,12 +711,6 @@ } } }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -831,16 +726,6 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, - "clipboardy": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", - "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", - "dev": true, - "requires": { - "arch": "^2.1.0", - "execa": "^0.8.0" - } - }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -958,7 +843,7 @@ }, "commander": { "version": "2.8.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", "requires": { "graceful-readlink": ">= 1.0.0" @@ -980,41 +865,6 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true }, - "compressible": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz", - "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==", - "dev": true, - "requires": { - "mime-db": ">= 1.36.0 < 2" - } - }, - "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.14", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "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" - } - } - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1131,7 +981,7 @@ "dependencies": { "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -1354,7 +1204,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -1446,7 +1296,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { "cipher-base": "^1.0.1", @@ -1458,7 +1308,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { "cipher-base": "^1.0.3", @@ -1763,27 +1613,6 @@ "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", "dev": true }, - "detect-port": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.2.3.tgz", - "integrity": "sha512-IDbrX6PxqnYy8jV4wSHBaJlErYKTJvW8OQb9F7xivl1iQLqiUYHGa+nZ61Do6+N5uuOn/pReXKNqI9rUn04vug==", - "dev": true, - "requires": { - "address": "^1.0.1", - "debug": "^2.6.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, - "requires": { - "ms": "2.0.0" - } - } - } - }, "diff": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", @@ -1792,7 +1621,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "requires": { "bn.js": "^4.1.0", @@ -1827,7 +1656,7 @@ }, "duplexer": { "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, @@ -1848,7 +1677,7 @@ }, "ecstatic": { "version": "1.4.1", - "resolved": "http://registry.npmjs.org/ecstatic/-/ecstatic-1.4.1.tgz", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-1.4.1.tgz", "integrity": "sha1-Mst7b6LikNWGaGdNEV6PDD1WfWo=", "dev": true, "requires": { @@ -1860,7 +1689,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -1977,9 +1806,10 @@ } }, "ethers": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", - "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", + "version": "4.0.27", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.27.tgz", + "integrity": "sha512-+DXZLP/tyFnXWxqr2fXLT67KlGUfLuvDkHSOtSC9TUVG9OIj6yrG5JPeXRMYo15xkOYwnjgdMKrXp5V94rtjJA==", + "dev": true, "requires": { "@types/node": "^10.3.2", "aes-js": "3.0.0", @@ -1987,7 +1817,7 @@ "elliptic": "6.3.3", "hash.js": "1.1.3", "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", + "scrypt-js": "2.0.4", "setimmediate": "1.0.4", "uuid": "2.0.1", "xmlhttprequest": "1.8.0" @@ -1997,6 +1827,7 @@ "version": "6.3.3", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "dev": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -2008,6 +1839,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.0" @@ -2016,17 +1848,20 @@ "js-sha3": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", + "dev": true }, "setimmediate": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true }, "uuid": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true } } }, @@ -2274,7 +2109,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { @@ -2363,6 +2198,15 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=", + "dev": true, + "requires": { + "punycode": "^1.3.2" + } + }, "fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -2385,12 +2229,6 @@ "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -2580,7 +2418,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2601,12 +2440,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": 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" @@ -2627,12 +2468,14 @@ "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2777,6 +2620,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2784,12 +2628,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2808,6 +2654,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2901,6 +2748,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2986,7 +2834,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3042,6 +2891,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3085,12 +2935,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -3592,7 +3444,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3730,6 +3582,23 @@ } } }, + "glob-slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glob-slash/-/glob-slash-1.0.0.tgz", + "integrity": "sha1-/lLvpDMjP3Si/mTHq7m8hIICq5U=", + "dev": true + }, + "glob-slasher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glob-slasher/-/glob-slasher-1.0.1.tgz", + "integrity": "sha1-dHoOW7IiZC7hDT4FRD4QlJPLD44=", + "dev": true, + "requires": { + "glob-slash": "^1.0.0", + "lodash.isobject": "^2.4.1", + "toxic": "^1.0.0" + } + }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -3903,7 +3772,7 @@ }, "he": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/he/-/he-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz", "integrity": "sha1-LAX/rvkLaOhg8/0rVO9YCYknfuI=", "dev": true }, @@ -3925,7 +3794,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { "depd": "~1.1.2", @@ -4089,12 +3958,6 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, "ipaddr.js": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", @@ -4276,7 +4139,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, @@ -4353,12 +4216,6 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4480,13 +4337,6 @@ "graceful-fs": "^4.1.9" } }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -4571,12 +4421,6 @@ } } }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -4613,6 +4457,12 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, + "lodash._objecttypes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", + "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=", + "dev": true + }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -4631,6 +4481,15 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "dev": true, + "requires": { + "lodash._objecttypes": "~2.4.1" + } + }, "lodash.template": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", @@ -4650,12 +4509,6 @@ "lodash._reinterpolate": "~3.0.0" } }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -4765,7 +4618,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -4865,15 +4718,6 @@ } } }, - "micro-compress": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/micro-compress/-/micro-compress-1.0.0.tgz", - "integrity": "sha1-U/WoC0rQMgyhZaVZtuPfFF1PcE8=", - "dev": true, - "requires": { - "compression": "^1.6.2" - } - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -4961,7 +4805,7 @@ }, "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, "minimist-options": { @@ -4997,7 +4841,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" @@ -5103,12 +4947,6 @@ "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" }, - "mri": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.0.tgz", - "integrity": "sha1-XAo/KcjM/7ux7JQdzsCdcfoy82o=", - "dev": true - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -5164,10 +5002,10 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, - "node-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/node-version/-/node-version-1.1.3.tgz", - "integrity": "sha512-rEwE51JWn0yN3Wl5BXeGn5d52OGbSXzWiiXRjAQeuyvcGKyvuSILW2rb3G7Xh+nexzLwhTpek6Ehxd6IjvHePg==", + "nopy": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/nopy/-/nopy-0.2.7.tgz", + "integrity": "sha512-1kuUqU7o+Do7mEtvZTU7Ru+Vh4pYjLM1VjnR23zHI3DdAQudqNhCytszAwNjYFL+XEWpSiYf2P5ERYzfsZ2NCA==", "dev": true }, "normalize-package-data": { @@ -5315,12 +5153,6 @@ "ee-first": "1.1.1" } }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5344,21 +5176,6 @@ "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=", "dev": true }, - "openssl-self-signed-certificate": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/openssl-self-signed-certificate/-/openssl-self-signed-certificate-1.1.6.tgz", - "integrity": "sha1-nTpHdrGlfphHNQOSEUrS+RWoPdQ=", - "dev": true - }, - "opn": { - "version": "5.3.0", - "resolved": "http://registry.npmjs.org/opn/-/opn-5.3.0.tgz", - "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -5465,7 +5282,7 @@ "dependencies": { "got": { "version": "6.7.1", - "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { @@ -5549,12 +5366,6 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -5770,7 +5581,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -5818,7 +5629,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -5882,7 +5693,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -5915,6 +5726,12 @@ "strip-indent": "^2.0.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 + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -5951,11 +5768,11 @@ "dev": true, "requires": { "http-server": "0.9.0", - "remixd": "git+https://github.com/ethereum/remixd.git#a0823a3ee222c0b444197c138441aad2087f6448" + "remixd": "git+https://github.com/ethereum/remixd.git" } }, "remixd": { - "version": "git+https://github.com/ethereum/remixd.git#a0823a3ee222c0b444197c138441aad2087f6448", + "version": "git+https://github.com/ethereum/remixd.git#fbfe18d7068a8b4ccda23b4e716f0b949c922686", "from": "git+https://github.com/ethereum/remixd.git", "dev": true, "requires": { @@ -5964,6 +5781,7 @@ "fs-extra": "^3.0.1", "isbinaryfile": "^3.0.2", "lerna": "^2.9.0", + "nopy": "^0.2.6", "serve": "7.0.0", "stdout": "0.0.3", "watch": "^1.0.2", @@ -5971,6 +5789,18 @@ "websocket": "^1.0.24" }, "dependencies": { + "ajv": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.0.tgz", + "integrity": "sha512-VDUX1oSajablmiyFyED9L1DFndg0P9h7p1F+NO8FkIzei6EPrR6Zu1n18rd5P8PqaSRd/FrWv3G1TVBqpM83gA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^4.2.1" + } + }, "bluebird": { "version": "3.3.1", "resolved": "http://registry.npmjs.org/bluebird/-/bluebird-3.3.1.tgz", @@ -5983,6 +5813,30 @@ "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", "dev": true }, + "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" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "fs-extra": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", @@ -6003,11 +5857,60 @@ "graceful-fs": "^4.1.6" } }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", - "dev": true + "serve": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/serve/-/serve-7.0.0.tgz", + "integrity": "sha512-A3IxdJBhSt+RbSDO5X4fpoYDtsvGILP73MGZRv7TZyCOf5DVLHCUMLwXnbwEtxkzbnA73NWlGFH6HjNqltCuuQ==", + "dev": true, + "requires": { + "@zeit/schemas": "1.1.1", + "ajv": "6.5.0", + "arg": "2.0.0", + "chalk": "2.4.1", + "dot-prop": "4.2.0", + "fs-extra": "6.0.1", + "micro": "9.3.1", + "serve-handler": "2.3.10", + "update-check": "1.5.2" + }, + "dependencies": { + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, + "update-check": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", + "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", + "dev": true, + "requires": { + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" + } + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true }, "web3": { "version": "1.0.0-beta.27", @@ -6255,7 +6158,20 @@ "requires": { "underscore": "1.8.3", "web3-core-helpers": "1.0.0-beta.27", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" + }, + "dependencies": { + "websocket": { + "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "dev": true, + "requires": { + "debug": "^2.2.0", + "nan": "^2.3.3", + "typedarray-to-buffer": "^3.1.2", + "yaeti": "^0.0.6" + } + } } }, "web3-shh": { @@ -6395,16 +6311,6 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -6483,9 +6389,10 @@ } }, "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true }, "scrypt.js": { "version": "0.2.0", @@ -6569,169 +6476,31 @@ } } }, - "serve": { - "version": "6.5.8", - "resolved": "https://registry.npmjs.org/serve/-/serve-6.5.8.tgz", - "integrity": "sha512-GZYlJz7f6E7Xq6xbg1rTSvQQV9x4v/yYB/sum6egzSBLa/mdk1PViDSX2JvL0Me83sxu3JpEpQELfakDKbGcrw==", - "dev": true, - "requires": { - "args": "4.0.0", - "basic-auth": "2.0.0", - "bluebird": "3.5.1", - "boxen": "1.3.0", - "chalk": "2.4.1", - "clipboardy": "1.2.3", - "dargs": "5.1.0", - "detect-port": "1.2.3", - "filesize": "3.6.1", - "fs-extra": "6.0.1", - "handlebars": "4.0.11", - "ip": "1.1.5", - "micro": "9.3.1", - "micro-compress": "1.0.0", - "mime-types": "2.1.18", - "node-version": "1.1.3", - "openssl-self-signed-certificate": "1.1.6", - "opn": "5.3.0", - "path-is-inside": "1.0.2", - "path-type": "3.0.0", - "send": "0.16.2", - "update-check": "1.5.1" + "serve-handler": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-2.3.10.tgz", + "integrity": "sha512-ye8gHjWjTn5s3gsCbB583BtstMIfBX+2lBLYw3+T0kFbW1bOby0vnGBVBGRpw8uVsBoNERHF/XIgWYJKWrImTA==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "fast-url-parser": "1.1.3", + "glob-slasher": "1.0.1", + "mime": "2.3.1", + "minimatch": "3.0.4", + "path-to-regexp": "2.2.1" }, "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", "dev": true }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "dargs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", - "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=", + "path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", "dev": true - }, - "fs-extra": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", - "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "requires": { - "mime-db": "~1.33.0" - } - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "optional": true - } - } - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } } } }, @@ -6799,7 +6568,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { "inherits": "^2.0.1", @@ -7252,7 +7021,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -7393,7 +7162,7 @@ "dependencies": { "minimist": { "version": "0.1.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", "dev": true } @@ -7466,7 +7235,7 @@ "dependencies": { "bluebird": { "version": "2.11.0", - "resolved": "http://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" } } @@ -7517,32 +7286,6 @@ } } }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - }, - "dependencies": { - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - } - } - }, "text-extensions": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.8.0.tgz", @@ -7567,7 +7310,7 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { @@ -7650,6 +7393,15 @@ "punycode": "^1.4.1" } }, + "toxic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toxic/-/toxic-1.0.1.tgz", + "integrity": "sha512-WI3rIGdcaKULYg7KVoB0zcjikqvcYYvcuT6D89bFPz2rVR0Rl0PK6x8/X62rtdLtBKIE985NzVf/auTtGegIIg==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -7735,13 +7487,6 @@ } } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", @@ -7893,14 +7638,21 @@ "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, - "update-check": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.1.tgz", - "integrity": "sha512-M3rjq5KwSrWZrm2GVPIQIF+NXpIn5I9mIV67gGoydptQvzRjLp9ZbM6ctFJeNuaWSm5+mNP7aInELjSiLcIw6A==", + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0" + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } } }, "urix": { @@ -7996,7 +7748,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -8117,16 +7869,118 @@ "web3-eth-personal": "1.0.0-beta.36", "web3-net": "1.0.0-beta.36", "web3-utils": "1.0.0-beta.36" + }, + "dependencies": { + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", + "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + }, + "web3-eth-abi": { + "version": "1.0.0-beta.36", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.36.tgz", + "integrity": "sha512-fBfW+7hvA0rxEMV45fO7JU+0R32ayT7aRwG9Cl6NW2/QvhFeME2qVbMIWw0q5MryPZGIN8A6366hKNuWvVidDg==", + "requires": { + "ethers": "4.0.0-beta.1", + "underscore": "1.8.3", + "web3-utils": "1.0.0-beta.36" + } + } } }, "web3-eth-abi": { - "version": "1.0.0-beta.36", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.36.tgz", - "integrity": "sha512-fBfW+7hvA0rxEMV45fO7JU+0R32ayT7aRwG9Cl6NW2/QvhFeME2qVbMIWw0q5MryPZGIN8A6366hKNuWvVidDg==", + "version": "1.0.0-beta.52", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.52.tgz", + "integrity": "sha512-c03sH6y7ncp9tBPt0EZEcyFyou4kyYdr72VJMY8ip0JAfZgl4WI9XcGpD207z0lR4Ki1PSCfkh+ZigoXxggouw==", + "dev": true, "requires": { - "ethers": "4.0.0-beta.1", - "underscore": "1.8.3", - "web3-utils": "1.0.0-beta.36" + "@babel/runtime": "^7.3.1", + "ethers": "^4.0.27", + "lodash": "^4.17.11", + "web3-utils": "1.0.0-beta.52" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "web3-utils": { + "version": "1.0.0-beta.52", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.52.tgz", + "integrity": "sha512-WdHyzPcZu/sOnNrkcOZT20QEX9FhwD9OJJXENojQNvMK2a1xo3n8JWBcC2gzAGwsa0Aah6z2B3Xwa1P//8FaoA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "@types/bn.js": "^4.11.4", + "@types/node": "^10.12.18", + "bn.js": "4.11.8", + "eth-lib": "0.2.8", + "ethjs-unit": "^0.1.6", + "lodash": "^4.17.11", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "utf8": "2.1.1" + } + } } }, "web3-eth-accounts": { @@ -8176,6 +8030,75 @@ "web3-core-subscriptions": "1.0.0-beta.36", "web3-eth-abi": "1.0.0-beta.36", "web3-utils": "1.0.0-beta.36" + }, + "dependencies": { + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", + "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + }, + "web3-eth-abi": { + "version": "1.0.0-beta.36", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.36.tgz", + "integrity": "sha512-fBfW+7hvA0rxEMV45fO7JU+0R32ayT7aRwG9Cl6NW2/QvhFeME2qVbMIWw0q5MryPZGIN8A6366hKNuWvVidDg==", + "requires": { + "ethers": "4.0.0-beta.1", + "underscore": "1.8.3", + "web3-utils": "1.0.0-beta.36" + } + } } }, "web3-eth-ens": { @@ -8191,6 +8114,75 @@ "web3-eth-abi": "1.0.0-beta.36", "web3-eth-contract": "1.0.0-beta.36", "web3-utils": "1.0.0-beta.36" + }, + "dependencies": { + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", + "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + }, + "web3-eth-abi": { + "version": "1.0.0-beta.36", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.36.tgz", + "integrity": "sha512-fBfW+7hvA0rxEMV45fO7JU+0R32ayT7aRwG9Cl6NW2/QvhFeME2qVbMIWw0q5MryPZGIN8A6366hKNuWvVidDg==", + "requires": { + "ethers": "4.0.0-beta.1", + "underscore": "1.8.3", + "web3-utils": "1.0.0-beta.36" + } + } } }, "web3-eth-iban": { @@ -8257,7 +8249,27 @@ "requires": { "underscore": "1.8.3", "web3-core-helpers": "1.0.0-beta.36", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "websocket": { + "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "requires": { + "debug": "^2.2.0", + "nan": "^2.3.3", + "typedarray-to-buffer": "^3.1.2", + "yaeti": "^0.0.6" + } + } } }, "web3-shh": { @@ -8295,6 +8307,7 @@ "websocket": { "version": "1.0.26", "resolved": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "dev": true, "requires": { "debug": "^2.2.0", "nan": "^2.3.3", @@ -8306,6 +8319,7 @@ "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" } @@ -8336,22 +8350,6 @@ "string-width": "^1.0.2 || 2" } }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -8360,7 +8358,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8545,7 +8543,7 @@ "dependencies": { "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { diff --git a/package.json b/package.json index aae0879..92ddbe2 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.0.3", "remix-ide": "^0.6.4", - "truffle": "^4.1.14" + "truffle": "^4.1.14", + "web3-eth-abi": "^1.0.0-beta.52" }, "dependencies": { "sleep": "^5.2.3", diff --git a/test/system/acl.js b/test/system/acl.js new file mode 100644 index 0000000..e3ceb4b --- /dev/null +++ b/test/system/acl.js @@ -0,0 +1,300 @@ +const debug = require('debug') +const assert = require('assert') + +const Kernel = artifacts.require('./../TestKernel.sol') +const ACL = artifacts.require('./system/TestACL.sol') +const abi = require('ethereumjs-abi') + +const beakerlib = require("../../beakerlib"); +const testutils = require("../testutils.js"); + +const { AbiCoder } = require('web3-eth-abi') +const abiCoder = new AbiCoder() + +// const web3_new = new Web3_New('http://localhost:8545') + +// // // Valid Contracts +// // const Valid = { +// // Adder: artifacts.require('test/valid/Adder.sol'), +// // Multiply: artifacts.require('test/valid/Multiply.sol'), +// // Divide: artifacts.require('test/valid/Divide.sol'), +// // SysCallTestWrite: artifacts.require('test/valid/SysCallTestWrite.sol'), +// // SysCallTestCall: artifacts.require('test/valid/SysCallTestCall.sol'), +// // FirstNestedCall: artifacts.require('test/valid/NestedCalls/FirstNestedCall.sol'), +// // SecondNestedCall: artifacts.require('test/valid/NestedCalls/SecondNestedCall.sol'), +// // ThirdNestedCall: artifacts.require('test/valid/NestedCalls/ThirdNestedCall.sol'), +// // FourthNestedCall: artifacts.require('test/valid/NestedCalls/FourthNestedCall.sol'), +// // FifthNestedCall: artifacts.require('test/valid/NestedCalls/FifthNestedCall.sol'), +// // SixthNestedCall: artifacts.require('test/valid/NestedCalls/SixthNestedCall.sol'), +// // BasicEntryProcedure: artifacts.require('BasicEntryProcedure.sol'), +// // } + +// const TestWrite = artifacts.require('test/TestWrite.sol'); + +// const Invalid = { +// Simple: artifacts.require('test/invalid/Simple.sol') +// } + +const SELECTOR_ADD_ACCOUNT = "raw_addAccount(address,uint8)"; +const SELECTOR_REMOVE_ACCOUNT = "removeAccount(address,uint8)"; +const SELECTOR_GET_ACCOUNT_BY_ID = "getAccountById(address)"; +const SELECTOR_GET_ACCOUNT_BY_INDEX = "getAccountByIndex(uint8)"; + +const ACL_DEFAULT_CAPS = beakerlib.Cap.toInput([ + // Account Mapping Cap + new beakerlib.WriteCap(0x1000, 2 << 21), + // Account Array Cap + new beakerlib.WriteCap(0x2000, 256), + // Account Mapping Cap + new beakerlib.WriteCap(0x3000, 2 << 21), + // Account Array Cap + new beakerlib.WriteCap(0x4000, 256) +]); + +class TestACL { + + constructor(web3, kernel, acl) { + this.kernel = kernel; + this.acl = acl; + this.web3 = web3; + } + + async register(caps = ACL_DEFAULT_CAPS) { + const { kernel, acl } = this; + return await kernel.registerAnyProcedure("ACL", acl.address, caps); + } + + async createGroup(procId) { + const { kernel, web3 } = this; + + const functionSelector = "createGroup(bytes24)"; + const functionSelectorHash = web3.sha3(functionSelector).slice(2, 10); + const inputData = web3.fromAscii("ACL".padEnd(24, "\0")) + + functionSelectorHash + + web3.fromAscii(procId.padEnd(24, "\0")).slice(2).padEnd(32 * 2, 0) + + const valueXRawRaw = await web3.eth.call({ to: kernel.address, data: inputData }); + const value = web3.toBigNumber(valueXRawRaw); + + const tx = await kernel.sendTransaction({ data: inputData }); + return { tx, groupIndex: value }; + } + + async getGroupByIndex(groupIndex) { + const { kernel, web3 } = this; + + const functionSelector = "getGroupByIndex(uint8)"; + const functionSelectorHash = web3.sha3(functionSelector).slice(2, 10); + const inputData2 = web3.fromAscii("ACL".padEnd(24, "\0")) + + functionSelectorHash + + web3.toHex(groupIndex).slice(2).padStart(32 * 2, 0) // the amount argument for call (32 bytes) + + const valueXRawRaw = await web3.eth.call({ to: kernel.address, data: inputData2 }); + return abiCoder.decodeParameters([{ name: 'procId', type: 'bytes24' }, { name: 'accountsLen', type: 'uint8' }, { name: 'groupIndex', type: 'uint8' }], valueXRawRaw) + } + + async getAccountByIndex(accountIndex) { + const { kernel, web3 } = this; + + const functionSelector = "getAccountByIndex(uint8)"; + const functionSelectorHash = web3.sha3(functionSelector).slice(2, 10); + const inputData = web3.fromAscii("ACL".padEnd(24, "\0")) + + functionSelectorHash + + web3.toHex(accountIndex).slice(2).padStart(32 * 2, 0) // the amount argument for call (32 bytes) + + const valueXRawRaw = await web3.eth.call({ to: kernel.address, data: inputData }); + return abiCoder.decodeParameters([{ name: 'accountId', type: 'address' }, { name: 'procId', type: 'bytes24' }, { name: 'accountIndex', type: 'uint8' }], valueXRawRaw) + } + + async removeGroup(procId) { + const { kernel, web3 } = this; + + const functionSelector = "removeGroup(bytes24)"; + const functionSelectorHash = web3.sha3(functionSelector).slice(2, 10); + const inputData = web3.fromAscii("ACL".padEnd(24, "\0")) + + functionSelectorHash + + web3.fromAscii(procId.padEnd(24, "\0")).slice(2).padEnd(32 * 2, 0) + + const valueXRawRaw = await web3.eth.call({ to: kernel.address, data: inputData }); + const value = web3.toBigNumber(valueXRawRaw); + + const tx = await kernel.sendTransaction({ data: inputData }); + return { tx, groupIndex: value }; + } + + async addAccount(account, procId) { + const { kernel, web3 } = this; + + const functionSelector = "addAccount(address,bytes24)"; + const functionSelectorHash = web3.sha3(functionSelector).slice(2, 10); + const inputData = web3.fromAscii("ACL".padEnd(24, "\0")) + + functionSelectorHash + + account.slice(2).padStart(32*2,0) + + web3.fromAscii(procId.padEnd(24, "\0")).slice(2).padEnd(32 * 2, 0) + + const valueXRawRaw = await web3.eth.call({ to: kernel.address, data: inputData }); + const value = web3.toBigNumber(valueXRawRaw); + + const tx = await kernel.sendTransaction({ data: inputData }); + return { tx, accountIndex: value }; + } + +} + +contract.only('ACL', function (accounts) { + describe('#_createGroup(bytes24)', function () { + it('should push new group', async function () { + const kernel = await testutils.deployTestKernel(); + const acl = await testutils.deployedTrimmed(ACL) + const testACL = new TestACL(web3, kernel, acl) + const tx1 = await testACL.register(); + + // Create Group FOO + const foo_res = await testACL.createGroup("FOO"); + assert.equal(foo_res.groupIndex, 0) + + // Create Group BAR + const bar_res = await testACL.createGroup("BAR"); + assert.equal(bar_res.groupIndex, 1) + + // Get Groups + const foo = await testACL.getGroupByIndex(0) + assert.equal(foo.procId, web3.fromAscii("FOO".padEnd(24, "\0"))) + const bar = await testACL.getGroupByIndex(1) + assert.equal(bar.procId, web3.fromAscii("BAR".padEnd(24, "\0"))) + }) + + }) + + describe('#_removeGroup(bytes24)', function () { + it('should remove group', async function () { + const kernel = await testutils.deployTestKernel(); + const acl = await testutils.deployedTrimmed(ACL) + const testACL = new TestACL(web3, kernel, acl) + const tx1 = await testACL.register(); + + // Create Group FOO + const foo_res = await testACL.createGroup("FOO"); + assert.equal(foo_res.groupIndex, 0) + + // Create Group BAR + const bar_res = await testACL.createGroup("BAR"); + assert.equal(bar_res.groupIndex, 1) + + // Remove Group FOO + const foo_res_removed = await testACL.removeGroup("FOO"); + assert.equal(foo_res_removed.groupIndex, 0) + + // GROUP BAR Should be moved to index 0 + const bar = await testACL.getGroupByIndex(0) + assert.equal(bar.procId, web3.fromAscii("BAR".padEnd(24, "\0"))) + }) + }) + + describe('#_addAccount(address,bytes24)', function () { + it('should add account', async function () { + const kernel = await testutils.deployTestKernel(); + const acl = await testutils.deployedTrimmed(ACL) + const testACL = new TestACL(web3, kernel, acl) + const tx1 = await testACL.register(); + + // Create Group FOO + const foo_res = await testACL.createGroup("FOO"); + assert.equal(foo_res.groupIndex, 0) + + // Create Account 1 + const acc1_res = await testACL.addAccount(accounts[0], "FOO"); + assert.equal(acc1_res.accountIndex, 0) + + // Create Account 2 + const acc2_res = await testACL.addAccount(accounts[1], "FOO"); + assert.equal(acc2_res.accountIndex, 1) + + // Account 1 should be added + const acc1_res2 = await testACL.getAccountByIndex(0); + assert.equal(acc1_res2.accountId.toLowerCase(), accounts[0].toLowerCase()); + assert.equal(acc1_res2.procId, web3.fromAscii("FOO".padEnd(24, "\0"))) + assert.equal(acc1_res2.accountIndex, 0) + }) + }) + + // it('S() should fail when not given cap', async function () { + + // const kernel = await testutils.deployTestKernel(); + + // const SysCallTestWrite = await testutils.deployedTrimmed(Valid.SysCallTestWrite); + // const simpleTest = await testutils.deployedTrimmed(Valid.Multiply); + // const tx1 = await kernel.registerProcedure("SysCallTestWrite", SysCallTestWrite.address, []); + // const tx2 = await kernel.registerProcedure("Simple", simpleTest.address, []); + + // const newValue1 = await kernel.testGetter.call(); + // assert.equal(newValue1.toNumber(), 3, "The value should be 3 before the execution"); + + + // // Procedure keys must occupay the first 24 bytes, so must be + // // padded + // const functionSelector = "S()"; + // // const functionSelectorHash = web3.sha3(functionSelector); + // const functionSelectorHash = "4be1c796" + // const inputData = web3.fromAscii("SysCallTestWrite".padEnd(24,"\0")) + functionSelectorHash; + // const tx3 = await kernel.sendTransaction({data: inputData}); + + // // for (const log of tx3.receipt.logs) { + // // if (log.topics.length > 0) { + // // console.log(`Log: ${web3.toAscii(log.topics[0])} - ${log.data} - ${web3.toAscii(log.data)}`); + // // } else { + // // console.log(`Log: ${log.topics[0]} - ${web3.toAscii(log.data)} - ${log.data}`); + // // } + // // } + + // // The log value is 32 bytes log so we pad it out with nulls + // const expectedLogValue = "BasicEntryProcedureFallback".padEnd(32,'\0'); + // // Should be trimEnd, but I left it as trim in case you don't + // // have node 10 + + // const newValue4 = await kernel.testGetter.call(); + // assert.equal(newValue4.toNumber(), 3, "The value should still be 3 after the execution"); + // }) + // it('S() should fail when trying to write to an address below its cap', async function () { + + // const kernel = await testutils.deployTestKernel(); + + // const capArraySysCallTest = beakerlib.Cap.toInput([ + // new beakerlib.WriteCap(0x8500,2), + // new beakerlib.WriteCap(0x8001,0) + // ]); + // const SysCallTestWrite = await testutils.deployedTrimmed(Valid.SysCallTestWrite); + // const simpleTest = await testutils.deployedTrimmed(Valid.Multiply); + // const tx1 = await kernel.registerProcedure("SysCallTestWrite", SysCallTestWrite.address, capArraySysCallTest); + // const tx2 = await kernel.registerProcedure("Simple", simpleTest.address, []); + + // const newValue1 = await kernel.testGetter.call(); + // assert.equal(newValue1.toNumber(), 3, "The value should be 3 before the execution"); + + + // // Procedure keys must occupay the first 24 bytes, so must be + // // padded + // const functionSelector = "S()"; + // // const functionSelectorHash = web3.sha3(functionSelector); + // const functionSelectorHash = "4be1c796" + // const inputData = web3.fromAscii("SysCallTestWrite".padEnd(24,"\0")) + functionSelectorHash; + // const tx3 = await kernel.sendTransaction({data: inputData}); + + // // for (const log of tx3.receipt.logs) { + // // if (log.topics.length > 0) { + // // console.log(`Log: ${web3.toAscii(log.topics[0])} - ${log.data} - ${web3.toAscii(log.data)}`); + // // } else { + // // console.log(`Log: ${log.topics[0]} - ${web3.toAscii(log.data)} - ${log.data}`); + // // } + // // } + + // // The log value is 32 bytes log so we pad it out with nulls + // const expectedLogValue = "BasicEntryProcedureFallback".padEnd(32,'\0'); + // // Should be trimEnd, but I left it as trim in case you don't + // // have node 10 + + // const newValue4 = await kernel.testGetter.call(); + // assert.equal(newValue4.toNumber(), 3, "The value should still be 3 after the execution"); + // }) + // }) +}) \ No newline at end of file diff --git a/test/testutils.js b/test/testutils.js index 340baea..4add18b 100644 --- a/test/testutils.js +++ b/test/testutils.js @@ -3,10 +3,10 @@ const BasicEntryProcedure = artifacts.require('BasicEntryProcedure.sol'); const Kernel = artifacts.require('./TestKernel.sol') // Deploy a kernel and install the example entry procedure -async function deployTestKernel() { +async function deployTestKernel(entryProc = BasicEntryProcedure) { // First deploy the entry procedure that will be used to bootstrap the // system. - const deployedEntryProc = await deployedTrimmed(BasicEntryProcedure); + const deployedEntryProc = await deployedTrimmed(entryProc); // Deploy the kernel, specifying the previsouly deployed procedure as the // first entry procedure. This will be named "init ".