From 2e804eaeea5aca0fcaf31536ab975bf5c888d303 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:31 -0700 Subject: [PATCH 01/22] Autoformat code using Prettier --- .babelrc | 2 +- .prettierrc | 24 + .solcover.js | 10 +- .vscode/extensions.json | 3 + .vscode/settings.json | 24 + LICENSE | 39 +- contracts/Blacklistable.sol | 55 +- contracts/FiatTokenProxy.sol | 50 +- contracts/FiatTokenV1.sol | 147 +- contracts/FiatTokenV2.sol | 43 +- contracts/Migrations.sol | 44 +- contracts/Ownable.sol | 130 +- contracts/Pausable.sol | 124 +- .../test/FiatTokenV2NewFieldsNewLogicTest.sol | 60 +- contracts/test/FiatTokenV2NewFieldsTest.sol | 94 +- echidna_tests/negative.sol | 80 +- echidna_tests/positive.sol | 117 +- migrations/1_initial_migration.js | 2 +- migrations/2_deploy_usdc.js | 124 +- package.json | 3 + test/ABITests.test.js | 421 ++-- test/ABIUtils.js | 101 +- test/EventsTests.js | 174 +- test/ExtendedPositiveTests.js | 385 ++-- test/FiatTokenLegacy.test.js | 355 ++-- test/MiscTests.js | 861 +++++--- test/NegativeTests.js | 1188 +++++++---- test/Pausable.test.js | 167 +- test/PositiveTests.js | 281 ++- test/ProxyNegativeTests.js | 171 +- test/ProxyPositiveTests.js | 359 +++- test/TestWrapper.js | 25 +- test/TokenTestUtils.js | 1793 +++++++++-------- truffle.js | 33 +- validate/contractDiff.js | 171 +- validate/validate.js | 166 +- verification/verification_reporter.js | 240 ++- 37 files changed, 4916 insertions(+), 3150 deletions(-) create mode 100644 .prettierrc create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.babelrc b/.babelrc index bf944d224..0a3aa4659 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - "presets": ["es2015", "stage-2", "stage-3", "env"] + "presets": ["es2015", "stage-2", "stage-3", "env"] } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..b6aa57af2 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,24 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "printWidth": 80, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5", + "useTabs": false, + "overrides": [ + { + "files": "*.sol", + "options": { + "tabWidth": 4, + "explicitTypes": "always" + } + } + ] +} diff --git a/.solcover.js b/.solcover.js index 29aa89a09..8fdb01362 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,8 +1,6 @@ module.exports = { - port: 8555, - testrpcOptions: '-p 8555 -d --accounts 15', - skipFiles: [ - 'test/' - ], - copyPackages: ['openzeppelin-solidity', 'zos-lib'] + port: 8555, + testrpcOptions: "-p 8555 -d --accounts 15", + skipFiles: ["test/"], + copyPackages: ["openzeppelin-solidity", "zos-lib"], }; diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..8a1f9a227 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["esbenp.prettier-vscode", "juanblanco.solidity"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..19586b9c7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,24 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/node_modules/": true + }, + "solidity.packageDefaultDependenciesContractsDirectory": "", + "solidity.packageDefaultDependenciesDirectory": "node_modules", + "files.trimTrailingWhitespace": true, + "editor.insertSpaces": true, + "editor.tabSize": 2, + "[javascript]": { + "editor.formatOnSave": true + }, + "[json]": { + "editor.formatOnSave": true + }, + "[solidity]": { + "editor.tabSize": 4, + "editor.formatOnSave": true + }, + "[typescript]": { + "editor.formatOnSave": true + } +} diff --git a/LICENSE b/LICENSE index 45e865c76..01e197211 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,19 @@ -/** -* Copyright CENTRE SECZ 2019 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ +Copyright CENTRE SECZ 2018-2020 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/contracts/Blacklistable.sol b/contracts/Blacklistable.sol index e473c95be..0aa0b3d8c 100644 --- a/contracts/Blacklistable.sol +++ b/contracts/Blacklistable.sol @@ -1,34 +1,35 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; import "./Ownable.sol"; + /** * @title Blacklistable Token * @dev Allows accounts to be blacklisted by a "blacklister" role -*/ + */ contract Blacklistable is Ownable { - address public blacklister; mapping(address => bool) internal blacklisted; @@ -38,7 +39,7 @@ contract Blacklistable is Ownable { /** * @dev Throws if called by any account other than the blacklister - */ + */ modifier onlyBlacklister() { require(msg.sender == blacklister); _; @@ -47,7 +48,7 @@ contract Blacklistable is Ownable { /** * @dev Throws if argument account is blacklisted * @param _account The address to check - */ + */ modifier notBlacklisted(address _account) { require(blacklisted[_account] == false); _; @@ -55,8 +56,8 @@ contract Blacklistable is Ownable { /** * @dev Checks if account is blacklisted - * @param _account The address to check - */ + * @param _account The address to check + */ function isBlacklisted(address _account) public view returns (bool) { return blacklisted[_account]; } @@ -64,7 +65,7 @@ contract Blacklistable is Ownable { /** * @dev Adds account to blacklist * @param _account The address to blacklist - */ + */ function blacklist(address _account) public onlyBlacklister { blacklisted[_account] = true; emit Blacklisted(_account); @@ -73,7 +74,7 @@ contract Blacklistable is Ownable { /** * @dev Removes account from blacklist * @param _account The address to remove from the blacklist - */ + */ function unBlacklist(address _account) public onlyBlacklister { blacklisted[_account] = false; emit UnBlacklisted(_account); diff --git a/contracts/FiatTokenProxy.sol b/contracts/FiatTokenProxy.sol index 66243f2df..c13113649 100644 --- a/contracts/FiatTokenProxy.sol +++ b/contracts/FiatTokenProxy.sol @@ -1,33 +1,37 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; -import 'zos-lib/contracts/upgradeability/AdminUpgradeabilityProxy.sol'; +import "zos-lib/contracts/upgradeability/AdminUpgradeabilityProxy.sol"; + /** * @title FiatTokenProxy * @dev This contract proxies FiatToken calls and enables FiatToken upgrades -*/ + */ contract FiatTokenProxy is AdminUpgradeabilityProxy { - constructor(address _implementation) public AdminUpgradeabilityProxy(_implementation) { - } + constructor(address _implementation) + public + AdminUpgradeabilityProxy(_implementation) + {} } diff --git a/contracts/FiatTokenV1.sol b/contracts/FiatTokenV1.sol index ce0c95201..3b7f9c50b 100644 --- a/contracts/FiatTokenV1.sol +++ b/contracts/FiatTokenV1.sol @@ -1,33 +1,35 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; -import 'openzeppelin-solidity/contracts/token/ERC20/ERC20.sol'; -import 'openzeppelin-solidity/contracts/math/SafeMath.sol'; +import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; -import './Ownable.sol'; -import './Blacklistable.sol'; +import "./Ownable.sol"; +import "./Blacklistable.sol"; import "./Pausable.sol"; + /** * @title FiatToken * @dev ERC20 Token backed by fiat reserves @@ -83,7 +85,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Throws if called by any account other than a minter - */ + */ modifier onlyMinters() { require(minters[msg.sender] == true); _; @@ -92,10 +94,18 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. - * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _amount The amount of tokens to mint. Must be less than or equal + * to the minterAllowance of the caller. * @return A boolean that indicates if the operation was successful. - */ - function mint(address _to, uint256 _amount) whenNotPaused onlyMinters notBlacklisted(msg.sender) notBlacklisted(_to) public returns (bool) { + */ + function mint(address _to, uint256 _amount) + public + whenNotPaused + onlyMinters + notBlacklisted(msg.sender) + notBlacklisted(_to) + returns (bool) + { require(_to != address(0)); require(_amount > 0); @@ -112,7 +122,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Throws if called by any account other than the masterMinter - */ + */ modifier onlyMasterMinter() { require(msg.sender == masterMinter); _; @@ -121,15 +131,15 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Get minter allowance for an account * @param minter The address of the minter - */ + */ function minterAllowance(address minter) public view returns (uint256) { return minterAllowed[minter]; } /** * @dev Checks if account is a minter - * @param account The address to check - */ + * @param account The address to check + */ function isMinter(address account) public view returns (bool) { return minters[account]; } @@ -138,14 +148,18 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @dev Get allowed amount for an account * @param owner address The account owner * @param spender address The account spender - */ - function allowance(address owner, address spender) public view returns (uint256) { + */ + function allowance(address owner, address spender) + public + view + returns (uint256) + { return allowed[owner][spender]; } /** * @dev Get totalSupply of token - */ + */ function totalSupply() public view returns (uint256) { return totalSupply_; } @@ -153,7 +167,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Get token balance of an account * @param account address The account - */ + */ function balanceOf(address account) public view returns (uint256) { return balances[account]; } @@ -161,8 +175,14 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Adds blacklisted check to approve * @return True if the operation was successful. - */ - function approve(address _spender, uint256 _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) public returns (bool) { + */ + function approve(address _spender, uint256 _value) + public + whenNotPaused + notBlacklisted(msg.sender) + notBlacklisted(_spender) + returns (bool) + { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; @@ -174,8 +194,19 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred * @return bool success - */ - function transferFrom(address _from, address _to, uint256 _value) whenNotPaused notBlacklisted(_to) notBlacklisted(msg.sender) notBlacklisted(_from) public returns (bool) { + */ + function transferFrom( + address _from, + address _to, + uint256 _value + ) + public + whenNotPaused + notBlacklisted(_to) + notBlacklisted(msg.sender) + notBlacklisted(_from) + returns (bool) + { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); @@ -192,8 +223,14 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return bool success - */ - function transfer(address _to, uint256 _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_to) public returns (bool) { + */ + function transfer(address _to, uint256 _value) + public + whenNotPaused + notBlacklisted(msg.sender) + notBlacklisted(_to) + returns (bool) + { require(_to != address(0)); require(_value <= balances[msg.sender]); @@ -208,8 +245,13 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @param minter The address of the minter * @param minterAllowedAmount The minting amount allowed for the minter * @return True if the operation was successful. - */ - function configureMinter(address minter, uint256 minterAllowedAmount) whenNotPaused onlyMasterMinter public returns (bool) { + */ + function configureMinter(address minter, uint256 minterAllowedAmount) + public + whenNotPaused + onlyMasterMinter + returns (bool) + { minters[minter] = true; minterAllowed[minter] = minterAllowedAmount; emit MinterConfigured(minter, minterAllowedAmount); @@ -220,8 +262,12 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @dev Function to remove a minter * @param minter The address of the minter to remove * @return True if the operation was successful. - */ - function removeMinter(address minter) onlyMasterMinter public returns (bool) { + */ + function removeMinter(address minter) + public + onlyMasterMinter + returns (bool) + { minters[minter] = false; minterAllowed[minter] = 0; emit MinterRemoved(minter); @@ -233,8 +279,13 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * Validates that caller is a minter and that sender is not blacklisted * amount is less than or equal to the minter's account balance * @param _amount uint256 the amount of tokens to be burned - */ - function burn(uint256 _amount) whenNotPaused onlyMinters notBlacklisted(msg.sender) public { + */ + function burn(uint256 _amount) + public + whenNotPaused + onlyMinters + notBlacklisted(msg.sender) + { uint256 balance = balances[msg.sender]; require(_amount > 0); require(balance >= _amount); @@ -245,7 +296,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { emit Transfer(msg.sender, address(0), _amount); } - function updateMasterMinter(address _newMasterMinter) onlyOwner public { + function updateMasterMinter(address _newMasterMinter) public onlyOwner { require(_newMasterMinter != address(0)); masterMinter = _newMasterMinter; emit MasterMinterChanged(masterMinter); diff --git a/contracts/FiatTokenV2.sol b/contracts/FiatTokenV2.sol index 9a2ec009e..2c362582e 100644 --- a/contracts/FiatTokenV2.sol +++ b/contracts/FiatTokenV2.sol @@ -1,31 +1,34 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; -import './FiatTokenV1.sol'; +import "./FiatTokenV1.sol"; + /** * @title FiatTokenV2 * @dev ERC20 Token backed by fiat reserves */ contract FiatTokenV2 is FiatTokenV1 { + } diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index 523b8e5a3..b4e87cda0 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,29 +1,31 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; + contract Migrations { address public owner; - uint public last_completed_migration; + uint256 public last_completed_migration; modifier restricted() { if (msg.sender == owner) _; @@ -33,7 +35,7 @@ contract Migrations { owner = msg.sender; } - function setCompleted(uint completed) public restricted { + function setCompleted(uint256 completed) public restricted { last_completed_migration = completed; } diff --git a/contracts/Ownable.sol b/contracts/Ownable.sol index 4134d74dd..edd8b322d 100755 --- a/contracts/Ownable.sol +++ b/contracts/Ownable.sol @@ -1,83 +1,83 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; + /** * @title Ownable - * @dev The Ownable contract from https://github.com/zeppelinos/labs/blob/master/upgradeability_ownership/contracts/ownership/Ownable.sol + * @dev The Ownable contract from https://github.com/zeppelinos/labs/blob/master/upgradeability_ownership/contracts/ownership/Ownable.sol * branch: master commit: 3887ab77b8adafba4a26ace002f3a684c1a3388b modified to: * 1) Add emit prefix to OwnershipTransferred event (7/13/18) * 2) Replace constructor with constructor syntax (7/13/18) * 3) consolidate OwnableStorage into this contract */ contract Ownable { + // Owner of the contract + address private _owner; - // Owner of the contract - address private _owner; + /** + * @dev Event to show ownership has been transferred + * @param previousOwner representing the address of the previous owner + * @param newOwner representing the address of the new owner + */ + event OwnershipTransferred(address previousOwner, address newOwner); - /** - * @dev Event to show ownership has been transferred - * @param previousOwner representing the address of the previous owner - * @param newOwner representing the address of the new owner - */ - event OwnershipTransferred(address previousOwner, address newOwner); + /** + * @dev The constructor sets the original owner of the contract to the sender account. + */ + constructor() public { + setOwner(msg.sender); + } - /** - * @dev The constructor sets the original owner of the contract to the sender account. - */ - constructor() public { - setOwner(msg.sender); - } - - /** - * @dev Tells the address of the owner - * @return the address of the owner - */ - function owner() public view returns (address) { - return _owner; - } + /** + * @dev Tells the address of the owner + * @return the address of the owner + */ + function owner() public view returns (address) { + return _owner; + } - /** - * @dev Sets a new owner address - */ - function setOwner(address newOwner) internal { - _owner = newOwner; - } + /** + * @dev Sets a new owner address + */ + function setOwner(address newOwner) internal { + _owner = newOwner; + } - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - require(msg.sender == owner()); - _; - } + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(msg.sender == owner()); + _; + } - /** - * @dev Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - function transferOwnership(address newOwner) public onlyOwner { - require(newOwner != address(0)); - emit OwnershipTransferred(owner(), newOwner); - setOwner(newOwner); - } + /** + * @dev Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + function transferOwnership(address newOwner) public onlyOwner { + require(newOwner != address(0)); + emit OwnershipTransferred(owner(), newOwner); + setOwner(newOwner); + } } diff --git a/contracts/Pausable.sol b/contracts/Pausable.sol index e6d797c24..34743f611 100644 --- a/contracts/Pausable.sol +++ b/contracts/Pausable.sol @@ -1,28 +1,30 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; import "./Ownable.sol"; + /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. @@ -35,53 +37,51 @@ import "./Ownable.sol"; * 5) Remove constructor (7/13/18) */ contract Pausable is Ownable { - event Pause(); - event Unpause(); - event PauserChanged(address indexed newAddress); - - - address public pauser; - bool public paused = false; + event Pause(); + event Unpause(); + event PauserChanged(address indexed newAddress); - /** - * @dev Modifier to make a function callable only when the contract is not paused. - */ - modifier whenNotPaused() { - require(!paused); - _; - } + address public pauser; + bool public paused = false; - /** - * @dev throws if called by any account other than the pauser - */ - modifier onlyPauser() { - require(msg.sender == pauser); - _; - } + /** + * @dev Modifier to make a function callable only when the contract is not paused. + */ + modifier whenNotPaused() { + require(!paused); + _; + } - /** - * @dev called by the owner to pause, triggers stopped state - */ - function pause() onlyPauser public { - paused = true; - emit Pause(); - } + /** + * @dev throws if called by any account other than the pauser + */ + modifier onlyPauser() { + require(msg.sender == pauser); + _; + } - /** - * @dev called by the owner to unpause, returns to normal state - */ - function unpause() onlyPauser public { - paused = false; - emit Unpause(); - } + /** + * @dev called by the owner to pause, triggers stopped state + */ + function pause() public onlyPauser { + paused = true; + emit Pause(); + } - /** - * @dev update the pauser role - */ - function updatePauser(address _newPauser) onlyOwner public { - require(_newPauser != address(0)); - pauser = _newPauser; - emit PauserChanged(pauser); - } + /** + * @dev called by the owner to unpause, returns to normal state + */ + function unpause() public onlyPauser { + paused = false; + emit Unpause(); + } + /** + * @dev update the pauser role + */ + function updatePauser(address _newPauser) public onlyOwner { + require(_newPauser != address(0)); + pauser = _newPauser; + emit PauserChanged(pauser); + } } diff --git a/contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol b/contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol index fb9e61234..2ef00ab1c 100644 --- a/contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol +++ b/contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol @@ -1,34 +1,35 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; -import './../FiatTokenV1.sol'; +import "./../FiatTokenV1.sol"; + /** * @title FiatTokenV2NewFieldsNewLogicTest * @dev ERC20 Token backed by fiat reserves */ contract FiatTokenV2NewFieldsNewLogicTest is FiatTokenV1 { - bool public newBool; address public newAddress; uint256 public newUint; @@ -47,11 +48,24 @@ contract FiatTokenV2NewFieldsNewLogicTest is FiatTokenV1 { address _newAddress, uint256 _newUint ) public { - super.initialize(_name, _symbol, _currency, _decimals, _masterMinter, _pauser, _blacklister, _owner); + super.initialize( + _name, + _symbol, + _currency, + _decimals, + _masterMinter, + _pauser, + _blacklister, + _owner + ); initV2(_newBool, _newAddress, _newUint); } - function initV2(bool _newBool, address _newAddress, uint256 _newUint) public { + function initV2( + bool _newBool, + address _newAddress, + uint256 _newUint + ) public { require(!initializedV2); newBool = _newBool; newAddress = _newAddress; diff --git a/contracts/test/FiatTokenV2NewFieldsTest.sol b/contracts/test/FiatTokenV2NewFieldsTest.sol index 00fe6fa97..2c6def29a 100644 --- a/contracts/test/FiatTokenV2NewFieldsTest.sol +++ b/contracts/test/FiatTokenV2NewFieldsTest.sol @@ -1,63 +1,75 @@ /** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ pragma solidity ^0.4.24; -import './../FiatTokenV1.sol'; +import "./../FiatTokenV1.sol"; + /** * @title FiatTokenV2NewFieldsTest * @dev ERC20 Token backed by fiat reserves */ contract FiatTokenV2NewFieldsTest is FiatTokenV1 { - bool public newBool; address public newAddress; uint256 public newUint; bool internal initializedV2; function initialize( - string _name, - string _symbol, - string _currency, - uint8 _decimals, - address _masterMinter, - address _pauser, - address _blacklister, - address _owner, - bool _newBool, - address _newAddress, - uint256 _newUint + string _name, + string _symbol, + string _currency, + uint8 _decimals, + address _masterMinter, + address _pauser, + address _blacklister, + address _owner, + bool _newBool, + address _newAddress, + uint256 _newUint ) public { - super.initialize(_name, _symbol, _currency, _decimals, _masterMinter, _pauser, _blacklister, _owner); + super.initialize( + _name, + _symbol, + _currency, + _decimals, + _masterMinter, + _pauser, + _blacklister, + _owner + ); initV2(_newBool, _newAddress, _newUint); } - function initV2(bool _newBool, address _newAddress, uint256 _newUint) public { - require(!initializedV2); - newBool = _newBool; - newAddress = _newAddress; - newUint = _newUint; - initializedV2 = true; + function initV2( + bool _newBool, + address _newAddress, + uint256 _newUint + ) public { + require(!initializedV2); + newBool = _newBool; + newAddress = _newAddress; + newUint = _newUint; + initializedV2 = true; } - - } diff --git a/echidna_tests/negative.sol b/echidna_tests/negative.sol index 5ed101b42..3e8261e2e 100644 --- a/echidna_tests/negative.sol +++ b/echidna_tests/negative.sol @@ -2,45 +2,57 @@ pragma solidity ^0.4.24; import "contracts/FiatTokenV1.sol"; -contract Test is FiatTokenV1 { - //Note: These are special addresses used by echidna––please don't change. - address testerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea70; - address otherAddr = 0x67518339e369ab3d591d3569ab0a0d83b2ff5198; - address ownerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea72; - uint256 initial_totalSupply = 1000000000; +contract Test is FiatTokenV1 { + //Note: These are special addresses used by echidna––please don't change. + address testerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea70; + address otherAddr = 0x67518339e369ab3d591d3569ab0a0d83b2ff5198; + address ownerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea72; + uint256 initial_totalSupply = 1000000000; - constructor () { - /* config.yaml sets this contract's address to ownerAddr, so we + constructor() public { + /* config.yaml sets this contract's address to ownerAddr, so we need to initialize all the contract roles to this address so that calls from the contract pass funtion modifiers.*/ - initialize('Test', '', '', 6, ownerAddr, ownerAddr, ownerAddr, ownerAddr); - configureMinter(ownerAddr, initial_totalSupply); - mint(testerAddr, initial_totalSupply/2); - require(balanceOf(testerAddr) == initial_totalSupply/2); - mint(otherAddr, initial_totalSupply/2); - require(balanceOf(otherAddr) == initial_totalSupply/2); - } + initialize( + "Test", + "", + "", + 6, + ownerAddr, + ownerAddr, + ownerAddr, + ownerAddr + ); + configureMinter(ownerAddr, initial_totalSupply); + mint(testerAddr, initial_totalSupply / 2); + require(balanceOf(testerAddr) == initial_totalSupply / 2); + mint(otherAddr, initial_totalSupply / 2); + require(balanceOf(otherAddr) == initial_totalSupply / 2); + } - function echidna_failed_transaction() returns (bool) { - uint balance = balanceOf(testerAddr); - transfer(testerAddr, balance+1); - return (true); - } + function echidna_failed_transaction() public returns (bool) { + uint256 balance = balanceOf(testerAddr); + transfer(testerAddr, balance + 1); + return (true); + } - function echidna_self_approve_and_failed_transferFrom_to_zero() returns (bool) { - uint balance = balanceOf(testerAddr); - approve(testerAddr, 0); - approve(testerAddr, balance); - transferFrom(testerAddr, 0x0, balance); - return (true); - } + function echidna_self_approve_and_failed_transferFrom_to_zero() + public + returns (bool) + { + uint256 balance = balanceOf(testerAddr); + approve(testerAddr, 0); + approve(testerAddr, balance); + transferFrom(testerAddr, 0x0, balance); + return (true); + } - function echidna_multiple_approves() returns (bool) { - transfer(ownerAddr, 1); - uint balance = balanceOf(ownerAddr); - approve(testerAddr, balance); - approve(testerAddr, balance); - return (allowed[ownerAddr][testerAddr] == balance); - } + function echidna_multiple_approves() public returns (bool) { + transfer(ownerAddr, 1); + uint256 balance = balanceOf(ownerAddr); + approve(testerAddr, balance); + approve(testerAddr, balance); + return (allowed[ownerAddr][testerAddr] == balance); + } } diff --git a/echidna_tests/positive.sol b/echidna_tests/positive.sol index 549ae8377..4a38b60ac 100644 --- a/echidna_tests/positive.sol +++ b/echidna_tests/positive.sol @@ -2,67 +2,80 @@ pragma solidity ^0.4.24; import "contracts/FiatTokenV1.sol"; -contract Test is FiatTokenV1 { - //Note: These are special addresses used by echidna––don't change. - address testerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea70; - address otherAddr = 0x67518339e369ab3d591d3569ab0a0d83b2ff5198; - address ownerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea72; - uint256 initial_totalSupply = 1000000000; +contract Test is FiatTokenV1 { + //Note: These are special addresses used by echidna––don't change. + address testerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea70; + address otherAddr = 0x67518339e369ab3d591d3569ab0a0d83b2ff5198; + address ownerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea72; + uint256 initial_totalSupply = 1000000000; - constructor () { - /* config.yaml sets this contract's address to ownerAddr, so we + constructor() public { + /* config.yaml sets this contract's address to ownerAddr, so we need to initialize all the contract roles to this address so that calls from the contract pass funtion modifiers.*/ - initialize('Test', '', '', 6, ownerAddr, ownerAddr, ownerAddr, ownerAddr); - configureMinter(ownerAddr, initial_totalSupply); - mint(testerAddr, initial_totalSupply/2); - require(balanceOf(testerAddr) == initial_totalSupply/2); - mint(otherAddr, initial_totalSupply/2); - require(balanceOf(otherAddr) == initial_totalSupply/2); - } + initialize( + "Test", + "", + "", + 6, + ownerAddr, + ownerAddr, + ownerAddr, + ownerAddr + ); + configureMinter(ownerAddr, initial_totalSupply); + mint(testerAddr, initial_totalSupply / 2); + require(balanceOf(testerAddr) == initial_totalSupply / 2); + mint(otherAddr, initial_totalSupply / 2); + require(balanceOf(otherAddr) == initial_totalSupply / 2); + } + + function echidna_max_balance() public returns (bool) { + // config.yaml specifies testerAddr is always the 'sender' address in transfers. + return (balanceOf(testerAddr) <= initial_totalSupply / 2 && + balanceOf(otherAddr) >= initial_totalSupply / 2); + } - function echidna_max_balance() returns (bool) { - // config.yaml specifies testerAddr is always the 'sender' address in transfers. - return (balanceOf(testerAddr) <= initial_totalSupply/2 && balanceOf(otherAddr) >= initial_totalSupply/2); - } + function echidna_no_burn_using_zero() public returns (bool) { + return (balanceOf(0x0) == 0); + } - function echidna_no_burn_using_zero() returns (bool) { - return (balanceOf(0x0) == 0); - } + function echidna_self_transfer() public returns (bool) { + uint256 balance = balanceOf(testerAddr); + var b = transfer(testerAddr, balance); + return (balanceOf(testerAddr) == balance && b); + } - function echidna_self_transfer() returns (bool) { - uint balance = balanceOf(testerAddr); - var b = transfer(testerAddr, balance); - return (balanceOf(testerAddr) == balance && b); - } + function echidna_zero_transfer() public returns (bool) { + return (transfer(otherAddr, 0)); + } - function echidna_zero_transfer() returns (bool) { - return (transfer(otherAddr, 0)); - } + function echidna_fixed_supply() public returns (bool) { + return (totalSupply() == initial_totalSupply); + } - function echidna_fixed_supply() returns (bool) { - return (totalSupply() == initial_totalSupply); - } + function echidna_self_approve_and_self_transferFrom() + public + returns (bool) + { + uint256 balance = balanceOf(testerAddr); + approve(testerAddr, 0); + approve(testerAddr, balance); + return (transferFrom(testerAddr, testerAddr, balance)); + } - function echidna_self_approve_and_self_transferFrom() returns (bool) { - uint balance = balanceOf(testerAddr); - approve(testerAddr, 0); - approve(testerAddr, balance); - return (transferFrom(testerAddr, testerAddr, balance)); - } + function echidna_self_approve_and_transferFrom() public returns (bool) { + uint256 balance = balanceOf(testerAddr); + approve(testerAddr, 0); + approve(testerAddr, balance); + return (transferFrom(testerAddr, otherAddr, balance)); + } - function echidna_self_approve_and_transferFrom() returns (bool) { - uint balance = balanceOf(testerAddr); - approve(testerAddr, 0); - approve(testerAddr, balance); - return (transferFrom(testerAddr, otherAddr, balance)); - } - - function echidna_multiple_approves() returns (bool) { - uint balance = balanceOf(testerAddr); - approve(ownerAddr, balance); - approve(ownerAddr, balance); - return (allowed[testerAddr][ownerAddr] == balance); - } + function echidna_multiple_approves() public returns (bool) { + uint256 balance = balanceOf(testerAddr); + approve(ownerAddr, balance); + approve(ownerAddr, balance); + return (allowed[testerAddr][ownerAddr] == balance); + } } diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index 4d5f3f9b0..9fc37c7bb 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,5 +1,5 @@ var Migrations = artifacts.require("./Migrations.sol"); -module.exports = function(deployer) { +module.exports = function (deployer) { deployer.deploy(Migrations); }; diff --git a/migrations/2_deploy_usdc.js b/migrations/2_deploy_usdc.js index f02618921..c84f0fcda 100644 --- a/migrations/2_deploy_usdc.js +++ b/migrations/2_deploy_usdc.js @@ -4,67 +4,67 @@ var FiatTokenProxy = artifacts.require("./FiatTokenProxy.sol"); // Any address will do, preferably one we generated var throwawayAddress = "0x64e078a8aa15a41b85890265648e965de686bae6"; -module.exports = function(deployer, network, accounts) { +module.exports = function (deployer, network, accounts) { + if (network == "development" || network == "coverage") { + // Change these to the cold storage addresses provided by ops + // these are the deterministic addresses from ganache, so the private keys are well known + // and match the values we use in the tests + var admin = "0x2f560290fef1b3ada194b6aa9c40aa71f8e95598"; + var masterMinter = "0x3e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9"; + var pauser = "0xaca94ef8bd5ffee41947b4585a84bda5a3d3da6e"; + var blacklister = "0xd03ea8624c8c5987235048901fb614fdca89b117"; + var owner = "0xe11ba2b4d45eaed5996cd0823791e0c93114882d"; + } - if( network == "development" || network == "coverage") { - // Change these to the cold storage addresses provided by ops - // these are the deterministic addresses from ganache, so the private keys are well known - // and match the values we use in the tests - var admin = "0x2f560290fef1b3ada194b6aa9c40aa71f8e95598"; - var masterMinter = "0x3e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9"; - var pauser = "0xaca94ef8bd5ffee41947b4585a84bda5a3d3da6e"; - var blacklister = "0xd03ea8624c8c5987235048901fb614fdca89b117"; - var owner = "0xe11ba2b4d45eaed5996cd0823791e0c93114882d"; - } + console.log("deploying impl"); - console.log("deploying impl") - - var fiatTokenImpl; - var tokenProxy; - // deploy implementation contract - deployer.deploy(FiatTokenV1) - .then(function(impl) { - fiatTokenImpl = impl; - console.log("initializing impl with dummy values") - return impl.initialize( - "", - "", - "", - 0, - throwawayAddress, - throwawayAddress, - throwawayAddress, - throwawayAddress - ); - }) - .then(function(initDone){ - console.log("deploying proxy"); - return deployer.deploy(FiatTokenProxy, fiatTokenImpl.address); - }) - .then(function(proxy){ - tokenProxy = proxy; - console.log("reassigning proxy admin"); - // need to change admin first, or the call to initialize won't work - // since admin can only call methods in the proxy, and not forwarded methods - return proxy.changeAdmin(admin); - }) - .then(function(changeAdminDone){ - console.log("initializing proxy"); - // Pretend that the proxy address is a FiatTokenV1 - // this is fine because the proxy will forward all the calls to the FiatTokenV1 impl - tokenProxy = FiatTokenV1.at(tokenProxy.address); - return tokenProxy.initialize( - "USD//C", - "USDC", - "USD", - 6, - masterMinter, - pauser, - blacklister, - owner - ); - }) - .then(function(initDone) { - console.log("Deployer proxy at ", tokenProxy.address); - }); -}; \ No newline at end of file + var fiatTokenImpl; + var tokenProxy; + // deploy implementation contract + deployer + .deploy(FiatTokenV1) + .then(function (impl) { + fiatTokenImpl = impl; + console.log("initializing impl with dummy values"); + return impl.initialize( + "", + "", + "", + 0, + throwawayAddress, + throwawayAddress, + throwawayAddress, + throwawayAddress + ); + }) + .then(function (initDone) { + console.log("deploying proxy"); + return deployer.deploy(FiatTokenProxy, fiatTokenImpl.address); + }) + .then(function (proxy) { + tokenProxy = proxy; + console.log("reassigning proxy admin"); + // need to change admin first, or the call to initialize won't work + // since admin can only call methods in the proxy, and not forwarded methods + return proxy.changeAdmin(admin); + }) + .then(function (changeAdminDone) { + console.log("initializing proxy"); + // Pretend that the proxy address is a FiatTokenV1 + // this is fine because the proxy will forward all the calls to the FiatTokenV1 impl + tokenProxy = FiatTokenV1.at(tokenProxy.address); + return tokenProxy.initialize( + "USD//C", + "USDC", + "USD", + 6, + masterMinter, + pauser, + blacklister, + owner + ); + }) + .then(function (initDone) { + console.log("Deployer proxy at ", tokenProxy.address); + }); +}; diff --git a/package.json b/package.json index fbe2b4420..30b542376 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ }, "scripts": { "dev": "lite-server", + "fmt": "prettier --write **/*.sol **/*.js **/*.json *.js *.json", "truffle-test": "scripts/start-ganache.sh && truffle test", "test": "scripts/start-ganache.sh && ./node_modules/.bin/solidity-coverage" }, @@ -48,6 +49,8 @@ "googleapis": "^27.0.0", "lite-server": "^2.4.0", "mocha": "^5.2.0", + "prettier": "2.0.5", + "prettier-plugin-solidity": "^1.0.0-alpha.51", "solidity-coverage": "^0.5.0" } } diff --git a/test/ABITests.test.js b/test/ABITests.test.js index 0c5d5d2f6..5cb7e14b2 100644 --- a/test/ABITests.test.js +++ b/test/ABITests.test.js @@ -1,11 +1,11 @@ -var Tx = require('ethereumjs-tx'); -var tokenUtils = require('./TokenTestUtils'); +var Tx = require("ethereumjs-tx"); +var tokenUtils = require("./TokenTestUtils"); var FiatToken = tokenUtils.FiatToken; var name = tokenUtils.name; var symbol = tokenUtils.symbol; var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals -var BigNumber = require('bignumber.js'); +var decimals = tokenUtils.decimals; +var BigNumber = require("bignumber.js"); var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; var mint = tokenUtils.mint; @@ -38,7 +38,7 @@ var minterAccountPrivateKey = tokenUtils.minterAccountPrivateKey; var pauserAccountPrivateKey = tokenUtils.pauserAccountPrivateKey; var blacklisterAccountPrivateKey = tokenUtils.blacklisterAccountPrivateKey; -var abiUtils = require('./ABIUtils'); +var abiUtils = require("./ABIUtils"); var makeRawTransaction = abiUtils.makeRawTransaction; var sendRawTransaction = abiUtils.sendRawTransaction; var functionSignature = abiUtils.functionSignature; @@ -52,238 +52,253 @@ var msgData3 = abiUtils.msgData3; // Encodes methodName, 32 byte string of 0, and address. function mockStringAddressEncode(methodName, address) { - var version = encodeUint(32) + encodeUint(0); // encode 32 byte string of 0's - return functionSignature(methodName) + version + encodeAddress(address); + var version = encodeUint(32) + encodeUint(0); // encode 32 byte string of 0's + return functionSignature(methodName) + version + encodeAddress(address); } async function run_tests(newToken, accounts) { + beforeEach(async function checkBefore() { + rawToken = await newToken(); + var tokenConfig = await initializeTokenWithProxy(rawToken); + proxy = tokenConfig.proxy; + token = tokenConfig.token; + assert.equal(proxy.address, token.address); + }); - beforeEach(async function checkBefore() { - rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + // sanity check for pausable + it("abi004 FiatToken pause() is public", async function () { + let badData = functionSignature("pause()"); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - // sanity check for pausable - it('abi004 FiatToken pause() is public', async function () { - let badData = functionSignature('pause()'); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(pauserAccountPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); + await sendRawTransaction(raw); + var customVars = [{ variable: "paused", expectedValue: true }]; + await checkVariables([token], [customVars]); + }); - await sendRawTransaction(raw); - var customVars = [ - { 'variable': 'paused', 'expectedValue': true } - ]; - await checkVariables([token], [customVars]); + it("abi040 Blacklistable constructor is not a function", async function () { + let badData = functionSignature("Blacklistable()"); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - it('abi040 Blacklistable constructor is not a function', async function () { - let badData = functionSignature('Blacklistable()'); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(pauserAccountPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); + await expectRevert(sendRawTransaction(raw)); + }); - await expectRevert(sendRawTransaction(raw)); + it("abi042 Ownable constructor is not a function", async function () { + let badData = functionSignature("Ownable()"); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - it('abi042 Ownable constructor is not a function', async function () { - let badData = functionSignature('Ownable()'); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(pauserAccountPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); + await expectRevert(sendRawTransaction(raw)); + }); - await expectRevert(sendRawTransaction(raw)); + it("abi005 Pausable constructor is not a function", async function () { + let badData = functionSignature("Pausable()"); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - it('abi005 Pausable constructor is not a function', async function () { - let badData = functionSignature('Pausable()'); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(pauserAccountPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); + await expectRevert(sendRawTransaction(raw)); + }); - await expectRevert(sendRawTransaction(raw)); + it("abi043 FiatTokenProxy constructor is not a function", async function () { + let badData = functionSignature("FiatTokenProxy()"); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - it('abi043 FiatTokenProxy constructor is not a function', async function () { - let badData = functionSignature('FiatTokenProxy()'); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(pauserAccountPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); + await expectRevert(sendRawTransaction(raw)); + }); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi027 UpgradeabilityProxy constructor", async function () { + let badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi027 UpgradeabilityProxy constructor', async function () { - let badData = msgData('UpgradeabilityProxy(address)', arbitraryAccount); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi055 Proxy constructor is not a function", async function () { + let badData = functionSignature("Proxy()"); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi055 Proxy constructor is not a function', async function () { - let badData = functionSignature('Proxy()'); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi056 Proxy _delegate is internal", async function () { + let badData = msgData("_delegate(address)", arbitraryAccount); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi056 Proxy _delegate is internal', async function () { - let badData = msgData('_delegate(address)', arbitraryAccount); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi057 Proxy _willFallback is internal", async function () { + let badData = functionSignature("_willFallback()"); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi057 Proxy _willFallback is internal', async function () { - let badData = functionSignature('_willFallback()'); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi058 Proxy _fallback is internal", async function () { + let badData = functionSignature("_fallback()"); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi058 Proxy _fallback is internal', async function () { - let badData = functionSignature('_fallback()'); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi050 Upgradeability implementation is internal", async function () { + let badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi050 Upgradeability implementation is internal', async function () { - let badData = msgData('UpgradeabilityProxy(address)', arbitraryAccount); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi051 AdminUpgradeabillityProxy constructor is not a function", async function () { + let badData = msgData( + "AdminUpgradeabillityProxy(address)", + arbitraryAccount + ); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi051 AdminUpgradeabillityProxy constructor is not a function', async function () { - let badData = msgData('AdminUpgradeabillityProxy(address)', arbitraryAccount); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi053 AdminUpgradeabillityProxy _setAdmin is internal", async function () { + let badData = msgData( + "AdminUpgradeabillityProxy(address)", + arbitraryAccount + ); + let raw = makeRawTransaction( + badData, + arbitraryAccount, + arbitraryAccountPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi053 AdminUpgradeabillityProxy _setAdmin is internal', async function () { - let badData = msgData('AdminUpgradeabillityProxy(address)', arbitraryAccount); - let raw = makeRawTransaction( - badData, - arbitraryAccount, - arbitraryAccountPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); + it("abi041 FiatToken constructor is not a function", async function () { + let badData = functionSignature("FiatToken()"); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - it('abi041 FiatToken constructor is not a function', async function () { - let badData = functionSignature('FiatToken()'); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(pauserAccountPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); + await expectRevert(sendRawTransaction(raw)); + }); - await expectRevert(sendRawTransaction(raw)); + it("abi025 setOwner is internal", async function () { + let badData = msgData("setOwner(address)", pauserAccount); + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(tokenOwnerAccount)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 100000, + to: token.address, + value: 0, + data: badData, }); + var privateKey = Buffer.from(tokenOwnerPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); - it('abi025 setOwner is internal', async function () { - let badData = msgData('setOwner(address)', pauserAccount); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(tokenOwnerAccount)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - var privateKey = Buffer.from(tokenOwnerPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); - - await expectRevert(sendRawTransaction(raw)); - }); + await expectRevert(sendRawTransaction(raw)); + }); - it('abi028 UpgradeabilityProxy._upgradeTo is internal', async function () { - let badData = mockStringAddressEncode('_upgradeTo(string,address)', pauserAccount); - let raw = makeRawTransaction( - badData, - tokenOwnerAccount, - tokenOwnerPrivateKey, - token.address); - await expectRevert(sendRawTransaction(raw)); - }); + it("abi028 UpgradeabilityProxy._upgradeTo is internal", async function () { + let badData = mockStringAddressEncode( + "_upgradeTo(string,address)", + pauserAccount + ); + let raw = makeRawTransaction( + badData, + tokenOwnerAccount, + tokenOwnerPrivateKey, + token.address + ); + await expectRevert(sendRawTransaction(raw)); + }); } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_ABIHackingTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_ABIHackingTests", run_tests); module.exports = { - run_tests: run_tests, -} + run_tests: run_tests, +}; diff --git a/test/ABIUtils.js b/test/ABIUtils.js index 5b91ad859..db38d45c6 100644 --- a/test/ABIUtils.js +++ b/test/ABIUtils.js @@ -1,76 +1,93 @@ +var Tx = require("ethereumjs-tx"); -var Tx = require('ethereumjs-tx'); - -function makeRawTransaction(msgData, msgSender, hexPrivateKey, contractAddress) { - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(msgSender)), - gasPrice: web3.toHex(web3.toWei('20', 'gwei')), - gasLimit: 1000000, - to: contractAddress, - value: 0, - data: msgData, - }); - var privateKey = Buffer.from(hexPrivateKey, 'hex'); - tx.sign(privateKey); - var raw = '0x' + tx.serialize().toString('hex'); - return raw +function makeRawTransaction( + msgData, + msgSender, + hexPrivateKey, + contractAddress +) { + var tx = new Tx({ + nonce: web3.toHex(web3.eth.getTransactionCount(msgSender)), + gasPrice: web3.toHex(web3.toWei("20", "gwei")), + gasLimit: 1000000, + to: contractAddress, + value: 0, + data: msgData, + }); + var privateKey = Buffer.from(hexPrivateKey, "hex"); + tx.sign(privateKey); + var raw = "0x" + tx.serialize().toString("hex"); + return raw; } function sendRawTransaction(raw) { - return new Promise(function (resolve, reject) { - web3.eth.sendRawTransaction(raw, function (err, transactionHash) { - if (err !== null) return reject(err); - resolve(transactionHash); - }); + return new Promise(function (resolve, reject) { + web3.eth.sendRawTransaction(raw, function (err, transactionHash) { + if (err !== null) return reject(err); + resolve(transactionHash); }); + }); } function functionSignature(methodName) { - return web3.sha3(methodName).substr(0, 2 + 8); + return web3.sha3(methodName).substr(0, 2 + 8); } function encodeAddress(address) { - address = address.substr(2, address.length - 2); - while (address.length < 64) address = "0" + address; - return address; + address = address.substr(2, address.length - 2); + while (address.length < 64) address = "0" + address; + return address; } function encodeUint(value) { - value = value.toString(16); - while (value.length < 64) value = "0" + value; - return value; + value = value.toString(16); + while (value.length < 64) value = "0" + value; + return value; } // Create ABI calls for functions function msgData0(methodName, value) { - return functionSignature(methodName) + encodeUint(value); + return functionSignature(methodName) + encodeUint(value); } function msgData(methodName, addressValue) { - return functionSignature(methodName) + encodeAddress(addressValue); + return functionSignature(methodName) + encodeAddress(addressValue); } function msgData1(methodName, address, value) { - return functionSignature(methodName) + encodeAddress(address) + encodeUint(value); + return ( + functionSignature(methodName) + encodeAddress(address) + encodeUint(value) + ); } function msgData2(methodName, address1, address2, value) { - return functionSignature(methodName) + encodeAddress(address1) + encodeAddress(address2) + encodeUint(value); + return ( + functionSignature(methodName) + + encodeAddress(address1) + + encodeAddress(address2) + + encodeUint(value) + ); } function msgData3(methodName, address1, value1, address2, value2) { - return functionSignature(methodName) + encodeAddress(address1) + encodeUint(value1) + encodeAddress(address2) + encodeUint(value2); + return ( + functionSignature(methodName) + + encodeAddress(address1) + + encodeUint(value1) + + encodeAddress(address2) + + encodeUint(value2) + ); } module.exports = { - makeRawTransaction: makeRawTransaction, - sendRawTransaction: sendRawTransaction, - functionSignature: functionSignature, - encodeAddress: encodeAddress, - encodeUint: encodeUint, - msgData0: msgData0, - msgData: msgData, - msgData1: msgData1, - msgData2: msgData2, - msgData3: msgData3 + makeRawTransaction: makeRawTransaction, + sendRawTransaction: sendRawTransaction, + functionSignature: functionSignature, + encodeAddress: encodeAddress, + encodeUint: encodeUint, + msgData0: msgData0, + msgData: msgData, + msgData1: msgData1, + msgData2: msgData2, + msgData3: msgData3, }; diff --git a/test/EventsTests.js b/test/EventsTests.js index 3b9b3ed63..da5f05140 100644 --- a/test/EventsTests.js +++ b/test/EventsTests.js @@ -1,4 +1,4 @@ -var tokenUtils = require('./TokenTestUtils'); +var tokenUtils = require("./TokenTestUtils"); var FiatToken = tokenUtils.FiatToken; var FiatTokenProxy = tokenUtils.FiatTokenProxy; var minterAccount = tokenUtils.minterAccount; @@ -15,7 +15,6 @@ var symbol = tokenUtils.symbol; var currency = tokenUtils.currency; var decimals = tokenUtils.decimals; - var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; var encodeCall = tokenUtils.encodeCall; @@ -40,115 +39,170 @@ var checkTransferEvents = tokenUtils.checkTransferEvents; var amount = 100; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { - rawToken = await FiatToken.new(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); - }); - - it('et000 should check MinterConfigured event', async function() { - let configureMinter = await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + beforeEach("Make fresh token contract", async function () { + rawToken = await FiatToken.new(); + var tokenConfig = await initializeTokenWithProxy(rawToken); + proxy = tokenConfig.proxy; + token = tokenConfig.token; + assert.equal(proxy.address, token.address); + }); + + it("et000 should check MinterConfigured event", async function () { + let configureMinter = await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); checkMinterConfiguredEvent(configureMinter, minterAccount, amount); }); - it('et001 should check Mint/Transfer events', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - let mint = await token.mint(arbitraryAccount, amount, {from: minterAccount}); + it("et001 should check Mint/Transfer events", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + let mint = await token.mint(arbitraryAccount, amount, { + from: minterAccount, + }); checkMintEvent(mint, arbitraryAccount, amount, minterAccount); }); - it('et002 should check Burn/Transfer events', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + it("et002 should check Burn/Transfer events", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(minterAccount, amount, { from: minterAccount }); - let burn = await token.burn(amount, {from: minterAccount}); + let burn = await token.burn(amount, { from: minterAccount }); checkBurnEvents(burn, amount, minterAccount); }); - it('et003 should check MinterRemoved event', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - let minterRemovedEvent = await token.removeMinter(minterAccount, {from: masterMinterAccount}); + it("et003 should check MinterRemoved event", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + let minterRemovedEvent = await token.removeMinter(minterAccount, { + from: masterMinterAccount, + }); checkMinterRemovedEvent(minterRemovedEvent, minterAccount); }); - it('et004 should check MasterMinterChanged event', async function () { - let updateMasterMinter = await token.updateMasterMinter(arbitraryAccount, {from: tokenOwnerAccount}); + it("et004 should check MasterMinterChanged event", async function () { + let updateMasterMinter = await token.updateMasterMinter(arbitraryAccount, { + from: tokenOwnerAccount, + }); checkUpdateMasterMinterEvent(updateMasterMinter, arbitraryAccount); }); - it('et005 should check Blacklisted event', async function () { - let blacklist = await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); + it("et005 should check Blacklisted event", async function () { + let blacklist = await token.blacklist(arbitraryAccount, { + from: blacklisterAccount, + }); checkBlacklistEvent(blacklist, arbitraryAccount); }); - it('et006 should check UnBlacklisted event', async function () { - let unblacklist = await token.unBlacklist(arbitraryAccount, { from: blacklisterAccount }); - checkUnblacklistEvent(unblacklist, arbitraryAccount); + it("et006 should check UnBlacklisted event", async function () { + let unblacklist = await token.unBlacklist(arbitraryAccount, { + from: blacklisterAccount, + }); + checkUnblacklistEvent(unblacklist, arbitraryAccount); }); - it('et007 should check BlacklisterChanged event', async function () { - let blacklisterChanged = await token.updateBlacklister(arbitraryAccount, {from: tokenOwnerAccount}); + it("et007 should check BlacklisterChanged event", async function () { + let blacklisterChanged = await token.updateBlacklister(arbitraryAccount, { + from: tokenOwnerAccount, + }); checkBlacklisterChangedEvent(blacklisterChanged, arbitraryAccount); }); - it('et008 should check Upgraded event', async function () { + it("et008 should check Upgraded event", async function () { var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const initializeData = encodeCall('initV2', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - let upgrade = await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount }); + const initializeData = encodeCall( + "initV2", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + let upgrade = await proxy.upgradeToAndCall( + upgradedToken.address, + initializeData, + { from: proxyOwnerAccount } + ); checkUpgradeEvent(upgrade, upgradedToken.address); }); - it('et009 should check AdminChanged event', async function () { - let adminChanged = await proxy.changeAdmin(arbitraryAccount, {from: proxyOwnerAccount}); + it("et009 should check AdminChanged event", async function () { + let adminChanged = await proxy.changeAdmin(arbitraryAccount, { + from: proxyOwnerAccount, + }); checkAdminChangedEvent(adminChanged, proxyOwnerAccount, arbitraryAccount); }); - it('et010 should check OwnershipTransferred event', async function () { - let transferOwnership = await token.transferOwnership(arbitraryAccount, {from: tokenOwnerAccount}); - checkTransferOwnershipEvent(transferOwnership, tokenOwnerAccount, arbitraryAccount); + it("et010 should check OwnershipTransferred event", async function () { + let transferOwnership = await token.transferOwnership(arbitraryAccount, { + from: tokenOwnerAccount, + }); + checkTransferOwnershipEvent( + transferOwnership, + tokenOwnerAccount, + arbitraryAccount + ); }); - it('et011 should check Approval event', async function () { - let approval = await token.approve(arbitraryAccount2, amount, {from: arbitraryAccount}); + it("et011 should check Approval event", async function () { + let approval = await token.approve(arbitraryAccount2, amount, { + from: arbitraryAccount, + }); checkApprovalEvent(approval, arbitraryAccount, arbitraryAccount2, amount); }); - it('et012 should check Pause event', async function () { - let pause = await token.pause({from: pauserAccount}); + it("et012 should check Pause event", async function () { + let pause = await token.pause({ from: pauserAccount }); checkPauseEvent(pause); }); - it('et013 should check Unpause event', async function () { - let unpause = await token.unpause({from: pauserAccount}); + it("et013 should check Unpause event", async function () { + let unpause = await token.unpause({ from: pauserAccount }); checkUnpauseEvent(unpause); }); - it('et014 should check PauserChanged event', async function () { - let updatePauser = await token.updatePauser(arbitraryAccount, {from: tokenOwnerAccount}); + it("et014 should check PauserChanged event", async function () { + let updatePauser = await token.updatePauser(arbitraryAccount, { + from: tokenOwnerAccount, + }); checkPauserChangedEvent(updatePauser, arbitraryAccount); }); - it('et015 should check Transfer event', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.mint(arbitraryAccount, amount, {from: minterAccount}); - let transfer = await token.transfer(arbitraryAccount2, amount, {from: arbitraryAccount}); + it("et015 should check Transfer event", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.mint(arbitraryAccount, amount, { from: minterAccount }); + let transfer = await token.transfer(arbitraryAccount2, amount, { + from: arbitraryAccount, + }); checkTransferEvents(transfer, arbitraryAccount, arbitraryAccount2, amount); }); - it('et016 should check Transfer event in transferFrom', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.mint(arbitraryAccount, amount, {from: minterAccount}); - await token.approve(arbitraryAccount2, amount, {from: arbitraryAccount}); - let transferFrom = await token.transferFrom(arbitraryAccount, blacklisterAccount, amount, {from: arbitraryAccount2}); - checkTransferEvents(transferFrom, arbitraryAccount, blacklisterAccount, amount); + it("et016 should check Transfer event in transferFrom", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.mint(arbitraryAccount, amount, { from: minterAccount }); + await token.approve(arbitraryAccount2, amount, { from: arbitraryAccount }); + let transferFrom = await token.transferFrom( + arbitraryAccount, + blacklisterAccount, + amount, + { from: arbitraryAccount2 } + ); + checkTransferEvents( + transferFrom, + arbitraryAccount, + blacklisterAccount, + amount + ); }); } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_EventTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_EventTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/ExtendedPositiveTests.js b/test/ExtendedPositiveTests.js index 621b33721..a3c996b88 100644 --- a/test/ExtendedPositiveTests.js +++ b/test/ExtendedPositiveTests.js @@ -1,6 +1,6 @@ -var tokenUtils = require('./TokenTestUtils'); -var BigNumber = require('bignumber.js'); -var assertDiff = require('assert-diff'); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; @@ -28,8 +28,7 @@ var upgradeTo = tokenUtils.upgradeTo; var amount = 100; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { + beforeEach("Make fresh token contract", async function () { rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; @@ -37,183 +36,221 @@ async function run_tests(newToken, accounts) { assert.equal(proxy.address, token.address); }); - // Paused - it('ept001 should changeAdmin while paused', async function () { + it("ept001 should changeAdmin while paused", async function () { await token.pause({ from: pauserAccount }); await proxy.changeAdmin(arbitraryAccount, { from: upgraderAccount }); var result = [ - { 'variable': 'paused', 'expectedValue': true }, - { 'variable': 'upgrader', 'expectedValue': arbitraryAccount}, + { variable: "paused", expectedValue: true }, + { variable: "upgrader", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it('ept002 should updateMasterMinter while paused', async function () { + it("ept002 should updateMasterMinter while paused", async function () { await token.pause({ from: pauserAccount }); - await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount }); + await token.updateMasterMinter(arbitraryAccount, { + from: tokenOwnerAccount, + }); var result = [ - { 'variable': 'masterMinter', 'expectedValue': arbitraryAccount }, - { 'variable': 'paused', 'expectedValue': true } + { variable: "masterMinter", expectedValue: arbitraryAccount }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it('ept003 should updateBlacklister while paused', async function () { + it("ept003 should updateBlacklister while paused", async function () { await token.pause({ from: pauserAccount }); - await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount }); + await token.updateBlacklister(arbitraryAccount, { + from: tokenOwnerAccount, + }); var result = [ - { 'variable': 'blacklister', 'expectedValue': arbitraryAccount }, - { 'variable': 'paused', 'expectedValue': true } + { variable: "blacklister", expectedValue: arbitraryAccount }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it('ept004 should updatePauser while paused', async function () { + it("ept004 should updatePauser while paused", async function () { await token.pause({ from: pauserAccount }); await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); var result = [ - { 'variable': 'pauser', 'expectedValue': arbitraryAccount }, - { 'variable': 'paused', 'expectedValue': true } + { variable: "pauser", expectedValue: arbitraryAccount }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it('ept005 should transferOwnership while paused', async function () { + it("ept005 should transferOwnership while paused", async function () { await token.pause({ from: pauserAccount }); - await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount }); + await token.transferOwnership(arbitraryAccount, { + from: tokenOwnerAccount, + }); var result = [ - { 'variable': 'tokenOwner', 'expectedValue': arbitraryAccount }, - { 'variable': 'paused', 'expectedValue': true } + { variable: "tokenOwner", expectedValue: arbitraryAccount }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it('ept006 should removeMinter while paused', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + it("ept006 should removeMinter while paused", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.pause({ from: pauserAccount }); var isAMinter = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'paused', 'expectedValue': true } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [isAMinter]); await token.removeMinter(minterAccount, { from: masterMinterAccount }); var notAMinter = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': false }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) }, - { 'variable': 'paused', 'expectedValue': true } + { variable: "isAccountMinter.minterAccount", expectedValue: false }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [notAMinter]); }); - it('ept008 should upgrade while paused', async function() { + it("ept008 should upgrade while paused", async function () { var newRawToken = await UpgradedFiatToken.new(); - await token.pause({from: pauserAccount}); + await token.pause({ from: pauserAccount }); var tokenConfig = await upgradeTo(proxy, newRawToken); var newProxiedToken = tokenConfig.token; var newToken = newProxiedToken; var newToken_result = [ - { 'variable': 'paused', 'expectedValue': true }, - {'variable': 'proxiedTokenAddress', 'expectedValue': newRawToken.address } + { variable: "paused", expectedValue: true }, + { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, ]; await checkVariables([newToken], [newToken_result]); }); // Blacklisted - it('ept013 should changeAdmin when msg.sender blacklisted', async function () { + it("ept013 should changeAdmin when msg.sender blacklisted", async function () { await token.blacklist(upgraderAccount, { from: blacklisterAccount }); await proxy.changeAdmin(arbitraryAccount, { from: upgraderAccount }); var result = [ - { 'variable': 'isAccountBlacklisted.upgraderAccount', 'expectedValue': true }, - { 'variable': 'upgrader', 'expectedValue': arbitraryAccount }, + { variable: "isAccountBlacklisted.upgraderAccount", expectedValue: true }, + { variable: "upgrader", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it('ept014 should updateMasterMinter when msg.sender blacklisted', async function () { + it("ept014 should updateMasterMinter when msg.sender blacklisted", async function () { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); - await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount }); + await token.updateMasterMinter(arbitraryAccount, { + from: tokenOwnerAccount, + }); var setup = [ - { 'variable': 'masterMinter', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.tokenOwnerAccount', 'expectedValue': true } + { variable: "masterMinter", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.tokenOwnerAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept015 should updateBlacklister when msg.sender blacklisted', async function () { + it("ept015 should updateBlacklister when msg.sender blacklisted", async function () { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); - await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount }); + await token.updateBlacklister(arbitraryAccount, { + from: tokenOwnerAccount, + }); var setup = [ - { 'variable': 'blacklister', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.tokenOwnerAccount', 'expectedValue': true } + { variable: "blacklister", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.tokenOwnerAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept016 should updatePauser when msg.sender blacklisted', async function () { + it("ept016 should updatePauser when msg.sender blacklisted", async function () { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); var setup = [ - { 'variable': 'pauser', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.tokenOwnerAccount', 'expectedValue': true } + { variable: "pauser", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.tokenOwnerAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept017 should transferOwnership when msg.sender blacklisted', async function () { + it("ept017 should transferOwnership when msg.sender blacklisted", async function () { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); - await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount }); + await token.transferOwnership(arbitraryAccount, { + from: tokenOwnerAccount, + }); var setup = [ - { 'variable': 'tokenOwner', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.tokenOwnerAccount', 'expectedValue': true } + { variable: "tokenOwner", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.tokenOwnerAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it ('ept018 should pause when msg.sender blacklisted', async function() { + it("ept018 should pause when msg.sender blacklisted", async function () { await token.blacklist(pauserAccount, { from: blacklisterAccount }); await token.pause({ from: pauserAccount }); var setup = [ - { 'variable': 'paused', 'expectedValue': true }, - { 'variable': 'isAccountBlacklisted.pauserAccount', 'expectedValue': true } + { variable: "paused", expectedValue: true }, + { variable: "isAccountBlacklisted.pauserAccount", expectedValue: true }, ]; await checkVariables([token], [setup]); }); - it ('ept019 should unpause when msg.sender blacklisted', async function() { + it("ept019 should unpause when msg.sender blacklisted", async function () { await token.pause({ from: pauserAccount }); - var setup = [ - { 'variable': 'paused', 'expectedValue': true } - ]; + var setup = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [setup]); await token.blacklist(pauserAccount, { from: blacklisterAccount }); await token.unpause({ from: pauserAccount }); setup = [ - { 'variable': 'isAccountBlacklisted.pauserAccount', 'expectedValue': true } + { variable: "isAccountBlacklisted.pauserAccount", expectedValue: true }, ]; await checkVariables([token], [setup]); }); - it ('ept020 should blacklist when msg.sender blacklisted', async function() { + it("ept020 should blacklist when msg.sender blacklisted", async function () { await token.blacklist(blacklisterAccount, { from: blacklisterAccount }); await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); var setup = [ - { 'variable': 'isAccountBlacklisted.blacklisterAccount', 'expectedValue': true }, - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { + variable: "isAccountBlacklisted.blacklisterAccount", + expectedValue: true, + }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it ('ept021 should unBlacklist when msg.sender blacklisted', async function() { + it("ept021 should unBlacklist when msg.sender blacklisted", async function () { await token.blacklist(blacklisterAccount, { from: blacklisterAccount }); var setup = [ - { 'variable': 'isAccountBlacklisted.blacklisterAccount', 'expectedValue': true } + { + variable: "isAccountBlacklisted.blacklisterAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); @@ -221,20 +258,20 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [[]]); }); - it('ept022 should upgrade when msg.sender blacklisted', async function () { + it("ept022 should upgrade when msg.sender blacklisted", async function () { await token.blacklist(upgraderAccount, { from: blacklisterAccount }); var newRawToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, newRawToken); var newToken = tokenConfig.token; var newToken_result = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': newRawToken.address }, - { 'variable': 'isAccountBlacklisted.upgraderAccount', 'expectedValue': true }, + { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, + { variable: "isAccountBlacklisted.upgraderAccount", expectedValue: true }, ]; await checkVariables([newToken], [newToken_result]); }); - it ('ept023 should upgrade to blacklisted address', async function() { + it("ept023 should upgrade to blacklisted address", async function () { var newRawToken = await UpgradedFiatToken.new(); await token.blacklist(newRawToken.address, { from: blacklisterAccount }); @@ -243,182 +280,238 @@ async function run_tests(newToken, accounts) { var newToken = newProxiedToken; var newToken_result = [ - {'variable': 'proxiedTokenAddress', 'expectedValue': newRawToken.address } + { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, ]; assert(await newToken.isBlacklisted(newRawToken.address)); await checkVariables([newToken], [newToken_result]); }); - it('ept024 should blacklist a blacklisted address', async function () { + it("ept024 should blacklist a blacklisted address", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); var setup = [ - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await checkVariables([token], [setup]); }); - it('ept025 should changeAdmin to blacklisted address', async function () { + it("ept025 should changeAdmin to blacklisted address", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await proxy.changeAdmin(arbitraryAccount, { from: upgraderAccount }); var result = [ - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'upgrader', 'expectedValue': arbitraryAccount }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + { variable: "upgrader", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it('ept026 should updateMasterMinter to blacklisted address', async function () { + it("ept026 should updateMasterMinter to blacklisted address", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount }); + await token.updateMasterMinter(arbitraryAccount, { + from: tokenOwnerAccount, + }); var setup = [ - { 'variable': 'masterMinter', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { variable: "masterMinter", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept027 should updateBlacklister to blacklisted address', async function () { + it("ept027 should updateBlacklister to blacklisted address", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount }); + await token.updateBlacklister(arbitraryAccount, { + from: tokenOwnerAccount, + }); var setup = [ - { 'variable': 'blacklister', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { variable: "blacklister", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept028 should updatePauser to blacklisted address', async function () { + it("ept028 should updatePauser to blacklisted address", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); var setup = [ - { 'variable': 'pauser', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { variable: "pauser", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept029 should transferOwnership to blacklisted address', async function () { + it("ept029 should transferOwnership to blacklisted address", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount }); + await token.transferOwnership(arbitraryAccount, { + from: tokenOwnerAccount, + }); var setup = [ - { 'variable': 'tokenOwner', 'expectedValue': arbitraryAccount }, - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { variable: "tokenOwner", expectedValue: arbitraryAccount }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [setup]); }); - it('ept030 should configureMinter when masterMinter is blacklisted', async function () { + it("ept030 should configureMinter when masterMinter is blacklisted", async function () { await token.blacklist(masterMinterAccount, { from: blacklisterAccount }); - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var result = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "isAccountBlacklisted.masterMinterAccount", + expectedValue: true, + }, ]; await checkVariables([token], [result]); }); - it('ept032 should configureMinter when minter is blacklisted', async function () { + it("ept032 should configureMinter when minter is blacklisted", async function () { await token.blacklist(minterAccount, { from: blacklisterAccount }); - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var result = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it('ept033 should removeMinter when masterMinter is blacklisted', async function() { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + it("ept033 should removeMinter when masterMinter is blacklisted", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.blacklist(masterMinterAccount, { from: blacklisterAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "isAccountBlacklisted.masterMinterAccount", + expectedValue: true, + }, ]; await checkVariables([token], [customVars]); await token.removeMinter(minterAccount, { from: masterMinterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': false }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) }, - { 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true }, + { variable: "isAccountMinter.minterAccount", expectedValue: false }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { + variable: "isAccountBlacklisted.masterMinterAccount", + expectedValue: true, + }, ]; await checkVariables([token], [customVars]); }); - it('ept034 should removeMinter when minter is blacklisted', async function() { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + it("ept034 should removeMinter when minter is blacklisted", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.blacklist(minterAccount, { from: blacklisterAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; await checkVariables([token], [customVars]); await token.removeMinter(minterAccount, { from: masterMinterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': false }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) }, - { 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true }, + { variable: "isAccountMinter.minterAccount", expectedValue: false }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; await checkVariables([token], [customVars]); }); - it('ept035 should unBlacklist while contract is paused', async function() { - await token.pause({from: pauserAccount}); + it("ept035 should unBlacklist while contract is paused", async function () { + await token.pause({ from: pauserAccount }); await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); var customVars = [ - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'paused', 'expectedValue': true}, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [customVars]); await token.unBlacklist(arbitraryAccount, { from: blacklisterAccount }); - customVars = [ - { 'variable': 'paused', 'expectedValue': true}, - ]; + customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); }); - it('ept036 should blacklist while contract is paused', async function() { - await token.pause({from: pauserAccount}); - var customVars = [ - { 'variable': 'paused', 'expectedValue': true}, - ]; + it("ept036 should blacklist while contract is paused", async function () { + await token.pause({ from: pauserAccount }); + var customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'paused', 'expectedValue': true}, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [customVars]); }); - it('ept037 should pause while contract is paused', async function() { - await token.pause({from: pauserAccount}); - var customVars = [ - { 'variable': 'paused', 'expectedValue': true}, - ]; + it("ept037 should pause while contract is paused", async function () { + await token.pause({ from: pauserAccount }); + var customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); - await token.pause({from: pauserAccount}); - customVars = [ - { 'variable': 'paused', 'expectedValue': true}, - ]; + await token.pause({ from: pauserAccount }); + customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); }); +} - } - -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_ExtendedPositiveTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_ExtendedPositiveTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/FiatTokenLegacy.test.js b/test/FiatTokenLegacy.test.js index f4b3976d9..98d2e7243 100644 --- a/test/FiatTokenLegacy.test.js +++ b/test/FiatTokenLegacy.test.js @@ -1,9 +1,9 @@ -var tokenUtils = require('./TokenTestUtils'); +var tokenUtils = require("./TokenTestUtils"); var name = tokenUtils.name; var symbol = tokenUtils.symbol; var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals -var BigNumber = require('bignumber.js'); +var decimals = tokenUtils.decimals; +var BigNumber = require("bignumber.js"); var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; var mint = tokenUtils.mint; @@ -34,21 +34,20 @@ var getAdmin = tokenUtils.getAdmin; // these tests are for reference and do not track side effects on all variables async function run_tests(newToken, accounts) { - beforeEach(async function () { - rawToken = await FiatToken.new(); + rawToken = await FiatToken.new(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; token = tokenConfig.token; assert.equal(proxy.address, token.address); }); - it('should start with a totalSupply of 0', async function () { + it("should start with a totalSupply of 0", async function () { let totalSupply = await token.totalSupply(); assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(0))); }); - it('should add multiple mints to a given address in address balance', async function () { + it("should add multiple mints to a given address in address balance", async function () { await mint(token, accounts[0], 100, minterAccount); await mint(token, accounts[0], 200, minterAccount); @@ -56,31 +55,53 @@ async function run_tests(newToken, accounts) { assert.equal(balance0, 300); }); - it('should fail to mint to a null address', async function () { + it("should fail to mint to a null address", async function () { let initialTotalSupply = await token.totalSupply(); await expectRevert(mint(token, "0x0", 100, minterAccount)); totalSupply = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply))); + assert.isTrue( + new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) + ); await expectRevert(mint(token, 0x0, 100, minterAccount)); totalSupply = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply))); - - await expectRevert(mint(token, "0x0000000000000000000000000000000000000000", 100, minterAccount)); + assert.isTrue( + new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) + ); + + await expectRevert( + mint( + token, + "0x0000000000000000000000000000000000000000", + 100, + minterAccount + ) + ); totalSupply = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply))); - - await expectRevert(mint(token, 0x0000000000000000000000000000000000000000, 100, minterAccount)); + assert.isTrue( + new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) + ); + + await expectRevert( + mint( + token, + 0x0000000000000000000000000000000000000000, + 100, + minterAccount + ) + ); totalSupply = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply))); + assert.isTrue( + new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) + ); }); - it('should add multiple mints to a given address in address balance', async function () { + it("should add multiple mints to a given address in address balance", async function () { await mint(token, accounts[0], 100, minterAccount); await mint(token, accounts[0], 200, minterAccount); @@ -88,17 +109,21 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(balance0).isEqualTo(new BigNumber(300))); }); - it('should add multiple mints to total supply', async function () { + it("should add multiple mints to total supply", async function () { let initialTotalSupply = await token.totalSupply(); await mint(token, accounts[0], 100, minterAccount); await mint(token, accounts[0], 400, minterAccount); await mint(token, accounts[1], 600, minterAccount); let totalSupply = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply).minus(new BigNumber(initialTotalSupply)).isEqualTo(new BigNumber(1100))); + assert.isTrue( + new BigNumber(totalSupply) + .minus(new BigNumber(initialTotalSupply)) + .isEqualTo(new BigNumber(1100)) + ); }); - it('should fail to mint from blacklisted minter', async function () { + it("should fail to mint from blacklisted minter", async function () { await setMinter(token, accounts[2], 200); await blacklist(token, accounts[2]); @@ -108,41 +133,53 @@ async function run_tests(newToken, accounts) { assert.equal(balance0, 0); }); - it('should fail to mint to blacklisted address', async function () { + it("should fail to mint to blacklisted address", async function () { await blacklist(token, accounts[3]); - await expectRevert(mint(token, accounts[3], 100, minterAccount)) + await expectRevert(mint(token, accounts[3], 100, minterAccount)); let balance0 = await token.balanceOf(accounts[0]); assert.equal(balance0, 0); }); - it('should fail to mint from a non-minter call', async function () { + it("should fail to mint from a non-minter call", async function () { await mint(token, accounts[0], 400, minterAccount); - await expectRevert(token.mint(accounts[0], 100, { from: accounts[0] })) + await expectRevert(token.mint(accounts[0], 100, { from: accounts[0] })); let balance0 = await token.balanceOf(accounts[0]); assert.equal(balance0, 400); }); - it('should complete transferFrom', async function () { - await sampleTransferFrom(token, deployerAccount, arbitraryAccount2, minterAccount); + it("should complete transferFrom", async function () { + await sampleTransferFrom( + token, + deployerAccount, + arbitraryAccount2, + minterAccount + ); }); - it('should approve', async function () { + it("should approve", async function () { await approve(token, accounts[3], 100, accounts[2]); let allowance = await token.allowance(accounts[2], accounts[3]); assert.isTrue(new BigNumber(allowance).isEqualTo(new BigNumber(100))); }); - it('should complete sample transfer', async function () { - await sampleTransfer(token, deployerAccount, arbitraryAccount2, minterAccount); + it("should complete sample transfer", async function () { + await sampleTransfer( + token, + deployerAccount, + arbitraryAccount2, + minterAccount + ); }); - it('should complete transfer from non-owner', async function () { + it("should complete transfer from non-owner", async function () { await mint(token, accounts[2], 1900, minterAccount); - let transfer = await token.transfer(accounts[3], 1000, { from: accounts[2] }); + let transfer = await token.transfer(accounts[3], 1000, { + from: accounts[2], + }); checkTransferEvents(transfer, accounts[2], accounts[3], 1000); @@ -152,7 +189,7 @@ async function run_tests(newToken, accounts) { assert.equal(balance3, 1000); }); - it('should set allowance and balances before and after approved transfer', async function () { + it("should set allowance and balances before and after approved transfer", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); await mint(token, accounts[0], 500, minterAccount); @@ -160,7 +197,9 @@ async function run_tests(newToken, accounts) { allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); - let transfer = await token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[3] }); + let transfer = await token.transferFrom(accounts[0], accounts[3], 50, { + from: accounts[3], + }); checkTransferEvents(transfer, accounts[0], accounts[3], 50); @@ -170,7 +209,7 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(50))); }); - it('should fail on unauthorized approved transfer and not change balances', async function () { + it("should fail on unauthorized approved transfer and not change balances", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); await mint(token, accounts[0], 500, minterAccount); @@ -178,7 +217,9 @@ async function run_tests(newToken, accounts) { allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); - await expectRevert(token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[4] })); + await expectRevert( + token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[4] }) + ); let balance0 = await token.balanceOf(accounts[0]); assert.equal(balance0, 500); @@ -186,7 +227,7 @@ async function run_tests(newToken, accounts) { assert.equal(balance3, 0); }); - it('should fail on invalid approved transfer amount and not change balances', async function () { + it("should fail on invalid approved transfer amount and not change balances", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); await mint(token, accounts[0], 500, minterAccount); @@ -194,29 +235,31 @@ async function run_tests(newToken, accounts) { allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); - await expectRevert(token.transferFrom(accounts[0], accounts[3], 450, { from: accounts[3] })); + await expectRevert( + token.transferFrom(accounts[0], accounts[3], 450, { from: accounts[3] }) + ); let balance0 = await token.balanceOf(accounts[0]); assert.equal(balance0, 500); let balance3 = await token.balanceOf(accounts[3]); assert.equal(balance3, 0); - }); - it('should fail on invalid transfer recipient (zero-account) and not change balances', async function () { - + it("should fail on invalid transfer recipient (zero-account) and not change balances", async function () { await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); - await expectRevert(token.transferFrom(accounts[0], 0, 50, { from: accounts[3] })); + await expectRevert( + token.transferFrom(accounts[0], 0, 50, { from: accounts[3] }) + ); let balance0 = await token.balanceOf(accounts[0]); assert.equal(balance0, 500); }); - it('should test consistency of transfer(x) and approve(x) + transferFrom(x)', async function () { + it("should test consistency of transfer(x) and approve(x) + transferFrom(x)", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); let transferAmount = 650; @@ -237,9 +280,16 @@ async function run_tests(newToken, accounts) { await token.approve(accounts[4], transferAmount, { from: accounts[1] }); allowed = await token.allowance.call(accounts[1], accounts[4]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(transferAmount))); + assert.isTrue( + new BigNumber(allowed).isEqualTo(new BigNumber(transferAmount)) + ); - transfer = await token.transferFrom(accounts[1], accounts[4], transferAmount, { from: accounts[4] }); + transfer = await token.transferFrom( + accounts[1], + accounts[4], + transferAmount, + { from: accounts[4] } + ); checkTransferEvents(transfer, accounts[1], accounts[4], transferAmount); @@ -249,38 +299,59 @@ async function run_tests(newToken, accounts) { assert.equal(balance3, transferAmount); }); - it('should pause and should not be able to transfer', async function () { + it("should pause and should not be able to transfer", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); await token.pause({ from: pauserAccount }); assert.equal(await token.paused.call(), true); - await expectRevert(sampleTransferFrom(token, deployerAccount, arbitraryAccount2, minterAccount)); + await expectRevert( + sampleTransferFrom( + token, + deployerAccount, + arbitraryAccount2, + minterAccount + ) + ); }); - it('should pause and should not be able to transfer, then unpause and be able to transfer', async function () { + it("should pause and should not be able to transfer, then unpause and be able to transfer", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); await token.pause({ from: pauserAccount }); assert.equal(await token.paused.call(), true); - await expectRevert(sampleTransferFrom(token, deployerAccount, arbitraryAccount2, minterAccount)); + await expectRevert( + sampleTransferFrom( + token, + deployerAccount, + arbitraryAccount2, + minterAccount + ) + ); await token.unpause({ from: pauserAccount }); assert.equal(await token.paused.call(), false); - await sampleTransferFrom(token, deployerAccount, arbitraryAccount2, minterAccount); + await sampleTransferFrom( + token, + deployerAccount, + arbitraryAccount2, + minterAccount + ); }); - it('should pause and should not be able to transferFrom', async function () { + it("should pause and should not be able to transferFrom", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); await token.pause({ from: pauserAccount }); assert.equal(await token.paused.call(), true); - await expectRevert(sampleTransfer(token, deployerAccount, arbitraryAccount2, minterAccount)); + await expectRevert( + sampleTransfer(token, deployerAccount, arbitraryAccount2, minterAccount) + ); }); - it('should pause and should not be able to approve', async function () { + it("should pause and should not be able to approve", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); await token.pause({ from: pauserAccount }); @@ -289,7 +360,7 @@ async function run_tests(newToken, accounts) { await expectRevert(approve(token, accounts[2], 50, accounts[3])); }); - it('should pause and should not be able to mint', async function () { + it("should pause and should not be able to mint", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); await token.pause({ from: pauserAccount }); @@ -298,7 +369,7 @@ async function run_tests(newToken, accounts) { await expectRevert(mint(token, accounts[2], 1900, minterAccount)); }); - it('should try to pause with non-pauser and fail to pause', async function () { + it("should try to pause with non-pauser and fail to pause", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); @@ -307,7 +378,7 @@ async function run_tests(newToken, accounts) { assert.equal(await token.paused.call(), false); }); - it('should try to pause with non-pauser and fail to pause', async function () { + it("should try to pause with non-pauser and fail to pause", async function () { await mint(token, accounts[2], 1900, minterAccount); assert.equal(await token.paused.call(), false); @@ -316,17 +387,19 @@ async function run_tests(newToken, accounts) { assert.equal(await token.paused.call(), false); }); - it('should approve and fail to transfer more than balance', async function () { + it("should approve and fail to transfer more than balance", async function () { await mint(token, accounts[2], 100, minterAccount); await token.approve(accounts[1], 600, { from: accounts[2] }); - await expectRevert(token.transferFrom(accounts[2], accounts[1], 600, { from: accounts[1] })); + await expectRevert( + token.transferFrom(accounts[2], accounts[1], 600, { from: accounts[1] }) + ); let balance = await token.balanceOf(accounts[2]); assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(100))); }); - it('should blacklist and make transfer impossible', async function () { + it("should blacklist and make transfer impossible", async function () { await mint(token, accounts[2], 1900, minterAccount); await blacklist(token, accounts[2]); @@ -336,7 +409,7 @@ async function run_tests(newToken, accounts) { assert.equal(balance, 1900); }); - it('should blacklist recipient and make transfer to recipient impossible', async function () { + it("should blacklist recipient and make transfer to recipient impossible", async function () { await mint(token, accounts[2], 1900, minterAccount); await mint(token, accounts[9], 1600, minterAccount); await blacklist(token, accounts[2]); @@ -349,15 +422,17 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1600))); }); - it('should blacklist and make transferFrom impossible with the approved transferer', async function () { - let isBlacklistedBefore = await token.isBlacklisted(accounts[2]) + it("should blacklist and make transferFrom impossible with the approved transferer", async function () { + let isBlacklistedBefore = await token.isBlacklisted(accounts[2]); assert.equal(isBlacklistedBefore, false); await mint(token, accounts[2], 1900, minterAccount); await token.approve(accounts[1], 600, { from: accounts[2] }); await blacklist(token, accounts[2]); - await expectRevert(token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[1] })); + await expectRevert( + token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[1] }) + ); let balance = await token.balanceOf(accounts[2]); assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); @@ -366,29 +441,33 @@ async function run_tests(newToken, accounts) { assert.equal(isBlacklistedAfter, true); }); - it('should make transferFrom impossible with the approved and blacklisted transferer', async function () { + it("should make transferFrom impossible with the approved and blacklisted transferer", async function () { await mint(token, accounts[2], 1900, minterAccount); await token.approve(accounts[1], 600, { from: accounts[2] }); await blacklist(token, accounts[1]); - await expectRevert(token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[1] })); + await expectRevert( + token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[1] }) + ); let balance = await token.balanceOf(accounts[2]); assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); }); - it('should blacklist recipient and make transfer to recipient using transferFrom impossible', async function () { + it("should blacklist recipient and make transfer to recipient using transferFrom impossible", async function () { await mint(token, accounts[2], 1900, minterAccount); await token.approve(accounts[3], 600, { from: accounts[2] }); await blacklist(token, accounts[3]); - await expectRevert(token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[2] })); + await expectRevert( + token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[2] }) + ); let balance = await token.balanceOf(accounts[2]); assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); }); - it('should blacklist and make approve impossible', async function () { + it("should blacklist and make approve impossible", async function () { await mint(token, accounts[1], 1900, minterAccount); await blacklist(token, accounts[1]); @@ -397,7 +476,7 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(approval).isEqualTo(new BigNumber(0))); }); - it('should make giving approval to blacklisted account impossible', async function () { + it("should make giving approval to blacklisted account impossible", async function () { await mint(token, accounts[2], 1900, minterAccount); await blacklist(token, accounts[1]); @@ -407,7 +486,7 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(approval).isEqualTo(new BigNumber(0))); }); - it('should blacklist then unblacklist to make a transfer possible', async function () { + it("should blacklist then unblacklist to make a transfer possible", async function () { await mint(token, accounts[2], 1900, minterAccount); await blacklist(token, accounts[2]); await unBlacklist(token, accounts[2]); @@ -418,7 +497,7 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(600))); }); - it('should fail to blacklist with non-blacklister account', async function () { + it("should fail to blacklist with non-blacklister account", async function () { await mint(token, accounts[2], 1900, minterAccount); await expectRevert(token.blacklist(accounts[2], { from: pauserAccount })); @@ -430,7 +509,7 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(600))); }); - it('should unblacklist when paused', async function () { + it("should unblacklist when paused", async function () { await mint(token, accounts[2], 1900, minterAccount); await token.blacklist(accounts[2], { from: blacklisterAccount }); let blacklisted = await token.isBlacklisted(accounts[2]); @@ -447,11 +526,15 @@ async function run_tests(newToken, accounts) { assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); }); - it('should change the minter and mint as well as fail to mint with the old minter', async function () { - let update = await token.removeMinter(minterAccount, { from: masterMinterAccount }); - assert.equal(update.logs[0].event, 'MinterRemoved'); + it("should change the minter and mint as well as fail to mint with the old minter", async function () { + let update = await token.removeMinter(minterAccount, { + from: masterMinterAccount, + }); + assert.equal(update.logs[0].event, "MinterRemoved"); assert.equal(update.logs[0].args.oldMinter, minterAccount); - update = await setMinter(token, accounts[3], 10000, { from: masterMinterAccount }); + update = await setMinter(token, accounts[3], 10000, { + from: masterMinterAccount, + }); await token.mint(accounts[1], 100, { from: accounts[3] }); await expectRevert(token.mint(accounts[1], 200, { from: minterAccount })); @@ -462,8 +545,10 @@ async function run_tests(newToken, accounts) { assert.equal(balance, 100); }); - it('should remove a minter even if the contract is paused', async function () { - await token.configureMinter(accounts[3], 200, { from: masterMinterAccount }); + it("should remove a minter even if the contract is paused", async function () { + await token.configureMinter(accounts[3], 200, { + from: masterMinterAccount, + }); let isAccountMinter = await token.isMinter(accounts[3]); assert.equal(isAccountMinter, true); await token.pause({ from: pauserAccount }); @@ -472,50 +557,52 @@ async function run_tests(newToken, accounts) { assert.equal(isAccountMinter, false); }); - it('should pause contract even when contract is already paused', async function () { + it("should pause contract even when contract is already paused", async function () { await token.pause({ from: pauserAccount }); await token.pause({ from: pauserAccount }); let isPaused = await token.paused(); assert.equal(isPaused, true); }); - it('should unpause contract even when contract is already unpaused', async function () { + it("should unpause contract even when contract is already unpaused", async function () { await token.unpause({ from: pauserAccount }); let isPaused = await token.paused(); assert.equal(isPaused, false); }); - it('should fail to updateMinterAllowance from non-masterMinter', async function () { - let minterAllowanceBefore = await token.minterAllowance(minterAccount) + it("should fail to updateMinterAllowance from non-masterMinter", async function () { + let minterAllowanceBefore = await token.minterAllowance(minterAccount); assert.equal(minterAllowanceBefore, 0); - await expectRevert(token.configureMinter(minterAccount, 100, { from: tokenOwnerAccount })); + await expectRevert( + token.configureMinter(minterAccount, 100, { from: tokenOwnerAccount }) + ); - let minterAllowanceAfter = await token.minterAllowance(minterAccount) + let minterAllowanceAfter = await token.minterAllowance(minterAccount); assert.equal(minterAllowanceAfter, 0); }); - it('should have correct name', async function () { + it("should have correct name", async function () { let actual = await token.name.call(); assert.equal(actual, name); }); - it('should have correct symbol', async function () { + it("should have correct symbol", async function () { let actual = await token.symbol.call(); assert.equal(actual, symbol); }); - it('should have correct decimals', async function () { + it("should have correct decimals", async function () { let actual = await token.decimals.call(); assert.equal(actual, decimals); }); - it('should have correct currency', async function () { + it("should have correct currency", async function () { let actual = await token.currency.call(); assert.equal(actual, currency); }); - it('should mint and burn tokens', async function () { + it("should mint and burn tokens", async function () { let burnerAddress = accounts[3]; let amount = 500; await setMinter(token, burnerAddress, amount); @@ -528,27 +615,43 @@ async function run_tests(newToken, accounts) { await mint(token, burnerAddress, amount, minterAccount); let totalSupply1 = await token.totalSupply(); let minterBalance1 = await token.balanceOf(burnerAddress); - assert.isTrue(new BigNumber(totalSupply1).isEqualTo(new BigNumber(totalSupply).plus(new BigNumber(amount)))); - assert.isTrue(new BigNumber(minterBalance1).isEqualTo(new BigNumber(minterBalance).plus(new BigNumber(amount)))); + assert.isTrue( + new BigNumber(totalSupply1).isEqualTo( + new BigNumber(totalSupply).plus(new BigNumber(amount)) + ) + ); + assert.isTrue( + new BigNumber(minterBalance1).isEqualTo( + new BigNumber(minterBalance).plus(new BigNumber(amount)) + ) + ); // burn tokens await burn(token, amount, burnerAddress); let totalSupply2 = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply2).isEqualTo(new BigNumber(totalSupply1).minus(new BigNumber(amount)))); + assert.isTrue( + new BigNumber(totalSupply2).isEqualTo( + new BigNumber(totalSupply1).minus(new BigNumber(amount)) + ) + ); // check that minter's balance has been reduced let minterBalance2 = await token.balanceOf(burnerAddress); - assert.isTrue(new BigNumber(minterBalance2).isEqualTo(new BigNumber(minterBalance1).minus(new BigNumber(amount)))); + assert.isTrue( + new BigNumber(minterBalance2).isEqualTo( + new BigNumber(minterBalance1).minus(new BigNumber(amount)) + ) + ); }); - it('should try to burn tokens from a non-minter and fail', async function () { + it("should try to burn tokens from a non-minter and fail", async function () { let burnerAddress = accounts[3]; let amount = 1000; await expectRevert(token.burn(amount, { from: burnerAddress })); }); - it('should fail to burn from a blacklisted address', async function () { + it("should fail to burn from a blacklisted address", async function () { let burnerAddress = accounts[3]; await setMinter(token, burnerAddress, 200); await mint(token, burnerAddress, 200, minterAccount); @@ -559,7 +662,7 @@ async function run_tests(newToken, accounts) { assert.equal(balance0, 200); }); - it('should try to burn more tokens than balance and fail', async function () { + it("should try to burn more tokens than balance and fail", async function () { let burnerAddress = accounts[3]; let amount = 500; await setMinter(token, burnerAddress, 250); @@ -568,10 +671,10 @@ async function run_tests(newToken, accounts) { await expectRevert(token.burn(amount, { from: burnerAddress })); }); - it('should upgrade and preserve data', async function () { + it("should upgrade and preserve data", async function () { await mint(token, accounts[2], 200, minterAccount); let initialBalance = await token.balanceOf(accounts[2]); - assert.isTrue((new BigNumber(initialBalance)).isEqualTo(new BigNumber(200))); + assert.isTrue(new BigNumber(initialBalance).isEqualTo(new BigNumber(200))); var newRawToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, newRawToken); @@ -579,14 +682,16 @@ async function run_tests(newToken, accounts) { var newToken = newProxiedToken; let upgradedBalance = await newToken.balanceOf(accounts[2]); - assert.isTrue((new BigNumber(upgradedBalance)).isEqualTo(new BigNumber(200))); - await newToken.configureMinter(minterAccount, 500, { from: masterMinterAccount }); + assert.isTrue(new BigNumber(upgradedBalance).isEqualTo(new BigNumber(200))); + await newToken.configureMinter(minterAccount, 500, { + from: masterMinterAccount, + }); await newToken.mint(accounts[2], 200, { from: minterAccount }); let balance = await newToken.balanceOf(accounts[2]); - assert.isTrue((new BigNumber(balance)).isEqualTo(new BigNumber(400))); + assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(400))); }); - it('should updateRoleAddress for masterMinter', async function () { + it("should updateRoleAddress for masterMinter", async function () { let address1 = accounts[7]; let address2 = accounts[6]; await token.updateMasterMinter(address1, { from: tokenOwnerAccount }); @@ -598,7 +703,7 @@ async function run_tests(newToken, accounts) { assert.equal(masterMinter2, address2); }); - it('should updateRoleAddress for blacklister', async function () { + it("should updateRoleAddress for blacklister", async function () { let address1 = accounts[7]; let address2 = accounts[6]; await token.updateBlacklister(address1, { from: tokenOwnerAccount }); @@ -610,7 +715,7 @@ async function run_tests(newToken, accounts) { assert.equal(blacklister2, address2); }); - it('should updateRoleAddress for pauser', async function () { + it("should updateRoleAddress for pauser", async function () { let address1 = accounts[7]; let address2 = accounts[6]; await token.updatePauser(address1, { from: tokenOwnerAccount }); @@ -622,42 +727,50 @@ async function run_tests(newToken, accounts) { assert.equal(pauser2, address2); }); - it('should updateUpgraderAddress for upgrader', async function () { + it("should updateUpgraderAddress for upgrader", async function () { let upgrader = getAdmin(proxy); assert.equal(proxyOwnerAccount, upgrader); let address1 = accounts[10]; - let updated = await proxy.changeAdmin(address1, { from: proxyOwnerAccount }); + let updated = await proxy.changeAdmin(address1, { + from: proxyOwnerAccount, + }); upgrader = getAdmin(proxy); assert.equal(upgrader, address1); //Test upgrade with new upgrader account - await token.configureMinter(minterAccount, 1000, {from: masterMinterAccount}); - await token.mint(accounts[2], 200, {from: minterAccount}); + await token.configureMinter(minterAccount, 1000, { + from: masterMinterAccount, + }); + await token.mint(accounts[2], 200, { from: minterAccount }); let initialBalance = await token.balanceOf(accounts[2]); - assert.isTrue((new BigNumber(initialBalance)).isEqualTo(new BigNumber(200))); - + assert.isTrue(new BigNumber(initialBalance).isEqualTo(new BigNumber(200))); + var newRawToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, newRawToken, address1); var newProxiedToken = tokenConfig.token; var newToken = newProxiedToken; let upgradedBalance = await newToken.balanceOf(accounts[2]); - assert.isTrue((new BigNumber(upgradedBalance)).isEqualTo(new BigNumber(200))); - await newToken.configureMinter(minterAccount, 500, { from: masterMinterAccount }); + assert.isTrue(new BigNumber(upgradedBalance).isEqualTo(new BigNumber(200))); + await newToken.configureMinter(minterAccount, 500, { + from: masterMinterAccount, + }); await newToken.mint(accounts[2], 200, { from: minterAccount }); let balance = await newToken.balanceOf(accounts[2]); - assert.isTrue((new BigNumber(balance)).isEqualTo(new BigNumber(400))); + assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(400))); }); - it('should fail to updateUpgraderAddress for upgrader using non-upgrader account', async function () { + it("should fail to updateUpgraderAddress for upgrader using non-upgrader account", async function () { let address1 = accounts[7]; - await expectRevert(proxy.changeAdmin(address1, { from: tokenOwnerAccount })); + await expectRevert( + proxy.changeAdmin(address1, { from: tokenOwnerAccount }) + ); let upgrader = getAdmin(proxy); assert.notEqual(upgrader, address1); }); - it('should updateRoleAddress for roleAddressChanger', async function () { + it("should updateRoleAddress for roleAddressChanger", async function () { let address1 = accounts[7]; let address2 = accounts[6]; await token.transferOwnership(address1, { from: tokenOwnerAccount }); @@ -669,17 +782,19 @@ async function run_tests(newToken, accounts) { assert.equal(roleAddressChanger2, address2); }); - it('should fail to updateRoleAddress from a non-roleAddressChanger', async function () { + it("should fail to updateRoleAddress from a non-roleAddressChanger", async function () { let nonRoleAddressChanger = accounts[2]; let address1 = accounts[7]; - await expectRevert(token.updateMasterMinter(address1, { from: nonRoleAddressChanger })); + await expectRevert( + token.updateMasterMinter(address1, { from: nonRoleAddressChanger }) + ); }); } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_LegacyTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_LegacyTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/MiscTests.js b/test/MiscTests.js index e2e8efa50..44d8faa2b 100644 --- a/test/MiscTests.js +++ b/test/MiscTests.js @@ -1,8 +1,8 @@ -var FiatTokenProxy = artifacts.require('FiatTokenProxy'); +var FiatTokenProxy = artifacts.require("FiatTokenProxy"); -var tokenUtils = require('./TokenTestUtils');; -var BigNumber = require('bignumber.js'); -var assertDiff = require('assert-diff'); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; @@ -26,12 +26,12 @@ var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; var getInitializedV1 = tokenUtils.getInitializedV1; var FiatToken = tokenUtils.FiatToken; -var maxAmount = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; +var maxAmount = + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; var amount = 100; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { + beforeEach("Make fresh token contract", async function () { rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; @@ -39,13 +39,16 @@ async function run_tests(newToken, accounts) { assert.equal(proxy.address, token.address); }); - // No Payable Function - it('ms001 no payable function', async function () { + it("ms001 no payable function", async function () { var success = false; try { - await web3.eth.sendTransaction({ from: arbitraryAccount, to: token.address, value: 1 }); + await web3.eth.sendTransaction({ + from: arbitraryAccount, + to: token.address, + value: 1, + }); } catch (e) { success = true; } @@ -54,512 +57,840 @@ async function run_tests(newToken, accounts) { // Same Address - it('ms002 should transfer to self has correct final balance', async function() { + it("ms002 should transfer to self has correct final balance", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); - await token.transfer(arbitraryAccount, mintAmount, { from: arbitraryAccount }); + await token.transfer(arbitraryAccount, mintAmount, { + from: arbitraryAccount, + }); var customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); - it('ms003 should transferFrom to self from approved account and have correct final balance', async function() { + it("ms003 should transferFrom to self from approved account and have correct final balance", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.approve(pauserAccount, mintAmount, { from: arbitraryAccount }); - await token.transferFrom(arbitraryAccount, arbitraryAccount, mintAmount, { from: pauserAccount }); + await token.transferFrom(arbitraryAccount, arbitraryAccount, mintAmount, { + from: pauserAccount, + }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); - it('ms004 should transferFrom to self from approved self and have correct final balance', async function() { + it("ms004 should transferFrom to self from approved self and have correct final balance", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); - await token.approve(arbitraryAccount, mintAmount, { from: arbitraryAccount }); - await token.transferFrom(arbitraryAccount, arbitraryAccount, mintAmount, { from: arbitraryAccount }); + await token.approve(arbitraryAccount, mintAmount, { + from: arbitraryAccount, + }); + await token.transferFrom(arbitraryAccount, arbitraryAccount, mintAmount, { + from: arbitraryAccount, + }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); - it('ms005 should mint to self with correct final balance', async function () { + it("ms005 should mint to self with correct final balance", async function () { var mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(minterAccount, mintAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); - it('ms006 should approve correct allowance for self', async function () { + it("ms006 should approve correct allowance for self", async function () { var mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.approve(arbitraryAccount, amount, { from: arbitraryAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'allowance.arbitraryAccount.arbitraryAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { + variable: "allowance.arbitraryAccount.arbitraryAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); }); - it('ms007 should configureMinter for masterMinter', async function () { - await token.configureMinter(masterMinterAccount, amount, { from: masterMinterAccount }); + it("ms007 should configureMinter for masterMinter", async function () { + await token.configureMinter(masterMinterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.masterMinterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.masterMinterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.masterMinterAccount", expectedValue: true }, + { + variable: "minterAllowance.masterMinterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); }); // Multiple Minters - it('ms009 should configure two minters', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + it("ms009 should configure two minters", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); }); - it('ms010 should configure two minters and each mint distinct amounts', async function () { + it("ms010 should configure two minters and each mint distinct amounts", async function () { var mintAmount1 = 10; var mintAmount2 = 20; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); await token.mint(pauserAccount, mintAmount1, { from: minterAccount }); await token.mint(pauserAccount, mintAmount2, { from: arbitraryAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount1) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount - mintAmount2) }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount1 + mintAmount2) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount1 + mintAmount2) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount1), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount - mintAmount2), + }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount1 + mintAmount2), + }, + { + variable: "totalSupply", + expectedValue: new BigNumber(mintAmount1 + mintAmount2), + }, ]; await checkVariables([token], [customVars]); }); - it('ms011 should configure two minters, each minting distinct amounts and then remove one minter', async function () { + it("ms011 should configure two minters, each minting distinct amounts and then remove one minter", async function () { var mintAmount1 = 10; var mintAmount2 = 20; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); await token.mint(pauserAccount, mintAmount1, { from: minterAccount }); await token.mint(pauserAccount, mintAmount2, { from: arbitraryAccount }); await token.removeMinter(arbitraryAccount, { from: masterMinterAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount1) }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount1 + mintAmount2) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount1 + mintAmount2) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount1), + }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount1 + mintAmount2), + }, + { + variable: "totalSupply", + expectedValue: new BigNumber(mintAmount1 + mintAmount2), + }, ]; await checkVariables([token], [customVars]); }); - it('ms012 should configure two minters and adjust both allowances', async function () { + it("ms012 should configure two minters and adjust both allowances", async function () { var adjustment = 10; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount) }, - ]; - await checkVariables([token], [customVars]); - - await token.configureMinter(minterAccount, amount - adjustment, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount + adjustment, { from: masterMinterAccount }); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount), + }, + ]; + await checkVariables([token], [customVars]); + + await token.configureMinter(minterAccount, amount - adjustment, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount + adjustment, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - adjustment) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount + adjustment) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - adjustment), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount + adjustment), + }, ]; await checkVariables([token], [customVars]); }); - it('ms013 should configure two minters, one with zero allowance fails to mint', async function () { + it("ms013 should configure two minters, one with zero allowance fails to mint", async function () { var mintAmount = 10; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, 0, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, 0, { + from: masterMinterAccount, + }); await token.mint(pauserAccount, mintAmount, { from: minterAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - ]; - await expectRevert(token.mint(pauserAccount, mintAmount, { from: arbitraryAccount })); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + ]; + await expectRevert( + token.mint(pauserAccount, mintAmount, { from: arbitraryAccount }) + ); //await expectRevert(token.mint(pauserAccount, 0, { from: arbitraryAccount })); await checkVariables([token], [customVars]); }); - it('ms014 should configure two minters and fail to mint when paused', async function () { + it("ms014 should configure two minters and fail to mint when paused", async function () { var mintAmount = 10; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); await token.pause({ from: pauserAccount }); var customVars = [ - { 'variable': 'paused', 'expectedValue': true }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount) } - ]; - await expectRevert(token.mint(pauserAccount, mintAmount, { from: minterAccount })); - await expectRevert(token.mint(pauserAccount, mintAmount, { from: arbitraryAccount })); + { variable: "paused", expectedValue: true }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount), + }, + ]; + await expectRevert( + token.mint(pauserAccount, mintAmount, { from: minterAccount }) + ); + await expectRevert( + token.mint(pauserAccount, mintAmount, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); - it('ms015 should configure two minters, blacklist one and ensure it cannot mint, then unblacklist and ensure it can mint', async function () { + it("ms015 should configure two minters, blacklist one and ensure it cannot mint, then unblacklist and ensure it can mint", async function () { var mintAmount = 10; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); await token.blacklist(minterAccount, { from: blacklisterAccount }); await token.mint(pauserAccount, mintAmount, { from: arbitraryAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - ]; - await expectRevert(token.mint(pauserAccount, mintAmount, { from: minterAccount })); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + ]; + await expectRevert( + token.mint(pauserAccount, mintAmount, { from: minterAccount }) + ); await checkVariables([token], [customVars]); await token.unBlacklist(minterAccount, { from: blacklisterAccount }); await token.mint(pauserAccount, mintAmount, { from: minterAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount + mintAmount) }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount + mintAmount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "totalSupply", + expectedValue: new BigNumber(mintAmount + mintAmount), + }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount + mintAmount), + }, ]; await checkVariables([token], [customVars]); }); - it('ms016 should configure two minters, each mints to themselves and then burns certain amount', async function () { + it("ms016 should configure two minters, each mints to themselves and then burns certain amount", async function () { var mintAmount1 = 10; var mintAmount2 = 20; var burnAmount = 10; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.configureMinter(arbitraryAccount, amount, { + from: masterMinterAccount, + }); await token.mint(minterAccount, mintAmount1, { from: minterAccount }); await token.mint(arbitraryAccount, mintAmount2, { from: arbitraryAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount1) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount - mintAmount2) }, - { 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(mintAmount1) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount2) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount1 + mintAmount2) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount1), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount - mintAmount2), + }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(mintAmount1), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount2), + }, + { + variable: "totalSupply", + expectedValue: new BigNumber(mintAmount1 + mintAmount2), + }, ]; await checkVariables([token], [customVars]); await token.burn(burnAmount, { from: minterAccount }); await token.burn(burnAmount, { from: arbitraryAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'isAccountMinter.arbitraryAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount1) }, - { 'variable': 'minterAllowance.arbitraryAccount', 'expectedValue': new BigNumber(amount - mintAmount2) }, - { 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(mintAmount1 - burnAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount2 - burnAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount1 + mintAmount2 - burnAmount - burnAmount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount1), + }, + { + variable: "minterAllowance.arbitraryAccount", + expectedValue: new BigNumber(amount - mintAmount2), + }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(mintAmount1 - burnAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount2 - burnAmount), + }, + { + variable: "totalSupply", + expectedValue: new BigNumber( + mintAmount1 + mintAmount2 - burnAmount - burnAmount + ), + }, ]; await checkVariables([token], [customVars]); }); // 0 Input - it('ms018 should approve 0 token allowance with unchanged state', async function () { + it("ms018 should approve 0 token allowance with unchanged state", async function () { await token.approve(minterAccount, 0, { from: arbitraryAccount }); await checkVariables([token], [[]]); }); - it('ms019 should transferFrom 0 tokens with unchanged state', async function () { - await token.transferFrom(arbitraryAccount, pauserAccount, 0, { from: arbitraryAccount2 }); + it("ms019 should transferFrom 0 tokens with unchanged state", async function () { + await token.transferFrom(arbitraryAccount, pauserAccount, 0, { + from: arbitraryAccount2, + }); await checkVariables([token], [[]]); }); - it('ms020 should transfer 0 tokens with unchanged state', async function () { + it("ms020 should transfer 0 tokens with unchanged state", async function () { await token.transfer(arbitraryAccount, 0, { from: arbitraryAccount2 }); await checkVariables([token], [[]]); }); - it('ms036 should get allowance for same address', async function() { - await token.approve(arbitraryAccount, amount, {from: arbitraryAccount}); - var allowance = new BigNumber(await token.allowance(arbitraryAccount, arbitraryAccount)); + it("ms036 should get allowance for same address", async function () { + await token.approve(arbitraryAccount, amount, { from: arbitraryAccount }); + var allowance = new BigNumber( + await token.allowance(arbitraryAccount, arbitraryAccount) + ); assert(allowance.isEqualTo(new BigNumber(amount))); }); // Return value /* - * Calls (i.e token.mint.call(...) , token.approve.call(...) etc.) expose the - * return value of functions while transactions (token.mint(...) , - * token.approve(...) etc.) return transaction receipts and do not read - * function return values. Calls, unlike transactions, do not permanently - * modify data. However, both calls and transactions execute code on the - * network. That is, token.mint.call(...) will revert if and only if - * token.mint(...) reverts. - * - * "Choosing between a transaction and a call is as simple as deciding - * whether you want to read data, or write it." - * - truffle docs - * (https://truffleframework.com/docs/getting_started/contracts) - */ - - it('ms039 should return true on mint', async function() { + * Calls (i.e token.mint.call(...) , token.approve.call(...) etc.) expose the + * return value of functions while transactions (token.mint(...) , + * token.approve(...) etc.) return transaction receipts and do not read + * function return values. Calls, unlike transactions, do not permanently + * modify data. However, both calls and transactions execute code on the + * network. That is, token.mint.call(...) will revert if and only if + * token.mint(...) reverts. + * + * "Choosing between a transaction and a call is as simple as deciding + * whether you want to read data, or write it." + * - truffle docs + * (https://truffleframework.com/docs/getting_started/contracts) + */ + + it("ms039 should return true on mint", async function () { var mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } - ]; - assert(await token.mint.call(arbitraryAccount, mintAmount, { from: minterAccount })); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; + assert( + await token.mint.call(arbitraryAccount, mintAmount, { + from: minterAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('ms040 should return true on approve', async function() { - assert(await token.approve.call(minterAccount, amount, { from: arbitraryAccount })); + it("ms040 should return true on approve", async function () { + assert( + await token.approve.call(minterAccount, amount, { + from: arbitraryAccount, + }) + ); }); - it('ms041 should return true on transferFrom', async function() { + it("ms041 should return true on transferFrom", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); - await token.approve(masterMinterAccount, mintAmount, { from: arbitraryAccount }); + await token.approve(masterMinterAccount, mintAmount, { + from: arbitraryAccount, + }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'allowance.arbitraryAccount.masterMinterAccount', 'expectedValue': new BigNumber(mintAmount)}, - ]; - assert(await token.transferFrom.call(arbitraryAccount, pauserAccount, mintAmount, { from: masterMinterAccount })); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { + variable: "allowance.arbitraryAccount.masterMinterAccount", + expectedValue: new BigNumber(mintAmount), + }, + ]; + assert( + await token.transferFrom.call( + arbitraryAccount, + pauserAccount, + mintAmount, + { from: masterMinterAccount } + ) + ); await checkVariables([token], [customVars]); }); - it('ms042 should return true on transfer', async function() { + it("ms042 should return true on transfer", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } - ]; - assert(await token.transfer.call(pauserAccount, mintAmount, { from: arbitraryAccount })); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + ]; + assert( + await token.transfer.call(pauserAccount, mintAmount, { + from: arbitraryAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('ms043 should return true on configureMinter', async function() { - assert(await token.configureMinter.call(minterAccount, amount, { from: masterMinterAccount })); + it("ms043 should return true on configureMinter", async function () { + assert( + await token.configureMinter.call(minterAccount, amount, { + from: masterMinterAccount, + }) + ); }); - it('ms044 should return true on removeMinter', async function() { - assert(await token.removeMinter.call(minterAccount, { from: masterMinterAccount })); + it("ms044 should return true on removeMinter", async function () { + assert( + await token.removeMinter.call(minterAccount, { + from: masterMinterAccount, + }) + ); }); - it('ms045 initialized should be in slot 8, byte 21', async function() { + it("ms045 initialized should be in slot 8, byte 21", async function () { var initialized = await getInitializedV1(token); assert.equal("0x01", initialized); }); - it('ms046 initialized should be 0 before initialization', async function() { + it("ms046 initialized should be 0 before initialization", async function () { var rawToken = await newToken(); - var newProxy = await FiatTokenProxy.new(rawToken.address, { from: arbitraryAccount }); + var newProxy = await FiatTokenProxy.new(rawToken.address, { + from: arbitraryAccount, + }); var token = FiatToken.at(newProxy.address); var initialized = await getInitializedV1(token); assert.equal("0x00", initialized); }); - it('ms047 configureMinter works on amount=2^256-1', async function() { - await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount }); + it("ms047 configureMinter works on amount=2^256-1", async function () { + await token.configureMinter(minterAccount, maxAmount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(maxAmount), + }, ]; await checkVariables([token], [customVars]); }); - it('ms048 mint works on amount=2^256-1', async function() { - await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount }); + it("ms048 mint works on amount=2^256-1", async function () { + await token.configureMinter(minterAccount, maxAmount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(maxAmount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, ]; await checkVariables([token], [customVars]); - }); + }); - it('ms049 burn on works on amount=2^256-1', async function() { - await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount }); + it("ms049 burn on works on amount=2^256-1", async function () { + await token.configureMinter(minterAccount, maxAmount, { + from: masterMinterAccount, + }); await token.mint(minterAccount, maxAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, ]; await checkVariables([token], [customVars]); await token.burn(maxAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, ]; await checkVariables([token], [customVars]); - }); + }); - it('ms050 approve works on amount=2^256-1', async function() { - await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount }); + it("ms050 approve works on amount=2^256-1", async function () { + await token.configureMinter(minterAccount, maxAmount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, ]; await checkVariables([token], [customVars]); - await token.approve(pauserAccount, maxAmount, {from: arbitraryAccount}); + await token.approve(pauserAccount, maxAmount, { from: arbitraryAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'allowance.arbitraryAccount.pauserAccount', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { + variable: "allowance.arbitraryAccount.pauserAccount", + expectedValue: new BigNumber(maxAmount), + }, ]; await checkVariables([token], [customVars]); - }); + }); - it('ms051 transfer works on amount=2^256-1', async function() { - await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount }); + it("ms051 transfer works on amount=2^256-1", async function () { + await token.configureMinter(minterAccount, maxAmount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, ]; await checkVariables([token], [customVars]); - await token.transfer(pauserAccount, maxAmount, {from: arbitraryAccount}); + await token.transfer(pauserAccount, maxAmount, { from: arbitraryAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, ]; await checkVariables([token], [customVars]); - }); + }); - it('ms052 transferFrom works on amount=2^256-1', async function() { - await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount }); + it("ms052 transferFrom works on amount=2^256-1", async function () { + await token.configureMinter(minterAccount, maxAmount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); - await token.approve(pauserAccount, maxAmount, {from: arbitraryAccount}); + await token.approve(pauserAccount, maxAmount, { from: arbitraryAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'allowance.arbitraryAccount.pauserAccount', 'expectedValue': new BigNumber(maxAmount) } - ]; - await checkVariables([token], [customVars]); - - await token.transferFrom(arbitraryAccount, pauserAccount, maxAmount, {from: pauserAccount}); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { + variable: "allowance.arbitraryAccount.pauserAccount", + expectedValue: new BigNumber(maxAmount), + }, + ]; + await checkVariables([token], [customVars]); + + await token.transferFrom(arbitraryAccount, pauserAccount, maxAmount, { + from: pauserAccount, + }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(maxAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(maxAmount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(maxAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, ]; await checkVariables([token], [customVars]); - }); + }); } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_MiscTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_MiscTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/NegativeTests.js b/test/NegativeTests.js index 6c29fc06e..ee9c40ba6 100644 --- a/test/NegativeTests.js +++ b/test/NegativeTests.js @@ -1,6 +1,6 @@ -var tokenUtils = require('./TokenTestUtils'); -var BigNumber = require('bignumber.js'); -var assertDiff = require('assert-diff'); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; @@ -33,8 +33,7 @@ let longZero = 0x0000000000000000000000000000000000000000; let shortZero = 0x00; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { + beforeEach("Make fresh token contract", async function () { rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; @@ -42,558 +41,881 @@ async function run_tests(newToken, accounts) { assert.equal(proxy.address, token.address); }); - // Mint - it('nt001 should fail to mint when paused', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); - await token.pause({from: pauserAccount}); + it("nt001 should fail to mint when paused", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.pause({ from: pauserAccount }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)}, - {'variable': 'paused', 'expectedValue': true} - ] - await expectRevert(token.mint(arbitraryAccount, 50, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "paused", expectedValue: true }, + ]; + await expectRevert( + token.mint(arbitraryAccount, 50, { from: minterAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt002 should fail to mint when msg.sender is not a minter', async function () { + it("nt002 should fail to mint when msg.sender is not a minter", async function () { //Note: minterAccount has not yet been configured as a minter - await expectRevert(token.mint(arbitraryAccount, 50, {from: minterAccount})); + await expectRevert( + token.mint(arbitraryAccount, 50, { from: minterAccount }) + ); await checkVariables([token], [[]]); }); - it('nt003 should fail to mint when msg.sender is blacklisted', async function () { - await token.blacklist(minterAccount, {from: blacklisterAccount}); - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt003 should fail to mint when msg.sender is blacklisted", async function () { + await token.blacklist(minterAccount, { from: blacklisterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)}, - {'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true} - ] - await expectRevert(token.mint(arbitraryAccount, 50, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, + ]; + await expectRevert( + token.mint(arbitraryAccount, 50, { from: minterAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt004 should fail to mint when recipient is blacklisted', async function () { - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt004 should fail to mint when recipient is blacklisted", async function () { + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)}, - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.mint(arbitraryAccount, 50, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.mint(arbitraryAccount, 50, { from: minterAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt005 should fail to mint when allowance of minter is less than amount', async function () { - await token.configureMinter(minterAccount, amount - 1, {from: masterMinterAccount}); + it("nt005 should fail to mint when allowance of minter is less than amount", async function () { + await token.configureMinter(minterAccount, amount - 1, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 1)} - ] - await expectRevert(token.mint(arbitraryAccount, amount, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 1), + }, + ]; + await expectRevert( + token.mint(arbitraryAccount, amount, { from: minterAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt006 should fail to mint to 0x0 address', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt006 should fail to mint to 0x0 address", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] - await expectRevert(token.mint("0x0", amount, {from: minterAccount})); - await expectRevert(token.mint("0x0000000000000000000000000000000000000000", amount, {from: minterAccount})); - await expectRevert(token.mint(0x0000000000000000000000000000000000000000, amount, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; + await expectRevert(token.mint("0x0", amount, { from: minterAccount })); + await expectRevert( + token.mint("0x0000000000000000000000000000000000000000", amount, { + from: minterAccount, + }) + ); + await expectRevert( + token.mint(0x0000000000000000000000000000000000000000, amount, { + from: minterAccount, + }) + ); await checkVariables([token], [customVars]); }); // Approve - it('nt008 should fail to approve when spender is blacklisted', async function () { - await token.blacklist(minterAccount, {from: blacklisterAccount}); + it("nt008 should fail to approve when spender is blacklisted", async function () { + await token.blacklist(minterAccount, { from: blacklisterAccount }); var customVars = [ - {'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true}, - ] - await expectRevert(token.approve(minterAccount, 100, {from: arbitraryAccount})); + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, + ]; + await expectRevert( + token.approve(minterAccount, 100, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt009 should fail to approve when msg.sender is blacklisted', async function () { - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + it("nt009 should fail to approve when msg.sender is blacklisted", async function () { + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); var customVars = [ - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true}, - ] - await expectRevert(token.approve(minterAccount, 100, {from: arbitraryAccount})); + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.approve(minterAccount, 100, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt010 should fail to approve when contract is paused', async function () { - await token.pause({from: pauserAccount}); - var customVars = [ - {'variable': 'paused', 'expectedValue': true}, - ] - await expectRevert(token.approve(minterAccount, 100, {from: arbitraryAccount})); + it("nt010 should fail to approve when contract is paused", async function () { + await token.pause({ from: pauserAccount }); + var customVars = [{ variable: "paused", expectedValue: true }]; + await expectRevert( + token.approve(minterAccount, 100, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); // TransferFrom - it('nt012 should fail to transferFrom to 0x0 address', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt012 should fail to transferFrom to 0x0 address", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.approve(pauserAccount, 50, {from: arbitraryAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.approve(pauserAccount, 50, { from: arbitraryAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.arbitraryAccount.pauserAccount', 'expectedValue': new BigNumber(50)} - ] - await expectRevert(token.transferFrom(arbitraryAccount, "0x0", 50, {from: pauserAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.arbitraryAccount.pauserAccount", + expectedValue: new BigNumber(50), + }, + ]; + await expectRevert( + token.transferFrom(arbitraryAccount, "0x0", 50, { from: pauserAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt013 should fail to transferFrom an amount greater than balance', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt013 should fail to transferFrom an amount greater than balance", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.approve(blacklisterAccount, amount, {from: arbitraryAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.approve(blacklisterAccount, amount, { from: arbitraryAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.arbitraryAccount.blacklisterAccount', 'expectedValue': new BigNumber(amount)}, - ] - await expectRevert(token.transferFrom(arbitraryAccount, pauserAccount, amount, {from: blacklisterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.arbitraryAccount.blacklisterAccount", + expectedValue: new BigNumber(amount), + }, + ]; + await expectRevert( + token.transferFrom(arbitraryAccount, pauserAccount, amount, { + from: blacklisterAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('nt014 should fail to transferFrom to blacklisted recipient', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt014 should fail to transferFrom to blacklisted recipient", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(blacklisterAccount, 50, {from: minterAccount}); - await token.approve(pauserAccount, 50, {from: blacklisterAccount}); - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + await token.mint(blacklisterAccount, 50, { from: minterAccount }); + await token.approve(pauserAccount, 50, { from: blacklisterAccount }); + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.blacklisterAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.blacklisterAccount.pauserAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.transferFrom(blacklisterAccount, arbitraryAccount, 50, {from: pauserAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.blacklisterAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.blacklisterAccount.pauserAccount", + expectedValue: new BigNumber(50), + }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.transferFrom(blacklisterAccount, arbitraryAccount, 50, { + from: pauserAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('nt015 should fail to transferFrom from blacklisted msg.sender', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt015 should fail to transferFrom from blacklisted msg.sender", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(tokenOwnerAccount, 50, {from: minterAccount}); - await token.approve(arbitraryAccount, 50, {from: tokenOwnerAccount}); - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + await token.mint(tokenOwnerAccount, 50, { from: minterAccount }); + await token.approve(arbitraryAccount, 50, { from: tokenOwnerAccount }); + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.tokenOwnerAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.tokenOwnerAccount.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.transferFrom(tokenOwnerAccount, pauserAccount, 50, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.tokenOwnerAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.tokenOwnerAccount.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.transferFrom(tokenOwnerAccount, pauserAccount, 50, { + from: arbitraryAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('nt016 should fail to transferFrom when from is blacklisted', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt016 should fail to transferFrom when from is blacklisted", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.approve(tokenOwnerAccount, 50, {from: arbitraryAccount}); - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.approve(tokenOwnerAccount, 50, { from: arbitraryAccount }); + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.arbitraryAccount.tokenOwnerAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.transferFrom(arbitraryAccount, pauserAccount, 50, {from: tokenOwnerAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.arbitraryAccount.tokenOwnerAccount", + expectedValue: new BigNumber(50), + }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.transferFrom(arbitraryAccount, pauserAccount, 50, { + from: tokenOwnerAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('nt017 should fail to transferFrom an amount greater than allowed for msg.sender', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt017 should fail to transferFrom an amount greater than allowed for msg.sender", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.approve(tokenOwnerAccount, 50, {from: arbitraryAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.approve(tokenOwnerAccount, 50, { from: arbitraryAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.arbitraryAccount.tokenOwnerAccount', 'expectedValue': new BigNumber(50)}, - ] - await expectRevert(token.transferFrom(arbitraryAccount, pauserAccount, 60, {from: tokenOwnerAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.arbitraryAccount.tokenOwnerAccount", + expectedValue: new BigNumber(50), + }, + ]; + await expectRevert( + token.transferFrom(arbitraryAccount, pauserAccount, 60, { + from: tokenOwnerAccount, + }) + ); await checkVariables([token], [customVars]); }); - it('nt018 should fail to transferFrom when paused', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt018 should fail to transferFrom when paused", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.approve(tokenOwnerAccount, 50, {from: arbitraryAccount}); - await token.pause({from: pauserAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.approve(tokenOwnerAccount, 50, { from: arbitraryAccount }); + await token.pause({ from: pauserAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'allowance.arbitraryAccount.tokenOwnerAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'paused', 'expectedValue': true} - ] - await expectRevert(token.transferFrom(arbitraryAccount, pauserAccount, 50, {from: tokenOwnerAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "allowance.arbitraryAccount.tokenOwnerAccount", + expectedValue: new BigNumber(50), + }, + { variable: "paused", expectedValue: true }, + ]; + await expectRevert( + token.transferFrom(arbitraryAccount, pauserAccount, 50, { + from: tokenOwnerAccount, + }) + ); await checkVariables([token], [customVars]); }); // Transfer - it('nt020 should fail to transfer to 0x0 address', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt020 should fail to transfer to 0x0 address", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)} - ] - await expectRevert(token.transfer("0x0", 50, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + ]; + await expectRevert(token.transfer("0x0", 50, { from: arbitraryAccount })); await checkVariables([token], [customVars]); }); - it('nt021 should fail to transfer an amount greater than balance', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt021 should fail to transfer an amount greater than balance", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)} - ] - await expectRevert(token.transfer(pauserAccount, amount, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + ]; + await expectRevert( + token.transfer(pauserAccount, amount, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt022 should fail to transfer to blacklisted recipient', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt022 should fail to transfer to blacklisted recipient", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(tokenOwnerAccount, 50, {from: minterAccount}); - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + await token.mint(tokenOwnerAccount, 50, { from: minterAccount }); + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.tokenOwnerAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.transfer(arbitraryAccount, 50, {from: tokenOwnerAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.tokenOwnerAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.transfer(arbitraryAccount, 50, { from: tokenOwnerAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt023 should fail to transfer when sender is blacklisted', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt023 should fail to transfer when sender is blacklisted", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.transfer(tokenOwnerAccount, 50, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.transfer(tokenOwnerAccount, 50, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); - it('nt024 should fail to transfer when paused', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt024 should fail to transfer when paused", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(arbitraryAccount, 50, {from: minterAccount}); - await token.pause({from: pauserAccount}); + await token.mint(arbitraryAccount, 50, { from: minterAccount }); + await token.pause({ from: pauserAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'paused', 'expectedValue': true} - ] - await expectRevert(token.transfer(tokenOwnerAccount, 50, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(50), + }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "paused", expectedValue: true }, + ]; + await expectRevert( + token.transfer(tokenOwnerAccount, 50, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); // ConfigureMinter - it('nt026 should fail to configureMinter when sender is not masterMinter', async function () { + it("nt026 should fail to configureMinter when sender is not masterMinter", async function () { assert.isFalse(arbitraryAccount == masterMinterAccount); - await expectRevert(token.configureMinter(minterAccount, amount, {from: arbitraryAccount})); + await expectRevert( + token.configureMinter(minterAccount, amount, { from: arbitraryAccount }) + ); await checkVariables([token], [[]]); }); - - it('nt028 should fail to configureMinter when paused', async function () { - await token.pause({from: pauserAccount}); - customVars = [ - {'variable': 'paused', 'expectedValue': true} - ] - await expectRevert(token.configureMinter(minterAccount, amount, {from: masterMinterAccount})); + it("nt028 should fail to configureMinter when paused", async function () { + await token.pause({ from: pauserAccount }); + customVars = [{ variable: "paused", expectedValue: true }]; + await expectRevert( + token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }) + ); await checkVariables([token], [customVars]); }); // RemoveMinter - it('nt029 should fail to removeMinter when sender is not masterMinter', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt029 should fail to removeMinter when sender is not masterMinter", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] - await expectRevert(token.removeMinter(minterAccount, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; + await expectRevert( + token.removeMinter(minterAccount, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); // Burn - it('nt031 should fail to burn when balance is less than amount', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt031 should fail to burn when balance is less than amount", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] - await expectRevert(token.burn(amount, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; + await expectRevert(token.burn(amount, { from: minterAccount })); await checkVariables([token], [customVars]); }); - it('nt032 should fail to burn when amount is -1', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); - await token.mint(minterAccount, amount, {from: minterAccount}); + it("nt032 should fail to burn when amount is -1", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.mint(minterAccount, amount, { from: minterAccount }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0)}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(amount)} - ] - await expectRevert(token.burn(-1, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(amount) }, + ]; + await expectRevert(token.burn(-1, { from: minterAccount })); await checkVariables([token], [customVars]); }); - it('nt033 should fail to burn when sender is blacklisted', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt033 should fail to burn when sender is blacklisted", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(minterAccount, 50, {from: minterAccount}); - await token.blacklist(minterAccount, {from: blacklisterAccount}); + await token.mint(minterAccount, 50, { from: minterAccount }); + await token.blacklist(minterAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true} - ] - await expectRevert(token.burn(50, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, + ]; + await expectRevert(token.burn(50, { from: minterAccount })); await checkVariables([token], [customVars]); }); - it('nt034 should fail to burn when paused', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt034 should fail to burn when paused", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(minterAccount, 50, {from: minterAccount}); - await token.pause({from: pauserAccount}); + await token.mint(minterAccount, 50, { from: minterAccount }); + await token.pause({ from: pauserAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)}, - {'variable': 'paused', 'expectedValue': true} - ] - await expectRevert(token.burn(50, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "paused", expectedValue: true }, + ]; + await expectRevert(token.burn(50, { from: minterAccount })); await checkVariables([token], [customVars]); }); - it('nt035 should fail to burn when sender is not minter', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt035 should fail to burn when sender is not minter", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(minterAccount, 50, {from: minterAccount}); + await token.mint(minterAccount, 50, { from: minterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)} - ] - await expectRevert(token.burn(50, {from: arbitraryAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + ]; + await expectRevert(token.burn(50, { from: arbitraryAccount })); await checkVariables([token], [customVars]); }); - it('nt036 should fail to burn after removeMinter', async function () { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); + it("nt036 should fail to burn after removeMinter", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); - await token.mint(minterAccount, 50, {from: minterAccount}); + await token.mint(minterAccount, 50, { from: minterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - 50)}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - 50), + }, + { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + ]; await checkVariables([token], [customVars]); - await token.removeMinter(minterAccount, {from: masterMinterAccount}); + await token.removeMinter(minterAccount, { from: masterMinterAccount }); customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': false}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0)}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(50)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(50)} - ] - await expectRevert(token.burn(50, {from: minterAccount})); + { variable: "isAccountMinter.minterAccount", expectedValue: false }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BigNumber(50) }, + ]; + await expectRevert(token.burn(50, { from: minterAccount })); await checkVariables([token], [customVars]); }); // Update functions - it('nt050 should fail to updatePauser when sender is not owner', async function () { - await expectRevert(token.updatePauser(arbitraryAccount, {from: pauserAccount})); + it("nt050 should fail to updatePauser when sender is not owner", async function () { + await expectRevert( + token.updatePauser(arbitraryAccount, { from: pauserAccount }) + ); await checkVariables([token], [[]]); }); - it('nt049 should fail to updateMasterMinter when sender is not owner', async function () { - await expectRevert(token.updateMasterMinter(arbitraryAccount, {from: pauserAccount})); + it("nt049 should fail to updateMasterMinter when sender is not owner", async function () { + await expectRevert( + token.updateMasterMinter(arbitraryAccount, { from: pauserAccount }) + ); await checkVariables([token], [[]]); }); - it('nt048 should fail to updateBlacklister when sender is not owner', async function () { - await expectRevert(token.updateBlacklister(arbitraryAccount, {from: pauserAccount})); + it("nt048 should fail to updateBlacklister when sender is not owner", async function () { + await expectRevert( + token.updateBlacklister(arbitraryAccount, { from: pauserAccount }) + ); await checkVariables([token], [[]]); }); // Pause and Unpause - it('nt040 should fail to pause when sender is not pauser', async function () { - await expectRevert(token.pause({from: arbitraryAccount})); + it("nt040 should fail to pause when sender is not pauser", async function () { + await expectRevert(token.pause({ from: arbitraryAccount })); await checkVariables([token], [[]]); }); - it('nt041 should fail to unpause when sender is not pauser', async function () { - await token.pause({from: pauserAccount}); - customVars = [ - {'variable': 'paused', 'expectedValue': true} - ] - await expectRevert(token.unpause({from: arbitraryAccount})); + it("nt041 should fail to unpause when sender is not pauser", async function () { + await token.pause({ from: pauserAccount }); + customVars = [{ variable: "paused", expectedValue: true }]; + await expectRevert(token.unpause({ from: arbitraryAccount })); await checkVariables([token], [customVars]); }); // Blacklist and Unblacklist - it('nt042 should fail to blacklist when sender is not blacklister', async function () { - await expectRevert(token.blacklist(tokenOwnerAccount, {from: arbitraryAccount})); + it("nt042 should fail to blacklist when sender is not blacklister", async function () { + await expectRevert( + token.blacklist(tokenOwnerAccount, { from: arbitraryAccount }) + ); await checkVariables([token], [[]]); }); - it('nt043 should fail to unblacklist when sender is not blacklister', async function () { - await token.blacklist(arbitraryAccount, {from: blacklisterAccount}); + it("nt043 should fail to unblacklist when sender is not blacklister", async function () { + await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); customVars = [ - {'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true} - ] - await expectRevert(token.unBlacklist(arbitraryAccount, {from: tokenOwnerAccount})); + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, + ]; + await expectRevert( + token.unBlacklist(arbitraryAccount, { from: tokenOwnerAccount }) + ); await checkVariables([token], [customVars]); }); // Upgrade - it('nt054 should fail to transferOwnership when sender is not owner', async function() { + it("nt054 should fail to transferOwnership when sender is not owner", async function () { // Create upgraded token var newRawToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, newRawToken); @@ -601,85 +923,177 @@ async function run_tests(newToken, accounts) { var newToken = newProxiedToken; var newToken_result = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': newRawToken.address } + { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, ]; // expectRevert on transferOwnership with wrong sender - await expectRevert(newToken.transferOwnership(arbitraryAccount, {from: arbitraryAccount2})); + await expectRevert( + newToken.transferOwnership(arbitraryAccount, { from: arbitraryAccount2 }) + ); await checkVariables([newToken], [newToken_result]); }); - it('nt055 should fail to mint when amount = 0', async function() { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); - await expectRevert(token.mint(pauserAccount, 0, {from: minterAccount})); + it("nt055 should fail to mint when amount = 0", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await expectRevert(token.mint(pauserAccount, 0, { from: minterAccount })); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, + ]; await checkVariables([token], [customVars]); }); - it('nt056 should fail to burn when amount = 0', async function() { - await token.configureMinter(minterAccount, amount, {from: masterMinterAccount}); - await token.mint(minterAccount, amount, {from: minterAccount}); - await expectRevert(token.burn(0, {from: minterAccount})); + it("nt056 should fail to burn when amount = 0", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.mint(minterAccount, amount, { from: minterAccount }); + await expectRevert(token.burn(0, { from: minterAccount })); var customVars = [ - {'variable': 'isAccountMinter.minterAccount', 'expectedValue': true}, - {'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount)}, - {'variable': 'totalSupply', 'expectedValue': new BigNumber(amount)} - ] + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(amount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(amount) }, + ]; await checkVariables([token], [customVars]); }); - it('nt064 transferOwnership should fail on 0x0', async function () { - await expectRevert(token.transferOwnership(longZero, { from: tokenOwnerAccount })); - await expectRevert(token.transferOwnership(shortZero, { from: tokenOwnerAccount })); + it("nt064 transferOwnership should fail on 0x0", async function () { + await expectRevert( + token.transferOwnership(longZero, { from: tokenOwnerAccount }) + ); + await expectRevert( + token.transferOwnership(shortZero, { from: tokenOwnerAccount }) + ); }); - it('nt057 updateMasterMinter should fail on 0x0', async function () { - await expectRevert(token.updateMasterMinter(longZero, { from: tokenOwnerAccount })); - await expectRevert(token.updateMasterMinter(shortZero, { from: tokenOwnerAccount })); + it("nt057 updateMasterMinter should fail on 0x0", async function () { + await expectRevert( + token.updateMasterMinter(longZero, { from: tokenOwnerAccount }) + ); + await expectRevert( + token.updateMasterMinter(shortZero, { from: tokenOwnerAccount }) + ); }); - it('nt058 updatePauser should fail on 0x0', async function () { - await expectRevert(token.updatePauser(longZero, { from: tokenOwnerAccount })); - await expectRevert(token.updatePauser(shortZero, { from: tokenOwnerAccount })); + it("nt058 updatePauser should fail on 0x0", async function () { + await expectRevert( + token.updatePauser(longZero, { from: tokenOwnerAccount }) + ); + await expectRevert( + token.updatePauser(shortZero, { from: tokenOwnerAccount }) + ); }); - it('nt059 updateBlacklister should fail on 0x0', async function () { - await expectRevert(token.updateBlacklister(longZero, { from: tokenOwnerAccount })); - await expectRevert(token.updateBlacklister(shortZero, { from: tokenOwnerAccount })); + it("nt059 updateBlacklister should fail on 0x0", async function () { + await expectRevert( + token.updateBlacklister(longZero, { from: tokenOwnerAccount }) + ); + await expectRevert( + token.updateBlacklister(shortZero, { from: tokenOwnerAccount }) + ); }); - it('nt060 initialize should fail when _masterMinter is 0x0', async function () { + it("nt060 initialize should fail when _masterMinter is 0x0", async function () { rawToken = await newToken(); - await expectRevert(customInitializeTokenWithProxy(rawToken, longZero, pauserAccount, blacklisterAccount, tokenOwnerAccount)); - await expectRevert(customInitializeTokenWithProxy(rawToken, shortZero, pauserAccount, blacklisterAccount, tokenOwnerAccount)); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + longZero, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ) + ); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + shortZero, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ) + ); }); - it('nt061 initialize should fail when _pauser is 0x0', async function () { + it("nt061 initialize should fail when _pauser is 0x0", async function () { rawToken = await newToken(); - await expectRevert(customInitializeTokenWithProxy(rawToken, masterMinterAccount, longZero, blacklisterAccount, tokenOwnerAccount)); - await expectRevert(customInitializeTokenWithProxy(rawToken, masterMinterAccount, shortZero, blacklisterAccount, tokenOwnerAccount)); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + longZero, + blacklisterAccount, + tokenOwnerAccount + ) + ); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + shortZero, + blacklisterAccount, + tokenOwnerAccount + ) + ); }); - it('nt062 initialize should fail when _blacklister is 0x0', async function () { + it("nt062 initialize should fail when _blacklister is 0x0", async function () { rawToken = await newToken(); - await expectRevert(customInitializeTokenWithProxy(rawToken, masterMinterAccount, pauserAccount, longZero, tokenOwnerAccount)); - await expectRevert(customInitializeTokenWithProxy(rawToken, masterMinterAccount, pauserAccount, shortZero, tokenOwnerAccount)); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + pauserAccount, + longZero, + tokenOwnerAccount + ) + ); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + pauserAccount, + shortZero, + tokenOwnerAccount + ) + ); }); - it('nt063 initialize should fail when _owner is 0x0', async function () { + it("nt063 initialize should fail when _owner is 0x0", async function () { rawToken = await newToken(); - await expectRevert(customInitializeTokenWithProxy(rawToken, masterMinterAccount, pauserAccount, blacklisterAccount, longZero)); - await expectRevert(customInitializeTokenWithProxy(rawToken, masterMinterAccount, pauserAccount, blacklisterAccount, shortZero)); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + longZero + ) + ); + await expectRevert( + customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + shortZero + ) + ); }); } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_NegativeTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_NegativeTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/Pausable.test.js b/test/Pausable.test.js index b9db8621c..f585d8a7c 100644 --- a/test/Pausable.test.js +++ b/test/Pausable.test.js @@ -1,91 +1,92 @@ -var Tx = require('ethereumjs-tx'); +var Tx = require("ethereumjs-tx"); -var Pausable = artifacts.require('Pausable'); -var tokenUtils = require('./TokenTestUtils'); -var BigNumber = require('bignumber.js'); +var Pausable = artifacts.require("Pausable"); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); var expectRevert = tokenUtils.expectRevert; var deployerAccount = tokenUtils.deployerAccount; var arbitraryAccount = tokenUtils.arbitraryAccount; var pauserAccount = tokenUtils.pauserAccount; var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; - -const should = require('chai') - .use(require('chai-as-promised')) - .use(require('chai-bignumber')(BigNumber)) - .should(); - -contract('PausableTests', function (accounts) { - var pause; - beforeEach(async function checkBefore() { - pause = await Pausable.new(); - await pause.updatePauser(pauserAccount); - }); - - it('constructor owner', async function () { - var actualOwner = await pause.owner.call(); - assert.equal(deployerAccount, actualOwner, "wrong owner"); - }); - - it('constructor pauser', async function () { - var actualOwner = await pause.pauser.call(); - assert.equal(pauserAccount, actualOwner, "wrong pauser"); - }); - - it('paused after pausing', async function () { - await checkUnPaused(); - - await pause.pause({from: pauserAccount}); - await checkPaused(); - - // should stay paused even if we call it again - await pause.pause({from: pauserAccount}); - await checkPaused(); - - await pause.unpause({from: pauserAccount}); - await checkUnPaused(); - }); - - it('update pauser', async function() { - // pause from original pauser - await pause.pause({from: pauserAccount}); - await checkPaused("should have paused from original pauser account"); - - await pause.updatePauser(arbitraryAccount, {from: deployerAccount}); - var newPauser = await pause.pauser.call(); - assert.equal(arbitraryAccount, newPauser); - // double check we're still paused - await checkPaused("should still be paused after changing pauser"); - - await pause.unpause({from: arbitraryAccount}); - await checkUnPaused(); - - //original pauser shouldn't work anymore - await expectRevert(pause.pause({from:pauserAccount})); - }); - - it('fail to update pauser from wrong account', async function() { - await expectRevert(pause.updatePauser(arbitraryAccount, {from:arbitraryAccount})); - }); - - it('fail to pause from wrong account', async function() { - await expectRevert(pause.pause({from:arbitraryAccount})); - }); - - it('fail to unpause from wrong account', async function() { - await pause.pause({from: pauserAccount}); - await checkPaused(); - - await expectRevert(pause.unpause({from:arbitraryAccount})); - }); - - async function checkPaused(msg ) { - var paused = await pause.paused.call(); - assert.isTrue(paused, msg); - } - - async function checkUnPaused(msg) { - var paused = await pause.paused.call(); - assert.isFalse(paused, msg); - } +const should = require("chai") + .use(require("chai-as-promised")) + .use(require("chai-bignumber")(BigNumber)) + .should(); + +contract("PausableTests", function (accounts) { + var pause; + beforeEach(async function checkBefore() { + pause = await Pausable.new(); + await pause.updatePauser(pauserAccount); + }); + + it("constructor owner", async function () { + var actualOwner = await pause.owner.call(); + assert.equal(deployerAccount, actualOwner, "wrong owner"); + }); + + it("constructor pauser", async function () { + var actualOwner = await pause.pauser.call(); + assert.equal(pauserAccount, actualOwner, "wrong pauser"); + }); + + it("paused after pausing", async function () { + await checkUnPaused(); + + await pause.pause({ from: pauserAccount }); + await checkPaused(); + + // should stay paused even if we call it again + await pause.pause({ from: pauserAccount }); + await checkPaused(); + + await pause.unpause({ from: pauserAccount }); + await checkUnPaused(); + }); + + it("update pauser", async function () { + // pause from original pauser + await pause.pause({ from: pauserAccount }); + await checkPaused("should have paused from original pauser account"); + + await pause.updatePauser(arbitraryAccount, { from: deployerAccount }); + var newPauser = await pause.pauser.call(); + assert.equal(arbitraryAccount, newPauser); + // double check we're still paused + await checkPaused("should still be paused after changing pauser"); + + await pause.unpause({ from: arbitraryAccount }); + await checkUnPaused(); + + //original pauser shouldn't work anymore + await expectRevert(pause.pause({ from: pauserAccount })); + }); + + it("fail to update pauser from wrong account", async function () { + await expectRevert( + pause.updatePauser(arbitraryAccount, { from: arbitraryAccount }) + ); + }); + + it("fail to pause from wrong account", async function () { + await expectRevert(pause.pause({ from: arbitraryAccount })); + }); + + it("fail to unpause from wrong account", async function () { + await pause.pause({ from: pauserAccount }); + await checkPaused(); + + await expectRevert(pause.unpause({ from: arbitraryAccount })); + }); + + async function checkPaused(msg) { + var paused = await pause.paused.call(); + assert.isTrue(paused, msg); + } + + async function checkUnPaused(msg) { + var paused = await pause.paused.call(); + assert.isFalse(paused, msg); + } }); diff --git a/test/PositiveTests.js b/test/PositiveTests.js index 8cd3afcc2..a57631e6e 100644 --- a/test/PositiveTests.js +++ b/test/PositiveTests.js @@ -1,6 +1,6 @@ -var tokenUtils = require('./TokenTestUtils');; -var BigNumber = require('bignumber.js'); -var assertDiff = require('assert-diff'); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; @@ -27,8 +27,7 @@ var FiatToken = tokenUtils.FiatToken; var amount = 100; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { + beforeEach("Make fresh token contract", async function () { rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; @@ -36,21 +35,21 @@ async function run_tests(newToken, accounts) { assert.equal(proxy.address, token.address); }); - it('pt000 should check that default variable values are correct', async function () { + it("pt000 should check that default variable values are correct", async function () { await checkVariables([token], [[]]); }); // Pause and Unpause - it('pt011 should pause and set paused to true', async function () { + it("pt011 should pause and set paused to true", async function () { await token.pause({ from: pauserAccount }); - var customVars = [{ 'variable': 'paused', 'expectedValue': true }]; + var customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); }); - it('pt006 should unpause and set paused to false', async function () { + it("pt006 should unpause and set paused to false", async function () { await token.pause({ from: pauserAccount }); - var customVars = [{ 'variable': 'paused', 'expectedValue': true }]; + var customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); await token.unpause({ from: pauserAccount }); await checkVariables([token], [[]]); @@ -58,28 +57,37 @@ async function run_tests(newToken, accounts) { // Approve - it('pt020 should approve a spend and set allowed amount', async function () { + it("pt020 should approve a spend and set allowed amount", async function () { await token.approve(minterAccount, amount, { from: arbitraryAccount }); var customVars = [ - { 'variable': 'allowance.arbitraryAccount.minterAccount', 'expectedValue': new BigNumber(amount) } + { + variable: "allowance.arbitraryAccount.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); }); // Blacklist and Unblacklist - it('pt019 should blacklist and set blacklisted to true', async function () { + it("pt019 should blacklist and set blacklisted to true", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); var customVars = [ - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [customVars]); }); - it('pt018 should blacklist and set blacklisted to true, then unblacklist and set blacklisted to false', async function () { + it("pt018 should blacklist and set blacklisted to true, then unblacklist and set blacklisted to false", async function () { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); var customVars = [ - { 'variable': 'isAccountBlacklisted.arbitraryAccount', 'expectedValue': true } + { + variable: "isAccountBlacklisted.arbitraryAccount", + expectedValue: true, + }, ]; await checkVariables([token], [customVars]); @@ -89,188 +97,269 @@ async function run_tests(newToken, accounts) { // Configure minter - it('pt015 should configureMinter, setting the minter to true and mintingAllowance to amount', async function () { - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + it("pt015 should configureMinter, setting the minter to true and mintingAllowance to amount", async function () { + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); }); // Mint and Burn - it('pt012 should mint the amount, increasing balance of recipient by amount, increasing total supply by amount, and decreasing minterAllowed by amount', async function () { + it("pt012 should mint the amount, increasing balance of recipient by amount, increasing total supply by amount, and decreasing minterAllowed by amount", async function () { var mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); - it('pt017 should burn amount of tokens and reduce balance and total supply by amount', async function () { + it("pt017 should burn amount of tokens and reduce balance and total supply by amount", async function () { var mintAmount = 11; var burnAmount = 10; - await token.configureMinter(minterAccount, mintAmount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, mintAmount, { + from: masterMinterAccount, + }); await token.mint(minterAccount, mintAmount, { from: minterAccount }); var setup = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) }, - { 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [setup]); await token.burn(burnAmount, { from: minterAccount }); var afterBurn = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) }, - { 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(mintAmount - burnAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount - burnAmount) }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(0), + }, + { + variable: "balances.minterAccount", + expectedValue: new BigNumber(mintAmount - burnAmount), + }, + { + variable: "totalSupply", + expectedValue: new BigNumber(mintAmount - burnAmount), + }, ]; await checkVariables([token], [afterBurn]); }); // Remove minter - it('pt010 should removeMinter, setting the minter to false and minterAllowed to 0', async function () { + it("pt010 should removeMinter, setting the minter to false and minterAllowed to 0", async function () { let mintAmount = 11; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); - await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }) + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); + await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); await token.removeMinter(minterAccount, { from: masterMinterAccount }); customVars = [ - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); // Transfer and transferFrom - it('pt008 should transfer, reducing sender balance by amount and increasing recipient balance by amount', async function () { + it("pt008 should transfer, reducing sender balance by amount and increasing recipient balance by amount", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); - it('pt007 should transferFrom, reducing sender balance by amount and increasing recipient balance by amount', async function () { + it("pt007 should transferFrom, reducing sender balance by amount and increasing recipient balance by amount", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); var customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount), + }, ]; await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { + variable: "balances.arbitraryAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); - await token.approve(masterMinterAccount, mintAmount, { from: arbitraryAccount }); - await token.transferFrom(arbitraryAccount, pauserAccount, mintAmount, { from: masterMinterAccount }); + await token.approve(masterMinterAccount, mintAmount, { + from: arbitraryAccount, + }); + await token.transferFrom(arbitraryAccount, pauserAccount, mintAmount, { + from: masterMinterAccount, + }); customVars = [ - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) } + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); }); // Update methods - it('pt004 should updateMasterMinter', async function () { - await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount }); + it("pt004 should updateMasterMinter", async function () { + await token.updateMasterMinter(arbitraryAccount, { + from: tokenOwnerAccount, + }); var result = [ - { 'variable': 'masterMinter', 'expectedValue': arbitraryAccount } + { variable: "masterMinter", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it('pt005 should updateBlacklister', async function () { - await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount }); - var result = [ - { 'variable': 'blacklister', 'expectedValue': arbitraryAccount } - ]; + it("pt005 should updateBlacklister", async function () { + await token.updateBlacklister(arbitraryAccount, { + from: tokenOwnerAccount, + }); + var result = [{ variable: "blacklister", expectedValue: arbitraryAccount }]; await checkVariables([token], [result]); }); - it('pt003 should updatePauser', async function () { + it("pt003 should updatePauser", async function () { await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); - var result = [ - { 'variable': 'pauser', 'expectedValue': arbitraryAccount } - ]; + var result = [{ variable: "pauser", expectedValue: arbitraryAccount }]; await checkVariables([token], [result]); }); // Transfer Ownership - it('pt009 should set owner to _newOwner', async function () { - await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount }); - var result = [ - { 'variable': 'tokenOwner', 'expectedValue': arbitraryAccount } - ]; + it("pt009 should set owner to _newOwner", async function () { + await token.transferOwnership(arbitraryAccount, { + from: tokenOwnerAccount, + }); + var result = [{ variable: "tokenOwner", expectedValue: arbitraryAccount }]; await checkVariables([token], [result]); }); - } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_PositiveTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_PositiveTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/ProxyNegativeTests.js b/test/ProxyNegativeTests.js index dfd8e833a..36b7498f4 100644 --- a/test/ProxyNegativeTests.js +++ b/test/ProxyNegativeTests.js @@ -1,6 +1,6 @@ -var tokenUtils = require('./TokenTestUtils');; -var BigNumber = require('bignumber.js'); -var assertDiff = require('assert-diff'); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; @@ -33,8 +33,7 @@ var UpgradedFiatTokenNewFields = tokenUtils.UpgradedFiatTokenNewFields; var amount = 100; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { + beforeEach("Make fresh token contract", async function () { rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; @@ -42,109 +41,197 @@ async function run_tests(newToken, accounts) { assert.equal(proxy.address, token.address); }); - it('nut002 should fail to switch adminAccount with non-adminAccount as caller', async function () { - await expectRevert(proxy.changeAdmin(masterMinterAccount, {from: masterMinterAccount})); - assert.equal(await proxy.admin({from: proxyOwnerAccount}), proxyOwnerAccount); + it("nut002 should fail to switch adminAccount with non-adminAccount as caller", async function () { + await expectRevert( + proxy.changeAdmin(masterMinterAccount, { from: masterMinterAccount }) + ); + assert.equal( + await proxy.admin({ from: proxyOwnerAccount }), + proxyOwnerAccount + ); customVars = []; await checkVariables([token], [customVars]); }); - it('nut003 should fail to upgradeTo to null contract address', async function () { + it("nut003 should fail to upgradeTo to null contract address", async function () { var upgradedToken = await UpgradedFiatToken.new(); - await expectRevert(proxy.upgradeTo("0x0", token, {from: proxyOwnerAccount})); + await expectRevert( + proxy.upgradeTo("0x0", token, { from: proxyOwnerAccount }) + ); customVars = []; await checkVariables([token], [customVars]); }); - it('nut004 should fail to upgradeToAndCall to null contract address', async function () { + it("nut004 should fail to upgradeToAndCall to null contract address", async function () { var upgradedToken = await UpgradedFiatToken.new(); - const initializeData = encodeCall('pauser', [], []); - await expectRevert(proxy.upgradeToAndCall("0x0", initializeData, { from: proxyOwnerAccount })); + const initializeData = encodeCall("pauser", [], []); + await expectRevert( + proxy.upgradeToAndCall("0x0", initializeData, { from: proxyOwnerAccount }) + ); customVars = []; await checkVariables([token], [customVars]); }); - it('nut005 should fail to initialize contract twice', async function () { - await expectRevert(token.initialize(name, symbol, currency, decimals, masterMinterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount)); + it("nut005 should fail to initialize contract twice", async function () { + await expectRevert( + token.initialize( + name, + symbol, + currency, + decimals, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ) + ); customVars = []; await checkVariables([token], [customVars]); }); - it('nut006 should fail to call contract function with adminAccount', async function () { - await expectRevert(token.allowance(minterAccount, arbitraryAccount, { from: proxyOwnerAccount })); + it("nut006 should fail to call contract function with adminAccount", async function () { + await expectRevert( + token.allowance(minterAccount, arbitraryAccount, { + from: proxyOwnerAccount, + }) + ); customVars = []; await checkVariables([token], [customVars]); }); - it('nut007 should fail to call proxy function with non-adminAccount', async function () { + it("nut007 should fail to call proxy function with non-adminAccount", async function () { await expectRevert(proxy.admin({ from: masterMinterAccount })); customVars = []; await checkVariables([token], [customVars]); }); - it('nut008 shoud fail to update proxy storage if state-changing function called directly in FiatToken', async function () { - await rawToken.initialize(name, symbol, currency, decimals, masterMinterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount); + it("nut008 shoud fail to update proxy storage if state-changing function called directly in FiatToken", async function () { + await rawToken.initialize( + name, + symbol, + currency, + decimals, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ); assert.equal(await rawToken.pauser(), pauserAccount); - await rawToken.updatePauser(masterMinterAccount, {from: tokenOwnerAccount}); + await rawToken.updatePauser(masterMinterAccount, { + from: tokenOwnerAccount, + }); assert.equal(await rawToken.pauser(), masterMinterAccount); customVars = []; await checkVariables([token], [customVars]); }); - it('nut009 should fail to call upgradeTo with non-adminAccount', async function () { + it("nut009 should fail to call upgradeTo with non-adminAccount", async function () { var upgradedToken = await UpgradedFiatToken.new(); - await expectRevert(proxy.upgradeTo(upgradedToken.address, {from:masterMinterAccount})); + await expectRevert( + proxy.upgradeTo(upgradedToken.address, { from: masterMinterAccount }) + ); var finalToken = FiatToken.at(proxy.address); - var implementation = await proxy.implementation({from: proxyOwnerAccount}); + var implementation = await proxy.implementation({ + from: proxyOwnerAccount, + }); finalToken.proxiedTokenAddress = implementation; customVars = []; await checkVariables([finalToken], [customVars]); }); - it('nut010 should fail to call updateToAndCall with non-adminAccount', async function () { + it("nut010 should fail to call updateToAndCall with non-adminAccount", async function () { var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const initializeData = encodeCall('initialize', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - await expectRevert(proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: masterMinterAccount })); + const initializeData = encodeCall( + "initialize", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + await expectRevert( + proxy.upgradeToAndCall(upgradedToken.address, initializeData, { + from: masterMinterAccount, + }) + ); var finalToken = FiatToken.at(proxy.address); - var implementation = await proxy.implementation({from: proxyOwnerAccount}); + var implementation = await proxy.implementation({ + from: proxyOwnerAccount, + }); finalToken.proxiedTokenAddress = implementation; customVars = []; await checkVariables([finalToken], [customVars]); }); - it('nut011 should fail to upgradeToAndCall with initialize (already set variables)', async function () { + it("nut011 should fail to upgradeToAndCall with initialize (already set variables)", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); var upgradedToken = await UpgradedFiatTokenNewFields.new(); - var data = encodeCall('initialize', ['string','string','string','uint8','address','address','address','address','bool','address','uint256'], [name, symbol, currency, decimals, masterMinterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount, true, pauserAccount, 12]); - await expectRevert(proxy.upgradeToAndCall(upgradedToken.address, data, { from: proxyOwnerAccount })); + var data = encodeCall( + "initialize", + [ + "string", + "string", + "string", + "uint8", + "address", + "address", + "address", + "address", + "bool", + "address", + "uint256", + ], + [ + name, + symbol, + currency, + decimals, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + true, + pauserAccount, + 12, + ] + ); + await expectRevert( + proxy.upgradeToAndCall(upgradedToken.address, data, { + from: proxyOwnerAccount, + }) + ); customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([token], [customVars]); - }); - + }); } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_ProxyNegativeTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_ProxyNegativeTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/ProxyPositiveTests.js b/test/ProxyPositiveTests.js index b06f705a6..3dcfebdc3 100644 --- a/test/ProxyPositiveTests.js +++ b/test/ProxyPositiveTests.js @@ -1,6 +1,6 @@ -var tokenUtils = require('./TokenTestUtils');; -var BigNumber = require('bignumber.js'); -var assertDiff = require('assert-diff'); +var tokenUtils = require("./TokenTestUtils"); +var BigNumber = require("bignumber.js"); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; @@ -32,18 +32,18 @@ var FiatToken = tokenUtils.FiatToken; var FiatTokenProxy = tokenUtils.FiatTokenProxy; var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; var UpgradedFiatTokenNewFields = tokenUtils.UpgradedFiatTokenNewFields; -var UpgradedFiatTokenNewFieldsNewLogic = tokenUtils.UpgradedFiatTokenNewFieldsNewLogic; +var UpgradedFiatTokenNewFieldsNewLogic = + tokenUtils.UpgradedFiatTokenNewFieldsNewLogic; var getAdmin = tokenUtils.getAdmin; -var abiUtils = require('./ABIUtils'); +var abiUtils = require("./ABIUtils"); var makeRawTransaction = abiUtils.makeRawTransaction; var sendRawTransaction = abiUtils.sendRawTransaction; var amount = 100; async function run_tests(newToken, accounts) { - - beforeEach('Make fresh token contract', async function () { + beforeEach("Make fresh token contract", async function () { rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; @@ -51,96 +51,175 @@ async function run_tests(newToken, accounts) { assert.equal(proxy.address, token.address); }); - it('upt001 should upgradeTo new contract and preserve data field values', async function () { - let mintAmount = 50; + it("upt001 should upgradeTo new contract and preserve data field values", async function () { + let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); var upgradedToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); + var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); var newToken = tokenConfig.token; customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); }); - it('upt002 should upgradeToandCall to contract with new data fields set on initVX and ensure new fields are correct and old data is preserved', async function () { + it("upt002 should upgradeToandCall to contract with new data fields set on initVX and ensure new fields are correct and old data is preserved", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const initializeData = encodeCall('initV2', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount }) + const initializeData = encodeCall( + "initV2", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { + from: proxyOwnerAccount, + }); newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); assert.equal(newProxiedToken.address, proxy.address); assert.notEqual(newProxiedToken.address, upgradedToken.address); assert.equal(await newProxiedToken.newBool(), true); assert.equal(await newProxiedToken.newAddress(), pauserAccount); - assert.equal((new BigNumber(12)).isEqualTo(await newProxiedToken.newUint()), true); + assert.equal( + new BigNumber(12).isEqualTo(await newProxiedToken.newUint()), + true + ); customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it('upt003 should upgradeToAndCall to contract with new data fields set on initVX and new logic and ensure old data preserved,new logic works, and new fields correct', async function () { + it("upt003 should upgradeToAndCall to contract with new data fields set on initVX and new logic and ensure old data preserved,new logic works, and new fields correct", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); var upgradedToken = await UpgradedFiatTokenNewFieldsNewLogic.new(); - const initializeData = encodeCall('initV2', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount }) - newProxiedToken = await UpgradedFiatTokenNewFieldsNewLogic.at(proxy.address); + const initializeData = encodeCall( + "initV2", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { + from: proxyOwnerAccount, + }); + newProxiedToken = await UpgradedFiatTokenNewFieldsNewLogic.at( + proxy.address + ); assert.equal(newProxiedToken.address, proxy.address); assert.notEqual(newProxiedToken.address, upgradedToken.address); assert.equal(await newProxiedToken.newBool(), true); assert.equal(await newProxiedToken.newAddress(), pauserAccount); - assert.equal((new BigNumber(12)).isEqualTo(await newProxiedToken.newUint()), true); + assert.equal( + new BigNumber(12).isEqualTo(await newProxiedToken.newUint()), + true + ); await newProxiedToken.setNewAddress(masterMinterAccount); assert.equal(await newProxiedToken.newAddress(), masterMinterAccount); customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it('upt008 should deploy upgraded version of contract with new data fields and without previous deployment and ensure new fields correct', async function() { + it("upt008 should deploy upgraded version of contract with new data fields and without previous deployment and ensure new fields correct", async function () { var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const newProxy = await FiatTokenProxy.new(upgradedToken.address, { from: proxyOwnerAccount }); + const newProxy = await FiatTokenProxy.new(upgradedToken.address, { + from: proxyOwnerAccount, + }); proxiedToken = await UpgradedFiatTokenNewFields.at(newProxy.address); - var data = encodeCall('initialize', ['string','string','string','uint8','address','address','address','address','bool','address','uint256'], [name, symbol, currency, decimals, masterMinterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount, true, pauserAccount, 12]); - var upgradeToRawTx = await makeRawTransaction(data, masterMinterAccount, masterMinterAccountPrivateKey, proxiedToken.address) + var data = encodeCall( + "initialize", + [ + "string", + "string", + "string", + "uint8", + "address", + "address", + "address", + "address", + "bool", + "address", + "uint256", + ], + [ + name, + symbol, + currency, + decimals, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + true, + pauserAccount, + 12, + ] + ); + var upgradeToRawTx = await makeRawTransaction( + data, + masterMinterAccount, + masterMinterAccountPrivateKey, + proxiedToken.address + ); await sendRawTransaction(upgradeToRawTx); assert.equal(await proxiedToken.newUint(), 12); @@ -148,18 +227,53 @@ async function run_tests(newToken, accounts) { assert.equal(await proxiedToken.newAddress(), pauserAccount); customVars = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([proxiedToken], [customVars]); - }); + }); - it('upt010 should deploy upgraded version of contract with new data fields and logic without previous deployment and ensure new logic works, and new fields correct', async function() { + it("upt010 should deploy upgraded version of contract with new data fields and logic without previous deployment and ensure new logic works, and new fields correct", async function () { var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const newProxy = await FiatTokenProxy.new(upgradedToken.address, { from: proxyOwnerAccount }); + const newProxy = await FiatTokenProxy.new(upgradedToken.address, { + from: proxyOwnerAccount, + }); proxiedToken = await UpgradedFiatTokenNewFields.at(newProxy.address); - var data = encodeCall('initialize', ['string','string','string','uint8','address','address','address','address','bool','address','uint256'], [name, symbol, currency, decimals, masterMinterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount, true, pauserAccount, 12]); - var upgradeToRawTx = await makeRawTransaction(data, masterMinterAccount, masterMinterAccountPrivateKey, proxiedToken.address) + var data = encodeCall( + "initialize", + [ + "string", + "string", + "string", + "uint8", + "address", + "address", + "address", + "address", + "bool", + "address", + "uint256", + ], + [ + name, + symbol, + currency, + decimals, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + true, + pauserAccount, + 12, + ] + ); + var upgradeToRawTx = await makeRawTransaction( + data, + masterMinterAccount, + masterMinterAccountPrivateKey, + proxiedToken.address + ); await sendRawTransaction(upgradeToRawTx); assert.equal(await proxiedToken.newUint(), 12); @@ -170,23 +284,23 @@ async function run_tests(newToken, accounts) { assert.equal(await newProxiedToken.newAddress(), masterMinterAccount); customVars = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([proxiedToken], [customVars]); - }); + }); - it('upt004 should update proxy adminAccount with previous adminAccount', async function () { - await proxy.changeAdmin(masterMinterAccount, {from: proxyOwnerAccount}); - customVars = [ - { 'variable': 'upgrader', 'expectedValue': masterMinterAccount}, - ] + it("upt004 should update proxy adminAccount with previous adminAccount", async function () { + await proxy.changeAdmin(masterMinterAccount, { from: proxyOwnerAccount }); + customVars = [{ variable: "upgrader", expectedValue: masterMinterAccount }]; await checkVariables([token], [customVars]); }); - it('upt005 should receive Transfer event on transfer when proxied after upgrade', async function () { + it("upt005 should receive Transfer event on transfer when proxied after upgrade", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount + 1, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); @@ -194,44 +308,54 @@ async function run_tests(newToken, accounts) { var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); var newToken = tokenConfig.token; - transfer = await newToken.transfer(pauserAccount, 1, { from: arbitraryAccount}); + transfer = await newToken.transfer(pauserAccount, 1, { + from: arbitraryAccount, + }); validateTransferEvent(transfer, arbitraryAccount, pauserAccount, 1); customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount - 1) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount + 1) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount + 1) }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount - 1), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount + 1), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount + 1) }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); }); - it('upt006 should upgrade while paused and upgraded contract should be paused as a result; then unpause should unpause contract', async function () { - await token.pause({from: pauserAccount}); + it("upt006 should upgrade while paused and upgraded contract should be paused as a result; then unpause should unpause contract", async function () { + await token.pause({ from: pauserAccount }); var upgradedToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); var newToken = tokenConfig.token; customVars = [ - { 'variable': 'paused', 'expectedValue': true, }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "paused", expectedValue: true }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); - await newToken.unpause({from:pauserAccount}); + await newToken.unpause({ from: pauserAccount }); customVars2 = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars2]); }); - it('upt007 should upgrade contract to original address', async function () { + it("upt007 should upgrade contract to original address", async function () { let mintAmount = 50; - await token.configureMinter(minterAccount, amount, { from: masterMinterAccount }); + await token.configureMinter(minterAccount, amount, { + from: masterMinterAccount, + }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); @@ -240,83 +364,106 @@ async function run_tests(newToken, accounts) { sameToken.proxiedTokenAddress = rawToken.address; customVars = [ - { 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount - mintAmount) }, - { 'variable': 'isAccountMinter.minterAccount', 'expectedValue': true }, - { 'variable': 'balances.arbitraryAccount', 'expectedValue': bigZero }, - { 'variable': 'balances.pauserAccount', 'expectedValue': new BigNumber(mintAmount) }, - { 'variable': 'totalSupply', 'expectedValue': new BigNumber(mintAmount) }, + { + variable: "minterAllowance.minterAccount", + expectedValue: new BigNumber(amount - mintAmount), + }, + { variable: "isAccountMinter.minterAccount", expectedValue: true }, + { variable: "balances.arbitraryAccount", expectedValue: bigZero }, + { + variable: "balances.pauserAccount", + expectedValue: new BigNumber(mintAmount), + }, + { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, ]; await checkVariables([sameToken], [customVars]); }); - - it('upt009 should check that admin is set correctly by proxy constructor', async function() { + + it("upt009 should check that admin is set correctly by proxy constructor", async function () { assert.equal(await getAdmin(token), upgraderAccount); }); - it('upt011 should upgradeToAndCall while paused and upgraded contract should be paused as a result', async function () { - await token.pause({from: pauserAccount}); + it("upt011 should upgradeToAndCall while paused and upgraded contract should be paused as a result", async function () { + await token.pause({ from: pauserAccount }); var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const initializeData = encodeCall('initV2', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount }) + const initializeData = encodeCall( + "initV2", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { + from: proxyOwnerAccount, + }); newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); assert.equal(newProxiedToken.address, proxy.address); assert.notEqual(newProxiedToken.address, upgradedToken.address); customVars = [ - { 'variable': 'paused', 'expectedValue': true, }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "paused", expectedValue: true }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it('upt012 should upgradeToAndCall while upgrader is blacklisted', async function () { - await token.blacklist(proxyOwnerAccount, {from: blacklisterAccount}); + it("upt012 should upgradeToAndCall while upgrader is blacklisted", async function () { + await token.blacklist(proxyOwnerAccount, { from: blacklisterAccount }); var upgradedToken = await UpgradedFiatTokenNewFields.new(); - const initializeData = encodeCall('initV2', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount }) + const initializeData = encodeCall( + "initV2", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { + from: proxyOwnerAccount, + }); newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); customVars = [ - { 'variable': 'isAccountBlacklisted.upgraderAccount', 'expectedValue': true, }, - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "isAccountBlacklisted.upgraderAccount", expectedValue: true }, + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it('upt013 should upgradeToAndCall while new logic is blacklisted', async function () { + it("upt013 should upgradeToAndCall while new logic is blacklisted", async function () { var upgradedToken = await UpgradedFiatTokenNewFields.new(); - await token.blacklist(upgradedToken.address, {from: blacklisterAccount}); - - const initializeData = encodeCall('initV2', ['bool', 'address', 'uint256'], [true, pauserAccount, 12]); - await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount }) + await token.blacklist(upgradedToken.address, { from: blacklisterAccount }); + + const initializeData = encodeCall( + "initV2", + ["bool", "address", "uint256"], + [true, pauserAccount, 12] + ); + await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { + from: proxyOwnerAccount, + }); newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); customVars = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it('upt014 should upgradeTo while new logic is blacklisted', async function () { + it("upt014 should upgradeTo while new logic is blacklisted", async function () { var upgradedToken = await UpgradedFiatToken.new(); - await token.blacklist(upgradedToken.address, {from: blacklisterAccount}); + await token.blacklist(upgradedToken.address, { from: blacklisterAccount }); var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); var newToken = tokenConfig.token; customVars = [ - { 'variable': 'proxiedTokenAddress', 'expectedValue': upgradedToken.address } + { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); }); - } -var testWrapper = require('./TestWrapper'); -testWrapper.execute('FiatToken_ProxyPositiveTests', run_tests); +var testWrapper = require("./TestWrapper"); +testWrapper.execute("FiatToken_ProxyPositiveTests", run_tests); module.exports = { run_tests: run_tests, -} +}; diff --git a/test/TestWrapper.js b/test/TestWrapper.js index 5372e4049..e7aa7850b 100644 --- a/test/TestWrapper.js +++ b/test/TestWrapper.js @@ -1,8 +1,7 @@ -var tokenUtils = require('./TokenTestUtils'); +var tokenUtils = require("./TokenTestUtils"); var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; var FiatToken = tokenUtils.FiatToken; - // The following helpers make fresh original/upgraded tokens before each test. async function newToken() { @@ -11,24 +10,24 @@ async function newToken() { } async function newUpgradedToken() { - var token = await UpgradedFiatToken.new(); - return token; + var token = await UpgradedFiatToken.new(); + return token; } // Executes the run_tests_function using an original and // an upgraded token. The test_suite_name is printed standard output. function execute(test_suite_name, run_tests_function) { - contract(test_suite_name, async function (accounts) { - await run_tests_function(newToken, accounts); - }); + contract(test_suite_name, async function (accounts) { + await run_tests_function(newToken, accounts); + }); - contract(test_suite_name + " Upgraded", async function (accounts) { - await run_tests_function(newUpgradedToken, accounts); - }); + contract(test_suite_name + " Upgraded", async function (accounts) { + await run_tests_function(newUpgradedToken, accounts); + }); - return; + return; } module.exports = { - execute: execute -} + execute: execute, +}; diff --git a/test/TokenTestUtils.js b/test/TokenTestUtils.js index 1dfea915f..93d702c61 100644 --- a/test/TokenTestUtils.js +++ b/test/TokenTestUtils.js @@ -1,28 +1,31 @@ -const util = require('util'); -const abi = require('ethereumjs-abi') -var _ = require('lodash'); -var name = 'Sample Fiat Token'; -var symbol = 'C-USD'; -var currency = 'USD'; +const util = require("util"); +const abi = require("ethereumjs-abi"); +var _ = require("lodash"); +var name = "Sample Fiat Token"; +var symbol = "C-USD"; +var currency = "USD"; var decimals = 2; -var BigNumber = require('bignumber.js'); +var BigNumber = require("bignumber.js"); var trueInStorageFormat = "0x01"; var bigZero = new BigNumber(0); var bigHundred = new BigNumber(100); -var assertDiff = require('assert-diff'); +var assertDiff = require("assert-diff"); assertDiff.options.strict = true; -var Q = require('q'); -var FiatToken = artifacts.require('FiatTokenV1'); -var UpgradedFiatToken = artifacts.require('FiatTokenV2'); -var UpgradedFiatTokenNewFields = artifacts.require('FiatTokenV2NewFieldsTest'); -var UpgradedFiatTokenNewFieldsNewLogic = artifacts.require('FiatTokenV2NewFieldsNewLogicTest'); -var FiatTokenProxy = artifacts.require('FiatTokenProxy'); +var Q = require("q"); +var FiatToken = artifacts.require("FiatTokenV1"); +var UpgradedFiatToken = artifacts.require("FiatTokenV2"); +var UpgradedFiatTokenNewFields = artifacts.require("FiatTokenV2NewFieldsTest"); +var UpgradedFiatTokenNewFieldsNewLogic = artifacts.require( + "FiatTokenV2NewFieldsNewLogicTest" +); +var FiatTokenProxy = artifacts.require("FiatTokenProxy"); // TODO: test really big numbers Does this still have to be done?? var deployerAccount = "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1"; // accounts[0] var arbitraryAccount = "0xffcf8fdee72ac11b5c542428b35eef5769c409f0"; // accounts[1] -var arbitraryAccountPrivateKey = "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; +var arbitraryAccountPrivateKey = + "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; var tokenOwnerAccount = "0xe11ba2b4d45eaed5996cd0823791e0c93114882d"; // accounts[3] var blacklisterAccount = "0xd03ea8624c8c5987235048901fb614fdca89b117"; // accounts[4] Why Multiple blacklisterAccount?? var arbitraryAccount2 = "0x95ced938f7991cd0dfcb48f0a06a40fa1af46ebc"; // accounts[5] @@ -34,299 +37,358 @@ var pauserAccount = "0xaca94ef8bd5ffee41947b4585a84bda5a3d3da6e"; // accounts[8] var proxyOwnerAccount = "0x2f560290fef1b3ada194b6aa9c40aa71f8e95598"; // accounts[14] var upgraderAccount = proxyOwnerAccount; // accounts[14] -var deployerAccountPrivateKey = "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; // accounts[0] -var arbitraryAccountPrivateKey = "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; -var upgraderAccountPrivateKey = "6370fd033278c143179d81c5526140625662b8daa446c22ee2d73db3707e620c"; // accounts[2] -var proxyOwnerAccountPrivateKey = "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46;" //accounts[14] -var tokenOwnerPrivateKey = "646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a7913"; // accounts[3] -var blacklisterAccountPrivateKey = "add53f9a7e588d003326d1cbf9e4a43c061aadd9bc938c843a79e7b4fd2ad743"; // accounts[4] -var arbitraryAccount2PrivateKey = "395df67f0c2d2d9fe1ad08d1bc8b6627011959b79c53d7dd6a3536a33ab8a4fd"; // accounts[5] -var masterMinterAccountPrivateKey = "e485d098507f54e7733a205420dfddbe58db035fa577fc294ebd14db90767a52"; // accounts[6] -var minterAccountPrivateKey = "a453611d9419d0e56f499079478fd72c37b251a94bfde4d19872c44cf65386e3"; // accounts[7] -var pauserAccountPrivateKey = "829e924fdf021ba3dbbc4225edfece9aca04b929d6e75613329ca6f1d31c0bb4"; // accounts[9] -var proxyOwnerAccountPrivateKey = "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46"; // accounts[14] +var deployerAccountPrivateKey = + "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; // accounts[0] +var arbitraryAccountPrivateKey = + "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; +var upgraderAccountPrivateKey = + "6370fd033278c143179d81c5526140625662b8daa446c22ee2d73db3707e620c"; // accounts[2] +var proxyOwnerAccountPrivateKey = + "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46;"; //accounts[14] +var tokenOwnerPrivateKey = + "646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a7913"; // accounts[3] +var blacklisterAccountPrivateKey = + "add53f9a7e588d003326d1cbf9e4a43c061aadd9bc938c843a79e7b4fd2ad743"; // accounts[4] +var arbitraryAccount2PrivateKey = + "395df67f0c2d2d9fe1ad08d1bc8b6627011959b79c53d7dd6a3536a33ab8a4fd"; // accounts[5] +var masterMinterAccountPrivateKey = + "e485d098507f54e7733a205420dfddbe58db035fa577fc294ebd14db90767a52"; // accounts[6] +var minterAccountPrivateKey = + "a453611d9419d0e56f499079478fd72c37b251a94bfde4d19872c44cf65386e3"; // accounts[7] +var pauserAccountPrivateKey = + "829e924fdf021ba3dbbc4225edfece9aca04b929d6e75613329ca6f1d31c0bb4"; // accounts[9] +var proxyOwnerAccountPrivateKey = + "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46"; // accounts[14] var upgraderAccountPrivateKey = proxyOwnerAccountPrivateKey; //var blacklisterAccountPrivateKey = "b0057716d5917badaf911b193b12b910811c1497b5bada8d7711f758981c3773"; // accounts[9] -var adminSlot = "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; -var implSlot = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; -const should = require('chai') - .use(require('chai-as-promised')) - .use(require('chai-bignumber')(BigNumber)) - .should(); +var adminSlot = + "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; +var implSlot = + "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; +const should = require("chai") + .use(require("chai-as-promised")) + .use(require("chai-bignumber")(BigNumber)) + .should(); -var BigNumber = require('bignumber.js'); +var BigNumber = require("bignumber.js"); // set to true to enable verbose logging in the tests var debugLogging = false; function calculateFeeAmount(amount) { - return Math.floor((fee / feeBase) * amount); + return Math.floor((fee / feeBase) * amount); } -function checkMinterConfiguredEvent(configureMinterEvent, minter, minterAllowedAmount) { - assert.equal(configureMinterEvent.logs[0].event, 'MinterConfigured') - assert.equal(configureMinterEvent.logs[0].args.minter, minter) - assert.equal(configureMinterEvent.logs[0].args.minterAllowedAmount, minterAllowedAmount) +function checkMinterConfiguredEvent( + configureMinterEvent, + minter, + minterAllowedAmount +) { + assert.equal(configureMinterEvent.logs[0].event, "MinterConfigured"); + assert.equal(configureMinterEvent.logs[0].args.minter, minter); + assert.equal( + configureMinterEvent.logs[0].args.minterAllowedAmount, + minterAllowedAmount + ); } function checkMinterRemovedEvent(minterRemovedEvent, minter) { - assert.equal(minterRemovedEvent.logs[0].event, 'MinterRemoved') - assert.equal(minterRemovedEvent.logs[0].args.oldMinter, minter); + assert.equal(minterRemovedEvent.logs[0].event, "MinterRemoved"); + assert.equal(minterRemovedEvent.logs[0].args.oldMinter, minter); } function checkTransferEventsWithFee(transferEvent, from, to, value, feeAmount) { - assert.equal(transferEvent.logs[0].event, 'Fee'); - assert.equal(transferEvent.logs[0].args.from, from); - assert.equal(transferEvent.logs[0].args.feeAccount, feeAccount); - assert.equal(transferEvent.logs[0].args.feeAmount, feeAmount); - assert.equal(transferEvent.logs[1].event, 'Transfer'); - assert.equal(transferEvent.logs[1].args.from, from); - assert.equal(transferEvent.logs[1].args.to, to); - assert.equal(transferEvent.logs[1].args.value, value); + assert.equal(transferEvent.logs[0].event, "Fee"); + assert.equal(transferEvent.logs[0].args.from, from); + assert.equal(transferEvent.logs[0].args.feeAccount, feeAccount); + assert.equal(transferEvent.logs[0].args.feeAmount, feeAmount); + assert.equal(transferEvent.logs[1].event, "Transfer"); + assert.equal(transferEvent.logs[1].args.from, from); + assert.equal(transferEvent.logs[1].args.to, to); + assert.equal(transferEvent.logs[1].args.value, value); } function checkTransferEvents(transferEvent, from, to, value) { - assert.equal(transferEvent.logs[0].event, 'Transfer'); - assert.equal(transferEvent.logs[0].args.from, from); - assert.equal(transferEvent.logs[0].args.to, to); - assert.equal(transferEvent.logs[0].args.value, value); + assert.equal(transferEvent.logs[0].event, "Transfer"); + assert.equal(transferEvent.logs[0].args.from, from); + assert.equal(transferEvent.logs[0].args.to, to); + assert.equal(transferEvent.logs[0].args.value, value); } function checkApprovalEvent(approvalEvent, approver, spender, value) { - assert.equal(approvalEvent.logs[0].event, 'Approval'); - assert.equal(approvalEvent.logs[0].args.owner, approver); - assert.equal(approvalEvent.logs[0].args.spender, spender); - assert.equal(approvalEvent.logs[0].args.value, value); + assert.equal(approvalEvent.logs[0].event, "Approval"); + assert.equal(approvalEvent.logs[0].args.owner, approver); + assert.equal(approvalEvent.logs[0].args.spender, spender); + assert.equal(approvalEvent.logs[0].args.value, value); } function checkBurnEvent(burnEvent, burner, amount) { - assert.equal(burnEvent.logs[0].event, 'Burn'); - assert.equal(burnEvent.logs[0].args.burner, burner); - assert.equal(burnEvent.logs[0].args.amount, amount); + assert.equal(burnEvent.logs[0].event, "Burn"); + assert.equal(burnEvent.logs[0].args.burner, burner); + assert.equal(burnEvent.logs[0].args.amount, amount); } function checkBlacklistEvent(blacklistEvent, account) { - assert.equal(blacklistEvent.logs[0].event, 'Blacklisted'); - assert.equal(blacklistEvent.logs[0].args._account, account); + assert.equal(blacklistEvent.logs[0].event, "Blacklisted"); + assert.equal(blacklistEvent.logs[0].args._account, account); } function checkUnblacklistEvent(unblacklistEvent, account) { - assert.equal(unblacklistEvent.logs[0].event, 'UnBlacklisted'); - assert.equal(unblacklistEvent.logs[0].args._account, account); + assert.equal(unblacklistEvent.logs[0].event, "UnBlacklisted"); + assert.equal(unblacklistEvent.logs[0].args._account, account); } function checkBlacklisterChangedEvent(blacklisterChangedEvent, blacklister) { - assert.equal(blacklisterChangedEvent.logs[0].event, 'BlacklisterChanged'); - assert.equal(blacklisterChangedEvent.logs[0].args.newBlacklister, blacklister); + assert.equal(blacklisterChangedEvent.logs[0].event, "BlacklisterChanged"); + assert.equal( + blacklisterChangedEvent.logs[0].args.newBlacklister, + blacklister + ); } function checkPauserChangedEvent(pauserChangedEvent, pauser) { - assert.equal(pauserChangedEvent.logs[0].event, 'PauserChanged'); - assert.equal(pauserChangedEvent.logs[0].args.newAddress, pauser); + assert.equal(pauserChangedEvent.logs[0].event, "PauserChanged"); + assert.equal(pauserChangedEvent.logs[0].args.newAddress, pauser); } -function checkTransferOwnershipEvent(transferOwnershipEvent, previousOwner, newOwner) { - assert.equal(transferOwnershipEvent.logs[0].event, 'OwnershipTransferred'); - assert.equal(transferOwnershipEvent.logs[0].args.previousOwner, previousOwner) - assert.equal(transferOwnershipEvent.logs[0].args.newOwner, newOwner); +function checkTransferOwnershipEvent( + transferOwnershipEvent, + previousOwner, + newOwner +) { + assert.equal(transferOwnershipEvent.logs[0].event, "OwnershipTransferred"); + assert.equal( + transferOwnershipEvent.logs[0].args.previousOwner, + previousOwner + ); + assert.equal(transferOwnershipEvent.logs[0].args.newOwner, newOwner); } -function checkUpdateMasterMinterEvent(checkUpdateMasterMinterEvent, newMasterMinter) { - assert.equal(checkUpdateMasterMinterEvent.logs[0].event, 'MasterMinterChanged'); - assert.equal(checkUpdateMasterMinterEvent.logs[0].args.newMasterMinter, newMasterMinter); +function checkUpdateMasterMinterEvent( + checkUpdateMasterMinterEvent, + newMasterMinter +) { + assert.equal( + checkUpdateMasterMinterEvent.logs[0].event, + "MasterMinterChanged" + ); + assert.equal( + checkUpdateMasterMinterEvent.logs[0].args.newMasterMinter, + newMasterMinter + ); } function checkAdminChangedEvent(adminChangedEvent, previousAdmin, newAdmin) { - assert.equal(adminChangedEvent.logs[0].event, 'AdminChanged') - assert.equal(adminChangedEvent.logs[0].args.previousAdmin, previousAdmin); - assert.equal(adminChangedEvent.logs[0].args.newAdmin, newAdmin); + assert.equal(adminChangedEvent.logs[0].event, "AdminChanged"); + assert.equal(adminChangedEvent.logs[0].args.previousAdmin, previousAdmin); + assert.equal(adminChangedEvent.logs[0].args.newAdmin, newAdmin); } function checkUpgradeEvent(upgradeEvent, implementation) { - assert.equal(upgradeEvent.logs[0].event, 'Upgraded'); - assert.equal(upgradeEvent.logs[0].args.implementation, implementation); + assert.equal(upgradeEvent.logs[0].event, "Upgraded"); + assert.equal(upgradeEvent.logs[0].args.implementation, implementation); } -function checkTransferProxyOwnershipEvent(transferProxyOwnershipEvent, previousOwner, newOwner) { - assert.equal(transferProxyOwnershipEvent.logs[0].event, 'ProxyOwnershipTransferred'); - assert.equal(transferProxyOwnershipEvent.logs[0].args.previousOwner, previousOwner); - assert.equal(transferProxyOwnershipEvent.logs[0].args.newOwner, newOwner); +function checkTransferProxyOwnershipEvent( + transferProxyOwnershipEvent, + previousOwner, + newOwner +) { + assert.equal( + transferProxyOwnershipEvent.logs[0].event, + "ProxyOwnershipTransferred" + ); + assert.equal( + transferProxyOwnershipEvent.logs[0].args.previousOwner, + previousOwner + ); + assert.equal(transferProxyOwnershipEvent.logs[0].args.newOwner, newOwner); } function checkPauseEvent(pause) { - assert.equal(pause.logs[0].event, 'Pause'); + assert.equal(pause.logs[0].event, "Pause"); } function checkUnpauseEvent(unpause) { - assert.equal(unpause.logs[0].event, 'Unpause'); + assert.equal(unpause.logs[0].event, "Unpause"); } function checkMintEvent(minting, to, amount, minter) { - // Mint Event - assert.equal(minting.logs[0].event, 'Mint'); - assert.equal(minting.logs[0].args.minter, minter); - assert.equal(minting.logs[0].args.to, to); - assert.equal(minting.logs[0].args.amount, amount); - - // Transfer from 0 Event - assert.equal(minting.logs[1].event, 'Transfer'); - assert.equal(minting.logs[1].args.from, 0); - assert.equal(minting.logs[1].args.to, to); - assert.equal(minting.logs[1].args.value, amount); - + // Mint Event + assert.equal(minting.logs[0].event, "Mint"); + assert.equal(minting.logs[0].args.minter, minter); + assert.equal(minting.logs[0].args.to, to); + assert.equal(minting.logs[0].args.amount, amount); + + // Transfer from 0 Event + assert.equal(minting.logs[1].event, "Transfer"); + assert.equal(minting.logs[1].args.from, 0); + assert.equal(minting.logs[1].args.to, to); + assert.equal(minting.logs[1].args.value, amount); } function checkBurnEvents(burning, amount, burner) { - // Burn Event - assert.equal(burning.logs[0].event, 'Burn'); - assert.equal(burning.logs[0].args.burner, burner); - assert.equal(burning.logs[0].args.amount, amount); - - // Transfer to 0 Event - assert.equal(burning.logs[1].event, 'Transfer'); - assert.equal(burning.logs[1].args.from, burner); - assert.equal(burning.logs[1].args.to, 0); - assert.equal(burning.logs[1].args.value, amount); - + // Burn Event + assert.equal(burning.logs[0].event, "Burn"); + assert.equal(burning.logs[0].args.burner, burner); + assert.equal(burning.logs[0].args.amount, amount); + + // Transfer to 0 Event + assert.equal(burning.logs[1].event, "Transfer"); + assert.equal(burning.logs[1].args.from, burner); + assert.equal(burning.logs[1].args.to, 0); + assert.equal(burning.logs[1].args.value, amount); } // Creates a state object, with default values replaced by // customVars where appropriate. function buildExpectedState(token, customVars) { - // set each variable's default value - var expectedState = { - 'name': name, - 'symbol': symbol, - 'currency': currency, - 'decimals': new BigNumber(decimals), - 'masterMinter': masterMinterAccount, - 'pauser': pauserAccount, - 'blacklister': blacklisterAccount, - 'tokenOwner': tokenOwnerAccount, - 'proxiedTokenAddress': token.proxiedTokenAddress, - 'initializedV1': trueInStorageFormat, - 'upgrader': proxyOwnerAccount, - 'balances': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'allowance': { - 'arbitraryAccount': { - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'arbitraryAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'masterMinterAccount': { - 'arbitraryAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'masterMinterAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'minterAccount': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'minterAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'pauserAccount': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'pauserAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'blacklisterAccount': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'blacklisterAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'tokenOwnerAccount': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'upgraderAccount': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'upgraderAccount': bigZero, - } - }, - 'totalSupply': bigZero, - 'isAccountBlacklisted': { - 'arbitraryAccount': false, - 'masterMinterAccount': false, - 'minterAccount': false, - 'pauserAccount': false, - 'blacklisterAccount': false, - 'tokenOwnerAccount': false, - 'upgraderAccount': false, - }, - 'isAccountMinter': { - 'arbitraryAccount': false, - 'masterMinterAccount': false, - 'minterAccount': false, - 'pauserAccount': false, - 'blacklisterAccount': false, - 'tokenOwnerAccount': false, - 'upgraderAccount': false, - }, - 'minterAllowance': { - 'arbitraryAccount': bigZero, - 'masterMinterAccount': bigZero, - 'minterAccount': bigZero, - 'pauserAccount': bigZero, - 'blacklisterAccount': bigZero, - 'tokenOwnerAccount': bigZero, - 'upgraderAccount': bigZero, - }, - 'paused': false - }; - - // for each item in customVars, set the item in expectedState - var i; - for (i = 0; i < customVars.length; ++i) { - if (_.has(expectedState, customVars[i].variable)) { - if (expectedState[customVars[i].variable] == customVars[i].expectedValue) { - throw new Error("variable " + customVars[i].variable + " to test has same default state as expected state"); - } else { - _.set(expectedState, customVars[i].variable, customVars[i].expectedValue); - } - } else { - // TODO: test the error - throw new Error("variable " + customVars[i].variable + " not found in expectedState"); - } + // set each variable's default value + var expectedState = { + name: name, + symbol: symbol, + currency: currency, + decimals: new BigNumber(decimals), + masterMinter: masterMinterAccount, + pauser: pauserAccount, + blacklister: blacklisterAccount, + tokenOwner: tokenOwnerAccount, + proxiedTokenAddress: token.proxiedTokenAddress, + initializedV1: trueInStorageFormat, + upgrader: proxyOwnerAccount, + balances: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + allowance: { + arbitraryAccount: { + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + arbitraryAccount: bigZero, + upgraderAccount: bigZero, + }, + masterMinterAccount: { + arbitraryAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + masterMinterAccount: bigZero, + upgraderAccount: bigZero, + }, + minterAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + minterAccount: bigZero, + upgraderAccount: bigZero, + }, + pauserAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + pauserAccount: bigZero, + upgraderAccount: bigZero, + }, + blacklisterAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + tokenOwnerAccount: bigZero, + blacklisterAccount: bigZero, + upgraderAccount: bigZero, + }, + tokenOwnerAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + upgraderAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + }, + totalSupply: bigZero, + isAccountBlacklisted: { + arbitraryAccount: false, + masterMinterAccount: false, + minterAccount: false, + pauserAccount: false, + blacklisterAccount: false, + tokenOwnerAccount: false, + upgraderAccount: false, + }, + isAccountMinter: { + arbitraryAccount: false, + masterMinterAccount: false, + minterAccount: false, + pauserAccount: false, + blacklisterAccount: false, + tokenOwnerAccount: false, + upgraderAccount: false, + }, + minterAllowance: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + paused: false, + }; + + // for each item in customVars, set the item in expectedState + var i; + for (i = 0; i < customVars.length; ++i) { + if (_.has(expectedState, customVars[i].variable)) { + if ( + expectedState[customVars[i].variable] == customVars[i].expectedValue + ) { + throw new Error( + "variable " + + customVars[i].variable + + " to test has same default state as expected state" + ); + } else { + _.set( + expectedState, + customVars[i].variable, + customVars[i].expectedValue + ); + } + } else { + // TODO: test the error + throw new Error( + "variable " + customVars[i].variable + " not found in expectedState" + ); } - return expectedState; + } + return expectedState; } // For testing variance of specific variables from their default values. @@ -334,663 +396,754 @@ function buildExpectedState(token, customVars) { // {'variable': , 'expectedValue': } // to reference nested variables, name variable using dot syntax, e.g. 'allowance.arbitraryAccount.minterAccount' async function checkVariables(_tokens, _customVars) { - // Iterate over array of tokens. - var numTokens = _tokens.length; - assert.equal(numTokens, _customVars.length); - var n; - for (n = 0; n < numTokens; n++) { - var token = _tokens[n]; - var customVars = _customVars[n]; - let expectedState = buildExpectedState(token, customVars); - if (debugLogging) { - console.log(util.inspect(expectedState, { showHidden: false, depth: null })) - } - - let actualState = await getActualState(token); - assertDiff.deepEqual(actualState, expectedState, "difference between expected and actual state"); - - // Check that sum of individual balances equals totalSupply - var accounts = [arbitraryAccount, masterMinterAccount, minterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount, upgraderAccount]; - var balanceSum = bigZero; - var x; - for (x = 0; x < accounts.length; x++) { - balanceSum = balanceSum.plus(new BigNumber(await token.balanceOf(accounts[x]))); - } - var totalSupply = new BigNumber(await token.totalSupply()) - assert(balanceSum.isEqualTo(totalSupply)); + // Iterate over array of tokens. + var numTokens = _tokens.length; + assert.equal(numTokens, _customVars.length); + var n; + for (n = 0; n < numTokens; n++) { + var token = _tokens[n]; + var customVars = _customVars[n]; + let expectedState = buildExpectedState(token, customVars); + if (debugLogging) { + console.log( + util.inspect(expectedState, { showHidden: false, depth: null }) + ); + } + + let actualState = await getActualState(token); + assertDiff.deepEqual( + actualState, + expectedState, + "difference between expected and actual state" + ); + + // Check that sum of individual balances equals totalSupply + var accounts = [ + arbitraryAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + upgraderAccount, + ]; + var balanceSum = bigZero; + var x; + for (x = 0; x < accounts.length; x++) { + balanceSum = balanceSum.plus( + new BigNumber(await token.balanceOf(accounts[x])) + ); } + var totalSupply = new BigNumber(await token.totalSupply()); + assert(balanceSum.isEqualTo(totalSupply)); + } } // build up actualState object to compare to expectedState object async function getActualState(token) { - return Q.all([ - await token.name.call(), - await token.symbol.call(), - await token.currency.call(), - await token.decimals.call(), - await token.masterMinter.call(), - await token.pauser.call(), - await token.blacklister.call(), - await token.owner.call(), - await getImplementation(token), - await getAdmin(token), - await getInitializedV1(token), - await token.balanceOf(arbitraryAccount), - await token.balanceOf(masterMinterAccount), - await token.balanceOf(minterAccount), - await token.balanceOf(pauserAccount), - await token.balanceOf(blacklisterAccount), - await token.balanceOf(tokenOwnerAccount), - await token.balanceOf(upgraderAccount), - await token.allowance(arbitraryAccount, masterMinterAccount), - await token.allowance(arbitraryAccount, minterAccount), - await token.allowance(arbitraryAccount, pauserAccount), - await token.allowance(arbitraryAccount, blacklisterAccount), - await token.allowance(arbitraryAccount, tokenOwnerAccount), - await token.allowance(arbitraryAccount, arbitraryAccount), - await token.allowance(arbitraryAccount, upgraderAccount), - await token.allowance(masterMinterAccount, arbitraryAccount), - await token.allowance(masterMinterAccount, minterAccount), - await token.allowance(masterMinterAccount, pauserAccount), - await token.allowance(masterMinterAccount, blacklisterAccount), - await token.allowance(masterMinterAccount, tokenOwnerAccount), - await token.allowance(masterMinterAccount, masterMinterAccount), - await token.allowance(masterMinterAccount, upgraderAccount), - await token.allowance(minterAccount, arbitraryAccount), - await token.allowance(minterAccount, masterMinterAccount), - await token.allowance(minterAccount, pauserAccount), - await token.allowance(minterAccount, blacklisterAccount), - await token.allowance(minterAccount, tokenOwnerAccount), - await token.allowance(minterAccount, minterAccount), - await token.allowance(minterAccount, upgraderAccount), - await token.allowance(pauserAccount, arbitraryAccount), - await token.allowance(pauserAccount, masterMinterAccount), - await token.allowance(pauserAccount, minterAccount), - await token.allowance(pauserAccount, blacklisterAccount), - await token.allowance(pauserAccount, tokenOwnerAccount), - await token.allowance(pauserAccount, pauserAccount), - await token.allowance(pauserAccount, upgraderAccount), - await token.allowance(blacklisterAccount, arbitraryAccount), - await token.allowance(blacklisterAccount, masterMinterAccount), - await token.allowance(blacklisterAccount, minterAccount), - await token.allowance(blacklisterAccount, pauserAccount), - await token.allowance(blacklisterAccount, tokenOwnerAccount), - await token.allowance(blacklisterAccount, blacklisterAccount), - await token.allowance(blacklisterAccount, upgraderAccount), - await token.allowance(tokenOwnerAccount, arbitraryAccount), - await token.allowance(tokenOwnerAccount, masterMinterAccount), - await token.allowance(tokenOwnerAccount, minterAccount), - await token.allowance(tokenOwnerAccount, pauserAccount), - await token.allowance(tokenOwnerAccount, blacklisterAccount), - await token.allowance(tokenOwnerAccount, tokenOwnerAccount), - await token.allowance(tokenOwnerAccount, upgraderAccount), - await token.allowance(upgraderAccount, arbitraryAccount), - await token.allowance(upgraderAccount, masterMinterAccount), - await token.allowance(upgraderAccount, minterAccount), - await token.allowance(upgraderAccount, pauserAccount), - await token.allowance(upgraderAccount, blacklisterAccount), - await token.allowance(upgraderAccount, tokenOwnerAccount), - await token.allowance(upgraderAccount, upgraderAccount), - await token.totalSupply(), - await token.isBlacklisted(arbitraryAccount), - await token.isBlacklisted(masterMinterAccount), - await token.isBlacklisted(minterAccount), - await token.isBlacklisted(pauserAccount), - await token.isBlacklisted(blacklisterAccount), - await token.isBlacklisted(tokenOwnerAccount), - await token.isBlacklisted(upgraderAccount), - await token.isMinter(arbitraryAccount), - await token.isMinter(masterMinterAccount), - await token.isMinter(minterAccount), - await token.isMinter(pauserAccount), - await token.isMinter(blacklisterAccount), - await token.isMinter(tokenOwnerAccount), - await token.isMinter(upgraderAccount), - await token.minterAllowance(arbitraryAccount), - await token.minterAllowance(masterMinterAccount), - await token.minterAllowance(minterAccount), - await token.minterAllowance(pauserAccount), - await token.minterAllowance(blacklisterAccount), - await token.minterAllowance(tokenOwnerAccount), - await token.minterAllowance(upgraderAccount), - await token.paused() - ]).spread(function ( - name, - symbol, - currency, - decimals, - masterMinter, - pauser, - blacklister, - tokenOwner, - proxiedTokenAddress, - upgrader, - initializedV1, - balancesA, - balancesMM, - balancesM, - balancesP, - balancesB, - balancesRAC, - balancesU, - allowanceAtoMM, - allowanceAtoM, - allowanceAtoP, - allowanceAtoB, - allowanceAtoRAC, - allowanceAtoA, - allowanceAtoU, - allowanceMMtoA, - allowanceMMtoM, - allowanceMMtoP, - allowanceMMtoB, - allowanceMMtoRAC, - allowanceMMtoMM, - allowanceMMtoU, - allowanceMtoA, - allowanceMtoMM, - allowanceMtoP, - allowanceMtoB, - allowanceMtoRAC, - allowanceMtoM, - allowanceMtoU, - allowancePtoA, - allowancePtoMM, - allowancePtoM, - allowancePtoB, - allowancePtoRAC, - allowancePtoP, - allowancePtoU, - allowanceBtoA, - allowanceBtoMM, - allowanceBtoM, - allowanceBtoP, - allowanceBtoRAC, - allowanceBtoB, - allowanceBtoU, - allowanceRACtoA, - allowanceRACtoMM, - allowanceRACtoM, - allowanceRACtoP, - allowanceRACtoB, - allowanceRACtoRAC, - allowanceRACtoU, - allowanceUtoA, - allowanceUtoMM, - allowanceUtoM, - allowanceUtoP, - allowanceUtoB, - allowanceUtoRAC, - allowanceUtoU, - totalSupply, - isAccountBlacklistedA, - isAccountBlacklistedMM, - isAccountBlacklistedM, - isAccountBlacklistedP, - isAccountBlacklistedB, - isAccountBlacklistedRAC, - isAccountBlacklistedU, - isAccountMinterA, - isAccountMinterMM, - isAccountMinterM, - isAccountMinterP, - isAccountMinterB, - isAccountMinterRAC, - isAccountMinterU, - minterAllowanceA, - minterAllowanceMM, - minterAllowanceM, - minterAllowanceP, - minterAllowanceB, - minterAllowanceRAC, - minterAllowanceU, - paused - ) { - var actualState = { - 'name': name, - 'symbol': symbol, - 'currency': currency, - 'decimals': decimals, - 'masterMinter': masterMinter, - 'pauser': pauser, - 'blacklister': blacklister, - 'tokenOwner': tokenOwner, - 'proxiedTokenAddress': proxiedTokenAddress, - 'upgrader': upgrader, - 'initializedV1': initializedV1, - 'balances': { - 'arbitraryAccount': balancesA, - 'masterMinterAccount': balancesMM, - 'minterAccount': balancesM, - 'pauserAccount': balancesP, - 'blacklisterAccount': balancesB, - 'tokenOwnerAccount': balancesRAC, - 'upgraderAccount': balancesU, - }, - 'allowance': { - 'arbitraryAccount': { - 'masterMinterAccount': allowanceAtoMM, - 'minterAccount': allowanceAtoM, - 'pauserAccount': allowanceAtoP, - 'blacklisterAccount': allowanceAtoB, - 'tokenOwnerAccount': allowanceAtoRAC, - 'arbitraryAccount': allowanceAtoA, - 'upgraderAccount': allowanceAtoU, - }, - 'masterMinterAccount': { - 'arbitraryAccount': allowanceMMtoA, - 'minterAccount': allowanceMMtoM, - 'pauserAccount': allowanceMMtoP, - 'blacklisterAccount': allowanceMMtoB, - 'tokenOwnerAccount': allowanceMMtoRAC, - 'masterMinterAccount': allowanceMMtoMM, - 'upgraderAccount': allowanceMMtoU, - }, - 'minterAccount': { - 'arbitraryAccount': allowanceMtoA, - 'masterMinterAccount': allowanceMtoMM, - 'pauserAccount': allowanceMtoP, - 'blacklisterAccount': allowanceMtoB, - 'tokenOwnerAccount': allowanceMtoRAC, - 'minterAccount': allowanceMtoM, - 'upgraderAccount': allowanceMtoU, - }, - 'pauserAccount': { - 'arbitraryAccount': allowancePtoA, - 'masterMinterAccount': allowancePtoMM, - 'minterAccount': allowancePtoM, - 'blacklisterAccount': allowancePtoB, - 'tokenOwnerAccount': allowancePtoRAC, - 'pauserAccount': allowancePtoP, - 'upgraderAccount': allowancePtoU, - }, - 'blacklisterAccount': { - 'arbitraryAccount': allowanceBtoA, - 'masterMinterAccount': allowanceBtoMM, - 'minterAccount': allowanceBtoM, - 'pauserAccount': allowanceBtoP, - 'tokenOwnerAccount': allowanceBtoRAC, - 'blacklisterAccount': allowanceBtoB, - 'upgraderAccount': allowanceBtoU, - }, - 'tokenOwnerAccount': { - 'arbitraryAccount': allowanceRACtoA, - 'masterMinterAccount': allowanceRACtoMM, - 'minterAccount': allowanceRACtoM, - 'pauserAccount': allowanceRACtoP, - 'blacklisterAccount': allowanceRACtoB, - 'tokenOwnerAccount': allowanceRACtoRAC, - 'upgraderAccount': allowanceRACtoU, - }, - 'upgraderAccount': { - 'arbitraryAccount': allowanceUtoA, - 'masterMinterAccount': allowanceUtoMM, - 'minterAccount': allowanceUtoM, - 'pauserAccount': allowanceUtoP, - 'blacklisterAccount': allowanceUtoB, - 'tokenOwnerAccount': allowanceUtoRAC, - 'upgraderAccount': allowanceUtoU, - } - }, - 'totalSupply': totalSupply, - 'isAccountBlacklisted': { - 'arbitraryAccount': isAccountBlacklistedA, - 'masterMinterAccount': isAccountBlacklistedMM, - 'minterAccount': isAccountBlacklistedM, - 'pauserAccount': isAccountBlacklistedP, - 'blacklisterAccount': isAccountBlacklistedB, - 'tokenOwnerAccount': isAccountBlacklistedRAC, - 'upgraderAccount': isAccountBlacklistedU, - }, - 'isAccountMinter': { - 'arbitraryAccount': isAccountMinterA, - 'masterMinterAccount': isAccountMinterMM, - 'minterAccount': isAccountMinterM, - 'pauserAccount': isAccountMinterP, - 'blacklisterAccount': isAccountMinterB, - 'tokenOwnerAccount': isAccountMinterRAC, - 'upgraderAccount': isAccountMinterU, - }, - 'minterAllowance': { - 'arbitraryAccount': minterAllowanceA, - 'masterMinterAccount': minterAllowanceMM, - 'minterAccount': minterAllowanceM, - 'pauserAccount': minterAllowanceP, - 'blacklisterAccount': minterAllowanceB, - 'tokenOwnerAccount': minterAllowanceRAC, - 'upgraderAccount': minterAllowanceU, - }, - 'paused': paused - }; - return actualState; - }) + return Q.all([ + await token.name.call(), + await token.symbol.call(), + await token.currency.call(), + await token.decimals.call(), + await token.masterMinter.call(), + await token.pauser.call(), + await token.blacklister.call(), + await token.owner.call(), + await getImplementation(token), + await getAdmin(token), + await getInitializedV1(token), + await token.balanceOf(arbitraryAccount), + await token.balanceOf(masterMinterAccount), + await token.balanceOf(minterAccount), + await token.balanceOf(pauserAccount), + await token.balanceOf(blacklisterAccount), + await token.balanceOf(tokenOwnerAccount), + await token.balanceOf(upgraderAccount), + await token.allowance(arbitraryAccount, masterMinterAccount), + await token.allowance(arbitraryAccount, minterAccount), + await token.allowance(arbitraryAccount, pauserAccount), + await token.allowance(arbitraryAccount, blacklisterAccount), + await token.allowance(arbitraryAccount, tokenOwnerAccount), + await token.allowance(arbitraryAccount, arbitraryAccount), + await token.allowance(arbitraryAccount, upgraderAccount), + await token.allowance(masterMinterAccount, arbitraryAccount), + await token.allowance(masterMinterAccount, minterAccount), + await token.allowance(masterMinterAccount, pauserAccount), + await token.allowance(masterMinterAccount, blacklisterAccount), + await token.allowance(masterMinterAccount, tokenOwnerAccount), + await token.allowance(masterMinterAccount, masterMinterAccount), + await token.allowance(masterMinterAccount, upgraderAccount), + await token.allowance(minterAccount, arbitraryAccount), + await token.allowance(minterAccount, masterMinterAccount), + await token.allowance(minterAccount, pauserAccount), + await token.allowance(minterAccount, blacklisterAccount), + await token.allowance(minterAccount, tokenOwnerAccount), + await token.allowance(minterAccount, minterAccount), + await token.allowance(minterAccount, upgraderAccount), + await token.allowance(pauserAccount, arbitraryAccount), + await token.allowance(pauserAccount, masterMinterAccount), + await token.allowance(pauserAccount, minterAccount), + await token.allowance(pauserAccount, blacklisterAccount), + await token.allowance(pauserAccount, tokenOwnerAccount), + await token.allowance(pauserAccount, pauserAccount), + await token.allowance(pauserAccount, upgraderAccount), + await token.allowance(blacklisterAccount, arbitraryAccount), + await token.allowance(blacklisterAccount, masterMinterAccount), + await token.allowance(blacklisterAccount, minterAccount), + await token.allowance(blacklisterAccount, pauserAccount), + await token.allowance(blacklisterAccount, tokenOwnerAccount), + await token.allowance(blacklisterAccount, blacklisterAccount), + await token.allowance(blacklisterAccount, upgraderAccount), + await token.allowance(tokenOwnerAccount, arbitraryAccount), + await token.allowance(tokenOwnerAccount, masterMinterAccount), + await token.allowance(tokenOwnerAccount, minterAccount), + await token.allowance(tokenOwnerAccount, pauserAccount), + await token.allowance(tokenOwnerAccount, blacklisterAccount), + await token.allowance(tokenOwnerAccount, tokenOwnerAccount), + await token.allowance(tokenOwnerAccount, upgraderAccount), + await token.allowance(upgraderAccount, arbitraryAccount), + await token.allowance(upgraderAccount, masterMinterAccount), + await token.allowance(upgraderAccount, minterAccount), + await token.allowance(upgraderAccount, pauserAccount), + await token.allowance(upgraderAccount, blacklisterAccount), + await token.allowance(upgraderAccount, tokenOwnerAccount), + await token.allowance(upgraderAccount, upgraderAccount), + await token.totalSupply(), + await token.isBlacklisted(arbitraryAccount), + await token.isBlacklisted(masterMinterAccount), + await token.isBlacklisted(minterAccount), + await token.isBlacklisted(pauserAccount), + await token.isBlacklisted(blacklisterAccount), + await token.isBlacklisted(tokenOwnerAccount), + await token.isBlacklisted(upgraderAccount), + await token.isMinter(arbitraryAccount), + await token.isMinter(masterMinterAccount), + await token.isMinter(minterAccount), + await token.isMinter(pauserAccount), + await token.isMinter(blacklisterAccount), + await token.isMinter(tokenOwnerAccount), + await token.isMinter(upgraderAccount), + await token.minterAllowance(arbitraryAccount), + await token.minterAllowance(masterMinterAccount), + await token.minterAllowance(minterAccount), + await token.minterAllowance(pauserAccount), + await token.minterAllowance(blacklisterAccount), + await token.minterAllowance(tokenOwnerAccount), + await token.minterAllowance(upgraderAccount), + await token.paused(), + ]).spread(function ( + name, + symbol, + currency, + decimals, + masterMinter, + pauser, + blacklister, + tokenOwner, + proxiedTokenAddress, + upgrader, + initializedV1, + balancesA, + balancesMM, + balancesM, + balancesP, + balancesB, + balancesRAC, + balancesU, + allowanceAtoMM, + allowanceAtoM, + allowanceAtoP, + allowanceAtoB, + allowanceAtoRAC, + allowanceAtoA, + allowanceAtoU, + allowanceMMtoA, + allowanceMMtoM, + allowanceMMtoP, + allowanceMMtoB, + allowanceMMtoRAC, + allowanceMMtoMM, + allowanceMMtoU, + allowanceMtoA, + allowanceMtoMM, + allowanceMtoP, + allowanceMtoB, + allowanceMtoRAC, + allowanceMtoM, + allowanceMtoU, + allowancePtoA, + allowancePtoMM, + allowancePtoM, + allowancePtoB, + allowancePtoRAC, + allowancePtoP, + allowancePtoU, + allowanceBtoA, + allowanceBtoMM, + allowanceBtoM, + allowanceBtoP, + allowanceBtoRAC, + allowanceBtoB, + allowanceBtoU, + allowanceRACtoA, + allowanceRACtoMM, + allowanceRACtoM, + allowanceRACtoP, + allowanceRACtoB, + allowanceRACtoRAC, + allowanceRACtoU, + allowanceUtoA, + allowanceUtoMM, + allowanceUtoM, + allowanceUtoP, + allowanceUtoB, + allowanceUtoRAC, + allowanceUtoU, + totalSupply, + isAccountBlacklistedA, + isAccountBlacklistedMM, + isAccountBlacklistedM, + isAccountBlacklistedP, + isAccountBlacklistedB, + isAccountBlacklistedRAC, + isAccountBlacklistedU, + isAccountMinterA, + isAccountMinterMM, + isAccountMinterM, + isAccountMinterP, + isAccountMinterB, + isAccountMinterRAC, + isAccountMinterU, + minterAllowanceA, + minterAllowanceMM, + minterAllowanceM, + minterAllowanceP, + minterAllowanceB, + minterAllowanceRAC, + minterAllowanceU, + paused + ) { + var actualState = { + name: name, + symbol: symbol, + currency: currency, + decimals: decimals, + masterMinter: masterMinter, + pauser: pauser, + blacklister: blacklister, + tokenOwner: tokenOwner, + proxiedTokenAddress: proxiedTokenAddress, + upgrader: upgrader, + initializedV1: initializedV1, + balances: { + arbitraryAccount: balancesA, + masterMinterAccount: balancesMM, + minterAccount: balancesM, + pauserAccount: balancesP, + blacklisterAccount: balancesB, + tokenOwnerAccount: balancesRAC, + upgraderAccount: balancesU, + }, + allowance: { + arbitraryAccount: { + masterMinterAccount: allowanceAtoMM, + minterAccount: allowanceAtoM, + pauserAccount: allowanceAtoP, + blacklisterAccount: allowanceAtoB, + tokenOwnerAccount: allowanceAtoRAC, + arbitraryAccount: allowanceAtoA, + upgraderAccount: allowanceAtoU, + }, + masterMinterAccount: { + arbitraryAccount: allowanceMMtoA, + minterAccount: allowanceMMtoM, + pauserAccount: allowanceMMtoP, + blacklisterAccount: allowanceMMtoB, + tokenOwnerAccount: allowanceMMtoRAC, + masterMinterAccount: allowanceMMtoMM, + upgraderAccount: allowanceMMtoU, + }, + minterAccount: { + arbitraryAccount: allowanceMtoA, + masterMinterAccount: allowanceMtoMM, + pauserAccount: allowanceMtoP, + blacklisterAccount: allowanceMtoB, + tokenOwnerAccount: allowanceMtoRAC, + minterAccount: allowanceMtoM, + upgraderAccount: allowanceMtoU, + }, + pauserAccount: { + arbitraryAccount: allowancePtoA, + masterMinterAccount: allowancePtoMM, + minterAccount: allowancePtoM, + blacklisterAccount: allowancePtoB, + tokenOwnerAccount: allowancePtoRAC, + pauserAccount: allowancePtoP, + upgraderAccount: allowancePtoU, + }, + blacklisterAccount: { + arbitraryAccount: allowanceBtoA, + masterMinterAccount: allowanceBtoMM, + minterAccount: allowanceBtoM, + pauserAccount: allowanceBtoP, + tokenOwnerAccount: allowanceBtoRAC, + blacklisterAccount: allowanceBtoB, + upgraderAccount: allowanceBtoU, + }, + tokenOwnerAccount: { + arbitraryAccount: allowanceRACtoA, + masterMinterAccount: allowanceRACtoMM, + minterAccount: allowanceRACtoM, + pauserAccount: allowanceRACtoP, + blacklisterAccount: allowanceRACtoB, + tokenOwnerAccount: allowanceRACtoRAC, + upgraderAccount: allowanceRACtoU, + }, + upgraderAccount: { + arbitraryAccount: allowanceUtoA, + masterMinterAccount: allowanceUtoMM, + minterAccount: allowanceUtoM, + pauserAccount: allowanceUtoP, + blacklisterAccount: allowanceUtoB, + tokenOwnerAccount: allowanceUtoRAC, + upgraderAccount: allowanceUtoU, + }, + }, + totalSupply: totalSupply, + isAccountBlacklisted: { + arbitraryAccount: isAccountBlacklistedA, + masterMinterAccount: isAccountBlacklistedMM, + minterAccount: isAccountBlacklistedM, + pauserAccount: isAccountBlacklistedP, + blacklisterAccount: isAccountBlacklistedB, + tokenOwnerAccount: isAccountBlacklistedRAC, + upgraderAccount: isAccountBlacklistedU, + }, + isAccountMinter: { + arbitraryAccount: isAccountMinterA, + masterMinterAccount: isAccountMinterMM, + minterAccount: isAccountMinterM, + pauserAccount: isAccountMinterP, + blacklisterAccount: isAccountMinterB, + tokenOwnerAccount: isAccountMinterRAC, + upgraderAccount: isAccountMinterU, + }, + minterAllowance: { + arbitraryAccount: minterAllowanceA, + masterMinterAccount: minterAllowanceMM, + minterAccount: minterAllowanceM, + pauserAccount: minterAllowanceP, + blacklisterAccount: minterAllowanceB, + tokenOwnerAccount: minterAllowanceRAC, + upgraderAccount: minterAllowanceU, + }, + paused: paused, + }; + return actualState; + }); } async function setMinter(token, minter, amount) { - let update = await token.configureMinter(minter, amount, { from: masterMinterAccount }); - assert.equal(update.logs[0].event, 'MinterConfigured'); - assert.equal(update.logs[0].args.minter, minter); - assert.equal(update.logs[0].args.minterAllowedAmount, amount); - let minterAllowance = await token.minterAllowance(minter); - - assert.equal(minterAllowance, amount); + let update = await token.configureMinter(minter, amount, { + from: masterMinterAccount, + }); + assert.equal(update.logs[0].event, "MinterConfigured"); + assert.equal(update.logs[0].args.minter, minter); + assert.equal(update.logs[0].args.minterAllowedAmount, amount); + let minterAllowance = await token.minterAllowance(minter); + + assert.equal(minterAllowance, amount); } async function burn(token, amount, burner) { - let burning = await token.burn(amount, { from: burner }); - checkBurnEvents(burning, amount, burner); + let burning = await token.burn(amount, { from: burner }); + checkBurnEvents(burning, amount, burner); } async function mint(token, to, amount, minter) { - await setMinter(token, minter, amount); - await mintRaw(token, to, amount, minter); + await setMinter(token, minter, amount); + await mintRaw(token, to, amount, minter); } async function mintRaw(token, to, amount, minter) { - let initialTotalSupply = await token.totalSupply(); - let initialMinterAllowance = await token.minterAllowance(minter); - let minting = await token.mint(to, amount, { from: minter }); - checkMintEvent(minting, to, amount, minter); + let initialTotalSupply = await token.totalSupply(); + let initialMinterAllowance = await token.minterAllowance(minter); + let minting = await token.mint(to, amount, { from: minter }); + checkMintEvent(minting, to, amount, minter); - // TODO revisit this - /* let totalSupply = await token.totalSupply(); + // TODO revisit this + /* let totalSupply = await token.totalSupply(); totalSupply.should.be.bignumber.equal(initialTotalSupply); let minterAllowance = await token.minterAllowance(minter); assert.isTrue(new BigNumber(initialMinterAllowance).minus(new BigNumber(amount)).isEqualTo(new BigNumber(minterAllowance)));*/ } async function blacklist(token, account) { - let blacklist = await token.blacklist(account, { from: blacklisterAccount }); - checkBlacklistEvent(blacklist, account); + let blacklist = await token.blacklist(account, { from: blacklisterAccount }); + checkBlacklistEvent(blacklist, account); } async function unBlacklist(token, account) { - let unblacklist = await token.unBlacklist(account, { from: blacklisterAccount }); - checkUnblacklistEvent(unblacklist, account); + let unblacklist = await token.unBlacklist(account, { + from: blacklisterAccount, + }); + checkUnblacklistEvent(unblacklist, account); } -async function setLongDecimalFeesTransferWithFees(token, ownerAccount, arbitraryAccount) { - fee = 123589; - feeBase = 1000000; - await token.updateTransferFee(fee, feeBase); - let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); - await mint(token, ownerAccount, 1900); - let initialBalanceFeeAccount = await token.balanceOf(feeAccount); - - await token.approve(arbitraryAccount, 1500); - allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(1500))); - - let transfer = await token.transfer(arbitraryAccount, 1000, { from: ownerAccount }); - - let feeAmount = calculateFeeAmount(1000); - checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 1000, feeAmount); - - - let balance0 = await token.balanceOf(ownerAccount); - assert.equal(balance0, 1900 - 1000 - feeAmount); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.equal(balance3, 1000); - let balanceFeeAccount = await token.balanceOf(feeAccount); - assert.isTrue(new BigNumber(balanceFeeAccount).minus(new BigNumber(initialBalanceFeeAccount)).isEqualTo(new BigNumber(feeAmount))); +async function setLongDecimalFeesTransferWithFees( + token, + ownerAccount, + arbitraryAccount +) { + fee = 123589; + feeBase = 1000000; + await token.updateTransferFee(fee, feeBase); + let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + await mint(token, ownerAccount, 1900); + let initialBalanceFeeAccount = await token.balanceOf(feeAccount); + + await token.approve(arbitraryAccount, 1500); + allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(1500))); + + let transfer = await token.transfer(arbitraryAccount, 1000, { + from: ownerAccount, + }); + + let feeAmount = calculateFeeAmount(1000); + checkTransferEvents( + transfer, + ownerAccount, + arbitraryAccount, + 1000, + feeAmount + ); + + let balance0 = await token.balanceOf(ownerAccount); + assert.equal(balance0, 1900 - 1000 - feeAmount); + let balance3 = await token.balanceOf(arbitraryAccount); + assert.equal(balance3, 1000); + let balanceFeeAccount = await token.balanceOf(feeAccount); + assert.isTrue( + new BigNumber(balanceFeeAccount) + .minus(new BigNumber(initialBalanceFeeAccount)) + .isEqualTo(new BigNumber(feeAmount)) + ); } async function sampleTransfer(token, ownerAccount, arbitraryAccount, minter) { - let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); - await mint(token, ownerAccount, 1900, minter); + let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + await mint(token, ownerAccount, 1900, minter); - await token.approve(arbitraryAccount, 1500); - allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(1500))); + await token.approve(arbitraryAccount, 1500); + allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(1500))); - let transfer = await token.transfer(arbitraryAccount, 1000, { from: ownerAccount }); + let transfer = await token.transfer(arbitraryAccount, 1000, { + from: ownerAccount, + }); - checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 1000); + checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 1000); - let balance0 = await token.balanceOf(ownerAccount); - assert.equal(balance0, 1900 - 1000); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.equal(balance3, 1000); + let balance0 = await token.balanceOf(ownerAccount); + assert.equal(balance0, 1900 - 1000); + let balance3 = await token.balanceOf(arbitraryAccount); + assert.equal(balance3, 1000); } -async function transferFromWithFees(token, ownerAccount, arbitraryAccount, minter) { - fee = 1235; - feeBase = 10000; - await token.updateTransferFee(fee, feeBase); - let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); - await mint(token, ownerAccount, 900, minter); - let initialBalanceFeeAccount = await token.balanceOf(feeAccount); - await token.approve(arbitraryAccount, 634); - allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(634))); - - transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { from: arbitraryAccount }); - - let feeAmount = calculateFeeAmount(534); - checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534, feeAmount); - - let balance0 = await token.balanceOf(ownerAccount); - assert.isTrue(new BigNumber(balance0).isEqualTo(new BigNumber(900).minus(new BigNumber(534)).minus(new BigNumber(feeAmount)))); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(534))); - let balanceFeeAccount = await token.balanceOf(feeAccount); - assert.isTrue(new BigNumber(balanceFeeAccount).minus(new BigNumber(initialBalanceFeeAccount)).isEqualTo(new BigNumber(feeAmount))); +async function transferFromWithFees( + token, + ownerAccount, + arbitraryAccount, + minter +) { + fee = 1235; + feeBase = 10000; + await token.updateTransferFee(fee, feeBase); + let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + await mint(token, ownerAccount, 900, minter); + let initialBalanceFeeAccount = await token.balanceOf(feeAccount); + await token.approve(arbitraryAccount, 634); + allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(634))); + + transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { + from: arbitraryAccount, + }); + + let feeAmount = calculateFeeAmount(534); + checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534, feeAmount); + + let balance0 = await token.balanceOf(ownerAccount); + assert.isTrue( + new BigNumber(balance0).isEqualTo( + new BigNumber(900) + .minus(new BigNumber(534)) + .minus(new BigNumber(feeAmount)) + ) + ); + let balance3 = await token.balanceOf(arbitraryAccount); + assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(534))); + let balanceFeeAccount = await token.balanceOf(feeAccount); + assert.isTrue( + new BigNumber(balanceFeeAccount) + .minus(new BigNumber(initialBalanceFeeAccount)) + .isEqualTo(new BigNumber(feeAmount)) + ); } -async function sampleTransferFrom(token, ownerAccount, arbitraryAccount, minter) { - let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); - await mint(token, ownerAccount, 900, minter); // TODO maybe this - await token.approve(arbitraryAccount, 634); // TODO not this - allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(634))); - - let transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { from: arbitraryAccount }); // TODO not this - - checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534); - - let balance0 = await token.balanceOf(ownerAccount); - assert.isTrue(new BigNumber(balance0).isEqualTo(new BigNumber(900).minus(new BigNumber(534)))); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(534))); +async function sampleTransferFrom( + token, + ownerAccount, + arbitraryAccount, + minter +) { + let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + await mint(token, ownerAccount, 900, minter); // TODO maybe this + await token.approve(arbitraryAccount, 634); // TODO not this + allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this + assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(634))); + + let transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { + from: arbitraryAccount, + }); // TODO not this + + checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534); + + let balance0 = await token.balanceOf(ownerAccount); + assert.isTrue( + new BigNumber(balance0).isEqualTo( + new BigNumber(900).minus(new BigNumber(534)) + ) + ); + let balance3 = await token.balanceOf(arbitraryAccount); + assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(534))); } async function approve(token, to, amount, from) { - await token.approve(to, amount, { from: from }); + await token.approve(to, amount, { from: from }); } async function redeem(token, account, amount) { - let redeemResult = await token.redeem(amount, { from: account }); - assert.equal(redeemResult.logs[0].event, 'Redeem'); - assert.equal(redeemResult.logs[0].args.redeemedAddress, account); - assert.equal(redeemResult.logs[0].args.amount, amount); + let redeemResult = await token.redeem(amount, { from: account }); + assert.equal(redeemResult.logs[0].event, "Redeem"); + assert.equal(redeemResult.logs[0].args.redeemedAddress, account); + assert.equal(redeemResult.logs[0].args.amount, amount); } function validateTransferEvent(transferEvent, from, to, value) { - let eventResult = transferEvent.logs[0]; - assert.equal(eventResult.event, 'Transfer'); - assert.equal(eventResult.args.from, from); - assert.equal(eventResult.args.to, to); - assert.equal(eventResult.args.value, value); + let eventResult = transferEvent.logs[0]; + assert.equal(eventResult.event, "Transfer"); + assert.equal(eventResult.args.from, from); + assert.equal(eventResult.args.to, to); + assert.equal(eventResult.args.value, value); } async function initializeTokenWithProxy(rawToken) { - return customInitializeTokenWithProxy(rawToken, masterMinterAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount); -} - -async function customInitializeTokenWithProxy(rawToken, _masterMinter, _pauser, _blacklister, _owner) { - const proxy = await FiatTokenProxy.new(rawToken.address, { from: proxyOwnerAccount }) - proxiedToken = await FiatToken.at(proxy.address); - await proxiedToken.initialize(name, symbol, currency, decimals, _masterMinter, _pauser, _blacklister, _owner); - proxiedToken.proxiedTokenAddress = rawToken.address; - assert.equal(proxiedToken.address, proxy.address); - assert.notEqual(proxiedToken.address, rawToken.address); - var tokenConfig = { - proxy: proxy, - token: proxiedToken - }; - return tokenConfig; + return customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ); } +async function customInitializeTokenWithProxy( + rawToken, + _masterMinter, + _pauser, + _blacklister, + _owner +) { + const proxy = await FiatTokenProxy.new(rawToken.address, { + from: proxyOwnerAccount, + }); + proxiedToken = await FiatToken.at(proxy.address); + await proxiedToken.initialize( + name, + symbol, + currency, + decimals, + _masterMinter, + _pauser, + _blacklister, + _owner + ); + proxiedToken.proxiedTokenAddress = rawToken.address; + assert.equal(proxiedToken.address, proxy.address); + assert.notEqual(proxiedToken.address, rawToken.address); + var tokenConfig = { + proxy: proxy, + token: proxiedToken, + }; + return tokenConfig; +} async function upgradeTo(proxy, upgradedToken, proxyUpgraderAccount) { - if (proxyUpgraderAccount == null) { - proxyUpgraderAccount = proxyOwnerAccount; - } - await proxy.upgradeTo(upgradedToken.address, { from: proxyUpgraderAccount }); - proxiedToken = await FiatToken.at(proxy.address); - assert.equal(proxiedToken.address, proxy.address); - return tokenConfig = { - proxy: proxy, - token: proxiedToken - } + if (proxyUpgraderAccount == null) { + proxyUpgraderAccount = proxyOwnerAccount; + } + await proxy.upgradeTo(upgradedToken.address, { from: proxyUpgraderAccount }); + proxiedToken = await FiatToken.at(proxy.address); + assert.equal(proxiedToken.address, proxy.address); + return (tokenConfig = { + proxy: proxy, + token: proxiedToken, + }); } async function expectRevert(contractPromise) { - try { - await contractPromise; - } catch (error) { - const revert = error.message.search('revert') >= 0; - assert( - revert, - 'Expected error of type revert, got \'' + error + '\' instead', - ); - return; - } - assert.fail('Expected error of type revert, but no error was received'); + try { + await contractPromise; + } catch (error) { + const revert = error.message.search("revert") >= 0; + assert( + revert, + "Expected error of type revert, got '" + error + "' instead" + ); + return; + } + assert.fail("Expected error of type revert, but no error was received"); } async function expectJump(contractPromise) { - try { - await contractPromise; - assert.fail('Expected invalid opcode not received'); - } catch (error) { - const invalidOpcodeReceived = error.message.search('invalid opcode') >= 0; - assert(invalidOpcodeReceived, `Expected "invalid opcode", got ${error} instead`); - } + try { + await contractPromise; + assert.fail("Expected invalid opcode not received"); + } catch (error) { + const invalidOpcodeReceived = error.message.search("invalid opcode") >= 0; + assert( + invalidOpcodeReceived, + `Expected "invalid opcode", got ${error} instead` + ); + } } function encodeCall(name, arguments, values) { - const methodId = abi.methodID(name, arguments).toString('hex'); - const params = abi.rawEncode(arguments, values).toString('hex'); - return '0x' + methodId + params; + const methodId = abi.methodID(name, arguments).toString("hex"); + const params = abi.rawEncode(arguments, values).toString("hex"); + return "0x" + methodId + params; } function getAdmin(proxy) { - let adm = web3.eth.getStorageAt(proxy.address, adminSlot); - return adm; + let adm = web3.eth.getStorageAt(proxy.address, adminSlot); + return adm; } function getImplementation(proxy) { - let impl = web3.eth.getStorageAt(proxy.address, implSlot); - return impl; + let impl = web3.eth.getStorageAt(proxy.address, implSlot); + return impl; } async function getInitializedV1(token) { - var slot8Data = await web3.eth.getStorageAt(token.address, 8); - var slot8DataLength = slot8Data.length; - var initialized; - var masterMinterStart; - var masterMinterAddress; - if (slot8DataLength == 4) { - //Validate proxy not yet initialized - for (var i = 0; i <= 20; i++) { - assert.equal("0x00", await web3.eth.getStorageAt(token.address, i)); - } - initialized = slot8Data; + var slot8Data = await web3.eth.getStorageAt(token.address, 8); + var slot8DataLength = slot8Data.length; + var initialized; + var masterMinterStart; + var masterMinterAddress; + if (slot8DataLength == 4) { + //Validate proxy not yet initialized + for (var i = 0; i <= 20; i++) { + assert.equal("0x00", await web3.eth.getStorageAt(token.address, i)); + } + initialized = slot8Data; + } else { + if (slot8DataLength == 44) { + initialized = "0x" + slot8Data.substring(2, 4); // first 2 hex-chars after 0x + masterMinterStart = 4; + } else if (slot8DataLength == 40) { + initialized = "0x00"; + masterMinterStart = 2; } else { - if (slot8DataLength == 44) { - initialized = "0x" + slot8Data.substring(2,4); // first 2 hex-chars after 0x - masterMinterStart = 4; - } else if (slot8DataLength == 40) { - initialized = "0x00"; - masterMinterStart = 2; - } else { - assert.fail("slot8Data incorrect size"); - } - masterMinterAddress = "0x" + slot8Data.substring(masterMinterStart, masterMinterStart + 40); - assert.equal(await token.masterMinter.call(), masterMinterAddress); + assert.fail("slot8Data incorrect size"); } - return initialized; + masterMinterAddress = + "0x" + slot8Data.substring(masterMinterStart, masterMinterStart + 40); + assert.equal(await token.masterMinter.call(), masterMinterAddress); + } + return initialized; } module.exports = { - FiatToken: FiatToken, - FiatTokenProxy: FiatTokenProxy, - UpgradedFiatToken: UpgradedFiatToken, - UpgradedFiatTokenNewFields: UpgradedFiatTokenNewFields, - UpgradedFiatTokenNewFieldsNewLogic: UpgradedFiatTokenNewFieldsNewLogic, - name: name, - symbol: symbol, - currency: currency, - decimals: decimals, - bigZero: bigZero, - bigHundred: bigHundred, - debugLogging: debugLogging, - calculateFeeAmount: calculateFeeAmount, - checkTransferEventsWithFee: checkTransferEventsWithFee, - checkTransferEvents: checkTransferEvents, - checkMinterConfiguredEvent: checkMinterConfiguredEvent, - checkMintEvent: checkMintEvent, - checkApprovalEvent: checkApprovalEvent, - checkBurnEvents: checkBurnEvents, - checkBurnEvent: checkBurnEvent, - checkMinterRemovedEvent: checkMinterRemovedEvent, - checkBlacklistEvent: checkBlacklistEvent, - checkUnblacklistEvent: checkUnblacklistEvent, - checkPauseEvent: checkPauseEvent, - checkUnpauseEvent: checkUnpauseEvent, - checkPauserChangedEvent: checkPauserChangedEvent, - checkTransferOwnershipEvent: checkTransferOwnershipEvent, - checkUpdateMasterMinterEvent: checkUpdateMasterMinterEvent, - checkBlacklisterChangedEvent: checkBlacklisterChangedEvent, - checkUpgradeEvent: checkUpgradeEvent, - checkAdminChangedEvent: checkAdminChangedEvent, - buildExpectedState, - checkVariables: checkVariables, - setMinter: setMinter, - mint: mint, - burn: burn, - mintRaw: mintRaw, - blacklist: blacklist, - unBlacklist: unBlacklist, - setLongDecimalFeesTransferWithFees: setLongDecimalFeesTransferWithFees, - sampleTransfer: sampleTransfer, - transferFromWithFees: transferFromWithFees, - sampleTransferFrom: sampleTransferFrom, - approve: approve, - redeem: redeem, - validateTransferEvent: validateTransferEvent, - initializeTokenWithProxy: initializeTokenWithProxy, - customInitializeTokenWithProxy: customInitializeTokenWithProxy, - upgradeTo: upgradeTo, - expectRevert: expectRevert, - expectJump: expectJump, - encodeCall: encodeCall, - getInitializedV1: getInitializedV1, - deployerAccount: deployerAccount, - arbitraryAccount: arbitraryAccount, - tokenOwnerAccount: tokenOwnerAccount, - arbitraryAccount2: arbitraryAccount2, - masterMinterAccount: masterMinterAccount, - minterAccount: minterAccount, - pauserAccount: pauserAccount, - blacklisterAccount: blacklisterAccount, - proxyOwnerAccount: proxyOwnerAccount, - proxyOwnerAccountPrivateKey: proxyOwnerAccountPrivateKey, - upgraderAccount: upgraderAccount, - getAdmin: getAdmin, - arbitraryAccountPrivateKey, - upgraderAccountPrivateKey, - proxyOwnerAccountPrivateKey, - tokenOwnerPrivateKey, - blacklisterAccountPrivateKey, - arbitraryAccount2PrivateKey, - masterMinterAccountPrivateKey, - minterAccountPrivateKey, - pauserAccountPrivateKey, - deployerAccountPrivateKey + FiatToken: FiatToken, + FiatTokenProxy: FiatTokenProxy, + UpgradedFiatToken: UpgradedFiatToken, + UpgradedFiatTokenNewFields: UpgradedFiatTokenNewFields, + UpgradedFiatTokenNewFieldsNewLogic: UpgradedFiatTokenNewFieldsNewLogic, + name: name, + symbol: symbol, + currency: currency, + decimals: decimals, + bigZero: bigZero, + bigHundred: bigHundred, + debugLogging: debugLogging, + calculateFeeAmount: calculateFeeAmount, + checkTransferEventsWithFee: checkTransferEventsWithFee, + checkTransferEvents: checkTransferEvents, + checkMinterConfiguredEvent: checkMinterConfiguredEvent, + checkMintEvent: checkMintEvent, + checkApprovalEvent: checkApprovalEvent, + checkBurnEvents: checkBurnEvents, + checkBurnEvent: checkBurnEvent, + checkMinterRemovedEvent: checkMinterRemovedEvent, + checkBlacklistEvent: checkBlacklistEvent, + checkUnblacklistEvent: checkUnblacklistEvent, + checkPauseEvent: checkPauseEvent, + checkUnpauseEvent: checkUnpauseEvent, + checkPauserChangedEvent: checkPauserChangedEvent, + checkTransferOwnershipEvent: checkTransferOwnershipEvent, + checkUpdateMasterMinterEvent: checkUpdateMasterMinterEvent, + checkBlacklisterChangedEvent: checkBlacklisterChangedEvent, + checkUpgradeEvent: checkUpgradeEvent, + checkAdminChangedEvent: checkAdminChangedEvent, + buildExpectedState, + checkVariables: checkVariables, + setMinter: setMinter, + mint: mint, + burn: burn, + mintRaw: mintRaw, + blacklist: blacklist, + unBlacklist: unBlacklist, + setLongDecimalFeesTransferWithFees: setLongDecimalFeesTransferWithFees, + sampleTransfer: sampleTransfer, + transferFromWithFees: transferFromWithFees, + sampleTransferFrom: sampleTransferFrom, + approve: approve, + redeem: redeem, + validateTransferEvent: validateTransferEvent, + initializeTokenWithProxy: initializeTokenWithProxy, + customInitializeTokenWithProxy: customInitializeTokenWithProxy, + upgradeTo: upgradeTo, + expectRevert: expectRevert, + expectJump: expectJump, + encodeCall: encodeCall, + getInitializedV1: getInitializedV1, + deployerAccount: deployerAccount, + arbitraryAccount: arbitraryAccount, + tokenOwnerAccount: tokenOwnerAccount, + arbitraryAccount2: arbitraryAccount2, + masterMinterAccount: masterMinterAccount, + minterAccount: minterAccount, + pauserAccount: pauserAccount, + blacklisterAccount: blacklisterAccount, + proxyOwnerAccount: proxyOwnerAccount, + proxyOwnerAccountPrivateKey: proxyOwnerAccountPrivateKey, + upgraderAccount: upgraderAccount, + getAdmin: getAdmin, + arbitraryAccountPrivateKey, + upgraderAccountPrivateKey, + proxyOwnerAccountPrivateKey, + tokenOwnerPrivateKey, + blacklisterAccountPrivateKey, + arbitraryAccount2PrivateKey, + masterMinterAccountPrivateKey, + minterAccountPrivateKey, + pauserAccountPrivateKey, + deployerAccountPrivateKey, }; diff --git a/truffle.js b/truffle.js index 061c042d8..06a561334 100644 --- a/truffle.js +++ b/truffle.js @@ -1,12 +1,14 @@ // INFURA Setup - see validate/README.validate.md for more info var HDWalletProvider = require("truffle-hdwallet-provider"); // These keys will be used only for CALL var mnemonic = "talisman"; -var fs = require('fs'); +var fs = require("fs"); var access_token = "none"; try { - access_token = fs.readFileSync('./validate/apikey.infura','utf8'); + access_token = fs.readFileSync("./validate/apikey.infura", "utf8"); } catch (err) { - console.log("No Infura access token detected. Unit tests will still work. See ./validate/README.validate.md for more details.") + console.log( + "No Infura access token detected. Unit tests will still work. See ./validate/README.validate.md for more details." + ); } module.exports = { @@ -14,7 +16,7 @@ module.exports = { development: { host: "localhost", port: 8545, - network_id: "*" // Match any network id + network_id: "*", // Match any network id }, // solidity-coverage looks for a network called 'coverage' and makes one // identical to this one if it is not found. We want solidity coverage to @@ -25,28 +27,31 @@ module.exports = { network_id: "*", port: 8555, gas: 17592186044415, - gasPrice: 1 + gasPrice: 1, }, // network to refer to ganache by name so it works with truffle/ganache in separate docker containers localTestNet: { host: "ganache", port: 8545, - network_id: "*" // Match any network id + network_id: "*", // Match any network id }, // INFURA Setup infura_mainnet: { - provider: function() { - return new HDWalletProvider(mnemonic, "https://mainnet.infura.io/" + access_token) + provider: function () { + return new HDWalletProvider( + mnemonic, + "https://mainnet.infura.io/" + access_token + ); }, - network_id: 1 - } + network_id: 1, + }, }, mocha: { /* - * To disable the spreadsheet verification tool ensure that - * the reporter is set to 'Spec' by commenting/uncommenting the lines below. - */ - reporter: 'Spec', + * To disable the spreadsheet verification tool ensure that + * the reporter is set to 'Spec' by commenting/uncommenting the lines below. + */ + reporter: "Spec", //reporter: './verification/verification_reporter.js', }, }; diff --git a/validate/contractDiff.js b/validate/contractDiff.js index d0daf2949..20a4b3b4c 100644 --- a/validate/contractDiff.js +++ b/validate/contractDiff.js @@ -1,120 +1,123 @@ -var fs = require('fs'); +var fs = require("fs"); const chalk = require("chalk"); const diff = require("diff"); function readFileSync(filename) { - return fs.readFileSync(filename, "utf8"); + return fs.readFileSync(filename, "utf8"); } function writeFileSync(filename, text) { - fs.writeFileSync(filename, text); + fs.writeFileSync(filename, text); } function getFilenamesFromCode(code) { - // find all lines with prefix "// File:" - var filenames = code.match(/\/\/\s*File:\s*\S+\n/gi); - for (var i = 0; i < filenames.length; i++) { - // remove prefix "// File: ". - filenames[i] = filenames[i].replace(/\/\/\s*File:\s*/i, ""); - filenames[i] = filenames[i].replace(/\s+/i, ""); - - // directory openzeppelin-solidity is inside node_modules - if(filenames[i].match(/openzeppelin-solidity/)){ - filenames[i] = "node_modules/" + filenames[i] - } - - // directory zos-lib is inside node_modules - if(filenames[i].match(/zos-lib/)){ - filenames[i] = "node_modules/" + filenames[i] - } - - // add ./ prefix - filenames[i] = "./" + filenames[i]; - console.log(filenames[i]); + // find all lines with prefix "// File:" + var filenames = code.match(/\/\/\s*File:\s*\S+\n/gi); + for (var i = 0; i < filenames.length; i++) { + // remove prefix "// File: ". + filenames[i] = filenames[i].replace(/\/\/\s*File:\s*/i, ""); + filenames[i] = filenames[i].replace(/\s+/i, ""); + + // directory openzeppelin-solidity is inside node_modules + if (filenames[i].match(/openzeppelin-solidity/)) { + filenames[i] = "node_modules/" + filenames[i]; } - return filenames; + + // directory zos-lib is inside node_modules + if (filenames[i].match(/zos-lib/)) { + filenames[i] = "node_modules/" + filenames[i]; + } + + // add ./ prefix + filenames[i] = "./" + filenames[i]; + console.log(filenames[i]); + } + return filenames; } function createCodeFile(filenames) { - var code = ""; - for (var i = 0; i < filenames.length; i++) { - try { - console.log("Reading file " + filenames[i]); - } catch (err) { - console.log("Could not read file " + filenames[i]); - return ""; - } - code = code + readFileSync(filenames[i]) + "\n"; + var code = ""; + for (var i = 0; i < filenames.length; i++) { + try { + console.log("Reading file " + filenames[i]); + } catch (err) { + console.log("Could not read file " + filenames[i]); + return ""; } - return code; + code = code + readFileSync(filenames[i]) + "\n"; + } + return code; } function diffText(code1, code2) { - const diffOutput = diff.diffTrimmedLines(code1, code2); - for (var i = 0; i < diffOutput.length; i++) { - var diffLine = diffOutput[i]; - if (diffLine.added) { - process.stdout.write(chalk.green(`+ ${diffLine.value}`)); - } else if (diffLine.removed) { - process.stdout.write(chalk.red(`- ${diffLine.value}`)); - } - } + const diffOutput = diff.diffTrimmedLines(code1, code2); + for (var i = 0; i < diffOutput.length; i++) { + var diffLine = diffOutput[i]; + if (diffLine.added) { + process.stdout.write(chalk.green(`+ ${diffLine.value}`)); + } else if (diffLine.removed) { + process.stdout.write(chalk.red(`- ${diffLine.value}`)); + } + } } function removeExtraComments(code) { - var modified = code.replace(/\/\/\s*File:\s*\S+\n/ig, ""); - return modified; + var modified = code.replace(/\/\/\s*File:\s*\S+\n/gi, ""); + return modified; } function validate(filename) { - var code = readFileSync(filename); + var code = readFileSync(filename); - var filenames = getFilenamesFromCode(code); - var expectedCode = createCodeFile(filenames); + var filenames = getFilenamesFromCode(code); + var expectedCode = createCodeFile(filenames); - code = removeExtraComments(code); - diffText(code, expectedCode); + code = removeExtraComments(code); + diffText(code, expectedCode); } function printUsage() { - console.log("node contractDiff .... "); + console.log("node contractDiff .... "); } function main() { - if(process.argv.length < 3) { - printUsage(); - return; - } - - var fail = 0; - var total = process.argv.length -2; - var goodFiles = ""; - var badFiles = ""; - - for(var i=2; i 0) { - process.stdout.write(chalk.green("\n\nSuccessfully processed " + (total-fail) + " files.\n")); - process.stdout.write(chalk.green(goodFiles)); - } - - if(fail > 0) { - process.stdout.write(chalk.red("\n\nFailed to process " + fail + " files.\n")); - process.stdout.write(chalk.red(badFiles + "\n")); + if (process.argv.length < 3) { + printUsage(); + return; + } + + var fail = 0; + var total = process.argv.length - 2; + var goodFiles = ""; + var badFiles = ""; + + for (var i = 2; i < process.argv.length; i++) { + var filename = process.argv[i]; + console.log("Checking: " + filename); + try { + validate(filename); + goodFiles = goodFiles + filename + "\n"; + } catch (err) { + console.log("Error validating file " + filename); + console.log(err.msg); + badFiles = badFiles + filename + "\n"; + ++fail; } + } + + if (total - fail > 0) { + process.stdout.write( + chalk.green("\n\nSuccessfully processed " + (total - fail) + " files.\n") + ); + process.stdout.write(chalk.green(goodFiles)); + } + + if (fail > 0) { + process.stdout.write( + chalk.red("\n\nFailed to process " + fail + " files.\n") + ); + process.stdout.write(chalk.red(badFiles + "\n")); + } } main(); - diff --git a/validate/validate.js b/validate/validate.js index be31a43d1..7e3df25d5 100644 --- a/validate/validate.js +++ b/validate/validate.js @@ -5,11 +5,11 @@ var fiatTokenAddress = "0x0882477e7895bdc5cea7cb1552ed914ab157fe56"; var fiatTokenProxyAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; // role addresses -var MASTER_MINTER = 0x1500A138523709cE66C8B9aBe678aBc1b6C5A7b7; -var PAUSER = 0xe8e13e1B6d363C270eF3A5AB466eBAd8326311bb; -var UPGRADER = 0x69005ff70072c57547dC44ea975d85ea60e5B196; -var OWNER = 0xa61E278899a8553d93D14eb19bA2791e05069e87; -var BLACKLISTER = 0x063d13783A0A2Ce65b1Ca00D9e897E6c8B1Ec86B; +var MASTER_MINTER = 0x1500a138523709ce66c8b9abe678abc1b6c5a7b7; +var PAUSER = 0xe8e13e1b6d363c270ef3a5ab466ebad8326311bb; +var UPGRADER = 0x69005ff70072c57547dc44ea975d85ea60e5b196; +var OWNER = 0xa61e278899a8553d93d14eb19ba2791e05069e87; +var BLACKLISTER = 0x063d13783a0a2ce65b1ca00d9e897e6c8b1ec86b; // Addresses of known minters - currently fake minters // If replacing with real minters need to modify printMinterInfo @@ -18,9 +18,9 @@ var minters = ["0x0000", "0x0001"]; var NAME = "USD//C"; var SYMBOL = "USDC"; var CURRENCY = "USD"; -var DECIMALS = 6 ; -var TOTALSUPPLY = 0; -var PAUSED = false +var DECIMALS = 6; +var TOTALSUPPLY = 0; +var PAUSED = false; // Name of current implementation artifact as stored in ./build/contracts/*.json var FiatToken = artifacts.require("FiatTokenV1"); @@ -34,115 +34,115 @@ var FiatTokenProxy = artifacts.require("FiatTokenProxy"); // // -var adminSlot = "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; -var implSlot = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; - -const asyncGetStorageAt = (address, slot) => new Promise((resolve, reject) => { - web3.eth.getStorageAt(address, slot, (err, result) => { - if (err) { - return reject(err); - } - resolve(result); +var adminSlot = + "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; +var implSlot = + "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; + +const asyncGetStorageAt = (address, slot) => + new Promise((resolve, reject) => { + web3.eth.getStorageAt(address, slot, (err, result) => { + if (err) { + return reject(err); + } + resolve(result); + }); }); -}); async function printMinterInfo(proxiedToken) { - for (const minter of minters) { - console.log("\nMinter: " + minter); + for (const minter of minters) { + console.log("\nMinter: " + minter); - let isMinter = await proxiedToken.isMinter.call(minter); - print("isMinter", isMinter, false); + let isMinter = await proxiedToken.isMinter.call(minter); + print("isMinter", isMinter, false); - let minterAllowance = await proxiedToken.minterAllowance.call(minter); - print("mintAllowance", minterAllowance, 0); + let minterAllowance = await proxiedToken.minterAllowance.call(minter); + print("mintAllowance", minterAllowance, 0); - let balanceOf = await proxiedToken.balanceOf.call(minter); - print("balanceOf", balanceOf, 0); + let balanceOf = await proxiedToken.balanceOf.call(minter); + print("balanceOf", balanceOf, 0); - let isBlacklisted = await proxiedToken.isBlacklisted.call(minter); - print("isBlacklisted", isBlacklisted, false); - } + let isBlacklisted = await proxiedToken.isBlacklisted.call(minter); + print("isBlacklisted", isBlacklisted, false); + } } function getAddressFromSlotData(slotData) { - const rawAddress = slotData.substring(26, 86); - return "0x" + rawAddress; + const rawAddress = slotData.substring(26, 86); + return "0x" + rawAddress; } function compare(actual, expected) { - if(actual == expected) - { - return "(ok)"; - } else { - return "(expect " + expected + ")"; - } + if (actual == expected) { + return "(ok)"; + } else { + return "(expect " + expected + ")"; + } } function print(name, actual, expected) { - console.log(name + "\t" + actual + "\t" + compare(actual, expected)); + console.log(name + "\t" + actual + "\t" + compare(actual, expected)); } async function Validate() { - console.log("Connecting to contract..."); - var token = await FiatToken.at(fiatTokenAddress); - console.log("Token found."); - var proxiedToken = await FiatToken.at(fiatTokenProxyAddress); - console.log("Proxied token created."); + console.log("Connecting to contract..."); + var token = await FiatToken.at(fiatTokenAddress); + console.log("Token found."); + var proxiedToken = await FiatToken.at(fiatTokenProxyAddress); + console.log("Proxied token created."); - // initialized needs to retrieved manually - var slot8Data = await asyncGetStorageAt(proxiedToken.address, 8); - var initialized = slot8Data.substring(24,26); - print("init proxy", initialized, "01"); + // initialized needs to retrieved manually + var slot8Data = await asyncGetStorageAt(proxiedToken.address, 8); + var initialized = slot8Data.substring(24, 26); + print("init proxy", initialized, "01"); - var slot8Data = await asyncGetStorageAt(fiatTokenAddress, 8); - var initialized = slot8Data.substring(24,26); - print("init logic", initialized, "01"); + var slot8Data = await asyncGetStorageAt(fiatTokenAddress, 8); + var initialized = slot8Data.substring(24, 26); + print("init logic", initialized, "01"); - var name = await proxiedToken.name.call(); - print("name ", name, NAME); + var name = await proxiedToken.name.call(); + print("name ", name, NAME); - var symbol = await proxiedToken.symbol.call(); - print("symbol ", symbol, SYMBOL); + var symbol = await proxiedToken.symbol.call(); + print("symbol ", symbol, SYMBOL); - var decimals = await proxiedToken.decimals.call(); - print("decimals", decimals, DECIMALS); + var decimals = await proxiedToken.decimals.call(); + print("decimals", decimals, DECIMALS); - var currency = await proxiedToken.currency.call(); - print("currency", currency, CURRENCY); + var currency = await proxiedToken.currency.call(); + print("currency", currency, CURRENCY); - var totalSupply = await proxiedToken.totalSupply.call(); - print("totalSupply", totalSupply, TOTALSUPPLY); + var totalSupply = await proxiedToken.totalSupply.call(); + print("totalSupply", totalSupply, TOTALSUPPLY); - var paused = await proxiedToken.paused.call(); - print("paused ", paused, PAUSED); + var paused = await proxiedToken.paused.call(); + print("paused ", paused, PAUSED); - // implementation - var implementation = await asyncGetStorageAt(proxiedToken.address, implSlot); - print("implement", getAddressFromSlotData(implementation), fiatTokenAddress); + // implementation + var implementation = await asyncGetStorageAt(proxiedToken.address, implSlot); + print("implement", getAddressFromSlotData(implementation), fiatTokenAddress); - var admin = await asyncGetStorageAt(proxiedToken.address, adminSlot); - print("upgrader", getAddressFromSlotData(admin), UPGRADER); + var admin = await asyncGetStorageAt(proxiedToken.address, adminSlot); + print("upgrader", getAddressFromSlotData(admin), UPGRADER); - var owner = await proxiedToken.owner.call(); - print("owner ", owner, OWNER); + var owner = await proxiedToken.owner.call(); + print("owner ", owner, OWNER); - var masterMinter = await proxiedToken.masterMinter.call(); - print("masterMinter", masterMinter, MASTER_MINTER); + var masterMinter = await proxiedToken.masterMinter.call(); + print("masterMinter", masterMinter, MASTER_MINTER); - var pauser = await proxiedToken.pauser.call(); - print("pauser ", pauser, PAUSER); + var pauser = await proxiedToken.pauser.call(); + print("pauser ", pauser, PAUSER); - var blacklister = await proxiedToken.blacklister.call(); - print("blacklister", blacklister, BLACKLISTER); + var blacklister = await proxiedToken.blacklister.call(); + print("blacklister", blacklister, BLACKLISTER); - await printMinterInfo(proxiedToken); + await printMinterInfo(proxiedToken); } -module.exports = async function(callback) { - try { +module.exports = async function (callback) { + try { await Validate(); - } catch(e) { - - } - callback(); -} \ No newline at end of file + } catch (e) {} + callback(); +}; diff --git a/verification/verification_reporter.js b/verification/verification_reporter.js index 5457838bf..099d5f49a 100644 --- a/verification/verification_reporter.js +++ b/verification/verification_reporter.js @@ -1,26 +1,26 @@ -const mocha = require('mocha'); +const mocha = require("mocha"); const spec_reporter = mocha.reporters.Spec; const base_reporter = mocha.reporters.Base; const color = base_reporter.color; const inherits = mocha.utils.inherits; -const sheets = require('./GoogleSheets/index'); -const _ = require('lodash'); -const jsdiff = require('diff'); -const colors = require('colors'); +const sheets = require("./GoogleSheets/index"); +const _ = require("lodash"); +const jsdiff = require("diff"); +const colors = require("colors"); // Global variables for text output. -const green_x = color('bright pass', base_reporter.symbols.err); -const red_x = color('bright fail', base_reporter.symbols.err); -const green_ok = color('bright pass', base_reporter.symbols.ok); -const red_ok = color('bright fail', base_reporter.symbols.ok); -const indent = ' '; +const green_x = color("bright pass", base_reporter.symbols.err); +const red_x = color("bright fail", base_reporter.symbols.err); +const green_ok = color("bright pass", base_reporter.symbols.ok); +const red_ok = color("bright fail", base_reporter.symbols.ok); +const indent = " "; module.exports = verification_reporter; // Extends default Mocha reporter, 'Spec'. inherits(verification_reporter, spec_reporter); -function verification_reporter (runner) { +function verification_reporter(runner) { spec_reporter.call(this, runner); var spreadsheet; @@ -29,9 +29,9 @@ function verification_reporter (runner) { var pending = {}; // Runs before tests are executed. Loads tests from spreadsheet. - before('load_spreadsheet_tests', async function() { + before("load_spreadsheet_tests", async function () { this.timeout(200000); - console.log('Loading spreadsheet...\n'); + console.log("Loading spreadsheet...\n"); spreadsheet = await sheets.load().catch((err) => { console.log(err); }); @@ -39,27 +39,28 @@ function verification_reporter (runner) { }); // Runs at the beginning of each contract block execution. - runner.on('suite', function(suite) { + runner.on("suite", function (suite) { // If contract block title is marked 'Legacy', // we skip verification. (See README.verification) var legacy = suite.title.match(/Legacy/gi); if (legacy) { - console.log(indent + - 'This test file is marked "Legacy". Skipping verification.'); + console.log( + indent + 'This test file is marked "Legacy". Skipping verification.' + ); } // We also skip verification on the 'PausableTests' file. // Remove this block and the one indicated below to re-enable. var pausable_tests = suite.title.match(/PausableTests/gi); if (pausable_tests) { - console.log(indent + - 'Verification tool configured to skip PausableTests file.'); + console.log( + indent + "Verification tool configured to skip PausableTests file." + ); } - }); // Runs at the end of every test. - runner.on('test end', function (test) { + runner.on("test end", function (test) { // If contract block title is marked 'Legacy', // we skip verification. (See README.verification) var legacy = test.parent.title.match(/Legacy/gi); @@ -79,23 +80,37 @@ function verification_reporter (runner) { if (file) { file = file[0]; } else { - console.log(indent + color('pass', - 'Error parsing test title.\n' - + indent + 'Confirm file name is formatted correctly and included in contract \n' - + indent + 'block title. (See README.verification)')); + console.log( + indent + + color( + "pass", + "Error parsing test title.\n" + + indent + + "Confirm file name is formatted correctly and included in contract \n" + + indent + + "block title. (See README.verification)" + ) + ); return; } var id = test.title.match(/([a-z]{2,})([0-9]+)/g); if (id) { id = id[0]; } else { - console.log(indent + color('pass', - 'Error parsing test title.\n' - + indent + 'Confirm id is formatted correctly and included in test title.\n' - + indent + '(See README.verification)')); + console.log( + indent + + color( + "pass", + "Error parsing test title.\n" + + indent + + "Confirm id is formatted correctly and included in test title.\n" + + indent + + "(See README.verification)" + ) + ); return; } - var test_ran = test.title.replace(id, ''); + var test_ran = test.title.replace(id, ""); // Check if test is in UnitTestCompleteness tab and "cross-off" if it is. if (!_.isEmpty(spreadsheet.completeness)) { @@ -105,32 +120,53 @@ function verification_reporter (runner) { } // If test is marked pending in spreadsheet, record for later output. - if (spreadsheet.pending && (spreadsheet.pending[id] == test_ran)) { - console.log(indent + green_x + color('bright pass', ' pending')); + if (spreadsheet.pending && spreadsheet.pending[id] == test_ran) { + console.log(indent + green_x + color("bright pass", " pending")); pending[id] = test_ran; } else { // Verify test is in spreadsheet. if (spreadsheet[file]) { - let spreadsheet_test = spreadsheet[file][id] || spreadsheet_clone[file][id]; + let spreadsheet_test = + spreadsheet[file][id] || spreadsheet_clone[file][id]; if (spreadsheet_test) { // Verify test descriptions match. if (spreadsheet_test == test_ran) { console.log(indent + green_x); } else { // If test is in spreadsheet, but descriptions don't match. - console.log(indent + red_x - + color('fail', - ' test description inconsistent with spreadsheet for ' - + id + ', ' + file)); + console.log( + indent + + red_x + + color( + "fail", + " test description inconsistent with spreadsheet for " + + id + + ", " + + file + ) + ); // Print test description string diff. let diff = getStringDiff(test_ran, spreadsheet_test); console.log(indent + diff); - errs.push(red_x + color('fail', - ' Test descriptions do not match for ' - + id + ', ' + file) - + '\n' + indent + 'In spreadsheet: ' + spreadsheet_test - + '\n' + indent + 'In test file: ' + test_ran - + '\n' + indent + 'Diff: ' + diff); + errs.push( + red_x + + color( + "fail", + " Test descriptions do not match for " + id + ", " + file + ) + + "\n" + + indent + + "In spreadsheet: " + + spreadsheet_test + + "\n" + + indent + + "In test file: " + + test_ran + + "\n" + + indent + + "Diff: " + + diff + ); } // If test is included in spreadsheet, 'cross-off' by deleting. if (spreadsheet[file][id]) { @@ -138,36 +174,55 @@ function verification_reporter (runner) { } } else { // If test is not in spreadsheet. - console.log(indent + red_x - + color('fail', ' ' - + id + ' missing from spreadsheet tab ' + file)); - errs.push(red_x - + color('fail', ' Test ' + id + ' missing from ' - + file + ' spreadsheet tab.')); + console.log( + indent + + red_x + + color("fail", " " + id + " missing from spreadsheet tab " + file) + ); + errs.push( + red_x + + color( + "fail", + " Test " + id + " missing from " + file + " spreadsheet tab." + ) + ); } } else { // If test file not found in spreadsheet tabs. - console.log(indent + red_x - + color('fail', ' test file ' + file - + ' does not match a spreadsheet tab')); - errs.push(red_x - + color('fail', ' Test file ' + file - + ' missing from spreadsheet. Possible solutions:\n' - + '1. Ensure test is listed in correct spreadsheet tab.\n' - + '2. Ensure the tab name is included in the contract block title.\n' - + '(See README.verification)')); + console.log( + indent + + red_x + + color( + "fail", + " test file " + file + " does not match a spreadsheet tab" + ) + ); + errs.push( + red_x + + color( + "fail", + " Test file " + + file + + " missing from spreadsheet. Possible solutions:\n" + + "1. Ensure test is listed in correct spreadsheet tab.\n" + + "2. Ensure the tab name is included in the contract block title.\n" + + "(See README.verification)" + ) + ); } } }); // Runs at the end of test suite execution. Prints verification summary. - runner.on('end', function () { - console.log('\n\nSpreadsheet Verification Summary:\n'); + runner.on("end", function () { + console.log("\n\nSpreadsheet Verification Summary:\n"); // If there are pending tests included in the test suite... if (!_.isEmpty(pending)) { - console.log(color('bright pass', 'Pending Tests:')); - console.log('The following tests are included in the test suite, but\n' - + 'marked pending in the spreadsheet (delete -p flag once merged): '); + console.log(color("bright pass", "Pending Tests:")); + console.log( + "The following tests are included in the test suite, but\n" + + "marked pending in the spreadsheet (delete -p flag once merged): " + ); console.log(pending); } // Do not report tests that are missing from test suite but marked pending. @@ -175,52 +230,77 @@ function verification_reporter (runner) { // Print out any tests that are included in UnitTestCompleteness tab but // missing from the test suite. if (!_.isEmpty(spreadsheet.completeness)) { - console.log('\n' + red_x + color('bright fail', - ' UnitTestCompleteness tab includes tests that are not present in test suite:') - + '\n' + Object.keys(spreadsheet.completeness).toString()); + console.log( + "\n" + + red_x + + color( + "bright fail", + " UnitTestCompleteness tab includes tests that are not present in test suite:" + ) + + "\n" + + Object.keys(spreadsheet.completeness).toString() + ); } else { - console.log(green_ok + color('bright pass', - ' Test suite suite contains all tests in UnitTestCompleteness tab.')); + console.log( + green_ok + + color( + "bright pass", + " Test suite suite contains all tests in UnitTestCompleteness tab." + ) + ); } delete spreadsheet.completeness; // If all the tests in a tab are present, 'cross-off' tab by deleting. - for(var file in spreadsheet) { + for (var file in spreadsheet) { if (_.isEmpty(spreadsheet[file])) { delete spreadsheet[file]; } } // If all tests are 'crossed-off', print success. if (_.isEmpty(spreadsheet)) { - console.log('\n' + green_ok + color('bright pass', - ' Test suite contains all tests in spreadsheet.')); + console.log( + "\n" + + green_ok + + color("bright pass", " Test suite contains all tests in spreadsheet.") + ); } else { // If not all tests are 'crossed-off', print the tests remaining. - console.log(color('bright fail', - '\nTests missing from test suite (but included in spreadsheet):\n')); + console.log( + color( + "bright fail", + "\nTests missing from test suite (but included in spreadsheet):\n" + ) + ); console.log(spreadsheet); } // Print all errors where executed tests did not match spreadsheet. if (errs.length) { - console.log(color('bright fail', - '\nTests missing from spreadsheet (but included in test suite): ')); + console.log( + color( + "bright fail", + "\nTests missing from spreadsheet (but included in test suite): " + ) + ); errs.map((err) => { - console.log('\n' + err); + console.log("\n" + err); }); } else { - console.log('\n' + green_ok + color('bright pass', - ' Spreadsheet contains all tests in test suite.')); + console.log( + "\n" + + green_ok + + color("bright pass", " Spreadsheet contains all tests in test suite.") + ); } }); } - // Helper function that takes in two strings and returns a color coded diff. function getStringDiff(string1, string2) { - var diff = ''; + var diff = ""; var diff_list = jsdiff.diffChars(string1, string2); diff_list.map((part) => { // green for additions, red for deletions, grey for common parts - let color = part.added ? 'green' : part.removed ? 'red' : 'grey'; + let color = part.added ? "green" : part.removed ? "red" : "grey"; diff += part.value[color]; }); return diff; From 9544b9281f35283cf00c7814b8d6e1b3c06a5427 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:33 -0700 Subject: [PATCH 02/22] Update npm packages --- package.json | 45 +- yarn.lock | 8683 ++++++++++++++++++++++---------------------------- 2 files changed, 3755 insertions(+), 4973 deletions(-) diff --git a/package.json b/package.json index 30b542376..32d55d25a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "Fiat and non-fiat tokens part of the CENTRE network.", "main": "truffle-config.js", "directories": { - "lib": "lib", "test": "test" }, "scripts": { @@ -25,32 +24,34 @@ }, "homepage": "https://github.com/centrehq/centre-tokens#readme", "dependencies": { - "assert-diff": "^1.2.6", - "bignumber.js": "6.0.0", - "ethereumjs-abi": "^0.6.5", - "ethereumjs-tx": "1.3.1", - "g": "^2.0.1", - "ganache-cli": "6.1.0", - "lodash": "^4.17.13", - "mkdirp": "^0.5.1", - "npm": "^6.13.4", "openzeppelin-solidity": "1.11.0", - "path": "^0.12.7", - "q": "^1.5.1", - "truffle-hdwallet-provider": "^0.0.6", "zos-lib": "1.3.0" }, "devDependencies": { - "chai": "^4.1.2", + "assert-diff": "^3.0.1", + "bignumber.js": "9.0.0", + "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "chai-bignumber": "^2.0.2", - "colors": "^1.3.1", - "diff": "^3.5.0", - "googleapis": "^27.0.0", - "lite-server": "^2.4.0", - "mocha": "^5.2.0", + "chai-bignumber": "^3.0.0", + "colors": "^1.4.0", + "diff": "^4.0.2", + "ethereumjs-abi": "^0.6.8", + "ethereumjs-tx": "2.1.2", + "ganache-cli": "6.9.1", + "googleapis": "^50.0.0", + "lite-server": "^2.5.4", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "mocha": "^7.1.2", "prettier": "2.0.5", - "prettier-plugin-solidity": "^1.0.0-alpha.51", - "solidity-coverage": "^0.5.0" + "prettier-plugin-solidity": "1.0.0-alpha.51", + "q": "^1.5.1", + "solidity-coverage": "^0.7.5", + "truffle": "^5.1.24", + "truffle-hdwallet-provider": "^1.0.17" + }, + "engines": { + "node": ">= 12.0.0", + "yarn": ">= 1.21.1" } } diff --git a/yarn.lock b/yarn.lock index 271993edf..bfbe22c33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,986 +2,426 @@ # yarn lockfile v1 -"@mrmlnc/readdir-enhanced@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" +"@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== dependencies: - call-me-maybe "^1.0.1" - glob-to-regexp "^0.3.0" + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" -"@nodelib/fs.stat@^1.0.1": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz#50c1e2260ac0ed9439a181de3725a0168d59c48a" +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== -"@samverschueren/stream-to-observable@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" +"@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== dependencies: - any-observable "^0.3.0" + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -JSONStream@^1.3.4, JSONStream@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" +"@solidity-parser/parser@^0.6.0", "@solidity-parser/parser@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.6.1.tgz#113edceb51da7ab3ca14ebd4cc66fe64bcb9082e" + integrity sha512-MUA5kP9LdeTILeOsaz/k/qA4MdTNUxrn6q6HMYsMzQN5crU9bWKND2DaoWZhzofQM0VaTOaD8GFkCw1BYbNj5w== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@truffle/error@^0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.7.tgz#e9db39885575647ef08bf624b0c13fe46d41a209" + integrity sha512-UIfVKsXSXocKnn5+RNklUXNoGd/JVj7V8KmC48TQzmjU33HQI86PX0JDS7SpHMHasI3w9X//1q7Lu7nZtj3Zzg== + +"@truffle/interface-adapter@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.3.3.tgz#61305378cf81776769ef36c60d394e568ac4a2ee" + integrity sha512-l3I4WFTfnBSIfG96IOBRtAIE6AHDAxcOUJE7W5zh9hocQwzQlGWc2yEyyTcLa0656TTM8RxaZZ2S/KdHHMvCaw== + dependencies: + bn.js "^4.11.8" + ethers "^4.0.32" + lodash "^4.17.13" + web3 "1.2.2" + +"@truffle/provider@^0.1.17": + version "0.1.19" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.1.19.tgz#3e6f15fdd8475ca5d0c846d2b412cc823f1fb767" + integrity sha512-ke8iQmzW4Y99+8iff8xQcc+mCNU4AkwtaZ/iSpmVD8qpLytw8/DSNCm0RiEz9/+I93Q1zqI4Jnij/rXnkS2Njw== + dependencies: + "@truffle/error" "^0.0.7" + "@truffle/interface-adapter" "^0.3.0" + web3 "1.2.1" + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*": + version "13.13.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.5.tgz#96ec3b0afafd64a4ccea9107b75bf8489f0e5765" + integrity sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g== + +"@types/node@^10.12.18", "@types/node@^10.3.2": + version "10.17.21" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.21.tgz#c00e9603399126925806bed2d9a1e37da506965e" + integrity sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ== + +"@types/node@^12.6.1": + version "12.12.38" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.38.tgz#58841a382f231ad005dbb935c36d44aa1118a26b" + integrity sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA== + +"@web3-js/scrypt-shim@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz#0bf7529ab6788311d3e07586f7d89107c3bea2cc" + integrity sha512-ZtZeWCc/s0nMcdx/+rZwY1EcuRdemOK9ag21ty9UsHkFxsNb/AaoucUz0iPuyGe0Ku+PFuRmWZG7Z7462p9xPw== + dependencies: + scryptsy "^2.1.0" + semver "^6.3.0" + +"@web3-js/websocket@^1.0.29": + version "1.0.30" + resolved "https://registry.yarnpkg.com/@web3-js/websocket/-/websocket-1.0.30.tgz#9ea15b7b582cf3bf3e8bc1f4d3d54c0731a87f87" + integrity sha512-fDwrD47MiDrzcJdSeTLF75aCcxVVt8B1N74rA+vh2XCAvFy4tEWJjtnUtj2QG7/zlQ6g9cQ88bZFBxwd9/FmtA== dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" -abbrev@1, abbrev@~1.1.1: +abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= -abstract-leveldown@~2.6.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== dependencies: - xtend "~4.0.0" + event-target-shim "^5.0.0" -abstract-leveldown@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" +accepts@~1.3.4, accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== dependencies: - xtend "~4.0.0" + mime-types "~2.1.24" + negotiator "0.6.2" -accepts@~1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" +address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== -aes-js@^0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@4, agent-base@~4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - dependencies: - es6-promisify "^5.0.0" - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - dependencies: - es6-promisify "^5.0.0" - -agentkeepalive@^3.4.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.1.tgz#4eba75cf2ad258fc09efd506cdb8d8c2971d35a4" +agent-base@6: + version "6.0.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" + integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== dependencies: - humanize-ms "^1.2.1" + debug "4" -ajv@^5.1.1, ajv@^5.3.0: +ajv@^5.1.1: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" +ajv@^6.5.5: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" + integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - dependencies: - string-width "^2.0.0" - -ansi-escapes@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" -ansi-styles@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" - -ansicolors@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" - -ansistyles@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" - -any-observable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" +any-promise@1.3.0, any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= -"aproba@^1.1.2 || 2", aproba@^2.0.0: +anymatch@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - -archy@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" + normalize-path "^3.0.0" + picomatch "^2.0.4" + +app-module-path@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" + integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-flatten@^1.0.1, arr-flatten@^1.1.0: +arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-differ@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= arraybuffer.slice@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" + integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +arrify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== -asap@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" -assert-diff@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/assert-diff/-/assert-diff-1.2.6.tgz#1b44d6f24a7e3018f557768ee350ae9a732c2fc6" +assert-diff@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/assert-diff/-/assert-diff-3.0.1.tgz#41720c433a2cef91a7cd4cedd2b21b4ba8719512" + integrity sha512-TxoFgLKQCGHNBDMEayf0YKSEf0CS3Xxmmx1RX6dsiun+YkwqO3NEoy6kpmQkrTw9e3juLbi4TUtrppUrXiYfrw== dependencies: assert-plus "1.0.0" - json-diff "0.5.2" + json-diff "0.5.4" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assertion-error@^1.0.1: +assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - -ast-types@0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.10.1.tgz#f52fca9715579a14f841d67d7f8d25432ab6a3dd" - -ast-types@0.11.5: - version "0.11.5" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.5.tgz#9890825d660c03c28339f315e9fa0a360e31ec28" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= async-each-series@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-0.1.1.tgz#7617c1917401fd8ca4a28aadce3dbae98afeb432" + integrity sha1-dhfBkXQB/Yykooqtzj266Yr+tDI= -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async-eventemitter@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" - dependencies: - async "^2.4.0" - -async-eventemitter@ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c: - version "0.2.3" - resolved "https://codeload.github.com/ahultgren/async-eventemitter/tar.gz/fa06e39e56786ba541c180061dbf2c0a5bbf951c" - dependencies: - async "^2.4.0" +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@1.5.2, async@1.x, async@^1.4.2, async@^1.5.0: +async@1.5.2, async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - dependencies: - lodash "^4.17.10" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - -axios@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.17.1.tgz#2d8e3e5d0bdbd7327f91bc814f5c57660f81824d" - dependencies: - follow-redirects "^1.2.5" - is-buffer "^1.1.5" - -axios@^0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102" - dependencies: - follow-redirects "^1.3.0" - is-buffer "^1.1.5" - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.14, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - dependencies: - 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" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - dependencies: - 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" - -babel-helper-bindify-decorators@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-explode-class@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" - dependencies: - babel-helper-bindify-decorators "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-generator-functions@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-generators "^6.5.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-class-constructor-call@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-class-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" - dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-decorators@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" - dependencies: - babel-helper-explode-class "^6.24.1" - babel-plugin-syntax-decorators "^6.13.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-object-rest-spread@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-preset-env@^1.3.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^3.2.6" - invariant "^2.2.2" - semver "^5.3.0" - -babel-preset-es2015@^6.9.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.24.1" - babel-plugin-transform-es2015-classes "^6.24.1" - babel-plugin-transform-es2015-computed-properties "^6.24.1" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.24.1" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.24.1" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-plugin-transform-es2015-modules-systemjs "^6.24.1" - babel-plugin-transform-es2015-modules-umd "^6.24.1" - babel-plugin-transform-es2015-object-super "^6.24.1" - babel-plugin-transform-es2015-parameters "^6.24.1" - babel-plugin-transform-es2015-shorthand-properties "^6.24.1" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.24.1" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.24.1" - babel-plugin-transform-regenerator "^6.24.1" - -babel-preset-stage-1@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" - dependencies: - babel-plugin-transform-class-constructor-call "^6.24.1" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^6.24.1" - -babel-preset-stage-2@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" - dependencies: - babel-plugin-syntax-dynamic-import "^6.18.0" - babel-plugin-transform-class-properties "^6.24.1" - babel-plugin-transform-decorators "^6.24.1" - babel-preset-stage-3 "^6.24.1" - -babel-preset-stage-3@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-generator-functions "^6.24.1" - babel-plugin-transform-async-to-generator "^6.24.1" - babel-plugin-transform-exponentiation-operator "^6.24.1" - babel-plugin-transform-object-rest-spread "^6.22.0" - -babel-register@^6.26.0, babel-register@^6.9.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - dependencies: - 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" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - 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@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - 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" - -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" + version "1.9.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" + integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== -babelify@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" +axios@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" + integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ== dependencies: - babel-core "^6.0.14" - object-assign "^4.0.0" - -babylon@^6.17.3, babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - -babylon@^7.0.0-beta.47: - version "7.0.0-beta.47" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.47.tgz#6d1fa44f0abec41ab7c780481e62fd9aafbdea80" + follow-redirects "1.5.10" + is-buffer "^2.0.2" backo2@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - -backoff@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" - dependencies: - precond "0.2" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base-x@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base64-arraybuffer@0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= + +base64-js@^1.0.2, base64-js@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== base64id@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== dependencies: cache-base "^1.0.1" class-utils "^0.3.5" @@ -994,30 +434,31 @@ base@^0.11.1: batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= dependencies: tweetnacl "^0.14.3" better-assert@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= dependencies: callsite "1.0.0" -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - -bignumber.js@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-6.0.0.tgz#bbfa047644609a5af093e9cbd83b0461fa3f6002" +bignumber.js@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" + integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== -bignumber.js@^7.2.0: +bignumber.js@^7.0.0, bignumber.js@^7.2.0: version "7.2.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": version "2.0.7" @@ -1027,91 +468,91 @@ bignumber.js@^7.2.0: version "2.0.7" resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" -bin-links@^1.1.2, bin-links@^1.1.6: - version "1.1.7" - resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.7.tgz#34b79ea9d0e575d7308afeff0c6b2fc24c793359" - dependencies: - bluebird "^3.5.3" - cmd-shim "^3.0.0" - gentle-fs "^2.3.0" - graceful-fs "^4.1.15" - npm-normalize-package-bin "^1.0.0" - write-file-atomic "^2.3.0" - binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== -binaryextensions@2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.1.tgz#3209a51ca4a4ad541a3b8d3d6a6d5b83a2485935" - -bindings@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7" +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -bip39@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" +bindings@^1.2.1, bindings@^1.3.1, bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== dependencies: - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - safe-buffer "^5.0.1" - unorm "^1.3.3" + file-uri-to-path "1.0.0" -bip66@^1.1.3: +bip66@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= dependencies: safe-buffer "^5.0.1" -blob@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" +bl@^1.0.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" + integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +blob@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" + integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: +bluebird@^3.5.0: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== bn.js@4.11.6: version "4.11.6" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.3, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: +bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -boxen@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - dependencies: - 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" +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== -brace-expansion@^1.1.7: - version "1.1.11" +body-parser@1.19.0, body-parser@^1.16.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +brace-expansion@^1.1.7: + version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== dependencies: arr-flatten "^1.1.0" array-unique "^0.3.2" @@ -1124,54 +565,74 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browser-sync-ui@v1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-sync-ui/-/browser-sync-ui-1.0.1.tgz#9740527b26d1d7ace259acc0c79e5b5e37d0fdf2" +browser-sync-client@^2.26.6: + version "2.26.6" + resolved "https://registry.yarnpkg.com/browser-sync-client/-/browser-sync-client-2.26.6.tgz#e5201d3ace8aee88af17656b7b0c0620b6f8e4ab" + integrity sha512-mGrkZdNzttKdf/16I+y+2dTQxoMCIpKbVIMJ/uP8ZpnKu9f9qa/2CYVtLtbjZG8nsM14EwiCrjuFTGBEnT3Gjw== + dependencies: + etag "1.8.1" + fresh "0.5.2" + mitt "^1.1.3" + rxjs "^5.5.6" + +browser-sync-ui@^2.26.4: + version "2.26.4" + resolved "https://registry.yarnpkg.com/browser-sync-ui/-/browser-sync-ui-2.26.4.tgz#3772f13c6b93f2d7d333f4be0ca1ec02aae97dba" + integrity sha512-u20P3EsZoM8Pt+puoi3BU3KlbQAH1lAcV+/O4saF26qokrBqIDotmGonfWwoRbUmdxZkM9MBmA0K39ZTG1h4sA== dependencies: async-each-series "0.1.1" - connect-history-api-fallback "^1.1.0" - immutable "^3.7.6" + connect-history-api-fallback "^1" + immutable "^3" server-destroy "1.0.1" - socket.io-client "2.0.4" + socket.io-client "^2.0.4" stream-throttle "^0.1.3" -browser-sync@^2.24.4: - version "2.24.6" - resolved "https://registry.yarnpkg.com/browser-sync/-/browser-sync-2.24.6.tgz#dacb9b2d8f985cfc4e55b9ca881f5a5970617ee8" +browser-sync@^2.26.7: + version "2.26.7" + resolved "https://registry.yarnpkg.com/browser-sync/-/browser-sync-2.26.7.tgz#120287716eb405651a76cc74fe851c31350557f9" + integrity sha512-lY3emme0OyvA2ujEMpRmyRy9LY6gHLuTr2/ABxhIm3lADOiRXzP4dgekvnDrQqZ/Ec2Fz19lEjm6kglSG5766w== dependencies: - browser-sync-ui v1.0.1 + browser-sync-client "^2.26.6" + browser-sync-ui "^2.26.4" bs-recipes "1.3.4" - chokidar "1.7.0" + bs-snippet-injector "^2.0.1" + chokidar "^2.0.4" connect "3.6.6" - connect-history-api-fallback "^1.5.0" + connect-history-api-fallback "^1" dev-ip "^1.0.1" - easy-extender "2.3.2" - eazy-logger "3.0.2" + easy-extender "^2.3.4" + eazy-logger "^3" etag "^1.8.1" fresh "^0.5.2" fs-extra "3.0.1" http-proxy "1.15.2" - immutable "3.8.2" - localtunnel "1.9.0" - micromatch "2.3.11" - opn "4.0.2" + immutable "^3" + localtunnel "1.9.2" + micromatch "^3.1.10" + opn "5.3.0" portscanner "2.1.1" qs "6.2.3" raw-body "^2.3.2" resp-modifier "6.0.2" rx "4.1.0" + send "0.16.2" serve-index "1.9.1" serve-static "1.13.2" server-destroy "1.0.1" @@ -1179,9 +640,10 @@ browser-sync@^2.24.4: ua-parser-js "0.7.17" yargs "6.4.0" -browserify-aes@^1.0.6: +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: buffer-xor "^1.0.3" cipher-base "^1.0.0" @@ -1190,91 +652,117 @@ browserify-aes@^1.0.6: inherits "^2.0.1" safe-buffer "^5.0.1" -browserify-sha3@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/browserify-sha3/-/browserify-sha3-0.0.1.tgz#3ff34a3006ef15c0fb3567e541b91a2340123d11" +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== dependencies: - js-sha3 "^0.3.1" + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" -browserslist@^3.2.6: - version "3.2.8" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= dependencies: - caniuse-lite "^1.0.30000844" - electron-to-chromium "^1.3.47" + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.1.0.tgz#4fe971b379a5aeb4925e06779f9fa1f41d249d70" + integrity sha512-VYxo7cDCeYUoBZ0ZCy4UyEUCP3smyBd4DRQM5nrFS1jJjPJjX7rP3oLRpPoWfkhQfyJ0I9ZbHbKafrFD/SGlrg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.2" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" bs-recipes@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/bs-recipes/-/bs-recipes-1.3.4.tgz#0d2d4d48a718c8c044769fdc4f89592dc8b69585" + integrity sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU= -bs58@^2.0.1: +bs-snippet-injector@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" + resolved "https://registry.yarnpkg.com/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz#61b5393f11f52559ed120693100343b6edb04dd5" + integrity sha1-YbU5PxH1JVntEgaTEANDtu2wTdU= -bs58@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" - dependencies: - base-x "^1.1.0" +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== -bs58check@^1.0.8: - version "1.3.4" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== dependencies: - bs58 "^3.1.0" - create-hash "^1.1.0" + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - -byte-size@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - -cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: - version "12.0.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" +buffer@^5.0.5, buffer@^5.2.1: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" + base64-js "^1.0.2" + ieee754 "^1.1.4" + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: collection-visit "^1.0.0" component-emitter "^1.2.1" @@ -1286,74 +774,67 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -call-limit@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.1.tgz#ef15f2670db3f1992557e2d965abc459e6e358d4" - -call-me-maybe@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" callsite@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= -camelcase@^4.0.0, camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - -caniuse-lite@^1.0.30000844: - version "1.0.30000877" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000877.tgz#f189673b86ecc06436520e3e391de6a13ca923b4" - -capture-stack-trace@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= chai-as-promised@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" + integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== dependencies: check-error "^1.0.2" -chai-bignumber@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/chai-bignumber/-/chai-bignumber-2.0.2.tgz#de6c219c690b2d66b646ad6930096f9ba2199643" +chai-bignumber@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chai-bignumber/-/chai-bignumber-3.0.0.tgz#e90cf1f468355bbb11a9acd051222586cd2648a9" + integrity sha512-SubOtaSI2AILWTWe2j0c6i2yFT/f9J6UBjeVGDuwDiPLkF/U5+/eTWUE3sbCZ1KgcPF6UJsDVYbIxaYA097MQA== -chai@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c" +chai@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" + integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== dependencies: - assertion-error "^1.0.1" - check-error "^1.0.1" - deep-eql "^3.0.0" + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" get-func-name "^2.0.0" - pathval "^1.0.0" - type-detect "^4.0.0" + pathval "^1.1.0" + type-detect "^4.0.5" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -1361,72 +842,63 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" +chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" - dependencies: - ansi-styles "~1.0.0" - has-color "~0.1.0" - strip-ansi "~0.1.0" - -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - -check-error@^1.0.1, check-error@^1.0.2: +check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -checkpoint-store@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" - dependencies: - functional-red-black-tree "^1.0.1" +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" -chokidar@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" +chokidar@^2.0.4: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" is-binary-path "^1.0.0" - is-glob "^2.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" path-is-absolute "^1.0.0" - readdirp "^2.0.0" + readdirp "^2.2.1" + upath "^1.1.1" optionalDependencies: - fsevents "^1.0.0" - -chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" - -ci-info@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + fsevents "^1.2.7" -cidr-regex@^2.0.10: - version "2.0.10" - resolved "https://registry.yarnpkg.com/cidr-regex/-/cidr-regex-2.0.10.tgz#af13878bd4ad704de77d6dc800799358b3afa70d" - dependencies: - ip-regex "^2.1.0" +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -1434,311 +906,213 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== dependencies: arr-union "^3.1.0" define-property "^0.2.5" isobject "^3.0.0" static-extend "^0.1.1" -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - cli-color@~0.1.6: version "0.1.7" resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-0.1.7.tgz#adc3200fa471cc211b0da7f566b71e98b9d67347" + integrity sha1-rcMgD6RxzCEbDaf1ZrcemLnWc0c= dependencies: es5-ext "0.8.x" -cli-columns@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-3.1.2.tgz#6732d972979efc2ae444a1f08e08fa139c96a18e" - dependencies: - string-width "^2.0.0" - strip-ansi "^3.0.1" - -cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - dependencies: - restore-cursor "^2.0.0" - -cli-spinners@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" - -cli-table3@^0.5.0, cli-table3@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" - dependencies: - object-assign "^4.1.0" - string-width "^2.1.1" - optionalDependencies: - colors "^1.1.2" - -cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - dependencies: - colors "1.0.3" - -cli-truncate@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" - dependencies: - slice-ansi "0.0.4" - string-width "^1.0.1" - -cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" -clone-response@1.0.2: +clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= dependencies: mimic-response "^1.0.0" -clone-stats@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" - -clone-stats@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" - -clone@^1.0.0, clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - -clone@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - -clone@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" - -cloneable-readable@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65" - dependencies: - inherits "^2.0.1" - process-nextick-args "^2.0.0" - readable-stream "^2.3.5" - -cmd-shim@^3.0.0, cmd-shim@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-3.0.3.tgz#2c35238d3df37d98ecdd7d5f6b8dc6b21cadc7cb" - dependencies: - graceful-fs "^4.1.2" - mkdirp "~0.5.0" - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -coinstring@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/coinstring/-/coinstring-2.3.0.tgz#cdb63363a961502404a25afb82c2e26d5ff627a4" - dependencies: - bs58 "^2.0.1" - create-hash "^1.1.1" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= dependencies: map-visit "^1.0.0" object-visit "^1.0.0" color-convert@^1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: - color-name "1.1.1" - -color-name@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" - -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + color-name "1.1.3" -colors@^1.1.2, colors@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.1.tgz#4accdb89cf2cabc7f982771925e9468784f32f3d" +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -columnify@~1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" - dependencies: - strip-ansi "^3.0.0" - wcwidth "^1.0.0" +colors@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@1.0.6, combined-stream@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -commander@2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - commander@2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== -commander@^2.2.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" - -commander@~2.20.3: +commander@^2.2.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" +commander@~2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ= + dependencies: + graceful-readlink ">= 1.0.0" component-bind@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= -component-emitter@1.2.1, component-emitter@^1.2.1: +component-emitter@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== component-inherit@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0, concat-stream@^1.5.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -config-chain@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - -configstore@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" - dependencies: - dot-prop "^4.1.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - unique-string "^1.0.0" - write-file-atomic "^2.0.0" - xdg-basedir "^3.0.0" - -connect-history-api-fallback@^1.1.0, connect-history-api-fallback@^1.2.0, connect-history-api-fallback@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" +connect-history-api-fallback@^1, connect-history-api-fallback@^1.2.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== connect-logger@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/connect-logger/-/connect-logger-0.0.1.tgz#4d999978a1d20bb4608e7cd434d741652255174b" + integrity sha1-TZmZeKHSC7RgjnzUNNdBZSJVF0s= dependencies: moment "*" connect@3.6.6: version "3.6.6" resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" + integrity sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ= dependencies: debug "2.6.9" finalhandler "1.1.0" parseurl "~1.3.2" utils-merge "1.0.1" -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" -convert-source-map@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - -core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -create-error-class@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" +cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== dependencies: - capture-stack-trace "^1.0.0" + bn.js "^4.1.0" + elliptic "^6.0.0" -create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== dependencies: cipher-base "^1.0.1" inherits "^2.0.1" @@ -1746,9 +1120,10 @@ create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.4: +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== dependencies: cipher-base "^1.0.3" create-hash "^1.1.0" @@ -1757,24 +1132,10 @@ create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-fetch@^2.1.0, cross-fetch@^2.1.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.2.tgz#a47ff4f7fc712daba8f6a695a11c948440d45723" - dependencies: - node-fetch "2.1.2" - whatwg-fetch "2.0.4" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.5: +cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -1782,233 +1143,275 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -crypto-js@^3.1.4: - version "3.1.8" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.8.tgz#715f070bf6014f2ae992a98b3929258b713f08d5" - -crypto-js@^3.1.9-1: - version "3.1.9-1" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8" - -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" +crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" -cyclist@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" +crypto-js@^3.1.4, crypto-js@^3.1.9-1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" + integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== -dargs@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" -date-fns@^1.27.2: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" - -dateformat@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" - death@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + integrity sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg= -debug@2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - -debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9, debug@~2.6.4: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@3.1.0, debug@^3.1.0, debug@~3.1.0: +debug@3.1.0, debug@=3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" -debuglog@*, debuglog@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" +debug@3.2.6, debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@4.1.1, debug@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" -decamelize@^1.1.1: +decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= decompress-response@^3.2.0, decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= dependencies: mimic-response "^1.0.0" -deep-eql@^3.0.0: +decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" + integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== + dependencies: + file-type "^5.2.0" + is-stream "^1.1.0" + tar-stream "^1.5.2" + +decompress-tarbz2@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" + integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== + dependencies: + decompress-tar "^4.1.0" + file-type "^6.1.0" + is-stream "^1.1.0" + seek-bzip "^1.0.5" + unbzip2-stream "^1.0.9" + +decompress-targz@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" + integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== + dependencies: + decompress-tar "^4.1.1" + file-type "^5.2.0" + is-stream "^1.1.0" + +decompress-unzip@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" + integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + dependencies: + file-type "^3.8.0" + get-stream "^2.2.0" + pify "^2.3.0" + yauzl "^2.4.2" + +decompress@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" + integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== + dependencies: + decompress-tar "^4.0.0" + decompress-tarbz2 "^4.0.0" + decompress-targz "^4.0.0" + decompress-unzip "^4.0.1" + graceful-fs "^4.1.10" + make-dir "^1.0.0" + pify "^2.3.0" + strip-dirs "^2.0.0" + +deep-eql@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== dependencies: type-detect "^4.0.0" -deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - dependencies: - clone "^1.0.2" - -deferred-leveldown@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" - dependencies: - abstract-leveldown "~2.6.0" - -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== -define-properties@^1.1.3: +define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: object-keys "^1.0.12" define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= dependencies: is-descriptor "^1.0.0" define-property@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== dependencies: is-descriptor "^1.0.2" isobject "^3.0.1" -defined@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-conflict@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/detect-conflict/-/detect-conflict-1.0.1.tgz#088657a66a961c05019db7c4230883b1c6b4176e" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" +detect-port@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" + integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== dependencies: - repeating "^2.0.0" - -detect-indent@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + address "^1.0.1" + debug "^2.6.0" dev-ip@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0" + integrity sha1-p2o+0YVb56ASu4rBbLgPPADcKPA= -dezalgo@^1.0.0, dezalgo@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" - dependencies: - asap "^2.0.0" - wrappy "1" - -diff@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" - -diff@3.5.0, diff@^3.3.1, diff@^3.5.0: +diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" difflib@~0.2.1: version "0.2.4" resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" + integrity sha1-teMDYabbAjF21WKJLbhZQKcY9H4= dependencies: heap ">= 0.2.0" -dir-glob@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: - arrify "^1.0.1" - path-type "^3.0.0" + path-type "^4.0.0" -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - -dot-prop@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - dependencies: - is-obj "^1.0.0" +dir-to-object@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-to-object/-/dir-to-object-2.0.0.tgz#29723e9bd1c3e58e4f307bd04ff634c0370c8f8a" + integrity sha512-sXs0JKIhymON7T1UZuO2Ud6VTNAx/VTBXIl4+3mjb2RgfOpt+hectX0x04YqPOPdkeOAKoJuKqwqnXXURNPNEA== -dotenv@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== drbg.js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= dependencies: browserify-aes "^1.0.6" create-hash "^1.1.2" @@ -2017,74 +1420,63 @@ drbg.js@^1.0.1: dreamopt@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/dreamopt/-/dreamopt-0.6.0.tgz#d813ccdac8d39d8ad526775514a13dda664d6b4b" + integrity sha1-2BPM2sjTnYrVJndVFKE92mZNa0s= dependencies: wordwrap ">=0.0.2" duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -easy-extender@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/easy-extender/-/easy-extender-2.3.2.tgz#3d3248febe2b159607316d8f9cf491c16648221d" +easy-extender@^2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/easy-extender/-/easy-extender-2.3.4.tgz#298789b64f9aaba62169c77a2b3b64b4c9589b8f" + integrity sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q== dependencies: - lodash "^3.10.1" + lodash "^4.17.10" -eazy-logger@3.0.2: +eazy-logger@^3: version "3.0.2" resolved "https://registry.yarnpkg.com/eazy-logger/-/eazy-logger-3.0.2.tgz#a325aa5e53d13a2225889b2ac4113b2b9636f4fc" + integrity sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw= dependencies: tfunk "^3.0.1" ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecdsa-sig-formatter@1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz#1c595000f04a8897dfb85000892a0f4c33af86c3" +ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: safe-buffer "^5.0.1" -editions@^1.3.3: - version "1.3.4" - resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" - -editor@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -ejs@^2.5.9: - version "2.6.1" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0" - -electron-to-chromium@^1.3.47: - version "1.3.58" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.58.tgz#8267a4000014e93986d9d18c65a8b4022ca75188" - -elegant-spinner@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" +elliptic@6.3.3: + version "6.3.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" + integrity sha1-VILZZG1UvLif19mU/J4ulWiHbj8= + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + inherits "^2.0.1" -elliptic@^6.2.3: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" +elliptic@6.5.2, elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -2094,29 +1486,37 @@ elliptic@^6.2.3: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.0.0.tgz#48a2309cc8a1d2e9d23bc6a67c39b63032e76ea4" + integrity sha512-6p1NII1Vm62wni/VR/cUMauVQoxmLVb9csqQlvLz+hO2gk8U2UYDfXHQSUYIBKmZwAKz867IDqG7B+u0mj+M6w== encodeurl@~1.0.1, encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" -engine.io-client@~3.1.0: - version "3.1.6" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.1.6.tgz#5bdeb130f8b94a50ac5cbeb72583e7a4a063ddfd" +engine.io-client@~3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36" + integrity sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw== dependencies: component-emitter "1.2.1" component-inherit "0.0.3" @@ -2130,35 +1530,49 @@ engine.io-client@~3.1.0: xmlhttprequest-ssl "~1.5.4" yeast "0.1.2" -engine.io-client@~3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36" +engine.io-client@~3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.4.1.tgz#922ddb47eecdcb541136a93aeead24718fd05461" + integrity sha512-RJNmA+A9Js+8Aoq815xpGAsgWH1VoSYM//2VgIiu9lNOaHFfLpTjH4tOzktBpjIs5lvOfiNY1dwf+NuU6D38Mw== dependencies: component-emitter "1.2.1" component-inherit "0.0.3" - debug "~3.1.0" - engine.io-parser "~2.1.1" + debug "~4.1.0" + engine.io-parser "~2.2.0" has-cors "1.1.0" indexof "0.0.1" parseqs "0.0.5" parseuri "0.0.5" - ws "~3.3.1" + ws "~6.1.0" xmlhttprequest-ssl "~1.5.4" yeast "0.1.2" engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.2.tgz#4c0f4cff79aaeecbbdcfdea66a823c6085409196" + version "2.1.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" + integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== + dependencies: + after "0.8.2" + arraybuffer.slice "~0.0.7" + base64-arraybuffer "0.1.5" + blob "0.0.5" + has-binary2 "~1.0.2" + +engine.io-parser@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.0.tgz#312c4894f57d52a02b420868da7b5c1c84af80ed" + integrity sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w== dependencies: after "0.8.2" arraybuffer.slice "~0.0.7" base64-arraybuffer "0.1.5" - blob "0.0.4" + blob "0.0.5" has-binary2 "~1.0.2" engine.io@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.0.tgz#54332506f42f2edc71690d2f2a42349359f3bf7d" + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.1.tgz#b60281c35484a70ee0351ea0ebff83ec8c9522a2" + integrity sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w== dependencies: accepts "~1.3.4" base64id "1.0.0" @@ -2167,48 +1581,17 @@ engine.io@~3.2.0: engine.io-parser "~2.1.0" ws "~3.3.1" -enhanced-resolve@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" - -env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" - -envinfo@^5.7.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-5.10.0.tgz#503a9774ae15b93ea68bdfae2ccd6306624ea6df" - -err-code@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" - -errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0, error-ex@^1.3.1: +error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -error@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" - dependencies: - string-template "~0.2.1" - xtend "~4.0.0" - -es-abstract@^1.17.0-next.1: - version "1.17.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" +es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" @@ -2222,27 +1605,10 @@ es-abstract@^1.17.0-next.1: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" -es-abstract@^1.5.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== dependencies: is-callable "^1.1.4" is-date-object "^1.0.1" @@ -2251,28 +1617,53 @@ es-to-primitive@^1.2.1: es5-ext@0.8.x: version "0.8.2" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.8.2.tgz#aba8d9e1943a895ac96837a62a39b3f55ecd94ab" + integrity sha1-q6jZ4ZQ6iVrJaDemKjmz9V7NlKs= -es6-promise@^4.0.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== dependencies: - es6-promise "^4.0.3" + d "^1.0.1" + ext "^1.1.2" escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= dependencies: esprima "^2.7.1" estraverse "^1.9.1" @@ -2281,293 +1672,226 @@ escodegen@1.8.x: optionalDependencies: source-map "~0.2.0" +esprima-extract-comments@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz#0dacab567a5900240de6d344cf18c33617becbc9" + integrity sha512-sBQUnvJwpeE9QnPrxh7dpI/dp67erYG4WXEAreAMoelPRpMR7NWb4YtwRPn9b+H1uLQKl/qS8WYmyaljTpjIsw== + dependencies: + esprima "^4.0.0" + esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= -esprima@^4.0.0, esprima@~4.0.0: +esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@^1.8.1, etag@~1.8.1: +etag@1.8.1, etag@^1.8.1, etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - -eth-block-tracker@^2.2.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz#ab6d177e5b50128fa06d7ae9e0489c7484bac95e" - dependencies: - async-eventemitter ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c - eth-query "^2.1.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.3" - ethjs-util "^0.1.3" - json-rpc-engine "^3.6.0" - pify "^2.3.0" - tape "^4.6.3" - -eth-block-tracker@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" - dependencies: - eth-query "^2.1.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.3" - ethjs-util "^0.1.3" - json-rpc-engine "^3.6.0" - pify "^2.3.0" - tape "^4.6.3" - -eth-json-rpc-infura@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.1.2.tgz#04c5d0cee98619e93ba8a9842492b771b316e83a" - dependencies: - cross-fetch "^2.1.1" - eth-json-rpc-middleware "^1.5.0" - json-rpc-engine "^3.4.0" - json-rpc-error "^2.0.0" - tape "^4.8.0" - -eth-json-rpc-middleware@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" - dependencies: - async "^2.5.0" - eth-query "^2.1.2" - eth-tx-summary "^3.1.2" - ethereumjs-block "^1.6.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.2" - ethereumjs-vm "^2.1.0" - fetch-ponyfill "^4.0.0" - json-rpc-engine "^3.6.0" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - tape "^4.6.3" - -eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" - dependencies: - json-rpc-random-id "^1.0.0" - xtend "^4.0.1" - -eth-sig-util@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eth-ens-namehash@2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +ethereum-bloom-filters@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz#b7b80735e385dbb7f944ce6b4533e24511306060" + integrity sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ== dependencies: - ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" - ethereumjs-util "^5.1.1" + js-sha3 "^0.8.0" -eth-tx-summary@^3.1.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.3.tgz#a52d7215616888e012fbc083b3eacd28f3e64764" +ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== dependencies: - async "^2.1.2" bn.js "^4.11.8" - clone "^2.0.0" - concat-stream "^1.5.1" - end-of-stream "^1.1.0" - eth-query "^2.0.2" - ethereumjs-block "^1.4.1" - ethereumjs-tx "^1.1.1" - ethereumjs-util "^5.0.1" - ethereumjs-vm "2.3.4" - through2 "^2.0.3" - treeify "^1.0.1" - web3-provider-engine "^13.3.2" - -ethereum-common@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" - -ethereum-common@^0.0.18: - version "0.0.18" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" - -ethereumjs-abi@^0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" - dependencies: - bn.js "^4.10.0" - ethereumjs-util "^4.3.0" + ethereumjs-util "^6.0.0" -"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": - version "0.6.5" - resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7" - dependencies: - bn.js "^4.10.0" - ethereumjs-util "^5.0.0" - -ethereumjs-account@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" - dependencies: - ethereumjs-util "^5.0.0" - rlp "^2.0.0" - safe-buffer "^5.1.1" - -ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0, ethereumjs-block@~1.7.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" - dependencies: - async "^2.0.1" - ethereum-common "0.2.0" - ethereumjs-tx "^1.2.2" - ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" - -ethereumjs-common@~0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-0.4.1.tgz#27690a24a817b058cc3a2aedef9392e8d7d63984" - -ethereumjs-testrpc-sc@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-testrpc-sc/-/ethereumjs-testrpc-sc-6.1.2.tgz#bd1d8306abb2d51481f3f01538fa71fb7fd44a4d" - dependencies: - source-map-support "^0.5.3" - webpack-cli "^2.0.9" - -ethereumjs-tx@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.1.tgz#d6909abcfb37da6404fc18124d351eda20047dac" - dependencies: - ethereum-common "^0.0.18" - ethereumjs-util "^5.0.0" +ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz#4e75042473a64daec0ed9fe84323dd9576aa5dba" + integrity sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ== -ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: - version "1.3.7" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" +ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== dependencies: - ethereum-common "^0.0.18" - ethereumjs-util "^5.0.0" + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" -ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" +ethereumjs-util@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8" + integrity sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q== dependencies: - bn.js "^4.8.0" + bn.js "^4.11.0" create-hash "^1.1.2" - keccakjs "^0.2.0" + ethjs-util "0.1.6" + keccak "^1.0.2" rlp "^2.0.0" + safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz#3e0c0d1741471acf1036052d048623dee54ad642" +ethereumjs-util@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" + integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== dependencies: + "@types/bn.js" "^4.11.3" bn.js "^4.11.0" create-hash "^1.1.2" - ethjs-util "^0.1.3" - keccak "^1.0.2" - rlp "^2.0.0" - safe-buffer "^5.1.1" + ethjs-util "0.1.6" + keccak "^2.0.0" + rlp "^2.2.3" secp256k1 "^3.0.1" -ethereumjs-vm@2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.3.4.tgz#f635d7cb047571a1840a6e9a74d29de4488f8ad6" - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - ethereum-common "0.2.0" - ethereumjs-account "^2.0.3" - ethereumjs-block "~1.7.0" - ethereumjs-util "^5.1.3" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "^2.1.2" - rustbn.js "~0.1.1" - safe-buffer "^5.1.1" - -ethereumjs-vm@^2.0.2, ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4: - version "2.4.0" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.4.0.tgz#244f1e35f2755e537a13546111d1a4c159d34b13" - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - ethereumjs-account "^2.0.3" - ethereumjs-block "~1.7.0" - ethereumjs-common "~0.4.0" - ethereumjs-util "^5.2.0" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "^2.1.2" - rustbn.js "~0.2.0" - safe-buffer "^5.1.1" - -ethereumjs-wallet@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz#82763b1697ee7a796be7155da9dfb49b2f98cfdb" +ethers@4.0.0-beta.3: + version "4.0.0-beta.3" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.3.tgz#15bef14e57e94ecbeb7f9b39dd0a4bd435bc9066" + integrity sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog== dependencies: - aes-js "^0.2.3" - bs58check "^1.0.8" - ethereumjs-util "^4.4.0" - hdkey "^0.7.0" - scrypt.js "^0.2.0" - utf8 "^2.1.1" - uuid "^2.0.1" + "@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" + +ethers@^4.0.32: + version "4.0.47" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.47.tgz#91b9cd80473b1136dd547095ff9171bd1fc68c85" + integrity sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ== + dependencies: + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.5.2" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" ethjs-abi@0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.1.8.tgz#cd288583ed628cdfadaf8adefa3ba1dbcbca6c18" + integrity sha1-zSiFg+1ijN+tr4re+juh28vKbBg= dependencies: bn.js "4.11.6" js-sha3 "0.5.5" number-to-bn "1.7.0" -ethjs-util@^0.1.3: +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== dependencies: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + eventemitter3@1.x.x: version "1.2.0" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + integrity sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg= -evp_bytestokey@^1.0.3: +eventemitter3@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== dependencies: md5.js "^1.3.4" safe-buffer "^5.1.1" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" + cross-spawn "^6.0.0" + get-stream "^4.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" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -2577,52 +1901,73 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" +express@^4.14.0: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== dependencies: - homedir-polyfill "^1.0.1" + type "^2.0.0" extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.1, extend@~3.0.2: +extend@^3.0.2, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - -external-editor@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== dependencies: array-unique "^0.3.2" define-property "^1.0.0" @@ -2633,92 +1978,116 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-comments@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/extract-comments/-/extract-comments-1.1.0.tgz#b90bca033a056bd69b8ba1c6b6b120fc2ee95c18" + integrity sha512-dzbZV2AdSSVW/4E7Ti5hZdHWbA+Z80RJsJhr5uiL10oyjl/gy7/o+HI1HwK4/WSZhlq4SNKU3oUzXlM13Qx02Q== + dependencies: + esprima-extract-comments "^1.1.0" + parse-code-context "^1.0.0" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - -fake-merkle-patricia-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" - dependencies: - checkpoint-store "^1.1.0" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= -fast-glob@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.2.tgz#71723338ac9b4e0e2fff1d6748a2a13d5ed352bf" +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + +fast-glob@^3.0.3: + version "3.2.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" + integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A== dependencies: - "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.0.1" - glob-parent "^3.1.0" - is-glob "^4.0.0" - merge2 "^1.2.1" - micromatch "^3.1.10" + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.4: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fetch-ponyfill@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" - dependencies: - node-fetch "~1.7.1" - -figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" +fast-text-encoding@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.2.tgz#ff1ad5677bde049e0f8656aa6083a7ef2c5836e2" + integrity sha512-5rQdinSsycpzvAoHga2EDn+LRX1d5xLFsuNG0Kg61JrAT/tASXcLL0nf/33v+sAxlQcfYmWbTURa1mmAf55jGw== -figures@^1.7.0: +fastq@^1.6.0: version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.7.0.tgz#fcd79a08c5bd7ec5b55cd3f5c4720db551929801" + integrity sha512-YOadQRnHd5q6PogvAR/x62BGituF2ufiEA6s8aavQANw5YKHERI4AREboX6KotzP8oX2klxYF2wcV/7bn1clfQ== dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" + reusify "^1.0.4" -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= dependencies: - escape-string-regexp "^1.0.5" + pend "~1.2.0" -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" +file-type@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" +file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" + integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + +file-type@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" + integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" repeat-string "^1.6.1" to-regex-range "^2.1.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + finalhandler@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + integrity sha1-zgtoVbRYU+eRsvzGgARtiCU91/U= dependencies: debug "2.6.9" encodeurl "~1.0.1" @@ -2728,295 +2097,276 @@ finalhandler@1.1.0: statuses "~1.3.1" unpipe "~1.0.0" -find-npm-prefix@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" - -find-up@^1.0.0: +finalhandler@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - dependencies: - locate-path "^2.0.0" + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" -find-up@^3.0.0: +find-up@3.0.0, find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" -first-chunk-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70" - dependencies: - readable-stream "^2.0.2" - -flow-parser@^0.*: - version "0.76.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.76.0.tgz#f7d4c4d26df74805c3a0babd5d8ea4c2cd57190b" - -flush-write-stream@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= dependencies: - inherits "^2.0.1" - readable-stream "^2.0.4" + path-exists "^2.0.0" + pinkie-promise "^2.0.0" -follow-redirects@^1.2.5, follow-redirects@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.1.tgz#67a8f14f5a1f67f962c2c46469c79eaec0a90291" +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== dependencies: - debug "^3.1.0" + is-buffer "~2.0.3" -for-each@^0.3.2, for-each@~0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== dependencies: - is-callable "^1.1.3" + debug "=3.1.0" -for-in@^1.0.1, for-in@^1.0.2: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= form-data@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" - combined-stream "1.0.6" + combined-stream "^1.0.6" mime-types "^2.1.12" +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= dependencies: map-cache "^0.2.2" fresh@0.5.2, fresh@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -from2@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-1.3.0.tgz#88413baaa5f9a597cfde9221d86986cd3c061dfd" - dependencies: - inherits "~2.0.1" - readable-stream "~1.1.10" - -from2@^2.1.0, from2@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" universalify "^0.1.0" -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== dependencies: graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - dependencies: - minipass "^2.2.1" + jsonfile "^4.0.0" + universalify "^0.1.0" -fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: - version "1.2.10" - resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36" +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== dependencies: - graceful-fs "^4.1.2" - path-is-inside "^1.0.1" - rimraf "^2.5.2" + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" -fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" + minipass "^2.6.0" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.0.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" +fsevents@^1.2.7: + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" + bindings "^1.5.0" + nan "^2.12.1" -function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - -g@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/g/-/g-2.0.1.tgz#0b5963ebd0ca70e3bc8c6766934a021821c8b857" - -ganache-cli@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.0.tgz#486c846497204b644166b5f0f74c9b41d02bdc25" +ganache-cli@6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.9.0.tgz#94d7e26964dff80b7382a33829ec75e15709a948" + integrity sha512-ZdL6kPrApXF/O+f6uU431OJcwxMk69H3KPDSHHrMP82ZvZRNpDHbR+rVv7XX/YUeoQ5q6nZ2AFiGiFAVn9pfzA== dependencies: - source-map-support "^0.5.3" - webpack-cli "^2.0.9" + ethereumjs-util "6.1.0" + source-map-support "0.5.12" + yargs "13.2.4" -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" +ganache-cli@6.9.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.9.1.tgz#1e13eee098fb9f19b031a191ec3f62ae926ea8b3" + integrity sha512-VPBumkNUZzXDRQwVOby5YyQpd5t1clkr06xMgB28lZdEIn5ht1GMwUskOTFOAxdkQ4J12IWP0gdeacVRGowqbA== dependencies: - 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" + ethereumjs-util "6.1.0" + source-map-support "0.5.12" + yargs "13.2.4" -gcp-metadata@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.6.3.tgz#4550c08859c528b370459bd77a7187ea0bdbc4ab" +gaxios@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.0.3.tgz#497730758f5b0d43a32ebdbebe5f1bd9f7db7aed" + integrity sha512-PkzQludeIFhd535/yucALT/Wxyj/y2zLyrMwPcJmnLHDugmV49NvAi/vb+VUq/eWztATZCNcb8ue+ywPG+oLuw== dependencies: - axios "^0.18.0" - extend "^3.0.1" - retry-axios "0.3.2" - -genfun@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" + abort-controller "^3.0.0" + extend "^3.0.2" + https-proxy-agent "^5.0.0" + is-stream "^2.0.0" + node-fetch "^2.3.0" -gentle-fs@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.3.0.tgz#13538db5029400f98684be4894e8a7d8f0d1ea7f" +gcp-metadata@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.1.0.tgz#8b9b5903882076948554af471c838e7ea2f564b4" + integrity sha512-r57SV28+olVsflPlKyVig3Muo/VDlcsObMtvDGOEtEJXj+DDE8bEl0coIkXh//hbkSDTvo+f5lbihZOndYXQQQ== dependencies: - aproba "^1.1.2" - chownr "^1.1.2" - cmd-shim "^3.0.3" - fs-vacuum "^1.2.10" - graceful-fs "^4.1.11" - iferr "^0.1.5" - infer-owner "^1.0.4" - mkdirp "^0.5.1" - path-is-inside "^1.0.2" - read-cmd-shim "^1.0.1" - slide "^1.1.6" + gaxios "^3.0.0" + json-bigint "^0.3.0" get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" -get-stream@3.0.0, get-stream@^3.0.0: +get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== dependencies: pump "^3.0.0" get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" -gh-got@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gh-got/-/gh-got-6.0.0.tgz#d74353004c6ec466647520a10bd46f7299d268d0" - dependencies: - got "^7.0.0" - is-plain-obj "^1.1.0" - -github-username@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/github-username/-/github-username-4.1.0.tgz#cbe280041883206da4212ae9e4b5f169c30bf417" - dependencies: - gh-got "^6.0.0" - -glob-all@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.1.0.tgz#8913ddfb5ee1ac7812656241b03d5217c64b02ab" - dependencies: - glob "^7.0.5" - yargs "~1.2.6" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" +ghost-testrpc@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== dependencies: - is-glob "^2.0.0" + chalk "^2.4.2" + node-emoji "^1.10.0" glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= dependencies: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-to-regexp@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" +glob-parent@^5.1.0, glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== + dependencies: + 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" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3028,6 +2378,7 @@ glob@7.1.2: glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= dependencies: inflight "^1.0.4" inherits "2" @@ -3035,9 +2386,10 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@~7.1.2: +glob@^7.0.0, glob@^7.1.3: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3046,112 +2398,107 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, gl once "^1.3.0" path-is-absolute "^1.0.0" -global-dirs@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - dependencies: - ini "^1.3.4" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" +global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" + global-prefix "^3.0.0" -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" global@~4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" + integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= dependencies: min-document "^2.19.0" process "~0.5.1" -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" - dependencies: - array-union "^1.0.1" - dir-glob "^2.0.0" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -globby@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" - dependencies: - array-union "^1.0.1" - dir-glob "^2.0.0" - fast-glob "^2.0.2" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -google-auth-library@^1.3.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-1.6.1.tgz#9c73d831ad720c0c3048ab89d0ffdec714d07dd2" - dependencies: - axios "^0.18.0" - gcp-metadata "^0.6.3" - gtoken "^2.3.0" - jws "^3.1.5" - lodash.isstring "^4.0.1" - lru-cache "^4.1.3" - retry-axios "^0.3.2" - -google-p12-pem@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-1.0.2.tgz#c8a3843504012283a0dbffc7430b7c753ecd4b07" +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== dependencies: - node-forge "^0.7.4" - pify "^3.0.0" + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" -googleapis@^27.0.0: - version "27.0.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-27.0.0.tgz#c210633b43e7047b65d33da40c489b6d8f9c02b8" +google-auth-library@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.0.0.tgz#f92576e9e920803634c258b25f091604c1379722" + integrity sha512-uLydy1t6SHN/EvYUJrtN3GCHFrnJ0c8HJjOxXiGjoTuYHIoCUT3jVxnzmjHwVnSdkfE9Akasm2rM6qG1COTXfQ== + dependencies: + arrify "^2.0.0" + base64-js "^1.3.0" + ecdsa-sig-formatter "^1.0.11" + fast-text-encoding "^1.0.0" + gaxios "^3.0.0" + gcp-metadata "^4.0.0" + gtoken "^5.0.0" + jws "^4.0.0" + lru-cache "^5.0.0" + +google-p12-pem@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.0.1.tgz#a220c05a8d7ee9751dd133ee72ecfc855820d5ab" + integrity sha512-VlQgtozgNVVVcYTXS36eQz4PXPt9gIPqLOhHN0QiV6W6h4qSCNVKPtKC5INtJsaHHF2r7+nOIa26MJeJMTaZEQ== dependencies: - google-auth-library "^1.3.1" - pify "^3.0.0" - qs "^6.5.1" - string-template "1.0.0" - uuid "^3.2.1" + node-forge "^0.9.0" -got@^6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - dependencies: - create-error-class "^3.0.0" +googleapis-common@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-4.1.1.tgz#433069ce463e50c631c5e1b5871f9d44881c90af" + integrity sha512-Br3EPgm1f7Zb/Vi8R+1Jc5jjhaFZMgQpvGaGAKcBq81BAi7m8NCHBaaR0XF3p4RbMjA4Wiz1RkPD0A8/5aP+xw== + dependencies: + extend "^3.0.2" + gaxios "^3.0.0" + google-auth-library "^6.0.0" + qs "^6.7.0" + url-template "^2.0.8" + uuid "^8.0.0" + +googleapis@^50.0.0: + version "50.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-50.0.0.tgz#861aacb96190f9a19dec19c08f0858369ecc1f4e" + integrity sha512-AJdOpPbDiNauraQZr51RR85cA53ygYtzLUj6Nq0cTr3g+GQ+GxjyLT6IMGgSE+/0dGLTpRVCemkZjZQA0XMb5Q== + dependencies: + google-auth-library "^6.0.0" + googleapis-common "^4.1.0" + +got@9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" -got@^7.0.0: +got@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== dependencies: decompress-response "^3.2.0" duplexer3 "^0.1.4" @@ -3168,130 +2515,106 @@ got@^7.0.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -got@^8.3.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.2, graceful-fs@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - -grouped-queue@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-0.3.3.tgz#c167d2a5319c5a0e0964ef6a25b7c2df8996c85c" - dependencies: - lodash "^4.17.2" +graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -growl@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= growl@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -gtoken@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-2.3.0.tgz#4e0ffc16432d7041a1b3dbc1d97aac17a5dc964a" +gtoken@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.0.1.tgz#b93f309d89adfe230bb0f24269b978284ba89e0f" + integrity sha512-33w4FNDkUcyIOq/TqyC+drnKdI4PdXmWp9lZzssyEQKuvu9ZFN3KttaSnDKo52U3E51oujVGop93mKxmqO8HHg== dependencies: - axios "^0.18.0" - google-p12-pem "^1.0.0" - jws "^3.1.4" + gaxios "^3.0.0" + google-p12-pem "^3.0.0" + jws "^4.0.0" mime "^2.2.0" - pify "^3.0.0" handlebars@^4.0.1: - version "4.5.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" + version "4.7.6" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" + integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== dependencies: + minimist "^1.2.5" neo-async "^2.6.0" - optimist "^0.6.1" source-map "^0.6.1" + wordwrap "^1.0.0" optionalDependencies: uglify-js "^3.1.4" har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= -har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" +har-validator@~5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== dependencies: - ajv "^5.3.0" + ajv "^6.5.5" har-schema "^2.0.0" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= dependencies: ansi-regex "^2.0.0" has-binary2@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" + integrity sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw== dependencies: isarray "2.0.1" -has-color@~0.1.0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" - has-cors@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + integrity sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk= has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== dependencies: has-symbol-support-x "^1.4.1" -has-unicode@^2.0.0, has-unicode@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -3300,6 +2623,7 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -3308,97 +2632,123 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= dependencies: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.1, has@^1.0.3, has@~1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== dependencies: inherits "^2.0.3" - minimalistic-assert "^1.0.1" + minimalistic-assert "^1.0.0" -hdkey@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-0.7.1.tgz#caee4be81aa77921e909b8d228dd0f29acaee632" +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: - coinstring "^2.0.0" - secp256k1 "^3.0.1" + inherits "^2.0.3" + minimalistic-assert "^1.0.1" he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== "heap@>= 0.2.0": version "0.2.6" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" + integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== -homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - dependencies: - parse-passwd "^1.0.0" +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -hosted-git-info@^2.1.4, hosted-git-info@^2.7.1, hosted-git-info@^2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" -http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" +http-errors@1.7.3, http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" -http-errors@1.6.3, http-errors@~1.6.2: +http-errors@~1.6.2: version "1.6.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= dependencies: depd "~1.1.2" inherits "2.0.3" setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - dependencies: - agent-base "4" - debug "3.1.0" +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= http-proxy@1.15.2: version "1.15.2" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.15.2.tgz#642fdcaffe52d3448d2bda3b0079e9409064da31" + integrity sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE= dependencies: eventemitter3 "1.x.x" requires-port "1.x.x" @@ -3406,233 +2756,168 @@ http-proxy@1.15.2: http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== dependencies: - ms "^2.0.0" + agent-base "6" + debug "4" -iconv-lite@0.4.23, iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - -iferr@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-1.0.2.tgz#e9fde49a9da06dc4a4194c6c9ed6d08305037a6d" - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== dependencies: - minimatch "^3.0.4" + punycode "2.1.0" -ignore@^3.3.5: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== -immediate@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" +ignore@^5.1.1: + version "5.1.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" + integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== -immutable@3.8.2, immutable@^3.7.6: +immutable@^3: version "3.8.2" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" - -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" - dependencies: - pkg-dir "^2.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@*, imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - dependencies: - repeating "^2.0.0" - -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM= indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= -infer-owner@^1.0.3, infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - -inflight@^1.0.4, inflight@~1.0.6: +inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -init-package-json@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" - dependencies: - glob "^7.1.1" - npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" - promzard "^0.3.0" - read "~1.0.1" - read-package-json "1 || 2" - semver "2.x || 3.x || 4 || 5" - validate-npm-package-license "^3.0.1" - validate-npm-package-name "^3.0.0" - -inquirer@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.1.0" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^5.5.2" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -interpret@^1.0.0, interpret@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - dependencies: - loose-envify "^1.0.0" +interpret@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== -ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= dependencies: kind-of "^3.0.2" is-accessor-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== dependencies: kind-of "^6.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= dependencies: binary-extensions "^1.0.0" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" +is-buffer@^2.0.2, is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" - -is-ci@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" - dependencies: - ci-info "^1.0.0" - -is-cidr@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-3.1.0.tgz#72e233d8e1c4cd1d3f11713fcce3eba7b0e3476f" - dependencies: - cidr-regex "^2.0.10" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= dependencies: kind-of "^3.0.2" is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== dependencies: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== dependencies: is-accessor-descriptor "^0.1.6" is-data-descriptor "^0.1.4" @@ -3641,276 +2926,196 @@ is-descriptor@^0.1.0: is-descriptor@^1.0.0, is-descriptor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== dependencies: is-accessor-descriptor "^1.0.0" is-data-descriptor "^1.0.0" kind-of "^6.0.2" -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== dependencies: is-plain-object "^2.0.4" -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -is-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= -is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= -is-installed-globally@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" - dependencies: - global-dirs "^0.1.0" - is-path-inside "^1.0.0" - -is-npm@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" +is-natural-number@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" + integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= is-number-like@^1.0.3: version "1.0.8" resolved "https://registry.yarnpkg.com/is-number-like/-/is-number-like-1.0.8.tgz#2e129620b50891042e44e9bbbb30593e75cfbbe3" + integrity sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA== dependencies: lodash.isfinite "^3.3.2" -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= dependencies: kind-of "^3.0.2" -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" + integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= -is-observable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" - dependencies: - symbol-observable "^1.1.0" - -is-path-inside@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - dependencies: - path-is-inside "^1.0.1" - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: +is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: +is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-redirect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - dependencies: - has "^1.0.1" - is-regex@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== dependencies: has "^1.0.3" -is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - -is-scoped@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-scoped/-/is-scoped-1.0.0.tgz#449ca98299e713038256289ecb2b540dc437cb30" - dependencies: - scoped-regex "^1.0.0" +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== -is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== dependencies: has-symbols "^1.0.1" -is-typedarray@~1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isarray@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" - -isbinaryfile@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -istanbul@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - -istextorbinary@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.2.1.tgz#a5231a08ef6dd22b268d0895084cf8d58b5bec53" - dependencies: - binaryextensions "2" - editions "^1.3.3" - textextensions "2" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= isurl@^1.0.0-alpha5: version "1.0.0" resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== dependencies: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" @@ -3918,22 +3123,22 @@ isurl@^1.0.0-alpha5: js-sha3@0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" + integrity sha1-uvDA6MVK1ZA0R9+Wreekobynmko= -js-sha3@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.3.1.tgz#86122802142f0828502a0d1dee1d95e253bb0243" - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-yaml@3.x: +js-yaml@3.13.1, js-yaml@3.x: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -3941,461 +3146,188 @@ js-yaml@3.x: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jscodeshift@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.4.1.tgz#da91a1c2eccfa03a3387a21d39948e251ced444a" - dependencies: - async "^1.5.0" - babel-plugin-transform-flow-strip-types "^6.8.0" - babel-preset-es2015 "^6.9.0" - babel-preset-stage-1 "^6.5.0" - babel-register "^6.9.0" - babylon "^6.17.3" - colors "^1.1.2" - flow-parser "^0.*" - lodash "^4.13.1" - micromatch "^2.3.7" - node-dir "0.1.8" - nomnom "^1.8.1" - recast "^0.12.5" - temp "^0.8.1" - write-file-atomic "^1.2.0" - -jscodeshift@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.5.1.tgz#4af6a721648be8638ae1464a190342da52960c33" - dependencies: - babel-plugin-transform-flow-strip-types "^6.8.0" - babel-preset-es2015 "^6.9.0" - babel-preset-stage-1 "^6.5.0" - babel-register "^6.9.0" - babylon "^7.0.0-beta.47" - colors "^1.1.2" - flow-parser "^0.*" - lodash "^4.13.1" - micromatch "^2.3.7" - neo-async "^2.5.0" - node-dir "0.1.8" - nomnom "^1.8.1" - recast "^0.15.0" - temp "^0.8.1" - write-file-atomic "^1.2.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" +json-bigint@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.3.0.tgz#0ccd912c4b8270d05f056fbd13814b53d3825b1e" + integrity sha1-DM2RLEuCcNBfBW+9E4FLU9OCWx4= + dependencies: + bignumber.js "^7.0.0" json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-diff@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/json-diff/-/json-diff-0.5.2.tgz#e0bc9e434cd2c4c6354487835e01bf3fed335cda" +json-diff@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/json-diff/-/json-diff-0.5.4.tgz#7bc8198c441756632aab66c7d9189d365a7a035a" + integrity sha512-q5Xmx9QXNOzOzIlMoYtLrLiu4Jl/Ce2bn0CNcv54PhyH89CI4GWlGVDye8ei2Ijt9R3U+vsWPsXpLUNob8bs8Q== dependencies: cli-color "~0.1.6" difflib "~0.2.1" dreamopt "~0.6.0" -json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - -json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: - version "3.7.3" - resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz#81dcabdb4f1ba5f79f99f04f560d20817908e4b5" - dependencies: - async "^2.0.1" - babel-preset-env "^1.3.2" - babelify "^7.3.0" - clone "^2.1.1" - json-rpc-error "^2.0.0" - promise-to-callback "^1.0.0" - -json-rpc-error@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" - dependencies: - inherits "^2.0.1" - -json-rpc-random-id@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" - json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - optionalDependencies: - graceful-fs "^4.1.6" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= jsonfile@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" +jsonschema@^1.2.4: + version "1.2.6" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.6.tgz#52b0a8e9dc06bbae7295249d03e4b9faee8a0c0b" + integrity sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA== jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= dependencies: assert-plus "1.0.0" extsprintf "1.3.0" json-schema "0.2.3" verror "1.10.0" -jwa@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.6.tgz#87240e76c9808dbde18783cf2264ef4929ee50e6" +jwa@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" + integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== dependencies: buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.10" + ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@^3.1.4, jws@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.5.tgz#80d12d05b293d1e841e7cb8b4e69e561adcf834f" +jws@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" + integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== dependencies: - jwa "^1.1.5" + jwa "^2.0.0" safe-buffer "^5.0.1" keccak@^1.0.2: version "1.4.0" resolved "https://registry.yarnpkg.com/keccak/-/keccak-1.4.0.tgz#572f8a6dbee8e7b3aa421550f9e6408ca2186f80" + integrity sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw== dependencies: bindings "^1.2.1" inherits "^2.0.3" nan "^2.2.1" safe-buffer "^5.1.0" -keccakjs@^0.2.0, keccakjs@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/keccakjs/-/keccakjs-0.2.1.tgz#1d633af907ef305bbf9f2fa616d56c44561dfa4d" +keccak@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" + integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== dependencies: - browserify-sha3 "^0.0.1" - sha3 "^1.1.0" + bindings "^1.5.0" + inherits "^2.0.4" + nan "^2.14.0" + safe-buffer "^5.2.0" -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== dependencies: json-buffer "3.0.0" kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= dependencies: is-buffer "^1.1.5" kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - optionalDependencies: - graceful-fs "^4.1.9" - -latest-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" - dependencies: - package-json "^4.0.0" - -lazy-property@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazy-property/-/lazy-property-1.0.0.tgz#84ddc4b370679ba8bd4cdcfa4c06b43d57111147" + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= dependencies: invert-kv "^1.0.0" -level-codec@~7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" - -level-errors@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" - dependencies: - errno "~0.1.1" - -level-errors@~1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" - dependencies: - errno "~0.1.1" - -level-iterator-stream@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" - dependencies: - inherits "^2.0.1" - level-errors "^1.0.3" - readable-stream "^1.0.33" - xtend "^4.0.0" - -level-ws@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" - dependencies: - readable-stream "~1.0.15" - xtend "~2.1.1" - -levelup@^1.2.1: - version "1.3.9" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== dependencies: - deferred-leveldown "~1.2.1" - level-codec "~7.0.0" - level-errors "~1.0.3" - level-iterator-stream "~1.3.0" - prr "~1.0.1" - semver "~5.4.1" - xtend "~4.0.0" + invert-kv "^2.0.0" levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" -libcipm@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-4.0.7.tgz#76cd675c98bdaae64db88b782b01b804b6d02c8a" - dependencies: - bin-links "^1.1.2" - bluebird "^3.5.1" - figgy-pudding "^3.5.1" - find-npm-prefix "^1.0.2" - graceful-fs "^4.1.11" - ini "^1.3.5" - lock-verify "^2.0.2" - mkdirp "^0.5.1" - npm-lifecycle "^3.0.0" - npm-logical-tree "^1.2.1" - npm-package-arg "^6.1.0" - pacote "^9.1.0" - read-package-json "^2.0.13" - rimraf "^2.6.2" - worker-farm "^1.6.0" - -libnpm@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/libnpm/-/libnpm-3.0.1.tgz#0be11b4c9dd4d1ffd7d95c786e92e55d65be77a2" - dependencies: - bin-links "^1.1.2" - bluebird "^3.5.3" - find-npm-prefix "^1.0.2" - libnpmaccess "^3.0.2" - libnpmconfig "^1.2.1" - libnpmhook "^5.0.3" - libnpmorg "^1.0.1" - libnpmpublish "^1.1.2" - libnpmsearch "^2.0.2" - libnpmteam "^1.0.2" - lock-verify "^2.0.2" - npm-lifecycle "^3.0.0" - npm-logical-tree "^1.2.1" - npm-package-arg "^6.1.0" - npm-profile "^4.0.2" - npm-registry-fetch "^4.0.0" - npmlog "^4.1.2" - pacote "^9.5.3" - read-package-json "^2.0.13" - stringify-package "^1.0.0" - -libnpmaccess@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.2.tgz#8b2d72345ba3bef90d3b4f694edd5c0417f58923" - dependencies: - aproba "^2.0.0" - get-stream "^4.0.0" - npm-package-arg "^6.1.0" - npm-registry-fetch "^4.0.0" - -libnpmconfig@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" - dependencies: - figgy-pudding "^3.5.1" - find-up "^3.0.0" - ini "^1.3.5" - -libnpmhook@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-5.0.3.tgz#4020c0f5edbf08ebe395325caa5ea01885b928f7" - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmorg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/libnpmorg/-/libnpmorg-1.0.1.tgz#5d2503f6ceb57f33dbdcc718e6698fea6d5ad087" - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmpublish@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.3.tgz#e3782796722d79eef1a0a22944c117e0c4ca4280" - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - lodash.clonedeep "^4.5.0" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - npm-registry-fetch "^4.0.0" - semver "^5.5.1" - ssri "^6.0.1" - -libnpmsearch@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/libnpmsearch/-/libnpmsearch-2.0.2.tgz#9a4f059102d38e3dd44085bdbfe5095f2a5044cf" - dependencies: - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmteam@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/libnpmteam/-/libnpmteam-1.0.2.tgz#8b48bcbb6ce70dd8150c950fcbdbf3feb6eec820" - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpx@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.0.tgz#1bf4a1c9f36081f64935eb014041da10855e3102" - dependencies: - dotenv "^5.0.1" - npm-package-arg "^6.0.0" - rimraf "^2.6.2" - safe-buffer "^5.1.0" - update-notifier "^2.3.0" - which "^1.3.0" - y18n "^4.0.0" - yargs "^11.0.0" - limiter@^1.0.5: - version "1.1.3" - resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.3.tgz#32e2eb55b2324076943e5d04c1185ffb387968ef" - -listr-silent-renderer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" - -listr-update-renderer@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - strip-ansi "^3.0.1" - -listr-verbose-renderer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" - dependencies: - chalk "^1.1.3" - cli-cursor "^1.0.2" - date-fns "^1.27.2" - figures "^1.7.0" - -listr@^0.14.1: - version "0.14.1" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.1.tgz#8a7afa4a7135cee4c921d128e0b7dfc6e522d43d" - dependencies: - "@samverschueren/stream-to-observable" "^0.3.0" - cli-truncate "^0.2.1" - figures "^1.7.0" - indent-string "^2.1.0" - is-observable "^1.1.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.4.0" - listr-verbose-renderer "^0.4.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - ora "^0.2.3" - p-map "^1.1.1" - rxjs "^6.1.0" - strip-ansi "^3.0.1" + version "1.1.5" + resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" + integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== -lite-server@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/lite-server/-/lite-server-2.4.0.tgz#e3e122885836b168895d7b6b4eca06047d204c0d" +lite-server@^2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/lite-server/-/lite-server-2.5.4.tgz#f1c1b25bb70ce0f83eb1ab0b08ef32c08accf4e2" + integrity sha512-57SverS67UqRFiRm0ktdzEG5yZeyzkywRJ9Q8PHVSGuLm9K97Mr6jF43XTu5v9lVe8g0WHJ4eKlIeGSd1Bq/sw== dependencies: - browser-sync "^2.24.4" + browser-sync "^2.26.7" connect-history-api-fallback "^1.2.0" connect-logger "0.0.1" - lodash "^4.11.1" + lodash "^4.17.15" minimist "1.2.0" load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -4403,323 +3335,131 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -loader-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -localtunnel@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/localtunnel/-/localtunnel-1.9.0.tgz#8ffecdcf8c8a14f62df1056cf9d54acbb0bb9a8f" +localtunnel@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/localtunnel/-/localtunnel-1.9.2.tgz#0012fcabc29cf964c130a01858768aa2bb65b5af" + integrity sha512-NEKF7bDJE9U3xzJu3kbayF0WTvng6Pww7tzqNb/XtEARYwqw7CKEX7BvOMg98FtE9es2CRizl61gkV3hS8dqYg== dependencies: - axios "0.17.1" - debug "2.6.8" + axios "0.19.0" + debug "4.1.1" openurl "1.1.1" yargs "6.6.0" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" path-exists "^3.0.0" -lock-verify@^2.0.2, lock-verify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.1.0.tgz#fff4c918b8db9497af0c5fa7f6d71555de3ceb47" - dependencies: - npm-package-arg "^6.1.0" - semver "^5.4.1" +lodash.isfinite@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" + integrity sha1-+4m2WpqAKBgz8LdHizpRBPiY67M= -lockfile@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" - dependencies: - signal-exit "^3.0.2" - -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - -lodash._baseuniq@~4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" - dependencies: - lodash._createset "~4.0.0" - lodash._root "~3.0.0" - -lodash._bindcallback@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - dependencies: - lodash._getnative "^3.0.0" - -lodash._createset@~4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" - -lodash._getnative@*, lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._root@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - -lodash.assign@^4.0.3, lodash.assign@^4.0.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.clonedeep@^4.5.0, lodash.clonedeep@~4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - -lodash.isfinite@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - -lodash.restparam@*: - version "3.6.1" - resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" - -lodash.union@~4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - -lodash.uniq@~4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - -lodash.without@~4.4.0: +lodash.toarray@^4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" - -lodash@^3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.11.1, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0: - version "4.17.13" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.13.tgz#0bdc3a6adc873d2f4e0c4bac285df91b64fc7b93" - -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - dependencies: - chalk "^1.0.0" - -log-symbols@^2.1.0, log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - dependencies: - chalk "^2.0.1" + resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" + integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= -log-update@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" - dependencies: - ansi-escapes "^1.0.0" - cli-cursor "^1.0.2" +lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + chalk "^2.4.2" -lowercase-keys@^1.0.0: +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -lru-cache@^4.0.1, lru-cache@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@^5.1.1: +lru-cache@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" -ltgt@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" - -make-dir@^1.0.0, make-dir@^1.1.0: +make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== dependencies: pify "^3.0.0" -make-fetch-happen@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" - dependencies: - agentkeepalive "^3.4.1" - cacache "^12.0.0" - http-cache-semantics "^3.8.1" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - node-fetch-npm "^2.0.2" - promise-retry "^1.1.1" - socks-proxy-agent "^4.0.0" - ssri "^6.0.0" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: object-visit "^1.0.0" -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - md5.js@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== dependencies: hash-base "^3.0.0" inherits "^2.0.1" + safe-buffer "^5.1.2" -meant@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.1.tgz#66044fea2f23230ec806fb515efea29c44d2115d" - -mem-fs-editor@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-4.0.3.tgz#d282a0c4e0d796e9eff9d75661f25f68f389af53" - dependencies: - commondir "^1.0.1" - deep-extend "^0.6.0" - ejs "^2.5.9" - glob "^7.0.3" - globby "^7.1.1" - isbinaryfile "^3.0.2" - mkdirp "^0.5.0" - multimatch "^2.0.0" - rimraf "^2.2.8" - through2 "^2.0.0" - vinyl "^2.0.1" - -mem-fs@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/mem-fs/-/mem-fs-1.1.3.tgz#b8ae8d2e3fcb6f5d3f9165c12d4551a065d989cc" - dependencies: - through2 "^2.0.0" - vinyl "^1.1.0" - vinyl-file "^2.0.0" - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - dependencies: - mimic-fn "^1.0.0" - -memdown@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" - dependencies: - abstract-leveldown "~2.7.1" - functional-red-black-tree "^1.0.1" - immediate "^3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.1.1" +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -memory-fs@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= -merge2@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34" +merge2@^1.2.3, merge2@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== -merkle-patricia-tree@^2.1.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz#7d4e7263a9c85c1679187cad4a6d71f48d524c71" - dependencies: - async "^1.4.2" - ethereumjs-util "^5.0.0" - level-ws "0.0.0" - levelup "^1.2.1" - memdown "^1.0.0" - readable-stream "^2.0.0" - rlp "^2.0.0" - semaphore ">=1.0.1" - -micromatch@2.3.11, micromatch@^2.1.5, micromatch@^2.3.7: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.10: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -4735,78 +3475,102 @@ micromatch@^3.1.10: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@~1.35.0: - version "1.35.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: - version "2.1.19" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "~1.35.0" + mime-db "1.44.0" mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + version "2.4.5" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" + integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^1.0.0: +mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= dependencies: dom-walk "^0.1.0" minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@1.2.0, minimist@^1.2.0, minimist@~1.2.0: +minimist@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= -minimist@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - -minipass@^2.2.1: - version "2.3.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.3.5, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" @@ -4814,55 +3578,53 @@ minipass@^2.3.5, minipass@^2.8.6, minipass@^2.9.0: minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== dependencies: minipass "^2.9.0" -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" +mitt@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.2.0.tgz#cb24e6569c806e31bd4e3995787fe38a04fdf90d" + integrity sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw== mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" -mocha@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794" +mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: - browser-stdout "1.3.0" - commander "2.11.0" - debug "3.1.0" - diff "3.3.1" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.3" - he "1.1.1" - mkdirp "0.5.1" - supports-color "4.4.0" + minimist "^1.2.5" -mocha@^5.2.0: +mocha@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== dependencies: browser-stdout "1.3.1" commander "2.15.1" @@ -4876,49 +3638,75 @@ mocha@^5.2.0: mkdirp "0.5.1" supports-color "5.4.0" -moment@*: - version "2.22.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" +mocha@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" + integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mock-fs@^4.1.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.12.0.tgz#a5d50b12d2d75e5bec9dac3b67ffe3c41d31ade4" + integrity sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== + +moment@*: + version "2.25.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.3.tgz#252ff41319cf41e47761a1a88cab30edfe9808c0" + integrity sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg== ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.0.0: +ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -multimatch@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" - dependencies: - array-differ "^1.0.0" - array-union "^1.0.1" - arrify "^1.0.0" - minimatch "^3.0.0" +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -mute-stream@0.0.7, mute-stream@~0.0.4: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" +nan@^2.12.1, nan@^2.14.0, nan@^2.2.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== -nan@2.10.0, nan@^2.0.8, nan@^2.2.1, nan@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -4932,367 +3720,101 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" -needle@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0, neo-async@^2.6.0: +neo-async@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -nice-try@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= -node-dir@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.8.tgz#55fb8deb699070707fb67f91a460f0448294c77d" +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch-npm@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" +node-emoji@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" + integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw== dependencies: - encoding "^0.1.11" - json-parse-better-errors "^1.0.0" - safe-buffer "^5.1.1" - -node-fetch@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" + lodash.toarray "^4.4.0" -node-fetch@~1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" -node-forge@^0.7.4: - version "0.7.5" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" - -node-gyp@^5.0.2, node-gyp@^5.0.5: - version "5.0.7" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.0.7.tgz#dd4225e735e840cf2870e4037c2ed9c28a31719e" - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.2" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.1.2" - request "^2.88.0" - rimraf "^2.6.3" - semver "^5.7.1" - tar "^4.4.12" - which "^1.3.1" +node-fetch@^2.3.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - dependencies: - 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" - -nomnom@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" - dependencies: - chalk "~0.4.0" - underscore "~1.6.0" +node-forge@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5" + integrity sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ== nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= dependencies: abbrev "1" -nopt@^4.0.1, nopt@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: +normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" resolve "^1.10.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.0, normalize-path@^2.0.1: +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= dependencies: remove-trailing-separator "^1.0.1" -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -npm-audit-report@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.2.tgz#303bc78cd9e4c226415076a4f7e528c89fc77018" - dependencies: - cli-table3 "^0.5.0" - console-control-strings "^1.1.0" - -npm-bundled@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" - -npm-cache-filename@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz#ded306c5b0bfc870a9e9faf823bc5f283e05ae11" - -npm-install-checks@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-3.0.2.tgz#ab2e32ad27baa46720706908e5b14c1852de44d9" - dependencies: - semver "^2.3.0 || 3.x || 4 || 5" - -npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz#de6975c7d8df65f5150db110b57cce498b0b604c" - dependencies: - byline "^5.0.0" - graceful-fs "^4.1.15" - node-gyp "^5.0.2" - resolve-from "^4.0.0" - slide "^1.1.6" - uid-number "0.0.6" - umask "^1.1.0" - which "^1.3.1" - -npm-logical-tree@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" - -npm-normalize-package-bin@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - -"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0, npm-package-arg@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" - dependencies: - hosted-git-info "^2.7.1" - osenv "^0.1.5" - semver "^5.6.0" - validate-npm-package-name "^3.0.0" - -npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-pick-manifest@^3.0.0, npm-pick-manifest@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - -npm-profile@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.2.tgz#8272a71c19634d0dce9c35a5daf8ee589cbb0f52" - dependencies: - aproba "^1.1.2 || 2" - figgy-pudding "^3.4.1" - npm-registry-fetch "^4.0.0" +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" - dependencies: - JSONStream "^1.3.4" - bluebird "^3.5.1" - figgy-pudding "^3.4.1" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - npm-package-arg "^6.1.0" - safe-buffer "^5.2.0" +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" -npm-user-validate@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" - -npm@^6.13.4: - version "6.13.4" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.13.4.tgz#1e95b0f311999cf682384c38865dfeb3127203bb" - dependencies: - JSONStream "^1.3.5" - abbrev "~1.1.1" - ansicolors "~0.3.2" - ansistyles "~0.1.3" - aproba "^2.0.0" - archy "~1.0.0" - bin-links "^1.1.6" - bluebird "^3.5.5" - byte-size "^5.0.1" - cacache "^12.0.3" - call-limit "^1.1.1" - chownr "^1.1.3" - ci-info "^2.0.0" - cli-columns "^3.1.2" - cli-table3 "^0.5.1" - cmd-shim "^3.0.3" - columnify "~1.5.4" - config-chain "^1.1.12" - debuglog "*" - detect-indent "~5.0.0" - detect-newline "^2.1.0" - dezalgo "~1.0.3" - editor "~1.0.0" - figgy-pudding "^3.5.1" - find-npm-prefix "^1.0.2" - fs-vacuum "~1.2.10" - fs-write-stream-atomic "~1.0.10" - gentle-fs "^2.3.0" - glob "^7.1.4" - graceful-fs "^4.2.3" - has-unicode "~2.0.1" - hosted-git-info "^2.8.5" - iferr "^1.0.2" - imurmurhash "*" - infer-owner "^1.0.4" - inflight "~1.0.6" - inherits "^2.0.4" - ini "^1.3.5" - init-package-json "^1.10.3" - is-cidr "^3.0.0" - json-parse-better-errors "^1.0.2" - lazy-property "~1.0.0" - libcipm "^4.0.7" - libnpm "^3.0.1" - libnpmaccess "^3.0.2" - libnpmhook "^5.0.3" - libnpmorg "^1.0.1" - libnpmsearch "^2.0.2" - libnpmteam "^1.0.2" - libnpx "^10.2.0" - lock-verify "^2.1.0" - lockfile "^1.0.4" - lodash._baseindexof "*" - lodash._baseuniq "~4.6.0" - lodash._bindcallback "*" - lodash._cacheindexof "*" - lodash._createcache "*" - lodash._getnative "*" - lodash.clonedeep "~4.5.0" - lodash.restparam "*" - lodash.union "~4.6.0" - lodash.uniq "~4.5.0" - lodash.without "~4.4.0" - lru-cache "^5.1.1" - meant "~1.0.1" - mississippi "^3.0.0" - mkdirp "~0.5.1" - move-concurrently "^1.0.1" - node-gyp "^5.0.5" - nopt "~4.0.1" - normalize-package-data "^2.5.0" - npm-audit-report "^1.3.2" - npm-cache-filename "~1.0.2" - npm-install-checks "^3.0.2" - npm-lifecycle "^3.1.4" - npm-package-arg "^6.1.1" - npm-packlist "^1.4.7" - npm-pick-manifest "^3.0.2" - npm-profile "^4.0.2" - npm-registry-fetch "^4.0.2" - npm-user-validate "~1.0.0" - npmlog "~4.1.2" - once "~1.4.0" - opener "^1.5.1" - osenv "^0.1.5" - pacote "^9.5.11" - path-is-inside "~1.0.2" - promise-inflight "~1.0.1" - qrcode-terminal "^0.12.0" - query-string "^6.8.2" - qw "~1.0.1" - read "~1.0.7" - read-cmd-shim "^1.0.5" - read-installed "~4.0.3" - read-package-json "^2.1.1" - read-package-tree "^5.3.1" - readable-stream "^3.4.0" - readdir-scoped-modules "^1.1.0" - request "^2.88.0" - retry "^0.12.0" - rimraf "^2.6.3" - safe-buffer "^5.1.2" - semver "^5.7.1" - sha "^3.0.0" - slide "~1.1.6" - sorted-object "~2.0.1" - sorted-union-stream "~2.1.3" - ssri "^6.0.1" - stringify-package "^1.0.1" - tar "^4.4.13" - text-table "~0.2.0" - tiny-relative-date "^1.3.0" - uid-number "0.0.6" - umask "~1.1.0" - unique-filename "^1.1.1" - unpipe "~1.0.0" - update-notifier "^2.5.0" - uuid "^3.3.3" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "~3.0.0" - which "^1.3.1" - worker-farm "^1.7.0" - write-file-atomic "^2.4.3" - -npmlog@^4.0.2, npmlog@^4.1.2, npmlog@~4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - 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@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= number-to-bn@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= dependencies: bn.js "4.11.6" strip-hex-prefix "1.0.0" @@ -5300,18 +3822,22 @@ number-to-bn@1.7.0: oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" @@ -5320,36 +3846,29 @@ object-copy@^0.1.0: object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - -object-inspect@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - -object-keys@^1.0.8: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - -object-keys@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object-path@^0.9.0: version "0.9.2" resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.9.2.tgz#0fd9a74fc5fad1ae3968b586bda5c632bd6c05a5" + integrity sha1-D9mnT8X60a45aLWGvaXGMr1sBaU= object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= dependencies: isobject "^3.0.0" -object.assign@^4.1.0: +object.assign@4.1.0, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== dependencies: define-properties "^1.1.2" function-bind "^1.1.1" @@ -5359,369 +3878,258 @@ object.assign@^4.1.0: object.getownpropertydescriptors@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== dependencies: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" +oboe@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= dependencies: ee-first "1.1.1" -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0, once@~1.4.0: +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - dependencies: - mimic-fn "^1.0.0" - -opener@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - openurl@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/openurl/-/openurl-1.1.1.tgz#3875b4b0ef7a52c156f0db41d4609dbb0f94b387" + integrity sha1-OHW0sO96UsFW8NtB1GCduw+Us4c= openzeppelin-solidity@1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.11.0.tgz#f57a5e340aa45efd4a052f4bb514a7a619b0bbd0" + integrity sha512-s4hFpQ9nMvFQBUuY0OJ7PfvSEprPcUph/YGvlgqJYQc6rNjsreRSj9Iq6ftTFI2anlECvWg/wWnNdPq4Tih1FA== openzeppelin-solidity@~1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.10.0.tgz#d77eee6653f5958d051318a61ba0b436f92216c0" + integrity sha512-igkrumQQ2lrN2zjeQV4Dnb0GpTBj1fzMcd8HPyBUqwI0hhuscX/HzXiqKT6gFQl1j9Wy/ppVVs9fqL/foF7Gmg== -opn@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" +opn@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" + integrity sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g== dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" + is-wsl "^1.1.0" optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" - fast-levenshtein "~2.0.4" + fast-levenshtein "~2.0.6" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" - wordwrap "~1.0.0" - -ora@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" - dependencies: - chalk "^1.1.1" - cli-cursor "^1.0.2" - cli-spinners "^0.1.2" - object-assign "^4.0.1" + word-wrap "~1.2.3" -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" +original-require@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" + integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= dependencies: lcid "^1.0.0" -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@^0.1.4, osenv@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== -p-each-series@^1.0.0: +p-defer@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" - dependencies: - p-reduce "^1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - -p-lazy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-1.0.0.tgz#ec53c802f2ee3ac28f166cc82d0b2b02de27a835" - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - dependencies: - p-try "^1.0.0" +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== p-limit@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - dependencies: - p-limit "^1.1.0" - p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= dependencies: p-finally "^1.0.0" -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-json@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - dependencies: - got "^6.7.1" - registry-auth-token "^3.0.1" - registry-url "^3.0.3" - semver "^5.1.0" - -pacote@^9.1.0, pacote@^9.5.11, pacote@^9.5.3: - version "9.5.12" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.12.tgz#1e11dd7a8d736bcc36b375a9804d41bb0377bf66" - dependencies: - bluebird "^3.5.3" - cacache "^12.0.2" - chownr "^1.1.2" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.3" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.4.0" - npm-normalize-package-bin "^1.0.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.1.12" - npm-pick-manifest "^3.0.0" - npm-registry-fetch "^4.0.0" - osenv "^0.1.5" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.2" - safe-buffer "^5.1.2" - semver "^5.6.0" - ssri "^6.0.1" - tar "^4.4.10" - unique-filename "^1.1.1" - which "^1.3.1" - -parallel-transform@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.5" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== dependencies: - cyclist "~0.2.2" - inherits "^2.0.3" - readable-stream "^2.1.5" + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" +parse-code-context@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-code-context/-/parse-code-context-1.0.0.tgz#718c295c593d0d19a37f898473268cc75e98de1e" + integrity sha512-OZQaqKaQnR21iqhlnPfVisFjBWjhnMl5J9MgbP8xC+EwoVqbXrq78lp+9Zb3ahmLzrIX5Us/qbvBnaS3hkH6OA== parse-headers@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.1.tgz#6ae83a7aa25a9d9b700acc28698cd1f1ed7e9536" - dependencies: - for-each "^0.3.2" - trim "0.0.1" + version "2.0.3" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" + integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - parseqs@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + integrity sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0= dependencies: better-assert "~1.0.0" parseuri@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + integrity sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo= dependencies: better-assert "~1.0.0" -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: +path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1, path-is-inside@^1.0.2, path-is-inside@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: graceful-fs "^4.1.2" pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - -path@^0.12.7: - version "0.12.7" - resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" - dependencies: - process "^0.11.1" - util "^0.10.3" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.0.0: +pathval@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= -pbkdf2@^3.0.3, pbkdf2@^3.0.9: - version "3.0.16" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" +pbkdf2@^3.0.3: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -5729,41 +4137,52 @@ pbkdf2@^3.0.3, pbkdf2@^3.0.9: safe-buffer "^5.0.1" sha.js "^2.4.8" -pegjs@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= portscanner@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.1.1.tgz#eabb409e4de24950f5a2a516d35ae769343fbb96" + integrity sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y= dependencies: async "1.5.2" is-number-like "^1.0.3" @@ -5771,279 +4190,195 @@ portscanner@2.1.1: posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - -precond@0.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +prettier-plugin-solidity@1.0.0-alpha.51: + version "1.0.0-alpha.51" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.51.tgz#743fae6034a4f3d9a6bf3f9839c80fd9960172ef" + integrity sha512-YzklTx2YZklhW1kvUadyJcXSsOqDgYpcv69a2M3yYJ9owpq94JeGyA6TxKwZyXG9LMis9ZdSOKSyneAjpPCIkQ== + dependencies: + "@solidity-parser/parser" "^0.6.1" + dir-to-object "^2.0.0" + emoji-regex "^9.0.0" + escape-string-regexp "^4.0.0" + extract-comments "^1.1.0" + prettier "^2.0.5" + semver "^7.3.2" + string-width "^4.2.0" + +prettier@2.0.5, prettier@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -prettier@^1.12.1: - version "1.14.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372" - -pretty-bytes@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" - -private@^0.1.6, private@^0.1.8, private@~0.1.5: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - -process@^0.11.1: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== process@~0.5.1: version "0.5.2" resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= -promise-inflight@^1.0.1, promise-inflight@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - -promise-retry@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" - dependencies: - err-code "^1.0.0" - retry "^0.10.0" - -promise-to-callback@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" - dependencies: - is-fn "^1.0.0" - set-immediate-shim "^1.0.1" - -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - dependencies: - read "1" - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - -protoduck@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== dependencies: - genfun "^5.0.0" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + forwarded "~0.1.2" + ipaddr.js "1.9.1" -psl@^1.1.24: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - -qrcode-terminal@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= qs@6.2.3: version "6.2.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.3.tgz#1cfcb25c10a9b2b483053ff39f5dfc9233908cfe" + integrity sha1-HPyyXBCpsrSDBT/zn138kjOQjP4= + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -qs@^6.5.1, qs@~6.5.2: +qs@^6.7.0: + version "6.9.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" + integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== + +qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== query-string@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== dependencies: decode-uri-component "^0.2.0" object-assign "^4.1.0" strict-uri-encode "^1.0.0" -query-string@^6.8.2: - version "6.9.0" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.9.0.tgz#1c3b727c370cf00f177c99f328fda2108f8fa3dd" - dependencies: - decode-uri-component "^0.2.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - -qw@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" - -randomatic@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.0.1: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - -rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-chunk@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-2.1.0.tgz#6a04c0928005ed9d42e1a6ac5600e19cbc7ff655" +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== dependencies: - pify "^3.0.0" - safe-buffer "^5.1.1" + randombytes "^2.0.5" + safe-buffer "^5.1.0" -read-cmd-shim@^1.0.1, read-cmd-shim@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" - dependencies: - graceful-fs "^4.1.2" +randomhex@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/randomhex/-/randomhex-0.1.5.tgz#baceef982329091400f2a2912c6cd02f1094f585" + integrity sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU= -read-installed@~4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" - dependencies: - debuglog "^1.0.1" - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - semver "2 || 3 || 4 || 5" - slide "~1.1.3" - util-extend "^1.0.1" - optionalDependencies: - graceful-fs "^4.1.2" +range-parser@~1.2.0, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13, read-package-json@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== dependencies: - glob "^7.1.1" - json-parse-better-errors "^1.0.1" - normalize-package-data "^2.0.0" - npm-normalize-package-bin "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" -read-package-tree@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" +raw-body@^2.3.2: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== dependencies: - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - util-promisify "^2.1.0" + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= dependencies: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -read@1, read@~1.0.1, read@~1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - dependencies: - mute-stream "~0.0.4" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" +readable-stream@^2.0.2, readable-stream@^2.3.0, readable-stream@^2.3.5: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -6053,176 +4388,72 @@ read@1, read@~1.0.1, read@~1.0.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^1.0.33, readable-stream@~1.1.10: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@~1.0.15: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdir-scoped-modules@^1.0.0, readdir-scoped-modules@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" - dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - graceful-fs "^4.1.2" - once "^1.3.0" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" + graceful-fs "^4.1.11" + micromatch "^3.1.10" readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -recast@^0.12.5: - version "0.12.9" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.12.9.tgz#e8e52bdb9691af462ccbd7c15d5a5113647a15f1" - dependencies: - ast-types "0.10.1" - core-js "^2.4.1" - esprima "~4.0.0" - private "~0.1.5" - source-map "~0.6.1" -recast@^0.15.0: - version "0.15.3" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.15.3.tgz#5fc1fd1c8e2d4d027ee3977a176bbb8d1c83305e" +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== dependencies: - ast-types "0.11.5" - esprima "~4.0.0" - private "~0.1.5" - source-map "~0.6.1" + picomatch "^2.0.4" rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= dependencies: resolve "^1.1.6" -regenerate@^1.2.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" +recursive-readdir@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== dependencies: - is-equal-shallow "^0.1.3" + minimatch "3.0.4" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== dependencies: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -registry-auth-token@^3.0.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - dependencies: - rc "^1.0.1" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^1.5.2, repeat-string@^1.6.1: +repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -replace-ext@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" - -replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - -req-cwd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-1.0.1.tgz#0d73aeae9266e697a78f7976019677e76acf0fff" - dependencies: - req-from "^1.0.1" - -req-from@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/req-from/-/req-from-1.0.1.tgz#bf81da5147947d32d13b947dc12a58ad4587350e" - dependencies: - resolve-from "^2.0.0" - -request@^2.67.0, request@^2.88.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" +request@^2.79.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -6231,7 +4462,7 @@ request@^2.67.0, request@^2.88.0: extend "~3.0.2" forever-agent "~0.6.1" form-data "~2.3.2" - har-validator "~5.1.0" + har-validator "~5.1.3" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" @@ -6241,264 +4472,213 @@ request@^2.67.0, request@^2.88.0: performance-now "^2.1.0" qs "~6.5.2" safe-buffer "^5.1.2" - tough-cookie "~2.4.3" + tough-cookie "~2.5.0" tunnel-agent "^0.6.0" uuid "^3.3.2" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== requires-port@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - dependencies: - resolve-from "^3.0.0" - -resolve-dir@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - dependencies: - path-parse "^1.0.5" - -resolve@^1.10.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2" +resolve@^1.1.6, resolve@^1.10.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -resolve@~1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" - dependencies: - path-parse "^1.0.5" - resp-modifier@6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/resp-modifier/-/resp-modifier-6.0.2.tgz#b124de5c4fbafcba541f48ffa73970f4aa456b4f" + integrity sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08= dependencies: debug "^2.2.0" minimatch "^3.0.2" -responselike@1.0.2: +responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= dependencies: lowercase-keys "^1.0.0" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - dependencies: - through "~2.3.4" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -retry-axios@0.3.2, retry-axios@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/retry-axios/-/retry-axios-0.3.2.tgz#5757c80f585b4cc4c4986aa2ffd47a60c6d35e13" - -retry@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - -rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - dependencies: - glob "^7.1.3" - -rimraf@~2.2.6: - version "2.2.8" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== dependencies: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.1.0.tgz#e4f9886d5a982174f314543831e36e1a658460f9" - dependencies: - safe-buffer "^5.1.1" - -run-async@^2.0.0, run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - dependencies: - is-promise "^2.1.0" - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" +rlp@^2.0.0, rlp@^2.2.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.4.tgz#d6b0e1659e9285fc509a5d169a9bd06f704951c1" + integrity sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw== dependencies: - aproba "^1.1.1" - -rustbn.js@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.1.2.tgz#979fa0f9562216dd667c9d2cd179ae5d13830eff" + bn.js "^4.11.1" -rustbn.js@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== rx@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" + integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I= -rxjs@^5.5.2: - version "5.5.11" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" +rxjs@^5.5.6: + version "5.5.12" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz#6fa61b8a77c3d793dbaf270bee2f43f652d741cc" + integrity sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw== dependencies: symbol-observable "1.0.1" -rxjs@^6.1.0: - version "6.2.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.2.tgz#eb75fa3c186ff5289907d06483a77884586e1cf9" - dependencies: - tslib "^1.9.0" +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +sc-istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.5.tgz#1896066484d55336cf2cdbcc7884dc79da50dc76" + integrity sha512-7wR5EZFLsC4w0wSm9BUuCgW+OGKAU7PNlW5L0qwVPbh+Q1sfVn2fyzfMXYCm6rkNA5ipaCOt94nApcguQwF5Gg== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" -scoped-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" +scrypt-js@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" + integrity sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q= -scrypt.js@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/scrypt.js/-/scrypt.js-0.2.0.tgz#af8d1465b71e9990110bedfc593b9479e03a8ada" - dependencies: - scrypt "^6.0.2" - scryptsy "^1.2.1" +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== -scrypt@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/scrypt/-/scrypt-6.0.3.tgz#04e014a5682b53fa50c2d5cce167d719c06d870d" +"scrypt-shim@github:web3-js/scrypt-shim": + version "0.1.0" + resolved "https://codeload.github.com/web3-js/scrypt-shim/tar.gz/be5e616323a8b5e568788bf94d03c1b8410eac54" dependencies: - nan "^2.0.8" + scryptsy "^2.1.0" + semver "^6.3.0" -scryptsy@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" - dependencies: - pbkdf2 "^3.0.3" +scryptsy@2.1.0, scryptsy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" + integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== secp256k1@^3.0.1: - version "3.5.0" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.5.0.tgz#677d3b8a8e04e1a5fa381a1ae437c54207b738d0" + version "3.8.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" + integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== dependencies: - bindings "^1.2.1" - bip66 "^1.1.3" - bn.js "^4.11.3" - create-hash "^1.1.2" + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" drbg.js "^1.0.1" - elliptic "^6.2.3" - nan "^2.2.1" - safe-buffer "^5.1.0" - -semaphore@>=1.0.1, semaphore@^1.0.3: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + elliptic "^6.5.2" + nan "^2.14.0" + safe-buffer "^5.1.2" -semver-diff@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" +seek-bzip@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" + integrity sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w= dependencies: - semver "^5.0.3" + commander "~2.8.1" -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.7.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@~5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== send@0.16.2: version "0.16.2" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== dependencies: debug "2.6.9" depd "~1.1.2" @@ -6514,9 +4694,29 @@ send@0.16.2: range-parser "~1.2.0" statuses "~1.4.0" +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + serve-index@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= dependencies: accepts "~1.3.4" batch "0.6.1" @@ -6529,114 +4729,131 @@ serve-index@1.9.1: serve-static@1.13.2: version "1.13.2" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" parseurl "~1.3.2" send "0.16.2" +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + server-destroy@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" + integrity sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0= -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" -set-value@^2.0.0: +set-blocking@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" is-plain-object "^2.0.3" split-string "^3.0.1" +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" -sha3@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-1.2.2.tgz#a66c5098de4c25bc88336ec8b4817d005bca7ba9" - dependencies: - nan "2.10.0" - -sha@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/sha/-/sha-3.0.0.tgz#b2f2f90af690c16a3a839a6a6c680ea51fedd1ae" - dependencies: - graceful-fs "^4.1.2" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -shelljs@^0.7.4: - version "0.7.8" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -shelljs@^0.8.0: - version "0.8.2" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" +shelljs@^0.8.3: + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== dependencies: glob "^7.0.0" interpret "^1.0.0" rechoir "^0.6.2" -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +signal-exit@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -slash@^1.0.0: +simple-concat@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" + integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - -slide@^1.1.5, slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" +simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" -smart-buffer@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== dependencies: define-property "^1.0.0" isobject "^3.0.0" @@ -6645,12 +4862,14 @@ snapdragon-node@^2.0.1: snapdragon-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== dependencies: kind-of "^3.2.0" snapdragon@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== dependencies: base "^0.11.1" debug "^2.2.0" @@ -6662,58 +4881,63 @@ snapdragon@^0.8.1: use "^3.1.0" socket.io-adapter@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b" + version "1.1.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" + integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g== -socket.io-client@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.0.4.tgz#0918a552406dc5e540b380dcd97afc4a64332f8e" +socket.io-client@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" + integrity sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ== dependencies: backo2 "1.0.2" base64-arraybuffer "0.1.5" component-bind "1.0.0" component-emitter "1.2.1" - debug "~2.6.4" - engine.io-client "~3.1.0" + debug "~3.1.0" + engine.io-client "~3.2.0" + has-binary2 "~1.0.2" has-cors "1.1.0" indexof "0.0.1" object-component "0.0.3" parseqs "0.0.5" parseuri "0.0.5" - socket.io-parser "~3.1.1" + socket.io-parser "~3.2.0" to-array "0.1.4" -socket.io-client@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" +socket.io-client@^2.0.4: + version "2.3.0" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.3.0.tgz#14d5ba2e00b9bcd145ae443ab96b3f86cbcc1bb4" + integrity sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA== dependencies: backo2 "1.0.2" base64-arraybuffer "0.1.5" component-bind "1.0.0" component-emitter "1.2.1" - debug "~3.1.0" - engine.io-client "~3.2.0" + debug "~4.1.0" + engine.io-client "~3.4.0" has-binary2 "~1.0.2" has-cors "1.1.0" indexof "0.0.1" object-component "0.0.3" parseqs "0.0.5" parseuri "0.0.5" - socket.io-parser "~3.2.0" + socket.io-parser "~3.3.0" to-array "0.1.4" -socket.io-parser@~3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.1.3.tgz#ed2da5ee79f10955036e3da413bfd7f1e4d86c8e" +socket.io-parser@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077" + integrity sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA== dependencies: component-emitter "1.2.1" debug "~3.1.0" - has-binary2 "~1.0.2" isarray "2.0.1" -socket.io-parser@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077" +socket.io-parser@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.0.tgz#2b52a96a509fdf31440ba40fed6094c7d4f1262f" + integrity sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng== dependencies: component-emitter "1.2.1" debug "~3.1.0" @@ -6722,6 +4946,7 @@ socket.io-parser@~3.2.0: socket.io@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980" + integrity sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA== dependencies: debug "~3.1.0" engine.io "~3.2.0" @@ -6730,93 +4955,45 @@ socket.io@2.1.1: socket.io-client "2.1.1" socket.io-parser "~3.2.0" -socks-proxy-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" - dependencies: - agent-base "~4.2.0" - socks "~2.2.0" - -socks@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.1.tgz#68ad678b3642fbc5d99c64c165bc561eab0215f9" - dependencies: - ip "^1.1.5" - smart-buffer "^4.0.1" - -sol-explore@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/sol-explore/-/sol-explore-1.6.2.tgz#43ae8c419fd3ac056a05f8a9d1fb1022cd41ecc2" - -solc@^0.4.2: - version "0.4.24" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.24.tgz#354f14b269b38cbaa82a47d1ff151723502b954e" - dependencies: - fs-extra "^0.30.0" - memorystream "^0.3.1" - require-from-string "^1.1.0" - semver "^5.3.0" - yargs "^4.7.1" - -solidity-coverage@^0.5.0: - version "0.5.5" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.5.5.tgz#81a2e3f8fc3e67f645c11796e5cbab0f8f5c355b" +solidity-coverage@^0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.5.tgz#29a738b5644b23687e540688520457ce6792ce94" + integrity sha512-UaNwVhK7I1ULYK3qDTATs7Hz0YKhJnE+rm5aU9ufUBowOImB2dWYXox2l/tMbSkHfTMWwHE/6TNqn0/ec0rwOw== dependencies: + "@solidity-parser/parser" "^0.6.0" + "@truffle/provider" "^0.1.17" + chalk "^2.4.2" death "^1.1.0" - ethereumjs-testrpc-sc "6.1.2" - istanbul "^0.4.5" - keccakjs "^0.2.1" - req-cwd "^1.0.1" - shelljs "^0.7.4" - sol-explore "^1.6.2" - solidity-parser-sc "0.4.11" - tree-kill "^1.2.0" - web3 "^0.18.4" - -solidity-parser-sc@0.4.11: - version "0.4.11" - resolved "https://registry.yarnpkg.com/solidity-parser-sc/-/solidity-parser-sc-0.4.11.tgz#86734c9205537007f4d6201b57176e41696ee607" - dependencies: - mocha "^4.1.0" - pegjs "^0.10.0" - yargs "^4.6.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - dependencies: - is-plain-obj "^1.0.0" - -sorted-object@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/sorted-object/-/sorted-object-2.0.1.tgz#7d631f4bd3a798a24af1dffcfbfe83337a5df5fc" - -sorted-union-stream@~2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz#c7794c7e077880052ff71a8d4a2dbb4a9a638ac7" - dependencies: - from2 "^1.3.0" - stream-iterate "^1.1.0" + detect-port "^1.3.0" + fs-extra "^8.1.0" + ganache-cli "6.9.0" + ghost-testrpc "^0.0.2" + global-modules "^2.0.0" + globby "^10.0.1" + jsonschema "^1.2.4" + lodash "^4.17.15" + node-emoji "^1.10.0" + pify "^4.0.1" + recursive-readdir "^2.2.2" + sc-istanbul "^0.4.5" + shelljs "^0.8.3" + web3 "1.2.6" source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== dependencies: - atob "^2.1.1" + atob "^2.1.2" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -6824,118 +5001,105 @@ source-map-support@^0.5.3: source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= dependencies: amdefine ">=0.0.4" spdx-correct@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" - -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== dependencies: extend-shallow "^3.0.0" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^6.0.0, ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - dependencies: - figgy-pudding "^3.5.1" - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= dependencies: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.4.0 < 2": +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= statuses@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-iterate@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/stream-iterate/-/stream-iterate-1.2.0.tgz#2bd7c77296c1702a46488b8ad41f79865eecd4e1" - dependencies: - readable-stream "^2.1.5" - stream-shift "^1.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== stream-throttle@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/stream-throttle/-/stream-throttle-0.1.3.tgz#add57c8d7cc73a81630d31cd55d3961cfafba9c3" + integrity sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM= dependencies: commander "^2.2.0" limiter "^1.0.5" @@ -6943,178 +5107,223 @@ stream-throttle@^0.1.3: strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - -string-template@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" - -string-template@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2": version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string.prototype.trim@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.0" - function-bind "^1.0.2" + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" string.prototype.trimleft@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== dependencies: define-properties "^1.1.3" - function-bind "^1.1.1" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" string.prototype.trimright@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== dependencies: define-properties "^1.1.3" - function-bind "^1.1.1" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" -stringify-package@^1.0.0, stringify-package@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" -strip-ansi@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" -strip-bom-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== dependencies: - first-chunk-stream "^2.0.0" - strip-bom "^2.0.0" + ansi-regex "^5.0.0" strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-dirs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" + integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== + dependencies: + is-natural-number "^4.0.1" strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@~2.0.1: +strip-json-comments@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -supports-color@4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" - dependencies: - has-flag "^2.0.0" - -supports-color@5.4.0, supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@5.4.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== + dependencies: + has-flag "^3.0.0" + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== dependencies: has-flag "^3.0.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= supports-color@^3.1.0: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" -symbol-observable@1.0.1: - version "1.0.1" +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +swarm-js@0.1.39: + version "0.1.39" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.39.tgz#79becb07f291d4b2a178c50fee7aa6e10342c0e8" + integrity sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + decompress "^4.0.0" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request-promise "^0.1.2" + +symbol-observable@1.0.1: + version "1.0.1" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= -symbol-observable@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" +tar-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== + dependencies: + bl "^1.0.0" + buffer-alloc "^1.2.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.3.0" + to-buffer "^1.1.1" + xtend "^4.0.0" -tapable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" - -tape@^4.4.0, tape@^4.6.3, tape@^4.8.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.9.1.tgz#1173d7337e040c76fbf42ec86fcabedc9b3805c9" - dependencies: - deep-equal "~1.0.1" - defined "~1.0.0" - for-each "~0.3.3" - function-bind "~1.1.1" - glob "~7.1.2" - has "~1.0.3" - inherits "~2.0.3" - minimist "~1.2.0" - object-inspect "~1.6.0" - resolve "~1.7.1" - resumer "~0.0.0" - string.prototype.trim "~1.1.2" - through "~2.3.8" - -tar@^4, tar@^4.4.10, tar@^4.4.12, tar@^4.4.13: +tar@^4.0.2: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" @@ -7124,449 +5333,1027 @@ tar@^4, tar@^4.4.10, tar@^4.4.12, tar@^4.4.13: safe-buffer "^5.1.2" yallist "^3.0.3" -temp@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" - dependencies: - os-tmpdir "^1.0.0" - rimraf "~2.2.6" - -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - dependencies: - execa "^0.7.0" - -text-table@^0.2.0, text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - -textextensions@2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.2.0.tgz#38ac676151285b658654581987a0ce1a4490d286" - tfunk@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/tfunk/-/tfunk-3.1.0.tgz#38e4414fc64977d87afdaa72facb6d29f82f7b5b" + integrity sha1-OORBT8ZJd9h6/apy+sttKfgve1s= dependencies: chalk "^1.1.1" object-path "^0.9.0" -through2@^2.0.0, through2@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" - -"through@>=2.2.7 <3", through@^2.3.6, through@~2.3.4, through@~2.3.8: +through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= timed-out@^4.0.0, timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - -tiny-relative-date@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - dependencies: - os-tmpdir "~1.0.2" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= to-array@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + integrity sha1-F+bBH3PdTz10zaek/zI46a2b+JA= -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-buffer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= dependencies: kind-of "^3.0.2" +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= dependencies: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== dependencies: define-property "^2.0.2" extend-shallow "^3.0.2" regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -tree-kill@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" - -treeify@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" truffle-blockchain-utils@^0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz#a4e5c064dadd69f782a137f3d276d21095da7a47" + integrity sha1-pOXAZNrdafeCoTfz0nbSEJXaekc= -truffle-contract-schema@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/truffle-contract-schema/-/truffle-contract-schema-2.0.1.tgz#9bf821d32e26e674ba15eb5d40f96b10b1c9d568" +truffle-contract-schema@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/truffle-contract-schema/-/truffle-contract-schema-2.0.3.tgz#0af8e19a39c630730bc19dd41b48f5b4137a6977" + integrity sha512-eI5cFifbB3zpcO4RsXSnjN9JMSlJ4M50GQPdrfbrIXRTXHsyQ433SkgFjIATUwfq++TXWkCRfKMjN8eA7YQ3+Q== dependencies: ajv "^5.1.1" crypto-js "^3.1.9-1" debug "^3.1.0" truffle-contract@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-3.0.6.tgz#2ef6fc32d7faafa9f4aed8e50001a9fdea342192" + version "3.0.8" + resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-3.0.8.tgz#6588b1b816060f6ac6876d77948934b929574067" + integrity sha512-uhXb/G4dORU4RjFlwZZbFT0n5BS8akify+MaRsnWWs4SA/bo6x4/bQs1xtdO3b5Cl9nXiOX88wdQzRj3xtPVUg== dependencies: ethjs-abi "0.1.8" truffle-blockchain-utils "^0.0.5" - truffle-contract-schema "^2.0.1" + truffle-contract-schema "^2.0.3" truffle-error "^0.0.3" web3 "0.20.6" truffle-error@^0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.3.tgz#4bf55242e14deee1c7194932709182deff2c97ca" + integrity sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o= -truffle-hdwallet-provider@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.6.tgz#775c677693a94d83a515815d7fd7f0a73f00c3e9" +truffle-hdwallet-provider@^1.0.17: + version "1.0.17" + resolved "https://registry.yarnpkg.com/truffle-hdwallet-provider/-/truffle-hdwallet-provider-1.0.17.tgz#fe8edd0d6974eeb31af9959e41525fb19abd74ca" + integrity sha512-s6DvSP83jiIAc6TUcpr7Uqnja1+sLGJ8og3X7n41vfyC4OCaKmBtXL5HOHf+SsU3iblOvnbFDgmN6Y1VBL/fsg== dependencies: - bip39 "^2.2.0" - ethereumjs-wallet "0.6.0" - web3 "^0.18.2" - web3-provider-engine "^14.0.5" + any-promise "^1.3.0" + bindings "^1.3.1" + web3 "1.2.1" + websocket "^1.0.28" truffle-provisioner@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/truffle-provisioner/-/truffle-provisioner-0.1.1.tgz#5a8327d62511ef23c950d3aa862610a7c377e2aa" + version "0.1.5" + resolved "https://registry.yarnpkg.com/truffle-provisioner/-/truffle-provisioner-0.1.5.tgz#f940b2e0aa3a26d5227dfc4ebe8d29ebc68a9e03" + integrity sha512-XSzD4Tj1T16E8qwoIHnQ9sOuvoemP1yqxX9Jg0VvvoLTdl8X17uau6dN08JgNR09hJroTrXPbkAi5Y8IfKhVMw== -tslib@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" +truffle@^5.1.24: + version "5.1.24" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.24.tgz#2e7afc28b1748f2b44f2da351b3605744f3546e4" + integrity sha512-2TAidfvwZD3cCBVM8cgyU7hAUR7NTSkKnBzsasdIIwCOGZ1+IqG/pALSuATjeeHbo4tqzjvs3Nau2U1yo5wDAw== + dependencies: + app-module-path "^2.2.0" + mocha "5.2.0" + original-require "1.0.1" tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" -type-detect@^4.0.0: +type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" ua-parser-js@0.7.17: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" + integrity sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g== uglify-js@^3.1.4: - version "3.7.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.3.tgz#f918fce9182f466d5140f24bb0ff35c2d32dcc6a" + version "3.9.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.2.tgz#012b74fb6a2e440d9ba1f79110a479d3b1f2d48d" + integrity sha512-zGVwKslUAD/EeqOrD1nQaBmXIHl1Vw371we8cvS8I6mYK9rmgX5tv8AAeJdfsQ3Kk5mGax2SVV/AizxdNGhl7Q== dependencies: commander "~2.20.3" - source-map "~0.6.1" - -uid-number@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== -umask@^1.1.0, umask@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" +unbzip2-stream@^1.0.9: + version "1.4.2" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.2.tgz#84eb9e783b186d8fb397515fbb656f312f1a7dbf" + integrity sha512-pZMVAofMrrHX6Ik39hCk470kulCbmZ2SWfQLPmTWqfJV/oUm0gn1CblvHdUu4+54Je6Jq34x8kY6XjTy6dMkOg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" -underscore@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== dependencies: arr-union "^3.1.0" get-value "^2.0.6" is-extendable "^0.1.1" - set-value "^0.4.3" - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" - dependencies: - imurmurhash "^0.1.4" - -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - dependencies: - crypto-random-string "^1.0.0" + set-value "^2.0.1" universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - -unorm@^1.3.3: - version "1.4.1" - resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.4.1.tgz#364200d5f13646ca8bcd44490271335614792300" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= dependencies: has-value "^0.3.1" isobject "^3.0.0" -untildify@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-3.0.3.tgz#1e7b42b140bcfd922b22e70ca1265bfe3634c7c9" - -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -update-notifier@^2.3.0, update-notifier@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" - dependencies: - boxen "^1.2.1" - chalk "^2.0.1" - configstore "^3.0.0" - import-lazy "^2.1.0" - is-ci "^1.0.10" - is-installed-globally "^0.1.0" - is-npm "^1.0.0" - latest-version "^3.0.0" - semver-diff "^2.0.0" - xdg-basedir "^3.0.0" +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= dependencies: prepend-http "^1.0.1" url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= dependencies: prepend-http "^2.0.0" +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + +url-template@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= + url-to-options@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +utf8@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== utf8@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" + integrity sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY= util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util-extend@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" - -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - dependencies: - object.getownpropertydescriptors "^2.0.3" - -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - dependencies: - inherits "2.0.3" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= -uuid@^3.2.1, uuid@^3.3.2, uuid@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== -v8-compile-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz#526492e35fc616864284700b7043e01baee09f0a" +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: +uuid@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c" + integrity sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw== + +validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - dependencies: - builtins "^1.0.3" +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" extsprintf "^1.2.0" -vinyl-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-2.0.0.tgz#a7ebf5ffbefda1b7d18d140fcb07b223efb6751a" +web3-bzz@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.1.tgz#c3bd1e8f0c02a13cd6d4e3c3e9e1713f144f6f0d" + integrity sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw== dependencies: - graceful-fs "^4.1.2" - pify "^2.3.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - strip-bom-stream "^2.0.0" - vinyl "^1.1.0" + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" -vinyl@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" +web3-bzz@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.2.tgz#a3b9f613c49fd3e120e0997088a73557d5adb724" + integrity sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA== dependencies: - clone "^1.0.0" - clone-stats "^0.0.1" - replace-ext "0.0.1" + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" -vinyl@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" +web3-bzz@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.6.tgz#0b88c0b96029eaf01b10cb47c4d5f79db4668883" + integrity sha512-9NiHLlxdI1XeFtbPJAmi2jnnIHVF+GNy517wvOS72P7ZfuJTPwZaSNXfT01vWgPPE9R96/uAHDWHOg+T4WaDQQ== dependencies: - clone "^2.1.1" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" -wcwidth@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - dependencies: - defaults "^1.0.3" - -web3-provider-engine@^13.3.2: - version "13.8.0" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-13.8.0.tgz#4c7c1ad2af5f1fe10343b8a65495879a2f9c00df" - dependencies: - async "^2.5.0" - clone "^2.0.0" - eth-block-tracker "^2.2.2" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - ethereumjs-util "^5.1.1" - ethereumjs-vm "^2.0.2" - fetch-ponyfill "^4.0.0" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - readable-stream "^2.2.9" - request "^2.67.0" - semaphore "^1.0.3" - solc "^0.4.2" - tape "^4.4.0" - xhr "^2.2.0" - xtend "^4.0.1" - -web3-provider-engine@^14.0.5: - version "14.0.6" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.0.6.tgz#cbdd66fe20c0136a3a495cbe40d18b6c4160d5f0" - dependencies: - async "^2.5.0" - backoff "^2.5.0" - clone "^2.0.0" - cross-fetch "^2.1.0" - eth-block-tracker "^3.0.0" - eth-json-rpc-infura "^3.1.0" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - ethereumjs-util "^5.1.5" - ethereumjs-vm "^2.3.4" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - readable-stream "^2.2.9" - request "^2.67.0" - semaphore "^1.0.3" - tape "^4.4.0" - ws "^5.1.1" - xhr "^2.2.0" - xtend "^4.0.1" +web3-core-helpers@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" + integrity sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.1" + web3-utils "1.2.1" + +web3-core-helpers@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz#484974f4bd4a487217b85b0d7cfe841af0907619" + integrity sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.2" + web3-utils "1.2.2" + +web3-core-helpers@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.6.tgz#7aacd25bf8015adcdfc0f3243d0dcfdff0373f7d" + integrity sha512-gYKWmC2HmO7RcDzpo4L1K8EIoy5L8iubNDuTC6q69UxczwqKF/Io0kbK/1Z10Av++NlzOSiuyGp2gc4t4UOsDw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.6" + web3-utils "1.2.6" + +web3-core-method@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" + integrity sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-core-subscriptions "1.2.1" + web3-utils "1.2.1" + +web3-core-method@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.2.tgz#d4fe2bb1945b7152e5f08e4ea568b171132a1e56" + integrity sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-core-promievent "1.2.2" + web3-core-subscriptions "1.2.2" + web3-utils "1.2.2" + +web3-core-method@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.6.tgz#f5a3e4d304abaf382923c8ab88ec8eeef45c1b3b" + integrity sha512-r2dzyPEonqkBg7Mugq5dknhV5PGaZTHBZlS/C+aMxNyQs3T3eaAsCTqlQDitwNUh/sUcYPEGF0Vo7ahYK4k91g== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.6" + web3-core-promievent "1.2.6" + web3-core-subscriptions "1.2.6" + web3-utils "1.2.6" + +web3-core-promievent@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" + integrity sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + +web3-core-promievent@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz#3b60e3f2a0c96db8a891c927899d29d39e66ab1c" + integrity sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + +web3-core-promievent@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.6.tgz#b1550a3a4163e48b8b704c1fe4b0084fc2dad8f5" + integrity sha512-km72kJef/qtQNiSjDJJVHIZvoVOm6ytW3FCYnOcCs7RIkviAb5JYlPiye0o4pJOLzCXYID7DK7Q9bhY8qWb1lw== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + +web3-core-requestmanager@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" + integrity sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + web3-providers-http "1.2.1" + web3-providers-ipc "1.2.1" + web3-providers-ws "1.2.1" + +web3-core-requestmanager@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz#667ba9ac724c9c76fa8965ae8a3c61f66e68d8d6" + integrity sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-providers-http "1.2.2" + web3-providers-ipc "1.2.2" + web3-providers-ws "1.2.2" + +web3-core-requestmanager@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.6.tgz#5808c0edc0d6e2991a87b65508b3a1ab065b68ec" + integrity sha512-QU2cbsj9Dm0r6om40oSwk8Oqbp3wTa08tXuMpSmeOTkGZ3EMHJ1/4LiJ8shwg1AvPMrKVU0Nri6+uBNCdReZ+g== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.6" + web3-providers-http "1.2.6" + web3-providers-ipc "1.2.6" + web3-providers-ws "1.2.6" + +web3-core-subscriptions@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" + integrity sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.1" + +web3-core-subscriptions@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz#bf4ba23a653a003bdc3551649958cc0b080b068e" + integrity sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.2" + +web3-core-subscriptions@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.6.tgz#9d44189e2321f8f1abc31f6c09103b5283461b57" + integrity sha512-M0PzRrP2Ct13x3wPulFtc5kENH4UtnPxO9YxkfQlX2WRKENWjt4Rfq+BCVGYEk3rTutDfWrjfzjmqMRvXqEY5Q== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.6" + +web3-core@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" + integrity sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg== + dependencies: + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-requestmanager "1.2.1" + web3-utils "1.2.1" + +web3-core@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.2.tgz#334b99c8222ef9cfd0339e27352f0b58ea789a2f" + integrity sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-requestmanager "1.2.2" + web3-utils "1.2.2" + +web3-core@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.6.tgz#bb42a1d7ae49a7258460f0d95ddb00906f59ef92" + integrity sha512-y/QNBFtr5cIR8vxebnotbjWJpOnO8LDYEAzZjeRRUJh2ijmhjoYk7dSNx9ExgC0UCfNFRoNCa9dGRu/GAxwRlw== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + web3-core-helpers "1.2.6" + web3-core-method "1.2.6" + web3-core-requestmanager "1.2.6" + web3-utils "1.2.6" + +web3-eth-abi@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz#9b915b1c9ebf82f70cca631147035d5419064689" + integrity sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.1" + +web3-eth-abi@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz#d5616d88a90020f894763423a9769f2da11fe37a" + integrity sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.2" + +web3-eth-abi@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.6.tgz#b495383cc5c0d8e2857b26e7fe25606685983b25" + integrity sha512-w9GAyyikn8nSifSDZxAvU9fxtQSX+W2xQWMmrtTXmBGCaE4/ywKOSPAO78gq8AoU4Wq5yqVGKZLLbfpt7/sHlA== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.6" + +web3-eth-accounts@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" + integrity sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + scryptsy "2.1.0" + semver "6.2.0" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-utils "1.2.1" + +web3-eth-accounts@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz#c187e14bff6baa698ac352220290222dbfd332e5" + integrity sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-shim "github:web3-js/scrypt-shim" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-utils "1.2.2" + +web3-eth-accounts@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.6.tgz#a1ba4bf75fa8102a3ec6cddd0eccd72462262720" + integrity sha512-cDVtonHRgzqi/ZHOOf8kfCQWFEipcfQNAMzXIaKZwc0UUD9mgSI5oJrN45a89Ze+E6Lz9m77cDG5Ax9zscSkcw== + dependencies: + "@web3-js/scrypt-shim" "^0.1.0" + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.6" + web3-core-helpers "1.2.6" + web3-core-method "1.2.6" + web3-utils "1.2.6" + +web3-eth-contract@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" + integrity sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g== + dependencies: + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-promievent "1.2.1" + web3-core-subscriptions "1.2.1" + web3-eth-abi "1.2.1" + web3-utils "1.2.1" + +web3-eth-contract@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz#84e92714918a29e1028ee7718f0712536e14e9a1" + integrity sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-promievent "1.2.2" + web3-core-subscriptions "1.2.2" + web3-eth-abi "1.2.2" + web3-utils "1.2.2" + +web3-eth-contract@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.6.tgz#39111543960035ed94c597a239cf5aa1da796741" + integrity sha512-ak4xbHIhWgsbdPCkSN+HnQc1SH4c856y7Ly+S57J/DQVzhFZemK5HvWdpwadJrQTcHET3ZeId1vq3kmW7UYodw== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.6" + web3-core-helpers "1.2.6" + web3-core-method "1.2.6" + web3-core-promievent "1.2.6" + web3-core-subscriptions "1.2.6" + web3-eth-abi "1.2.6" + web3-utils "1.2.6" + +web3-eth-ens@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" + integrity sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-eth-abi "1.2.1" + web3-eth-contract "1.2.1" + web3-utils "1.2.1" + +web3-eth-ens@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz#0a4abed1d4cbdacbf5e1ab06e502d806d1192bc6" + integrity sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-promievent "1.2.2" + web3-eth-abi "1.2.2" + web3-eth-contract "1.2.2" + web3-utils "1.2.2" + +web3-eth-ens@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.6.tgz#bf86a624c4c72bc59913c2345180d3ea947e110d" + integrity sha512-8UEqt6fqR/dji/jBGPFAyBs16OJjwi0t2dPWXPyGXmty/fH+osnXwWXE4HRUyj4xuafiM5P1YkXMsPhKEadjiw== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.6" + web3-core-helpers "1.2.6" + web3-core-promievent "1.2.6" + web3-eth-abi "1.2.6" + web3-eth-contract "1.2.6" + web3-utils "1.2.6" + +web3-eth-iban@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" + integrity sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.1" + +web3-eth-iban@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz#76bec73bad214df7c4192388979a59fc98b96c5a" + integrity sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.2" + +web3-eth-iban@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.6.tgz#0b22191fd1aa6e27f7ef0820df75820bfb4ed46b" + integrity sha512-TPMc3BW9Iso7H+9w+ytbqHK9wgOmtocyCD3PaAe5Eie50KQ/j7ThA60dGJnxItVo6yyRv5pZAYxPVob9x/fJlg== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.6" + +web3-eth-personal@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" + integrity sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg== + dependencies: + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-net "1.2.1" + web3-utils "1.2.1" + +web3-eth-personal@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz#eee1c86a8132fa16b5e34c6d421ca92e684f0be6" + integrity sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-net "1.2.2" + web3-utils "1.2.2" + +web3-eth-personal@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.6.tgz#47a0a0657ec04dd77f95451a6869d4751d324b6b" + integrity sha512-T2NUkh1plY8d7wePXSoHnaiKOd8dLNFaQfgBl9JHU6S7IJrG9jnYD9bVxLEgRUfHs9gKf9tQpDf7AcPFdq/A8g== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.6" + web3-core-helpers "1.2.6" + web3-core-method "1.2.6" + web3-net "1.2.6" + web3-utils "1.2.6" + +web3-eth@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" + integrity sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA== + dependencies: + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-subscriptions "1.2.1" + web3-eth-abi "1.2.1" + web3-eth-accounts "1.2.1" + web3-eth-contract "1.2.1" + web3-eth-ens "1.2.1" + web3-eth-iban "1.2.1" + web3-eth-personal "1.2.1" + web3-net "1.2.1" + web3-utils "1.2.1" + +web3-eth@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.2.tgz#65a1564634a23b990efd1655bf94ad513904286c" + integrity sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA== + dependencies: + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-subscriptions "1.2.2" + web3-eth-abi "1.2.2" + web3-eth-accounts "1.2.2" + web3-eth-contract "1.2.2" + web3-eth-ens "1.2.2" + web3-eth-iban "1.2.2" + web3-eth-personal "1.2.2" + web3-net "1.2.2" + web3-utils "1.2.2" + +web3-eth@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.6.tgz#15a8c65fdde0727872848cae506758d302d8d046" + integrity sha512-ROWlDPzh4QX6tlGGGlAK6X4kA2n0/cNj/4kb0nNVWkRouGmYO0R8k6s47YxYHvGiXt0s0++FUUv5vAbWovtUQw== + dependencies: + underscore "1.9.1" + web3-core "1.2.6" + web3-core-helpers "1.2.6" + web3-core-method "1.2.6" + web3-core-subscriptions "1.2.6" + web3-eth-abi "1.2.6" + web3-eth-accounts "1.2.6" + web3-eth-contract "1.2.6" + web3-eth-ens "1.2.6" + web3-eth-iban "1.2.6" + web3-eth-personal "1.2.6" + web3-net "1.2.6" + web3-utils "1.2.6" + +web3-net@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" + integrity sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw== + dependencies: + web3-core "1.2.1" + web3-core-method "1.2.1" + web3-utils "1.2.1" + +web3-net@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.2.tgz#5c3226ca72df7c591422440ce6f1203fd42ddad9" + integrity sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw== + dependencies: + web3-core "1.2.2" + web3-core-method "1.2.2" + web3-utils "1.2.2" + +web3-net@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.6.tgz#035ca0fbe55282fda848ca17ebb4c8966147e5ea" + integrity sha512-hsNHAPddrhgjWLmbESW0KxJi2GnthPcow0Sqpnf4oB6+/+ZnQHU9OsIyHb83bnC1OmunrK2vf9Ye2mLPdFIu3A== + dependencies: + web3-core "1.2.6" + web3-core-method "1.2.6" + web3-utils "1.2.6" + +web3-providers-http@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.1.tgz#c93ea003a42e7b894556f7e19dd3540f947f5013" + integrity sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ== + dependencies: + web3-core-helpers "1.2.1" + xhr2-cookies "1.1.0" + +web3-providers-http@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.2.tgz#155e55c1d69f4c5cc0b411ede40dea3d06720956" + integrity sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg== + dependencies: + web3-core-helpers "1.2.2" + xhr2-cookies "1.1.0" + +web3-providers-http@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.6.tgz#3c7b1252751fb37e53b873fce9dbb6340f5e31d9" + integrity sha512-2+SaFCspb5f82QKuHB3nEPQOF9iSWxRf7c18fHtmnLNVkfG9SwLN1zh67bYn3tZGUdOI3gj8aX4Uhfpwx9Ezpw== + dependencies: + web3-core-helpers "1.2.6" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" + integrity sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.1" + +web3-providers-ipc@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz#c6d165a12bc68674b4cdd543ea18aec79cafc2e8" + integrity sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.2" + +web3-providers-ipc@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.6.tgz#adabab5ac66b3ff8a26c7dc97af3f1a6a7609701" + integrity sha512-b0Es+/GTZyk5FG3SgUDW+2/mBwJAXWt5LuppODptiOas8bB2khLjG6+Gm1K4uwOb+1NJGPt5mZZ8Wi7vibtQ+A== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.6" + +web3-providers-ws@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" + integrity sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" + +web3-providers-ws@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz#d2c05c68598cea5ad3fa6ef076c3bcb3ca300d29" + integrity sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" + +web3-providers-ws@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.6.tgz#3cecc49f7c99f07a75076d3c54247050bc4f7e11" + integrity sha512-20waSYX+gb5M5yKhug5FIwxBBvkKzlJH7sK6XEgdOx6BZ9YYamLmvg9wcRVtnSZO8hV/3cWenO/tRtTrHVvIgQ== + dependencies: + "@web3-js/websocket" "^1.0.29" + underscore "1.9.1" + web3-core-helpers "1.2.6" + +web3-shh@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" + integrity sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA== + dependencies: + web3-core "1.2.1" + web3-core-method "1.2.1" + web3-core-subscriptions "1.2.1" + web3-net "1.2.1" + +web3-shh@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.2.tgz#44ed998f2a6ba0ec5cb9d455184a0f647826a49c" + integrity sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg== + dependencies: + web3-core "1.2.2" + web3-core-method "1.2.2" + web3-core-subscriptions "1.2.2" + web3-net "1.2.2" + +web3-shh@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.6.tgz#2492616da4cac32d4c7534b890f43bac63190c14" + integrity sha512-rouWyOOM6YMbLQd65grpj8BBezQfgNeRRX+cGyW4xsn6Xgu+B73Zvr6OtA/ftJwwa9bqHGpnLrrLMeWyy4YLUw== + dependencies: + web3-core "1.2.6" + web3-core-method "1.2.6" + web3-core-subscriptions "1.2.6" + web3-net "1.2.6" + +web3-utils@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.1.tgz#21466e38291551de0ab34558de21512ac4274534" + integrity sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randomhex "0.1.5" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.2.tgz#b53a08c40d2c3f31d3c4a28e7d749405df99c8c0" + integrity sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.6.tgz#b9a25432da00976457fcc1094c4af8ac6d486db9" + integrity sha512-8/HnqG/l7dGmKMgEL9JeKPTtjScxOePTzopv5aaKFExPfaBrYRkgoMqhoowCiAl/s16QaTn4DoIF1QC4YsT7Mg== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" web3@0.20.6: version "0.20.6" resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.6.tgz#3e97306ae024fb24e10a3d75c884302562215120" + integrity sha1-PpcwauAk+yThCj11yIQwJWIhUSA= dependencies: bignumber.js "git+https://github.com/frozeman/bignumber.js-nolookahead.git" crypto-js "^3.1.4" @@ -7574,9 +6361,51 @@ web3@0.20.6: xhr2 "*" xmlhttprequest "*" -web3@^0.18.2, web3@^0.18.4: +web3@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" + integrity sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw== + dependencies: + web3-bzz "1.2.1" + web3-core "1.2.1" + web3-eth "1.2.1" + web3-eth-personal "1.2.1" + web3-net "1.2.1" + web3-shh "1.2.1" + web3-utils "1.2.1" + +web3@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.2.tgz#b1b8b69aafdf94cbaeadbb68a8aa1df2ef266aec" + integrity sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg== + dependencies: + "@types/node" "^12.6.1" + web3-bzz "1.2.2" + web3-core "1.2.2" + web3-eth "1.2.2" + web3-eth-personal "1.2.2" + web3-net "1.2.2" + web3-shh "1.2.2" + web3-utils "1.2.2" + +web3@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.6.tgz#c497dcb14cdd8d6d9fb6b445b3b68ff83f8ccf68" + integrity sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA== + dependencies: + "@types/node" "^12.6.1" + web3-bzz "1.2.6" + web3-core "1.2.6" + web3-eth "1.2.6" + web3-eth-personal "1.2.6" + web3-net "1.2.6" + web3-shh "1.2.6" + web3-utils "1.2.6" + +web3@^0.18.4: version "0.18.4" resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d" + integrity sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0= dependencies: bignumber.js "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" crypto-js "^3.1.4" @@ -7584,143 +6413,140 @@ web3@^0.18.2, web3@^0.18.4: xhr2 "*" xmlhttprequest "*" -webpack-addons@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/webpack-addons/-/webpack-addons-1.1.5.tgz#2b178dfe873fb6e75e40a819fa5c26e4a9bc837a" +websocket@^1.0.28: + version "1.0.31" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" + integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== dependencies: - jscodeshift "^0.4.0" + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" -webpack-cli@^2.0.9: - version "2.1.5" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.1.5.tgz#3081fdeb2f205f0a54aa397986880b0c20a71f7a" +"websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": + version "1.0.29" + resolved "https://codeload.github.com/web3-js/WebSocket-Node/tar.gz/905deb4812572b344f5801f8c9ce8bb02799d82e" dependencies: - chalk "^2.4.1" - cross-spawn "^6.0.5" - diff "^3.5.0" - enhanced-resolve "^4.0.0" - envinfo "^5.7.0" - glob-all "^3.1.0" - global-modules "^1.0.0" - got "^8.3.1" - import-local "^1.0.0" - inquirer "^5.2.0" - interpret "^1.1.0" - jscodeshift "^0.5.0" - listr "^0.14.1" - loader-utils "^1.1.0" - lodash "^4.17.10" - log-symbols "^2.2.0" - mkdirp "^0.5.1" - p-each-series "^1.0.0" - p-lazy "^1.0.0" - prettier "^1.12.1" - supports-color "^5.4.0" - v8-compile-cache "^2.0.0" - webpack-addons "^1.1.5" - yargs "^11.1.0" - yeoman-environment "^2.1.1" - yeoman-generator "^2.0.5" - -whatwg-fetch@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.1.1, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@^1.1.0: +wide-align@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== dependencies: string-width "^1.0.2 || 2" -widest-line@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" - dependencies: - string-width "^2.1.1" - window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= -wordwrap@>=0.0.2, wordwrap@^1.0.0, wordwrap@~1.0.0: +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@>=0.0.2, wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -worker-farm@^1.6.0, worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - dependencies: - errno "~0.1.7" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^1.2.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" +ws@^3.0.0, ws@~3.3.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - slide "^1.1.5" + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" -write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" +ws@~6.1.0: + version "6.1.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.4.tgz#5b5c8800afab925e94ccb29d153c8d02c1776ef9" + integrity sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA== dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" + async-limiter "~1.0.0" -ws@^5.1.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== dependencies: - async-limiter "~1.0.0" + xhr-request "^1.1.0" -ws@~3.3.1: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" +xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" xhr2@*: - version "0.1.4" - resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.1.4.tgz#7f87658847716db5026323812f818cadab387a5f" + version "0.2.0" + resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.2.0.tgz#eddeff782f3b7551061b8d75645085269396e521" + integrity sha512-BDtiD0i2iKPK/S8OAZfpk6tyzEDnKKSjxWHcMBVmh+LuqJ8A32qXTyOx+TVOg2dKvq6zGBq2sgKPkEeRs1qTRA== -xhr@^2.2.0: +xhr@^2.0.4, xhr@^2.3.3: version "2.5.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" + integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== dependencies: global "~4.3.0" is-function "^1.0.1" @@ -7730,63 +6556,99 @@ xhr@^2.2.0: xmlhttprequest-ssl@~1.5.4: version "1.5.5" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" + integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xmlhttprequest@*: +xmlhttprequest@*, xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -xtend@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - dependencies: - object-keys "~0.4.0" +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= -yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" +yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" + camelcase "^5.0.0" + decamelize "^1.2.0" yargs-parser@^4.1.0, yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + integrity sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw= dependencies: camelcase "^3.0.0" -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== dependencies: - camelcase "^4.1.0" + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" yargs@6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.4.0.tgz#816e1a866d5598ccf34e5596ddce22d92da490d4" + integrity sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ= dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -7806,6 +6668,7 @@ yargs@6.4.0: yargs@6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + integrity sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg= dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -7821,105 +6684,23 @@ yargs@6.6.0: y18n "^3.2.1" yargs-parser "^4.2.0" -yargs@^11.0.0, yargs@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - -yargs@^4.6.0, yargs@^4.7.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" - dependencies: - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.1" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^2.4.1" - -yargs@~1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-1.2.6.tgz#9c7b4a82fd5d595b2bf17ab6dcc43135432fe34b" +yauzl@^2.4.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= dependencies: - minimist "^0.1.0" + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" - -yeoman-environment@^2.0.5, yeoman-environment@^2.1.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.3.1.tgz#1aa00cc474a8e48518ab2b0f64b43034215e9997" - dependencies: - chalk "^2.1.0" - cross-spawn "^6.0.5" - debug "^3.1.0" - diff "^3.3.1" - escape-string-regexp "^1.0.2" - globby "^8.0.1" - grouped-queue "^0.3.3" - inquirer "^5.2.0" - is-scoped "^1.0.0" - lodash "^4.17.10" - log-symbols "^2.1.0" - mem-fs "^1.1.0" - strip-ansi "^4.0.0" - text-table "^0.2.0" - untildify "^3.0.2" - -yeoman-generator@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/yeoman-generator/-/yeoman-generator-2.0.5.tgz#57b0b3474701293cc9ec965288f3400b00887c81" - dependencies: - async "^2.6.0" - chalk "^2.3.0" - cli-table "^0.3.1" - cross-spawn "^6.0.5" - dargs "^5.1.0" - dateformat "^3.0.3" - debug "^3.1.0" - detect-conflict "^1.0.0" - error "^7.0.2" - find-up "^2.1.0" - github-username "^4.0.0" - istextorbinary "^2.2.1" - lodash "^4.17.10" - make-dir "^1.1.0" - mem-fs-editor "^4.0.0" - minimist "^1.2.0" - pretty-bytes "^4.0.2" - read-chunk "^2.1.0" - read-pkg-up "^3.0.0" - rimraf "^2.6.2" - run-async "^2.0.0" - shelljs "^0.8.0" - text-table "^0.2.0" - through2 "^2.0.0" - yeoman-environment "^2.0.5" + integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= zos-lib@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/zos-lib/-/zos-lib-1.3.0.tgz#72a54227db97775041e581868c00ea047b91afbb" + integrity sha512-qa5bD5Ms4mgCxlVfrGVZoiC8+lxFR2JLXXLMvp/CAKTAFM/lIcup2z68FllZgdUcgeVQraifY/PEuXFag91bAg== dependencies: bignumber.js "^7.2.0" chalk "^2.4.1" From 20c40535c9b6a28ac7b95c1d65142b21d65ba8bc Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:35 -0700 Subject: [PATCH 03/22] Update Dockerfile --- Dockerfile.ganache | 4 ++-- Dockerfile.truffle | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile.ganache b/Dockerfile.ganache index 58efcbe00..347028e72 100644 --- a/Dockerfile.ganache +++ b/Dockerfile.ganache @@ -1,6 +1,6 @@ -FROM node:9-alpine +FROM node:12-alpine RUN npm i npm@latest -g \ - && npm install -g ganache-cli + && npm install -g ganache-cli@^6.9.1 ENTRYPOINT ["ganache-cli"] diff --git a/Dockerfile.truffle b/Dockerfile.truffle index e94c78832..985cafe14 100644 --- a/Dockerfile.truffle +++ b/Dockerfile.truffle @@ -1,8 +1,8 @@ -FROM node:9-alpine +FROM node:12-alpine RUN npm i npm@latest -g \ - && npm install -g truffle@^4.1.0 \ - && npm install -g ganache-cli + && npm install -g truffle@^5.1.24 \ + && npm install -g ganache-cli@^6.9.1 ENTRYPOINT ["truffle"] CMD ["--help"] From 61c39970b5c862487322c02251e868bf47dc75a7 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:36 -0700 Subject: [PATCH 04/22] Update Travis config --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85696c4fa..092372411 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,14 @@ language: node_js node_js: - - 8 + - 12 before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.2 + - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH="$HOME/.yarn/bin:$PATH" - install: - - npm install -g truffle@4.1.13 - yarn install --frozen-lockfile script: - - yarn check --integrity && truffle compile && npm test + - yarn ganache & sleep 5 && yarn test From ac48f00a9ab1e6bcff12cb930053b91caec28e66 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:37 -0700 Subject: [PATCH 05/22] Fix solidty-coverage --- .gitignore | 3 +++ .solcover.js | 8 +++++-- package.json | 4 ++-- truffle-config.js | 52 ++++++++++++++++++++++++++++++++++++++++-- truffle.js | 57 ----------------------------------------------- 5 files changed, 61 insertions(+), 63 deletions(-) delete mode 100644 truffle.js diff --git a/.gitignore b/.gitignore index 828920310..6d4426c11 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ token.json credentials.json echidna/ validate/apikey.infura +ganache-blockchain-log.txt +.coverage_artifacts +.coverage_contracts diff --git a/.solcover.js b/.solcover.js index 8fdb01362..b9ff66d13 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,6 +1,10 @@ module.exports = { - port: 8555, - testrpcOptions: "-p 8555 -d --accounts 15", + providerOptions: { + port: 8555, + seed: "TestRPC is awesome!", + total_accounts: 15, + default_balance_ether: 1000000, + }, skipFiles: ["test/"], copyPackages: ["openzeppelin-solidity", "zos-lib"], }; diff --git a/package.json b/package.json index 32d55d25a..587055e39 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "scripts": { "dev": "lite-server", "fmt": "prettier --write **/*.sol **/*.js **/*.json *.js *.json", - "truffle-test": "scripts/start-ganache.sh && truffle test", - "test": "scripts/start-ganache.sh && ./node_modules/.bin/solidity-coverage" + "coverage": "yarn run coverage", + "test": "scripts/start-ganache.sh && truffle test" }, "repository": { "type": "git", diff --git a/truffle-config.js b/truffle-config.js index a6330d6d5..0c7b66504 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,4 +1,52 @@ +// INFURA Setup - see validate/README.validate.md for more info +var HDWalletProvider = require("truffle-hdwallet-provider"); // These keys will be used only for CALL +var mnemonic = "talisman"; +var fs = require("fs"); +var access_token = "none"; +try { + access_token = fs.readFileSync("./validate/apikey.infura", "utf8"); +} catch (err) { + console.log( + "No Infura access token detected. Unit tests will still work. See ./validate/README.validate.md for more details." + ); +} + module.exports = { - // See - // to customize your Truffle configuration! + compilers: { + solc: { + version: "^0.4.24", + }, + }, + networks: { + development: { + host: "localhost", + port: 8545, + network_id: "*", // Match any network id + }, + // network to refer to ganache by name so it works with truffle/ganache in separate docker containers + localTestNet: { + host: "ganache", + port: 8545, + network_id: "*", // Match any network id + }, + // INFURA Setup + infura_mainnet: { + provider: function () { + return new HDWalletProvider( + mnemonic, + "https://mainnet.infura.io/" + access_token + ); + }, + network_id: 1, + }, + }, + mocha: { + /* + * To disable the spreadsheet verification tool ensure that + * the reporter is set to 'Spec' by commenting/uncommenting the lines below. + */ + reporter: "Spec", + //reporter: './verification/verification_reporter.js', + }, + plugins: ["solidity-coverage"], }; diff --git a/truffle.js b/truffle.js deleted file mode 100644 index 06a561334..000000000 --- a/truffle.js +++ /dev/null @@ -1,57 +0,0 @@ -// INFURA Setup - see validate/README.validate.md for more info -var HDWalletProvider = require("truffle-hdwallet-provider"); // These keys will be used only for CALL -var mnemonic = "talisman"; -var fs = require("fs"); -var access_token = "none"; -try { - access_token = fs.readFileSync("./validate/apikey.infura", "utf8"); -} catch (err) { - console.log( - "No Infura access token detected. Unit tests will still work. See ./validate/README.validate.md for more details." - ); -} - -module.exports = { - networks: { - development: { - host: "localhost", - port: 8545, - network_id: "*", // Match any network id - }, - // solidity-coverage looks for a network called 'coverage' and makes one - // identical to this one if it is not found. We want solidity coverage to - // accept this truffle.js file as valid so it will use our custom reporter, - // so we add the 'coverage' network manually here. - coverage: { - host: "localhost", - network_id: "*", - port: 8555, - gas: 17592186044415, - gasPrice: 1, - }, - // network to refer to ganache by name so it works with truffle/ganache in separate docker containers - localTestNet: { - host: "ganache", - port: 8545, - network_id: "*", // Match any network id - }, - // INFURA Setup - infura_mainnet: { - provider: function () { - return new HDWalletProvider( - mnemonic, - "https://mainnet.infura.io/" + access_token - ); - }, - network_id: 1, - }, - }, - mocha: { - /* - * To disable the spreadsheet verification tool ensure that - * the reporter is set to 'Spec' by commenting/uncommenting the lines below. - */ - reporter: "Spec", - //reporter: './verification/verification_reporter.js', - }, -}; From 9343b154e51d767653450bd986c4b4ea8396d999 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:39 -0700 Subject: [PATCH 06/22] Autoformat Markdown files --- .prettierrc | 6 + .vscode/settings.json | 3 + README.md | 75 ++++++----- doc/deployment.md | 79 ++++++----- doc/tokendesign.md | 185 +++++++++++++++++--------- doc/upgrade.md | 225 ++++++++++++++++++++------------ echidna_tests/README.md | 47 +++---- package.json | 2 +- validate/README.contractDiff.md | 38 +++--- validate/README.validate.md | 26 ++-- 10 files changed, 430 insertions(+), 256 deletions(-) diff --git a/.prettierrc b/.prettierrc index b6aa57af2..a5c35f86b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -19,6 +19,12 @@ "tabWidth": 4, "explicitTypes": "always" } + }, + { + "files": "*.md", + "options": { + "proseWrap": "always" + } } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 19586b9c7..780880947 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,6 +14,9 @@ "[json]": { "editor.formatOnSave": true }, + "[markdown]": { + "editor.formatOnSave": true + }, "[solidity]": { "editor.tabSize": 4, "editor.formatOnSave": true diff --git a/README.md b/README.md index cf1fdf91e..5f2be94ca 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,74 @@ # centre-tokens + Fiat tokens on the [CENTRE](https://centre.io) network. # Setup -Tests need node v8.0.0 or higher, as they depend on async/await functionality. Interacting with eth is very async-y so await makes it much easier to write tests. -Depends on truffle and testrpc for testing. -install truffle: -```npm install -g truffle``` +Tests need node v8.0.0 or higher, as they depend on async/await functionality. +Interacting with eth is very async-y so await makes it much easier to write +tests. Depends on truffle and testrpc for testing. + +install truffle: `npm install -g truffle` -install ganache-cli: -```npm install -g ganache-cli``` +install ganache-cli: `npm install -g ganache-cli` -install project npm dependencies: -```npm install``` +install project npm dependencies: `npm install` # Testing -All tests are run with: -```npm run truffle-test``` -or run a specific file of tests with: -```npm run truffle-test -- [file]``` +All tests are run with: `npm run truffle-test` -to generate test coverage on all tests run: -```npm test``` +or run a specific file of tests with: `npm run truffle-test -- [file]` +to generate test coverage on all tests run: `npm test` # Contracts -The implementation uses 2 separate contracts - a proxy contract (`FiatTokenProxy.sol`)and an implementation contract(`FiatToken.sol`). -This allows upgrading the contract, as a new implementation contact can be deployed and the Proxy updated to point to it. + +The implementation uses 2 separate contracts - a proxy contract +(`FiatTokenProxy.sol`)and an implementation contract(`FiatToken.sol`). This +allows upgrading the contract, as a new implementation contact can be deployed +and the Proxy updated to point to it. + ## FiatToken -The FiatToken offers a number of capabilities, which briefly are described below. There are more -[detailed design docs](./doc/tokendesign.md) in the `doc` folder. + +The FiatToken offers a number of capabilities, which briefly are described +below. There are more [detailed design docs](./doc/tokendesign.md) in the `doc` +folder. ### ERC20 compatible + The FiatToken implements the ERC20 interface. ### Pausable -The entire contract can be frozen, in case a serious bug is found or there is a serious key compromise. No transfers can take place while the contract is paused. -Access to the pause functionality is controlled by the `pauser` address. + +The entire contract can be frozen, in case a serious bug is found or there is a +serious key compromise. No transfers can take place while the contract is +paused. Access to the pause functionality is controlled by the `pauser` address. ### Upgradable -A new implementation contract can be deployed, and the proxy contract will forward calls to the new contract. -Access to the upgrade functionality is guarded by a `proxyOwner` address. Only the `proxyOwner` address can change the `proxyOwner` address. + +A new implementation contract can be deployed, and the proxy contract will +forward calls to the new contract. Access to the upgrade functionality is +guarded by a `proxyOwner` address. Only the `proxyOwner` address can change the +`proxyOwner` address. ### Blacklist -The contract can blacklist certain addresses which will prevent those addresses from transferring or receiving tokens. -Access to the blacklist functionality is controlled by the `blacklister` address. + +The contract can blacklist certain addresses which will prevent those addresses +from transferring or receiving tokens. Access to the blacklist functionality is +controlled by the `blacklister` address. ### Minting/Burning -Tokens can be minted or burned on demand. The contract supports having multiple minters simultaneously. There is a -`masterMinter` address which controls the list of minters and how much each is allowed to mint. The mint allowance is -similar to the ERC20 allowance - as each minter mints new tokens their allowance decreases. When it gets too low they will -need the allowance increased again by the `masterMinter`. + +Tokens can be minted or burned on demand. The contract supports having multiple +minters simultaneously. There is a `masterMinter` address which controls the +list of minters and how much each is allowed to mint. The mint allowance is +similar to the ERC20 allowance - as each minter mints new tokens their allowance +decreases. When it gets too low they will need the allowance increased again by +the `masterMinter`. ### Ownable -The contract has an Owner, who can change the `owner`, `pauser`, `blacklister`, or `masterMinter` addresses. The `owner` can not change -the `proxyOwner` address. +The contract has an Owner, who can change the `owner`, `pauser`, `blacklister`, +or `masterMinter` addresses. The `owner` can not change the `proxyOwner` +address. diff --git a/doc/deployment.md b/doc/deployment.md index c8fea26b3..06181ed82 100644 --- a/doc/deployment.md +++ b/doc/deployment.md @@ -1,16 +1,20 @@ # Initial Deployment -This is the process for deploying a new proxy and implementation (as opposed to upgrading an existing proxy). - -Since the proxy uses `delegatecall` to forward calls to the implementation initialization of the contracts becomes a little -tricky because we can not initialize fields in the implementation contract via the constructor. Instead there is an initialize -method in the implementation contract, which is publicly available, but can only be called once per proxy. +This is the process for deploying a new proxy and implementation (as opposed to +upgrading an existing proxy). +Since the proxy uses `delegatecall` to forward calls to the implementation +initialization of the contracts becomes a little tricky because we can not +initialize fields in the implementation contract via the constructor. Instead +there is an initialize method in the implementation contract, which is publicly +available, but can only be called once per proxy. ## Deploying the implementation contract + 1. Deploy [FiatTokenV1](../contracts/FiatTokenV1.sol) -2. Initialize the fields in FiatToken via the `initialize` method. The values are not important, but this will stop anyone -else initializing the roles and trying to use it as a token or pass it off as a real CENTRE token. +2. Initialize the fields in FiatToken via the `initialize` method. The values + are not important, but this will stop anyone else initializing the roles and + trying to use it as a token or pass it off as a real CENTRE token. ``` initialize( "", @@ -23,13 +27,14 @@ else initializing the roles and trying to use it as a token or pass it off as a throwawayAddress ) ``` -3. Verify that all fields in the FiatToken have been initialized correctly and have the expected values. -See [README.validate.md](../validate/validate.js). +3. Verify that all fields in the FiatToken have been initialized correctly and + have the expected values. See [README.validate.md](../validate/validate.js). ## Deploying a Proxy: -1. Obtain addresses for the various contract roles from CENTRE ops. The keys for these addresses will be stored offline. -The address needed are: +1. Obtain addresses for the various contract roles from CENTRE ops. The keys for + these addresses will be stored offline. The address needed are: + ``` admin masterMinter @@ -37,24 +42,33 @@ The address needed are: blacklister owner ``` - For details on what these roles can do, see the [Token Design Doc](tokendesign.md) -2. Deploy [FiatTokenProxy](../contracts/FiatTokenProxy.sol), passing the address of the deployed implementation contract -to the constructor, which will initialize the `_implementation` field. + For details on what these roles can do, see the + [Token Design Doc](tokendesign.md) + +2. Deploy [FiatTokenProxy](../contracts/FiatTokenProxy.sol), passing the address + of the deployed implementation contract to the constructor, which will + initialize the `_implementation` field. + +3. The `admin` of the proxy contract defaults to msg.sender. You must either + change the `admin` now, or send the remaining transactions from a different + address. The `admin` can only see methods in the Proxy, any method calls from + `admin` will not be forwarded to the implementation contract. The `admin` + address can be changed by calling `changeAdmin`. Note that change admin must + be called by the current admin. -3. The `admin` of the proxy contract defaults to msg.sender. You must either change the `admin` now, or send the remaining -transactions from a different address. The `admin` can only see methods in the Proxy, any method calls from `admin` will not -be forwarded to the implementation contract. -The `admin` address can be changed by calling `changeAdmin`. Note that change admin must be called by the current admin. ``` changeAdmin(adminAddress) ``` -4. Initialize the proxy, via the `initialize` method. This call will get forwarded to the implementation contract, but since -it is via `delegatecall` it will run in the context of the Proxy contract, so the fields it is initializing will be stored -it the storage of the Proxy. The values passed here are important, especially for the roles that will control the contract. -These addresses should be obtained from CENTRE ops, and the keys will be stored offline. +4. Initialize the proxy, via the `initialize` method. This call will get + forwarded to the implementation contract, but since it is via `delegatecall` + it will run in the context of the Proxy contract, so the fields it is + initializing will be stored it the storage of the Proxy. The values passed + here are important, especially for the roles that will control the contract. + These addresses should be obtained from CENTRE ops, and the keys will be + stored offline. ``` initialize( @@ -69,20 +83,25 @@ These addresses should be obtained from CENTRE ops, and the keys will be stored ) ``` -5. Verify the fields have been properly initialized. Verification should be performed independently by multiple people to make -sure that the contract has been deployed correctly. The following fields should be verified: +5. Verify the fields have been properly initialized. Verification should be + performed independently by multiple people to make sure that the contract has + been deployed correctly. The following fields should be verified: + - name, symbol, and currency are as expected - `decimals` is 6 - `masterMinter` is the expected address - `pauser` is the expected address - `blacklister` is the expected address - `owner` is the expected address - - `admin` is the expected address. Note that `admin` is not callable by anyone other than the admin, so this can be verified - by calling `eth.getStorageAt(proxyAddress, 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b)` - - `_implementation` is the address of the implementation contract. Note that `implementation` is not callable by - anyone other than the admin, so this can be verified by calling - `eth.getStorageAt(proxyAddress, 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3)` + - `admin` is the expected address. Note that `admin` is not callable by + anyone other than the admin, so this can be verified by calling + `eth.getStorageAt(proxyAddress, 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b)` + - `_implementation` is the address of the implementation contract. Note that + `implementation` is not callable by anyone other than the admin, so this + can be verified by calling + `eth.getStorageAt(proxyAddress, 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3)` - `totalSupply` is 0 - `initialized` is `true` -6. If all verification is successful, the contract is deployed and ready to go. If any verification steps failed, restart the process. +6. If all verification is successful, the contract is deployed and ready to go. + If any verification steps failed, restart the process. diff --git a/doc/tokendesign.md b/doc/tokendesign.md index ab38177c9..c0f405f94 100644 --- a/doc/tokendesign.md +++ b/doc/tokendesign.md @@ -1,141 +1,202 @@ # CENTRE Fiat Token -The CENTRE Fiat Token contract is an ERC-20 compatible token. -It allows minting/burning of tokens by multiple entities, pausing all activity, freezing of individual addresses, -and a way to upgrade the contract so that bugs can be fixed or features added. + +The CENTRE Fiat Token contract is an ERC-20 compatible token. It allows +minting/burning of tokens by multiple entities, pausing all activity, freezing +of individual addresses, and a way to upgrade the contract so that bugs can be +fixed or features added. ## Roles -The `FiatToken` has a number of roles (addresses) which control different functionality: -- `masterMinter` - adds and removes minters and increases their minting allowance + +The `FiatToken` has a number of roles (addresses) which control different +functionality: + +- `masterMinter` - adds and removes minters and increases their minting + allowance - `minters` - create and destroy tokens -- `pauser` - pause the contract, which prevents all transfers, minting, and burning -- `blacklister` - prevent all transfers to or from a particular address, and prevents that address from minting or burning +- `pauser` - pause the contract, which prevents all transfers, minting, and + burning +- `blacklister` - prevent all transfers to or from a particular address, and + prevents that address from minting or burning - `owner` - re-assign any of the roles except for `admin` - `admin` - upgrade the contract, and re-assign itself -CENTRE will control the address of all roles except for minters, which will be controlled by the entities that -CENTRE elects to make minters +CENTRE will control the address of all roles except for minters, which will be +controlled by the entities that CENTRE elects to make minters ## ERC-20 -The `FiatToken` implements the standard methods of the ERC-20 interface with some changes: - - A blacklisted address will be unable to call `transfer`, `transferFrom`, or `approve`, and will be unable to receive tokens. - - `transfer`, `transferFrom`, and `approve` will fail if the contract has been paused. +The `FiatToken` implements the standard methods of the ERC-20 interface with +some changes: + +- A blacklisted address will be unable to call `transfer`, `transferFrom`, or + `approve`, and will be unable to receive tokens. +- `transfer`, `transferFrom`, and `approve` will fail if the contract has been + paused. ## Issuing and Destroying tokens -The Fiat Token allows multiple entities to create and destroy tokens. -These entities will have to be members of CENTRE, and will be vetted by CENTRE before they are allowed to create new -tokens. CENTRE will not mint any tokens itself, it will approve members to mint and burn tokens. -Each `minter` has a `mintingAllowance`, which CENTRE configures. The `mintingAllowance` is how many tokens that minter -may issue, and as a `minter` issues tokens, its `mintingAllowance` declines. -CENTRE will periodically reset the `mintingAllowance` as long as a `minter` remains in good standing with CENTRE and maintains -adequate reserves for the tokens it has issued. The `mintingAllowance` is to limit the damage if any particular -`minter` is compromised. +The Fiat Token allows multiple entities to create and destroy tokens. These +entities will have to be members of CENTRE, and will be vetted by CENTRE before +they are allowed to create new tokens. CENTRE will not mint any tokens itself, +it will approve members to mint and burn tokens. + +Each `minter` has a `mintingAllowance`, which CENTRE configures. The +`mintingAllowance` is how many tokens that minter may issue, and as a `minter` +issues tokens, its `mintingAllowance` declines. CENTRE will periodically reset +the `mintingAllowance` as long as a `minter` remains in good standing with +CENTRE and maintains adequate reserves for the tokens it has issued. The +`mintingAllowance` is to limit the damage if any particular `minter` is +compromised. ### Adding Minters -CENTRE adds minters via the `configureMinter` method. When a minter is configured a `mintingAllowance` is specified, -which is the number of tokens that address is allowed to mint. As a `minter` mints tokens, the `mintingAllowance` will decline. + +CENTRE adds minters via the `configureMinter` method. When a minter is +configured a `mintingAllowance` is specified, which is the number of tokens that +address is allowed to mint. As a `minter` mints tokens, the `mintingAllowance` +will decline. - Only the `masterMinter` role may call configureMinter. ### Resetting Minting Allowance -The `minters` will need their allowance reset periodically to allow them to continue -minting. When a `minter`'s allowance is low, CENTRE can make another call to `configureMinter` to reset the -`mintingAllowance` to a higher value. + +The `minters` will need their allowance reset periodically to allow them to +continue minting. When a `minter`'s allowance is low, CENTRE can make another +call to `configureMinter` to reset the `mintingAllowance` to a higher value. ### Removing Minters -CENTRE removes minters via the `removeMinter` method. This will remove the `minter` from the list of `minters` and set -its `mintingAllowance` to 0. Once a `minter` is removed it will no longer be able to mint or burn tokens. - - Only the `masterMinter` role may call `removeMinter`. +CENTRE removes minters via the `removeMinter` method. This will remove the +`minter` from the list of `minters` and set its `mintingAllowance` to 0. Once a +`minter` is removed it will no longer be able to mint or burn tokens. + +- Only the `masterMinter` role may call `removeMinter`. ### Minting -A `minter` mints tokens via the `mint` method. The `minter` specifies the `amount` of tokens to create, and a `_to` -address which will own the newly created tokens. A `minter` may only mint an amount less than or equal to its `mintingAllowance`. -The `mintingAllowance` will decrease by the amount of tokens minted, and the balance of the `_to` address and `totalSupply` -will each increase by `amount`. + +A `minter` mints tokens via the `mint` method. The `minter` specifies the +`amount` of tokens to create, and a `_to` address which will own the newly +created tokens. A `minter` may only mint an amount less than or equal to its +`mintingAllowance`. The `mintingAllowance` will decrease by the amount of tokens +minted, and the balance of the `_to` address and `totalSupply` will each +increase by `amount`. - Only a `minter` may call `mint`. - Minting fails when the contract is `paused`. - Minting fails when the `minter` or `_to` address is blacklisted. -- Minting emits a `Mint(minter, _to, amount)` event and a `Transfer(0x00, _to, amount)` event. +- Minting emits a `Mint(minter, _to, amount)` event and a + `Transfer(0x00, _to, amount)` event. + ### Burning -A `minter` burns tokens via the `burn` method. The `minter` specifies the `amount` of tokens to burn, and the `minter` -must have a `balance` greater than or equal to the `amount`. Burning tokens is restricted to `minter` addresses to -avoid accidental burning of tokens by end users. A `minter` with a `mintingAllowance` of 0 is allowed to burn tokens. -A `minter` can only burn tokens which it owns. -When a minter burns tokens, its balance and the totalSupply are reduced by `amount`. -Burning tokens will not increase the mintingAllowance of the address doing the burning. +A `minter` burns tokens via the `burn` method. The `minter` specifies the +`amount` of tokens to burn, and the `minter` must have a `balance` greater than +or equal to the `amount`. Burning tokens is restricted to `minter` addresses to +avoid accidental burning of tokens by end users. A `minter` with a +`mintingAllowance` of 0 is allowed to burn tokens. A `minter` can only burn +tokens which it owns. When a minter burns tokens, its balance and the +totalSupply are reduced by `amount`. + +Burning tokens will not increase the mintingAllowance of the address doing the +burning. - Only a minter may call burn. - Burning fails when the contract is paused. -- Burning fails when the minter is blacklisted. +- Burning fails when the minter is blacklisted. -- Burning emits a `Burn(minter, amount)` event, and a `Transfer(minter, 0x00, amount)` event. +- Burning emits a `Burn(minter, amount)` event, and a + `Transfer(minter, 0x00, amount)` event. ## Blacklisting -Addresses can be blacklisted. A blacklisted address will be unable to transfer tokens, approve, mint, or burn tokens. + +Addresses can be blacklisted. A blacklisted address will be unable to transfer +tokens, approve, mint, or burn tokens. + ### Adding a blacklisted address -CENTRE blacklists an address via the `blacklist` method. The specified `account` will be added to the blacklist. + +CENTRE blacklists an address via the `blacklist` method. The specified `account` +will be added to the blacklist. - Only the `blacklister` role may call `blacklist`. - Blacklisting emits a `Blacklist(account)` event ### Removing a blacklisted address -CENTRE removes an address from the blacklist via the `unblacklist` method. The specified `account` will be removed from the blacklist. + +CENTRE removes an address from the blacklist via the `unblacklist` method. The +specified `account` will be removed from the blacklist. - Only the `blacklister` role may call `unblacklist`. - Unblacklisting emits an `UnBlacklist(account)` event. ## Pausing -The entire contract can be paused in case a serious bug is found or there is a serious key compromise. -All transfers, minting, burning, and adding minters will be prevented while the contract is paused. Other functionality, such as modifying -the blacklist, removing minters, changing roles, and upgrading will remain operational as those methods may be -required to fix or mitigate the issue that caused CENTRE to pause the contract. + +The entire contract can be paused in case a serious bug is found or there is a +serious key compromise. All transfers, minting, burning, and adding minters will +be prevented while the contract is paused. Other functionality, such as +modifying the blacklist, removing minters, changing roles, and upgrading will +remain operational as those methods may be required to fix or mitigate the issue +that caused CENTRE to pause the contract. ### Pause -CENTRE will pause the contract via the `pause` method. This method will set the paused flag to true. + +CENTRE will pause the contract via the `pause` method. This method will set the +paused flag to true. - Only the `pauser` role may call pause. - Pausing emits a `Pause()` event ### Unpause -CENTRE will unpause the contract via the `unpause` method. This method will set the `paused` flag to false. -All functionality will be restored when the contract is unpaused. + +CENTRE will unpause the contract via the `unpause` method. This method will set +the `paused` flag to false. All functionality will be restored when the contract +is unpaused. - Only the `pauser` role may call unpause. - Unpausing emits an `Unpause()` event ## Upgrading -The Fiat Token uses the zeppelinos Unstructured-Storage Proxy pattern [https://docs.zeppelinos.org/docs/upgradeability_AdminUpgradeabilityProxy.html]. [FiatTokenV1.sol](../contracts/FiatTokenV1.sol) is the implementation, the actual token will be a - Proxy contract ([FiatTokenProxy.sol](../contracts/FiatTokenProxy.sol)) which will forward all calls to `FiatToken` via - delegatecall. This pattern allows CENTRE to upgrade the logic of any deployed tokens seamlessly. -- CENTRE will upgrade the token via a call to `upgradeTo` or `upgradeToAndCall` if initialization is required for the new version. -- Only the `admin` role may call `upgradeTo` or `upgradeToAndCall`. +The Fiat Token uses the zeppelinos Unstructured-Storage Proxy pattern +[https://docs.zeppelinos.org/docs/upgradeability_AdminUpgradeabilityProxy.html]. +[FiatTokenV1.sol](../contracts/FiatTokenV1.sol) is the implementation, the +actual token will be a Proxy contract +([FiatTokenProxy.sol](../contracts/FiatTokenProxy.sol)) which will forward all +calls to `FiatToken` via delegatecall. This pattern allows CENTRE to upgrade the +logic of any deployed tokens seamlessly. + +- CENTRE will upgrade the token via a call to `upgradeTo` or `upgradeToAndCall` + if initialization is required for the new version. +- Only the `admin` role may call `upgradeTo` or `upgradeToAndCall`. ## Reassigning Roles -The roles outlined above may be reassigned. -The `owner` role has the ability to reassign all roles (including itself) except for the `admin` role. + +The roles outlined above may be reassigned. The `owner` role has the ability to +reassign all roles (including itself) except for the `admin` role. ### Admin + - `changeAdmin` updates the `admin` role to a new address. - `changeAdmin` may only be called by the `admin` role. + ### Master Minter + - `updateMasterMinter` updates the `masterMinter` role to a new address. - `updateMasterMinter` may only be called by the `owner` role. + ### Pauser + - `updatePauser` updates the `pauser` role to a new address. -- `updatePauser` may only be called by the `owner` role. +- `updatePauser` may only be called by the `owner` role. + ### Blacklister + - `updateBlacklister` updates the `blacklister` role to a new address. -- `updateBlacklister` may only be called by the `owner` role. +- `updateBlacklister` may only be called by the `owner` role. + ### Owner -- `transferOwnership` updates the `owner` role to a new address. -- `transferOwnership` may only be called by the `owner` role. +- `transferOwnership` updates the `owner` role to a new address. +- `transferOwnership` may only be called by the `owner` role. diff --git a/doc/upgrade.md b/doc/upgrade.md index db1b04ae9..ae7578789 100644 --- a/doc/upgrade.md +++ b/doc/upgrade.md @@ -1,108 +1,169 @@ # Upgrading a FiatToken -This is the process for creating an upgraded token, deploying the upgraded token, and pointing an existing proxy to the upgraded token. +This is the process for creating an upgraded token, deploying the upgraded +token, and pointing an existing proxy to the upgraded token. ## Upgraded Token Construction + An upgraded token can have: -1) New logic (functions) -2) New fields (data) -3) New logic and new fields -Each situation is addressed in a section below. +1. New logic (functions) +2. New fields (data) +3. New logic and new fields + +Each situation is addressed in a section below. ### New Logic Only -A template for the next upgraded contract for new logic is kept in /contracts with the file name FiatTokenV[X].sol where X is the version number. The upgraded contract *must* inherit from the current contract. For example, if upgrading from version 1 to version 2, the contract would have the format: - ``` - import './FiatTokenV1.sol'; +A template for the next upgraded contract for new logic is kept in /contracts +with the file name FiatTokenV[X].sol where X is the version number. The upgraded +contract _must_ inherit from the current contract. For example, if upgrading +from version 1 to version 2, the contract would have the format: - /** - \* @title FiatTokenV2 - \* @dev ERC20 Token backed by fiat reserves - **/ - contract FiatTokenV2 is FiatTokenV1 { - ... - } +``` +import './FiatTokenV1.sol'; - ``` +/** + \* @title FiatTokenV2 + \* @dev ERC20 Token backed by fiat reserves + **/ +contract FiatTokenV2 is FiatTokenV1 { + ... +} -All that remains is to add the new logic (functions) as part of the body (denoted by ... in the code above) of the contract. -Note that `private` *functions* will not be inherited in subsequent contract versions and should be added with care. +``` + +All that remains is to add the new logic (functions) as part of the body +(denoted by ... in the code above) of the contract. Note that `private` +_functions_ will not be inherited in subsequent contract versions and should be +added with care. ### New Fields Only -Adding new fields requires inheriting from the prior version of the contract as done in [New Logic](#new-logic-only). In addition, the new contract requires declaring new data fields and, if the data fields must be initialized to non-default values, adding initialization logic for the new fields. New variables added *must* be declared as type `internal` or `public`, `private` can never be used. Note that `private` *functions* will also not be inherited in subsequent contract versions and should be added with care. Also note that inline initialization of variables as part of declaration has no effect as the proxy never executes this code (for example, bool public newBool = true is not in fact initialized to true). If possible, new fields should be added that can start with default solidity values and do not need initialization. However, if any new fields require initialization to non-default values, the new token must add an *initialize* function and a *initV[X]* function, where X is the version of the contract. The initialization function allows the contract to be deployed from scratch and initialize all variables declared in the new contract and in prior contracts. The initV[X] function allows the contract to initialize only the new variables added in the new contract. A template is shown below for upgrading from version 1 to version 2. In the example, we add variables newBool, newAddress, and newUint, which would be replaced with the real variables added. - - ``` - import './FiatTokenV1.sol'; - - /** - \* @title FiatTokenV2 - \* @dev ERC20 Token backed by fiat reserves - **/ - contract FiatTokenV2 is FiatTokenV1 { - - bool public newBool; - address public newAddress; - uint256 public newUint; - bool internal initializedV2; - - function initialize( - string _name, - string _symbol, - string _currency, - uint8 _decimals, - address _masterMinter, - address _pauser, - address _blacklister, - address _owner, - bool _newBool, - address _newAddress, - uint256 _newUint - ) public { - super.initialize(_name, _symbol, _currency, _decimals, _masterMinter, _pauser, _blacklister, _owner); - initV2(_newBool, _newAddress, _newUint); - } - - function initV2(bool _newBool, address _newAddress, uint256 _newUint) public { - require(!initializedV2); - newBool = _newBool; - newAddress = _newAddress; - newUint = _newUint; - initializedV2 = true; - } - ... - - ``` - *Note the addition of a new initializedV[X] variable that is checked and set in initV[X].* - *Note the structure of initialized that uses a super call with previously set parameters as well as a call to initV[X].* + +Adding new fields requires inheriting from the prior version of the contract as +done in [New Logic](#new-logic-only). In addition, the new contract requires +declaring new data fields and, if the data fields must be initialized to +non-default values, adding initialization logic for the new fields. New +variables added _must_ be declared as type `internal` or `public`, `private` can +never be used. Note that `private` _functions_ will also not be inherited in +subsequent contract versions and should be added with care. Also note that +inline initialization of variables as part of declaration has no effect as the +proxy never executes this code (for example, bool public newBool = true is not +in fact initialized to true). If possible, new fields should be added that can +start with default solidity values and do not need initialization. However, if +any new fields require initialization to non-default values, the new token must +add an _initialize_ function and a _initV[X]_ function, where X is the version +of the contract. The initialization function allows the contract to be deployed +from scratch and initialize all variables declared in the new contract and in +prior contracts. The initV[X] function allows the contract to initialize only +the new variables added in the new contract. A template is shown below for +upgrading from version 1 to version 2. In the example, we add variables newBool, +newAddress, and newUint, which would be replaced with the real variables added. + +``` +import './FiatTokenV1.sol'; + +/** + \* @title FiatTokenV2 + \* @dev ERC20 Token backed by fiat reserves + **/ +contract FiatTokenV2 is FiatTokenV1 { + + bool public newBool; + address public newAddress; + uint256 public newUint; + bool internal initializedV2; + + function initialize( + string _name, + string _symbol, + string _currency, + uint8 _decimals, + address _masterMinter, + address _pauser, + address _blacklister, + address _owner, + bool _newBool, + address _newAddress, + uint256 _newUint + ) public { + super.initialize(_name, _symbol, _currency, _decimals, _masterMinter, _pauser, _blacklister, _owner); + initV2(_newBool, _newAddress, _newUint); + } + + function initV2(bool _newBool, address _newAddress, uint256 _newUint) public { + require(!initializedV2); + newBool = _newBool; + newAddress = _newAddress; + newUint = _newUint; + initializedV2 = true; + } + ... + +``` + +_Note the addition of a new initializedV[X] variable that is checked and set in +initV[X]._ _Note the structure of initialized that uses a super call with +previously set parameters as well as a call to initV[X]._ ### New Logic and New Fields -The case requires the same steps as [New Fields](#new-fields-only) plus the addition of new functions as done in [New Logic](#new-logic-only). +The case requires the same steps as [New Fields](#new-fields-only) plus the +addition of new functions as done in [New Logic](#new-logic-only). ## Upgraded Token Deployment + Deployment can be done in the following steps: - 1) Write any new logic and new fields in the new contract (as described above) - 2) Test any new fields and logic added to the contract (including positive, negative, and extended tests following the current testing strategy) - 3) Ensure the test suite has run on the final version of the new contract with added tests and that the test suite passes with 100% code coverage - 4) Complete any external audits as deemed necessary - 5) Go back to step 1 if any prior step is not completed successfully - 6) Deploy the contract by following *Deployment Instructions* in *only* section *Deploying the implementation contract* [instructions](deployment.md#Deploying-the-implementation-contract). When invoking `initialize` in following deployment instructions, the latest version of `initialize` should be called. + +1. Write any new logic and new fields in the new contract (as described above) +2. Test any new fields and logic added to the contract (including positive, + negative, and extended tests following the current testing strategy) +3. Ensure the test suite has run on the final version of the new contract with + added tests and that the test suite passes with 100% code coverage +4. Complete any external audits as deemed necessary +5. Go back to step 1 if any prior step is not completed successfully +6. Deploy the contract by following _Deployment Instructions_ in _only_ section + _Deploying the implementation contract_ + [instructions](deployment.md#Deploying-the-implementation-contract). When + invoking `initialize` in following deployment instructions, the latest + version of `initialize` should be called. ## Upgrading the Proxy to point to the UpgradedToken -The proxy must be pointed to the new upgraded token. This is accomplished two ways depending on whether only new logic was added or if new fields (and possibly new logic) were added. -### Upgrading if *ONLY* New Logic Added -1) Prepare an upgradeTo transaction from the adminAccount parameterized with the address of the new upgraded token. -2) Broadcast the transaction -3) Check that the implementation field of the proxy matches the address of the upgraded token by calling web3.eth.getStorageAt(proxy.address, implSlot), where implSlot is defined in the contract as a hardcoded field. As of CENTRE Fiat Token v1.0.0 that slot is 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b. Alternatively, getImplementation may be called on the proxy with the adminAccount. -4) If the address in 3) does not match, it is likely a wrong address was used. Repeat the process from step 1). +The proxy must be pointed to the new upgraded token. This is accomplished two +ways depending on whether only new logic was added or if new fields (and +possibly new logic) were added. + +### Upgrading if _ONLY_ New Logic Added + +1. Prepare an upgradeTo transaction from the adminAccount parameterized with the + address of the new upgraded token. +2. Broadcast the transaction +3. Check that the implementation field of the proxy matches the address of the + upgraded token by calling web3.eth.getStorageAt(proxy.address, implSlot), + where implSlot is defined in the contract as a hardcoded field. As of CENTRE + Fiat Token v1.0.0 that slot is + 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b. + Alternatively, getImplementation may be called on the proxy with the + adminAccount. +4. If the address in 3) does not match, it is likely a wrong address was used. + Repeat the process from step 1). ### Upgrading if New Fields (and possibly new Logic) Added -1) Prepare an upgradeToAndCall transaction from the adminAccount parameterized with the address of the new upgraded token and an internal call to invoke initV[X] with the new data fields. -2) Broadcast the transaction -3) Check that the implementation field of the proxy matches the address of the upgraded token by calling web3.eth.getStorageAt(proxy.address, implSlot), where implSlot is defined in the contract as a hardcoded field. As of CENTRE Fiat Token v1.0.0 that slot is 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b. Alternatively, getImplementation may be called on the proxy with the admin account. -4) If the address in 3) does not match, it is likely a wrong address was used. Repeat the process from step 1). -5) Verify that the new fields were set correctly as done in *Deployment Instructions* [verification](deployment.md) -6) If verification fails, restart the process from step 1) +1. Prepare an upgradeToAndCall transaction from the adminAccount parameterized + with the address of the new upgraded token and an internal call to invoke + initV[X] with the new data fields. +2. Broadcast the transaction +3. Check that the implementation field of the proxy matches the address of the + upgraded token by calling web3.eth.getStorageAt(proxy.address, implSlot), + where implSlot is defined in the contract as a hardcoded field. As of CENTRE + Fiat Token v1.0.0 that slot is + 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b. + Alternatively, getImplementation may be called on the proxy with the admin + account. +4. If the address in 3) does not match, it is likely a wrong address was used. + Repeat the process from step 1). +5. Verify that the new fields were set correctly as done in _Deployment + Instructions_ [verification](deployment.md) +6. If verification fails, restart the process from step 1) diff --git a/echidna_tests/README.md b/echidna_tests/README.md index 0f8c3b313..7558073b2 100644 --- a/echidna_tests/README.md +++ b/echidna_tests/README.md @@ -1,39 +1,40 @@ #Setup -1. Install the full version of [solc](http://solidity.readthedocs.io/en/v0.4.24/installing-solidity.html) via homebrew (not npm). +1. Install the full version of + [solc](http://solidity.readthedocs.io/en/v0.4.24/installing-solidity.html) + via homebrew (not npm). 2. Clone the echidna repository by running: -`git submodule add git@github.com:trailofbits/echidna.git` -`git submodule update --init --recursive` -Make sure that the `echidna` directory appears in your project root directory. -(echidna is included in .gitignore) + `git submodule add git@github.com:trailofbits/echidna.git` + `git submodule update --init --recursive` Make sure that the `echidna` + directory appears in your project root directory. (echidna is included in + .gitignore) -3. Install stack: -`brew install haskell-stack` +3. Install stack: `brew install haskell-stack` -4. Run the following commands from inside the echidna directory. Ignore all warnings. -`stack upgrade` -`stack setup` -`stack install` +4. Run the following commands from inside the echidna directory. Ignore all + warnings. `stack upgrade` `stack setup` `stack install` 5. If this gives you errors involving 'readline' on MacOS, try running: -`brew install readline` -`brew link readline --force` -`export LDFLAGS=-L/usr/local/opt/readline/lib` -`export CPPFLAGS=-I/usr/local/opt/readline/include` -`stack install readline --extra-include-dirs=/usr/local/opt/readline/include --extra-lib-dirs=/usr/local/opt/readline/lib` -`stack install` + `brew install readline` `brew link readline --force` + `export LDFLAGS=-L/usr/local/opt/readline/lib` + `export CPPFLAGS=-I/usr/local/opt/readline/include` + `stack install readline --extra-include-dirs=/usr/local/opt/readline/include --extra-lib-dirs=/usr/local/opt/readline/lib` + `stack install` 6. Add `/Users/$(whoami)/.local/bin` to your `PATH` variable: -`export PATH=$PATH:/Users/$(whoami)/.local/bin` + `export PATH=$PATH:/Users/$(whoami)/.local/bin` -7. Open `echidna_tests/config.yaml` in a text editor and replace the words `REPLACE_WITH_PWD` -with the path to the project root directory. To get this path, run `echo $PWD`. +7. Open `echidna_tests/config.yaml` in a text editor and replace the words + `REPLACE_WITH_PWD` with the path to the project root directory. To get this + path, run `echo $PWD`. 8. The echidna_tests suite contains negative and positive test files. -* To run the positive tests, open `config.yaml` and set the field `returnType` + +- To run the positive tests, open `config.yaml` and set the field `returnType` to `Success`. Then, run the following command from the project root directory: `echidna-test echidna_tests/positive.sol Test --config="echidna_tests/config.yaml"` -* To run the negative tests, open `config.yaml` and set the field `returnType` - to `Fail or Throw`. Then, run the following command from the project root directory: +- To run the negative tests, open `config.yaml` and set the field `returnType` + to `Fail or Throw`. Then, run the following command from the project root + directory: `echidna-test echidna_tests/negative.sol Test --config="echidna_tests/config.yaml"` diff --git a/package.json b/package.json index 587055e39..021145536 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ }, "scripts": { "dev": "lite-server", - "fmt": "prettier --write **/*.sol **/*.js **/*.json *.js *.json", "coverage": "yarn run coverage", "test": "scripts/start-ganache.sh && truffle test" + "fmt": "prettier --write **/*.sol **/*.js **/*.json **/*.md *.js *.json *.md", }, "repository": { "type": "git", diff --git a/validate/README.contractDiff.md b/validate/README.contractDiff.md index 9655d5938..6b4358f37 100644 --- a/validate/README.contractDiff.md +++ b/validate/README.contractDiff.md @@ -1,25 +1,28 @@ # Overview -The `checkDiff` script compares source code uploaded to Etherscan to source -code on the local machine. -The source code in Etherscan is a concatenation of several files. The script reads -comments inside the files to determine which local files were used, then it reads the -file and reconstructs the expected source code. +The `checkDiff` script compares source code uploaded to Etherscan to source code +on the local machine. -The script displays a `diff` between the actual and expected code. The difference -should fall in the following categories: +The source code in Etherscan is a concatenation of several files. The script +reads comments inside the files to determine which local files were used, then +it reads the file and reconstructs the expected source code. + +The script displays a `diff` between the actual and expected code. The +difference should fall in the following categories: 1. Comments / whitespace -2. The local code has `import` statements not included in Etherscan because the files were -explicitly concatenated into a master file. -3. The local code has extra `pragma solidity ^0.4.24` statements at the head of each file, -while Etherscan should have just one at the top. +2. The local code has `import` statements not included in Etherscan because the + files were explicitly concatenated into a master file. +3. The local code has extra `pragma solidity ^0.4.24` statements at the head of + each file, while Etherscan should have just one at the top. -At the end of the run, `checkDiff` will output which files it was able to process. Success -means that the Etherscan file could be read AND all the included files could be read. -Validity should be determined by actually looking at the diffs. +At the end of the run, `checkDiff` will output which files it was able to +process. Success means that the Etherscan file could be read AND all the +included files could be read. Validity should be determined by actually looking +at the diffs. # Running checkDiff.js + To run the script, type `node validate/contractDiff.js ... ` @@ -31,11 +34,13 @@ You can test them: `node validate/contractDiff.js validate/FiatTokenProxy.etherscan validate/FiatTokenV1.etherscan` # Finding code on Etherscan + 1. Go to [https://etherscan.io](https://etherscan.io) -2. Enter the contract address in the search bar. +2. Enter the contract address in the search bar. 3. Click on the `Code` tab. # Uploading to Etherscan + When uploading source code to Etherscan, you will need to combine several file. Before the start of an included file, add the comment: @@ -45,9 +50,8 @@ For example, to include `contracts/Ownable.sol`, add the comment `// File: contracts/Ownable.sol` -For Open Zeppelin files, omit the `node_modules` directory. For example: +For Open Zeppelin files, omit the `node_modules` directory. For example: `// File: openzeppelin-solidity/contracts/math/SafeMath.sol` `// File: zos-lib/contracts/upgradeability/Proxy.sol` - diff --git a/validate/README.validate.md b/validate/README.validate.md index e15bc2723..2f379a601 100644 --- a/validate/README.validate.md +++ b/validate/README.validate.md @@ -1,28 +1,32 @@ # Overview -The `validate.js` script connects to the Ethereum blockchain to validate -the values stored in the contract. + +The `validate.js` script connects to the Ethereum blockchain to validate the +values stored in the contract. # Infura Setup Note: Infura is a 3rd party provider. -1. Got to [https://infura.io](https://infura.io) and click "Get Started For Free" to register an email with Infura. +1. Got to [https://infura.io](https://infura.io) and click "Get Started For + Free" to register an email with Infura. -2. Click on the "Dashboards" icon at the top of the Infura homepage or go to -https://infura.io/dashboard to access your personal dashboard. +2. Click on the "Dashboards" icon at the top of the Infura homepage or go to + https://infura.io/dashboard to access your personal dashboard. -3. Create a new project - give it any name you want. Then whitelist the Token Proxy and the -current Token Implementation addresses. +3. Create a new project - give it any name you want. Then whitelist the Token + Proxy and the current Token Implementation addresses. -4. Create a local file `./validate/apikey.infura`. Copy the API Key from your project dashboard into -the file and save. +4. Create a local file `./validate/apikey.infura`. Copy the API Key from your + project dashboard into the file and save. # Configure Expected Values + Go to ./validate/validate.js and change the addresses at the top of the file, as well as any other constants. # Validation -Run ```truffle exec ./validate/validate.js --network infura_mainnet``` +Run `truffle exec ./validate/validate.js --network infura_mainnet` -You can replace `infura_mainnet` with any other network defined in `truffle.js` under `networks`. \ No newline at end of file +You can replace `infura_mainnet` with any other network defined in `truffle.js` +under `networks`. From 7172076a8f478cd5fa53a0dceb42606dc5eda0ce Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:41 -0700 Subject: [PATCH 07/22] Fix tests that broke due to Truffle upgrade --- .gitignore | 2 +- README.md | 48 ++++-- migrations/2_deploy_usdc.js | 48 +++--- package.json | 6 +- test/ABITests.test.js | 76 ++++++---- test/ABIUtils.js | 14 +- test/ExtendedPositiveTests.js | 20 ++- test/FiatTokenLegacy.test.js | 145 ++++++------------ test/MiscTests.js | 182 +++++++++++------------ test/NegativeTests.js | 272 ++++++++++++++-------------------- test/Pausable.test.js | 7 - test/PositiveTests.js | 65 ++++---- test/ProxyNegativeTests.js | 21 +-- test/ProxyPositiveTests.js | 55 +++---- test/TokenTestUtils.js | 191 ++++++++++++------------ 15 files changed, 536 insertions(+), 616 deletions(-) diff --git a/.gitignore b/.gitignore index 6d4426c11..d4012c411 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store build/ node_modules/ coverage/ @@ -6,7 +7,6 @@ package-lock.json .idea/ #local codebuild results artifacts/ -.DS_Store contracts/.DS_Store token.json credentials.json diff --git a/README.md b/README.md index 5f2be94ca..ecf33d11d 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,54 @@ Fiat tokens on the [CENTRE](https://centre.io) network. -# Setup +## Setup -Tests need node v8.0.0 or higher, as they depend on async/await functionality. -Interacting with eth is very async-y so await makes it much easier to write -tests. Depends on truffle and testrpc for testing. +Requirements: -install truffle: `npm install -g truffle` +- Node >= v12 +- Yarn -install ganache-cli: `npm install -g ganache-cli` +``` +$ git clone git@github.com:centrehq/centre-tokens.git +$ cd centre-tokens +$ npm i -g yarn # Install yarn if you don't already have it +$ yarn install # Install dependencies +``` -install project npm dependencies: `npm install` +## Testing -# Testing +First, make sure Ganache is running. -All tests are run with: `npm run truffle-test` +``` +$ yarn ganache +``` -or run a specific file of tests with: `npm run truffle-test -- [file]` +Run all tests: -to generate test coverage on all tests run: `npm test` +``` +$ yarn test +``` -# Contracts +To run tests in a specific file, run: + +``` +$ yarn test [path/to/file] +``` + +to generate test coverage, run: + +``` +$ yarn coverage +``` + +## Contracts The implementation uses 2 separate contracts - a proxy contract -(`FiatTokenProxy.sol`)and an implementation contract(`FiatToken.sol`). This +(`FiatTokenProxy.sol`) and an implementation contract (`FiatToken.sol`). This allows upgrading the contract, as a new implementation contact can be deployed and the Proxy updated to point to it. -## FiatToken +### FiatToken The FiatToken offers a number of capabilities, which briefly are described below. There are more [detailed design docs](./doc/tokendesign.md) in the `doc` diff --git a/migrations/2_deploy_usdc.js b/migrations/2_deploy_usdc.js index c84f0fcda..5da526918 100644 --- a/migrations/2_deploy_usdc.js +++ b/migrations/2_deploy_usdc.js @@ -4,29 +4,29 @@ var FiatTokenProxy = artifacts.require("./FiatTokenProxy.sol"); // Any address will do, preferably one we generated var throwawayAddress = "0x64e078a8aa15a41b85890265648e965de686bae6"; -module.exports = function (deployer, network, accounts) { - if (network == "development" || network == "coverage") { +module.exports = function (deployer, network) { + if (["development", "coverage", "test"].includes(network)) { // Change these to the cold storage addresses provided by ops // these are the deterministic addresses from ganache, so the private keys are well known // and match the values we use in the tests - var admin = "0x2f560290fef1b3ada194b6aa9c40aa71f8e95598"; - var masterMinter = "0x3e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9"; - var pauser = "0xaca94ef8bd5ffee41947b4585a84bda5a3d3da6e"; - var blacklister = "0xd03ea8624c8c5987235048901fb614fdca89b117"; - var owner = "0xe11ba2b4d45eaed5996cd0823791e0c93114882d"; + var admin = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; + var masterMinter = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; + var pauser = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; + var blacklister = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; + var owner = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; } console.log("deploying impl"); - var fiatTokenImpl; - var tokenProxy; // deploy implementation contract deployer .deploy(FiatTokenV1) - .then(function (impl) { - fiatTokenImpl = impl; + .then(function () { + return FiatTokenV1.deployed(); + }) + .then(function (fiatTokenV1) { console.log("initializing impl with dummy values"); - return impl.initialize( + return fiatTokenV1.initialize( "", "", "", @@ -37,23 +37,27 @@ module.exports = function (deployer, network, accounts) { throwawayAddress ); }) - .then(function (initDone) { + .then(function () { console.log("deploying proxy"); - return deployer.deploy(FiatTokenProxy, fiatTokenImpl.address); + return deployer.deploy(FiatTokenProxy, FiatTokenV1.address); + }) + .then(function () { + return FiatTokenProxy.deployed(); }) - .then(function (proxy) { - tokenProxy = proxy; + .then(function (fiatTokenProxy) { console.log("reassigning proxy admin"); // need to change admin first, or the call to initialize won't work // since admin can only call methods in the proxy, and not forwarded methods - return proxy.changeAdmin(admin); + return fiatTokenProxy.changeAdmin(admin); + }) + .then(function () { + return FiatTokenV1.at(FiatTokenProxy.address); }) - .then(function (changeAdminDone) { + .then(function (fiatTokenProxyAsFiatTokenV1) { console.log("initializing proxy"); // Pretend that the proxy address is a FiatTokenV1 // this is fine because the proxy will forward all the calls to the FiatTokenV1 impl - tokenProxy = FiatTokenV1.at(tokenProxy.address); - return tokenProxy.initialize( + return fiatTokenProxyAsFiatTokenV1.initialize( "USD//C", "USDC", "USD", @@ -64,7 +68,7 @@ module.exports = function (deployer, network, accounts) { owner ); }) - .then(function (initDone) { - console.log("Deployer proxy at ", tokenProxy.address); + .then(function () { + console.log("deployed proxy at ", FiatTokenProxy.address); }); }; diff --git a/package.json b/package.json index 021145536..cfa9b3aa0 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "test": "test" }, "scripts": { - "dev": "lite-server", - "coverage": "yarn run coverage", - "test": "scripts/start-ganache.sh && truffle test" "fmt": "prettier --write **/*.sol **/*.js **/*.json **/*.md *.js *.json *.md", + "coverage": "truffle run coverage", + "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --quiet", + "test": "truffle test" }, "repository": { "type": "git", diff --git a/test/ABITests.test.js b/test/ABITests.test.js index 5cb7e14b2..2bd36ef1c 100644 --- a/test/ABITests.test.js +++ b/test/ABITests.test.js @@ -1,4 +1,4 @@ -var Tx = require("ethereumjs-tx"); +var Transaction = require("ethereumjs-tx").Transaction; var tokenUtils = require("./TokenTestUtils"); var FiatToken = tokenUtils.FiatToken; var name = tokenUtils.name; @@ -68,9 +68,11 @@ async function run_tests(newToken, accounts) { // sanity check for pausable it("abi004 FiatToken pause() is public", async function () { let badData = functionSignature("pause()"); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(pauserAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -87,9 +89,11 @@ async function run_tests(newToken, accounts) { it("abi040 Blacklistable constructor is not a function", async function () { let badData = functionSignature("Blacklistable()"); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(pauserAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -104,9 +108,11 @@ async function run_tests(newToken, accounts) { it("abi042 Ownable constructor is not a function", async function () { let badData = functionSignature("Ownable()"); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(pauserAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -121,9 +127,11 @@ async function run_tests(newToken, accounts) { it("abi005 Pausable constructor is not a function", async function () { let badData = functionSignature("Pausable()"); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(pauserAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -138,9 +146,11 @@ async function run_tests(newToken, accounts) { it("abi043 FiatTokenProxy constructor is not a function", async function () { let badData = functionSignature("FiatTokenProxy()"); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(pauserAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -155,7 +165,7 @@ async function run_tests(newToken, accounts) { it("abi027 UpgradeabilityProxy constructor", async function () { let badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -166,7 +176,7 @@ async function run_tests(newToken, accounts) { it("abi055 Proxy constructor is not a function", async function () { let badData = functionSignature("Proxy()"); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -177,7 +187,7 @@ async function run_tests(newToken, accounts) { it("abi056 Proxy _delegate is internal", async function () { let badData = msgData("_delegate(address)", arbitraryAccount); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -188,7 +198,7 @@ async function run_tests(newToken, accounts) { it("abi057 Proxy _willFallback is internal", async function () { let badData = functionSignature("_willFallback()"); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -199,7 +209,7 @@ async function run_tests(newToken, accounts) { it("abi058 Proxy _fallback is internal", async function () { let badData = functionSignature("_fallback()"); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -210,7 +220,7 @@ async function run_tests(newToken, accounts) { it("abi050 Upgradeability implementation is internal", async function () { let badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -224,7 +234,7 @@ async function run_tests(newToken, accounts) { "AdminUpgradeabillityProxy(address)", arbitraryAccount ); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -238,7 +248,7 @@ async function run_tests(newToken, accounts) { "AdminUpgradeabillityProxy(address)", arbitraryAccount ); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -249,9 +259,11 @@ async function run_tests(newToken, accounts) { it("abi041 FiatToken constructor is not a function", async function () { let badData = functionSignature("FiatToken()"); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(pauserAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(pauserAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -266,9 +278,11 @@ async function run_tests(newToken, accounts) { it("abi025 setOwner is internal", async function () { let badData = msgData("setOwner(address)", pauserAccount); - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(tokenOwnerAccount)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex( + await web3.eth.getTransactionCount(tokenOwnerAccount) + ), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 100000, to: token.address, value: 0, @@ -286,7 +300,7 @@ async function run_tests(newToken, accounts) { "_upgradeTo(string,address)", pauserAccount ); - let raw = makeRawTransaction( + let raw = await makeRawTransaction( badData, tokenOwnerAccount, tokenOwnerPrivateKey, diff --git a/test/ABIUtils.js b/test/ABIUtils.js index db38d45c6..1f3e406d8 100644 --- a/test/ABIUtils.js +++ b/test/ABIUtils.js @@ -1,14 +1,14 @@ -var Tx = require("ethereumjs-tx"); +var Transaction = require("ethereumjs-tx").Transaction; -function makeRawTransaction( +async function makeRawTransaction( msgData, msgSender, hexPrivateKey, contractAddress ) { - var tx = new Tx({ - nonce: web3.toHex(web3.eth.getTransactionCount(msgSender)), - gasPrice: web3.toHex(web3.toWei("20", "gwei")), + var tx = new Transaction({ + nonce: web3.utils.toHex(await web3.eth.getTransactionCount(msgSender)), + gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 1000000, to: contractAddress, value: 0, @@ -22,7 +22,7 @@ function makeRawTransaction( function sendRawTransaction(raw) { return new Promise(function (resolve, reject) { - web3.eth.sendRawTransaction(raw, function (err, transactionHash) { + web3.eth.sendSignedTransaction(raw, function (err, transactionHash) { if (err !== null) return reject(err); resolve(transactionHash); }); @@ -30,7 +30,7 @@ function sendRawTransaction(raw) { } function functionSignature(methodName) { - return web3.sha3(methodName).substr(0, 2 + 8); + return web3.utils.keccak256(methodName).slice(0, 10); } function encodeAddress(address) { diff --git a/test/ExtendedPositiveTests.js b/test/ExtendedPositiveTests.js index a3c996b88..ba6db5af7 100644 --- a/test/ExtendedPositiveTests.js +++ b/test/ExtendedPositiveTests.js @@ -1,7 +1,5 @@ +var BN = require("bn.js"); var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; @@ -103,7 +101,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "paused", expectedValue: true }, ]; @@ -114,7 +112,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: false }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "paused", expectedValue: true }, ]; @@ -379,7 +377,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "isAccountBlacklisted.masterMinterAccount", @@ -398,7 +396,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; @@ -414,7 +412,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "isAccountBlacklisted.masterMinterAccount", @@ -428,7 +426,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: false }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "isAccountBlacklisted.masterMinterAccount", @@ -447,7 +445,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; @@ -458,7 +456,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: false }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; diff --git a/test/FiatTokenLegacy.test.js b/test/FiatTokenLegacy.test.js index 98d2e7243..77b529c26 100644 --- a/test/FiatTokenLegacy.test.js +++ b/test/FiatTokenLegacy.test.js @@ -1,3 +1,4 @@ +var BN = require("bn.js"); var tokenUtils = require("./TokenTestUtils"); var name = tokenUtils.name; var symbol = tokenUtils.symbol; @@ -16,6 +17,7 @@ var approve = tokenUtils.approve; var unBlacklist = tokenUtils.unBlacklist; var sampleTransfer = tokenUtils.sampleTransfer; var checkTransferEvents = tokenUtils.checkTransferEvents; +var nullAccount = tokenUtils.nullAccount; var deployerAccount = tokenUtils.deployerAccount; var arbitraryAccount = tokenUtils.arbitraryAccount; var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; @@ -44,7 +46,7 @@ async function run_tests(newToken, accounts) { it("should start with a totalSupply of 0", async function () { let totalSupply = await token.totalSupply(); - assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(totalSupply).eq(new BN(0))); }); it("should add multiple mints to a given address in address balance", async function () { @@ -58,47 +60,10 @@ async function run_tests(newToken, accounts) { it("should fail to mint to a null address", async function () { let initialTotalSupply = await token.totalSupply(); - await expectRevert(mint(token, "0x0", 100, minterAccount)); + await expectRevert(mint(token, nullAccount, 100, minterAccount)); totalSupply = await token.totalSupply(); - assert.isTrue( - new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) - ); - - await expectRevert(mint(token, 0x0, 100, minterAccount)); - - totalSupply = await token.totalSupply(); - assert.isTrue( - new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) - ); - - await expectRevert( - mint( - token, - "0x0000000000000000000000000000000000000000", - 100, - minterAccount - ) - ); - - totalSupply = await token.totalSupply(); - assert.isTrue( - new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) - ); - - await expectRevert( - mint( - token, - 0x0000000000000000000000000000000000000000, - 100, - minterAccount - ) - ); - - totalSupply = await token.totalSupply(); - assert.isTrue( - new BigNumber(totalSupply).isEqualTo(new BigNumber(initialTotalSupply)) - ); + assert.isTrue(new BN(totalSupply).eq(new BN(initialTotalSupply))); }); it("should add multiple mints to a given address in address balance", async function () { @@ -106,7 +71,7 @@ async function run_tests(newToken, accounts) { await mint(token, accounts[0], 200, minterAccount); let balance0 = await token.balanceOf(accounts[0]); - assert.isTrue(new BigNumber(balance0).isEqualTo(new BigNumber(300))); + assert.isTrue(new BN(balance0).eq(new BN(300))); }); it("should add multiple mints to total supply", async function () { @@ -117,9 +82,7 @@ async function run_tests(newToken, accounts) { let totalSupply = await token.totalSupply(); assert.isTrue( - new BigNumber(totalSupply) - .minus(new BigNumber(initialTotalSupply)) - .isEqualTo(new BigNumber(1100)) + new BN(totalSupply).sub(new BN(initialTotalSupply)).eq(new BN(1100)) ); }); @@ -163,7 +126,7 @@ async function run_tests(newToken, accounts) { it("should approve", async function () { await approve(token, accounts[3], 100, accounts[2]); let allowance = await token.allowance(accounts[2], accounts[3]); - assert.isTrue(new BigNumber(allowance).isEqualTo(new BigNumber(100))); + assert.isTrue(new BN(allowance).eq(new BN(100))); }); it("should complete sample transfer", async function () { @@ -191,11 +154,11 @@ async function run_tests(newToken, accounts) { it("should set allowance and balances before and after approved transfer", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); + assert.isTrue(new BN(allowed).eq(new BN(100))); let transfer = await token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[3], @@ -204,18 +167,18 @@ async function run_tests(newToken, accounts) { checkTransferEvents(transfer, accounts[0], accounts[3], 50); let balance0 = await token.balanceOf(accounts[0]); - assert.isTrue(new BigNumber(balance0).isEqualTo(new BigNumber(450))); + assert.isTrue(new BN(balance0).eq(new BN(450))); let balance3 = await token.balanceOf(accounts[3]); - assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(50))); + assert.isTrue(new BN(balance3).eq(new BN(50))); }); it("should fail on unauthorized approved transfer and not change balances", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); + assert.isTrue(new BN(allowed).eq(new BN(100))); await expectRevert( token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[4] }) @@ -229,11 +192,11 @@ async function run_tests(newToken, accounts) { it("should fail on invalid approved transfer amount and not change balances", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); + assert.isTrue(new BN(allowed).eq(new BN(100))); await expectRevert( token.transferFrom(accounts[0], accounts[3], 450, { from: accounts[3] }) @@ -249,10 +212,10 @@ async function run_tests(newToken, accounts) { await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(100))); + assert.isTrue(new BN(allowed).eq(new BN(100))); await expectRevert( - token.transferFrom(accounts[0], 0, 50, { from: accounts[3] }) + token.transferFrom(accounts[0], nullAccount, 50, { from: accounts[3] }) ); let balance0 = await token.balanceOf(accounts[0]); @@ -261,7 +224,7 @@ async function run_tests(newToken, accounts) { it("should test consistency of transfer(x) and approve(x) + transferFrom(x)", async function () { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); let transferAmount = 650; let totalAmount = transferAmount; await mint(token, accounts[0], totalAmount, minterAccount); @@ -275,14 +238,12 @@ async function run_tests(newToken, accounts) { assert.equal(balance3, transferAmount); await token.allowance.call(accounts[1], accounts[4]); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, accounts[1], totalAmount, minterAccount); await token.approve(accounts[4], transferAmount, { from: accounts[1] }); allowed = await token.allowance.call(accounts[1], accounts[4]); - assert.isTrue( - new BigNumber(allowed).isEqualTo(new BigNumber(transferAmount)) - ); + assert.isTrue(new BN(allowed).eq(new BN(transferAmount))); transfer = await token.transferFrom( accounts[1], @@ -396,7 +357,7 @@ async function run_tests(newToken, accounts) { ); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(100))); + assert.isTrue(new BN(balance).eq(new BN(100))); }); it("should blacklist and make transfer impossible", async function () { @@ -417,9 +378,9 @@ async function run_tests(newToken, accounts) { await expectRevert(token.transfer(accounts[2], 600, { from: accounts[9] })); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); + assert.isTrue(new BN(balance).eq(new BN(1900))); balance = await token.balanceOf(accounts[9]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1600))); + assert.isTrue(new BN(balance).eq(new BN(1600))); }); it("should blacklist and make transferFrom impossible with the approved transferer", async function () { @@ -435,7 +396,7 @@ async function run_tests(newToken, accounts) { ); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); + assert.isTrue(new BN(balance).eq(new BN(1900))); let isBlacklistedAfter = await token.isBlacklisted(accounts[2]); assert.equal(isBlacklistedAfter, true); @@ -451,7 +412,7 @@ async function run_tests(newToken, accounts) { ); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); + assert.isTrue(new BN(balance).eq(new BN(1900))); }); it("should blacklist recipient and make transfer to recipient using transferFrom impossible", async function () { @@ -464,7 +425,7 @@ async function run_tests(newToken, accounts) { ); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); + assert.isTrue(new BN(balance).eq(new BN(1900))); }); it("should blacklist and make approve impossible", async function () { @@ -473,7 +434,7 @@ async function run_tests(newToken, accounts) { await expectRevert(token.approve(accounts[2], 600, { from: accounts[1] })); let approval = await token.allowance(accounts[1], accounts[2]); - assert.isTrue(new BigNumber(approval).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(approval).eq(new BN(0))); }); it("should make giving approval to blacklisted account impossible", async function () { @@ -483,7 +444,7 @@ async function run_tests(newToken, accounts) { await expectRevert(token.approve(accounts[1], 600, { from: accounts[2] })); let approval = await token.allowance(accounts[2], accounts[1]); - assert.isTrue(new BigNumber(approval).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(approval).eq(new BN(0))); }); it("should blacklist then unblacklist to make a transfer possible", async function () { @@ -492,9 +453,9 @@ async function run_tests(newToken, accounts) { await unBlacklist(token, accounts[2]); await token.transfer(accounts[3], 600, { from: accounts[2] }); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1300))); + assert.isTrue(new BN(balance).eq(new BN(1300))); balance = await token.balanceOf(accounts[3]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(600))); + assert.isTrue(new BN(balance).eq(new BN(600))); }); it("should fail to blacklist with non-blacklister account", async function () { @@ -504,9 +465,9 @@ async function run_tests(newToken, accounts) { await token.transfer(accounts[3], 600, { from: accounts[2] }); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1300))); + assert.isTrue(new BN(balance).eq(new BN(1300))); balance = await token.balanceOf(accounts[3]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(600))); + assert.isTrue(new BN(balance).eq(new BN(600))); }); it("should unblacklist when paused", async function () { @@ -523,7 +484,7 @@ async function run_tests(newToken, accounts) { assert.isFalse(blacklisted); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(1900))); + assert.isTrue(new BN(balance).eq(new BN(1900))); }); it("should change the minter and mint as well as fail to mint with the old minter", async function () { @@ -608,39 +569,31 @@ async function run_tests(newToken, accounts) { await setMinter(token, burnerAddress, amount); let totalSupply = await token.totalSupply(); let minterBalance = await token.balanceOf(burnerAddress); - assert.isTrue(new BigNumber(totalSupply).isEqualTo(new BigNumber(0))); - assert.isTrue(new BigNumber(minterBalance).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(totalSupply).eq(new BN(0))); + assert.isTrue(new BN(minterBalance).eq(new BN(0))); // mint tokens to burnerAddress await mint(token, burnerAddress, amount, minterAccount); let totalSupply1 = await token.totalSupply(); let minterBalance1 = await token.balanceOf(burnerAddress); assert.isTrue( - new BigNumber(totalSupply1).isEqualTo( - new BigNumber(totalSupply).plus(new BigNumber(amount)) - ) + new BN(totalSupply1).eq(new BN(totalSupply).add(new BN(amount))) ); assert.isTrue( - new BigNumber(minterBalance1).isEqualTo( - new BigNumber(minterBalance).plus(new BigNumber(amount)) - ) + new BN(minterBalance1).eq(new BN(minterBalance).add(new BN(amount))) ); // burn tokens await burn(token, amount, burnerAddress); let totalSupply2 = await token.totalSupply(); assert.isTrue( - new BigNumber(totalSupply2).isEqualTo( - new BigNumber(totalSupply1).minus(new BigNumber(amount)) - ) + new BN(totalSupply2).eq(new BN(totalSupply1).sub(new BN(amount))) ); // check that minter's balance has been reduced let minterBalance2 = await token.balanceOf(burnerAddress); assert.isTrue( - new BigNumber(minterBalance2).isEqualTo( - new BigNumber(minterBalance1).minus(new BigNumber(amount)) - ) + new BN(minterBalance2).eq(new BN(minterBalance1).sub(new BN(amount))) ); }); @@ -674,7 +627,7 @@ async function run_tests(newToken, accounts) { it("should upgrade and preserve data", async function () { await mint(token, accounts[2], 200, minterAccount); let initialBalance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(initialBalance).isEqualTo(new BigNumber(200))); + assert.isTrue(new BN(initialBalance).eq(new BN(200))); var newRawToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, newRawToken); @@ -682,13 +635,13 @@ async function run_tests(newToken, accounts) { var newToken = newProxiedToken; let upgradedBalance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(upgradedBalance).isEqualTo(new BigNumber(200))); + assert.isTrue(new BN(upgradedBalance).eq(new BN(200))); await newToken.configureMinter(minterAccount, 500, { from: masterMinterAccount, }); await newToken.mint(accounts[2], 200, { from: minterAccount }); let balance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(400))); + assert.isTrue(new BN(balance).eq(new BN(400))); }); it("should updateRoleAddress for masterMinter", async function () { @@ -728,13 +681,13 @@ async function run_tests(newToken, accounts) { }); it("should updateUpgraderAddress for upgrader", async function () { - let upgrader = getAdmin(proxy); + let upgrader = await getAdmin(proxy); assert.equal(proxyOwnerAccount, upgrader); let address1 = accounts[10]; let updated = await proxy.changeAdmin(address1, { from: proxyOwnerAccount, }); - upgrader = getAdmin(proxy); + upgrader = await getAdmin(proxy); assert.equal(upgrader, address1); //Test upgrade with new upgrader account @@ -744,7 +697,7 @@ async function run_tests(newToken, accounts) { await token.mint(accounts[2], 200, { from: minterAccount }); let initialBalance = await token.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(initialBalance).isEqualTo(new BigNumber(200))); + assert.isTrue(new BN(initialBalance).eq(new BN(200))); var newRawToken = await UpgradedFiatToken.new(); var tokenConfig = await upgradeTo(proxy, newRawToken, address1); @@ -752,13 +705,13 @@ async function run_tests(newToken, accounts) { var newToken = newProxiedToken; let upgradedBalance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(upgradedBalance).isEqualTo(new BigNumber(200))); + assert.isTrue(new BN(upgradedBalance).eq(new BN(200))); await newToken.configureMinter(minterAccount, 500, { from: masterMinterAccount, }); await newToken.mint(accounts[2], 200, { from: minterAccount }); let balance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BigNumber(balance).isEqualTo(new BigNumber(400))); + assert.isTrue(new BN(balance).eq(new BN(400))); }); it("should fail to updateUpgraderAddress for upgrader using non-upgrader account", async function () { @@ -766,7 +719,7 @@ async function run_tests(newToken, accounts) { await expectRevert( proxy.changeAdmin(address1, { from: tokenOwnerAccount }) ); - let upgrader = getAdmin(proxy); + let upgrader = await getAdmin(proxy); assert.notEqual(upgrader, address1); }); diff --git a/test/MiscTests.js b/test/MiscTests.js index 44d8faa2b..667a64e01 100644 --- a/test/MiscTests.js +++ b/test/MiscTests.js @@ -1,9 +1,8 @@ +var BN = require("bn.js"); var FiatTokenProxy = artifacts.require("FiatTokenProxy"); var tokenUtils = require("./TokenTestUtils"); var BigNumber = require("bignumber.js"); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; @@ -28,6 +27,7 @@ var FiatToken = tokenUtils.FiatToken; var maxAmount = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; +var maxAmountBN = new BN(maxAmount.slice(2), 16); var amount = 100; async function run_tests(newToken, accounts) { @@ -70,14 +70,14 @@ async function run_tests(newToken, accounts) { var customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -98,13 +98,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -127,13 +127,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -148,7 +148,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -158,13 +158,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -179,7 +179,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -190,16 +190,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "allowance.arbitraryAccount.arbitraryAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -213,7 +213,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.masterMinterAccount", expectedValue: true }, { variable: "minterAllowance.masterMinterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -233,11 +233,11 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -260,19 +260,19 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount1), + expectedValue: new BN(amount - mintAmount1), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount - mintAmount2), + expectedValue: new BN(amount - mintAmount2), }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount1 + mintAmount2), + expectedValue: new BN(mintAmount1 + mintAmount2), }, { variable: "totalSupply", - expectedValue: new BigNumber(mintAmount1 + mintAmount2), + expectedValue: new BN(mintAmount1 + mintAmount2), }, ]; await checkVariables([token], [customVars]); @@ -295,15 +295,15 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount1), + expectedValue: new BN(amount - mintAmount1), }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount1 + mintAmount2), + expectedValue: new BN(mintAmount1 + mintAmount2), }, { variable: "totalSupply", - expectedValue: new BigNumber(mintAmount1 + mintAmount2), + expectedValue: new BN(mintAmount1 + mintAmount2), }, ]; await checkVariables([token], [customVars]); @@ -323,11 +323,11 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -343,11 +343,11 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - adjustment), + expectedValue: new BN(amount - adjustment), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount + adjustment), + expectedValue: new BN(amount + adjustment), }, ]; await checkVariables([token], [customVars]); @@ -368,13 +368,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await expectRevert( token.mint(pauserAccount, mintAmount, { from: arbitraryAccount }) @@ -399,11 +399,11 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await expectRevert( @@ -431,17 +431,17 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, ]; await expectRevert( @@ -456,19 +456,19 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "totalSupply", - expectedValue: new BigNumber(mintAmount + mintAmount), + expectedValue: new BN(mintAmount + mintAmount), }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount + mintAmount), + expectedValue: new BN(mintAmount + mintAmount), }, ]; await checkVariables([token], [customVars]); @@ -492,23 +492,23 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount1), + expectedValue: new BN(amount - mintAmount1), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount - mintAmount2), + expectedValue: new BN(amount - mintAmount2), }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(mintAmount1), + expectedValue: new BN(mintAmount1), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount2), + expectedValue: new BN(mintAmount2), }, { variable: "totalSupply", - expectedValue: new BigNumber(mintAmount1 + mintAmount2), + expectedValue: new BN(mintAmount1 + mintAmount2), }, ]; await checkVariables([token], [customVars]); @@ -520,23 +520,23 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount1), + expectedValue: new BN(amount - mintAmount1), }, { variable: "minterAllowance.arbitraryAccount", - expectedValue: new BigNumber(amount - mintAmount2), + expectedValue: new BN(amount - mintAmount2), }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(mintAmount1 - burnAmount), + expectedValue: new BN(mintAmount1 - burnAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount2 - burnAmount), + expectedValue: new BN(mintAmount2 - burnAmount), }, { variable: "totalSupply", - expectedValue: new BigNumber( + expectedValue: new BN( mintAmount1 + mintAmount2 - burnAmount - burnAmount ), }, @@ -565,10 +565,10 @@ async function run_tests(newToken, accounts) { it("ms036 should get allowance for same address", async function () { await token.approve(arbitraryAccount, amount, { from: arbitraryAccount }); - var allowance = new BigNumber( + var allowance = new BN( await token.allowance(arbitraryAccount, arbitraryAccount) ); - assert(allowance.isEqualTo(new BigNumber(amount))); + assert(allowance.eq(new BN(amount))); }); // Return value @@ -598,7 +598,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; assert( @@ -627,7 +627,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -640,16 +640,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "allowance.arbitraryAccount.masterMinterAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, ]; assert( @@ -673,7 +673,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -683,13 +683,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; assert( await token.transfer.call(pauserAccount, mintAmount, { @@ -725,7 +725,7 @@ async function run_tests(newToken, accounts) { var newProxy = await FiatTokenProxy.new(rawToken.address, { from: arbitraryAccount, }); - var token = FiatToken.at(newProxy.address); + var token = await FiatToken.at(newProxy.address); var initialized = await getInitializedV1(token); assert.equal("0x00", initialized); }); @@ -738,7 +738,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, ]; await checkVariables([token], [customVars]); @@ -752,7 +752,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, ]; await checkVariables([token], [customVars]); @@ -762,13 +762,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, ]; await checkVariables([token], [customVars]); }); @@ -782,9 +782,9 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, ]; await checkVariables([token], [customVars]); @@ -804,9 +804,9 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, ]; await checkVariables([token], [customVars]); @@ -815,12 +815,12 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, { variable: "allowance.arbitraryAccount.pauserAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, ]; await checkVariables([token], [customVars]); @@ -835,9 +835,9 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, ]; await checkVariables([token], [customVars]); @@ -846,9 +846,9 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, ]; await checkVariables([token], [customVars]); }); @@ -863,12 +863,12 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, { variable: "allowance.arbitraryAccount.pauserAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, ]; await checkVariables([token], [customVars]); @@ -880,9 +880,9 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(maxAmount), + expectedValue: maxAmountBN, }, - { variable: "totalSupply", expectedValue: new BigNumber(maxAmount) }, + { variable: "totalSupply", expectedValue: maxAmountBN }, ]; await checkVariables([token], [customVars]); }); diff --git a/test/NegativeTests.js b/test/NegativeTests.js index ee9c40ba6..970a51d79 100644 --- a/test/NegativeTests.js +++ b/test/NegativeTests.js @@ -1,7 +1,6 @@ +var BN = require("bn.js"); var tokenUtils = require("./TokenTestUtils"); var BigNumber = require("bignumber.js"); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; @@ -12,6 +11,7 @@ var name = tokenUtils.name; var symbol = tokenUtils.symbol; var currency = tokenUtils.currency; var decimals = tokenUtils.decimals; +var nullAccount = tokenUtils.nullAccount; var deployerAccount = tokenUtils.deployerAccount; var arbitraryAccount = tokenUtils.arbitraryAccount; var arbitraryAccount2 = tokenUtils.arbitraryAccount2; @@ -29,12 +29,10 @@ var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; var FiatToken = tokenUtils.FiatToken; var amount = 100; -let longZero = 0x0000000000000000000000000000000000000000; -let shortZero = 0x00; async function run_tests(newToken, accounts) { beforeEach("Make fresh token contract", async function () { - rawToken = await newToken(); + var rawToken = await newToken(); var tokenConfig = await initializeTokenWithProxy(rawToken); proxy = tokenConfig.proxy; token = tokenConfig.token; @@ -52,7 +50,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "paused", expectedValue: true }, ]; @@ -79,7 +77,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; @@ -98,7 +96,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -119,7 +117,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 1), + expectedValue: new BN(amount - 1), }, ]; await expectRevert( @@ -136,19 +134,11 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; - await expectRevert(token.mint("0x0", amount, { from: minterAccount })); await expectRevert( - token.mint("0x0000000000000000000000000000000000000000", amount, { - from: minterAccount, - }) - ); - await expectRevert( - token.mint(0x0000000000000000000000000000000000000000, amount, { - from: minterAccount, - }) + token.mint(nullAccount, amount, { from: minterAccount }) ); await checkVariables([token], [customVars]); }); @@ -199,7 +189,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -210,20 +200,22 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.arbitraryAccount.pauserAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, ]; await expectRevert( - token.transferFrom(arbitraryAccount, "0x0", 50, { from: pauserAccount }) + token.transferFrom(arbitraryAccount, nullAccount, 50, { + from: pauserAccount, + }) ); await checkVariables([token], [customVars]); }); @@ -236,7 +228,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -247,16 +239,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.arbitraryAccount.blacklisterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await expectRevert( @@ -275,7 +267,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -287,16 +279,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.blacklisterAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.blacklisterAccount.pauserAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -319,7 +311,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -331,16 +323,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.tokenOwnerAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.tokenOwnerAccount.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -363,7 +355,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -375,16 +367,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.arbitraryAccount.tokenOwnerAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -407,7 +399,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -418,16 +410,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.arbitraryAccount.tokenOwnerAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, ]; await expectRevert( @@ -446,7 +438,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -458,16 +450,16 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "allowance.arbitraryAccount.tokenOwnerAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, { variable: "paused", expectedValue: true }, ]; @@ -489,7 +481,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -499,15 +491,17 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, ]; - await expectRevert(token.transfer("0x0", 50, { from: arbitraryAccount })); + await expectRevert( + token.transfer(nullAccount, 50, { from: arbitraryAccount }) + ); await checkVariables([token], [customVars]); }); @@ -519,7 +513,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -529,13 +523,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, ]; await expectRevert( token.transfer(pauserAccount, amount, { from: arbitraryAccount }) @@ -551,7 +545,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -562,13 +556,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.tokenOwnerAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -588,7 +582,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -599,13 +593,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -625,7 +619,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -636,13 +630,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(50), + expectedValue: new BN(50), }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "paused", expectedValue: true }, ]; await expectRevert( @@ -682,7 +676,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await expectRevert( @@ -701,7 +695,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await expectRevert(token.burn(amount, { from: minterAccount })); @@ -717,13 +711,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, - { variable: "totalSupply", expectedValue: new BigNumber(amount) }, + { variable: "totalSupply", expectedValue: new BN(amount) }, ]; await expectRevert(token.burn(-1, { from: minterAccount })); await checkVariables([token], [customVars]); @@ -737,7 +731,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -748,10 +742,10 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, - { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "balances.minterAccount", expectedValue: new BN(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; await expectRevert(token.burn(50, { from: minterAccount })); @@ -766,7 +760,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -777,10 +771,10 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, - { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "balances.minterAccount", expectedValue: new BN(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, { variable: "paused", expectedValue: true }, ]; await expectRevert(token.burn(50, { from: minterAccount })); @@ -795,7 +789,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -805,10 +799,10 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, - { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "balances.minterAccount", expectedValue: new BN(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, ]; await expectRevert(token.burn(50, { from: arbitraryAccount })); await checkVariables([token], [customVars]); @@ -822,7 +816,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -832,10 +826,10 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - 50), + expectedValue: new BN(amount - 50), }, - { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "balances.minterAccount", expectedValue: new BN(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, ]; await checkVariables([token], [customVars]); @@ -844,10 +838,10 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: false }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, - { variable: "balances.minterAccount", expectedValue: new BigNumber(50) }, - { variable: "totalSupply", expectedValue: new BigNumber(50) }, + { variable: "balances.minterAccount", expectedValue: new BN(50) }, + { variable: "totalSupply", expectedValue: new BN(50) }, ]; await expectRevert(token.burn(50, { from: minterAccount })); await checkVariables([token], [customVars]); @@ -943,7 +937,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -959,64 +953,43 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, - { variable: "totalSupply", expectedValue: new BigNumber(amount) }, + { variable: "totalSupply", expectedValue: new BN(amount) }, ]; await checkVariables([token], [customVars]); }); it("nt064 transferOwnership should fail on 0x0", async function () { await expectRevert( - token.transferOwnership(longZero, { from: tokenOwnerAccount }) - ); - await expectRevert( - token.transferOwnership(shortZero, { from: tokenOwnerAccount }) + token.transferOwnership(nullAccount, { from: tokenOwnerAccount }) ); }); it("nt057 updateMasterMinter should fail on 0x0", async function () { await expectRevert( - token.updateMasterMinter(longZero, { from: tokenOwnerAccount }) - ); - await expectRevert( - token.updateMasterMinter(shortZero, { from: tokenOwnerAccount }) + token.updateMasterMinter(nullAccount, { from: tokenOwnerAccount }) ); }); it("nt058 updatePauser should fail on 0x0", async function () { await expectRevert( - token.updatePauser(longZero, { from: tokenOwnerAccount }) - ); - await expectRevert( - token.updatePauser(shortZero, { from: tokenOwnerAccount }) + token.updatePauser(nullAccount, { from: tokenOwnerAccount }) ); }); it("nt059 updateBlacklister should fail on 0x0", async function () { await expectRevert( - token.updateBlacklister(longZero, { from: tokenOwnerAccount }) - ); - await expectRevert( - token.updateBlacklister(shortZero, { from: tokenOwnerAccount }) + token.updateBlacklister(nullAccount, { from: tokenOwnerAccount }) ); }); it("nt060 initialize should fail when _masterMinter is 0x0", async function () { - rawToken = await newToken(); - await expectRevert( - customInitializeTokenWithProxy( - rawToken, - longZero, - pauserAccount, - blacklisterAccount, - tokenOwnerAccount - ) - ); + var rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, - shortZero, + nullAccount, pauserAccount, blacklisterAccount, tokenOwnerAccount @@ -1025,21 +998,12 @@ async function run_tests(newToken, accounts) { }); it("nt061 initialize should fail when _pauser is 0x0", async function () { - rawToken = await newToken(); + var rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, masterMinterAccount, - longZero, - blacklisterAccount, - tokenOwnerAccount - ) - ); - await expectRevert( - customInitializeTokenWithProxy( - rawToken, - masterMinterAccount, - shortZero, + nullAccount, blacklisterAccount, tokenOwnerAccount ) @@ -1047,45 +1011,27 @@ async function run_tests(newToken, accounts) { }); it("nt062 initialize should fail when _blacklister is 0x0", async function () { - rawToken = await newToken(); - await expectRevert( - customInitializeTokenWithProxy( - rawToken, - masterMinterAccount, - pauserAccount, - longZero, - tokenOwnerAccount - ) - ); + var rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, masterMinterAccount, pauserAccount, - shortZero, + nullAccount, tokenOwnerAccount ) ); }); it("nt063 initialize should fail when _owner is 0x0", async function () { - rawToken = await newToken(); - await expectRevert( - customInitializeTokenWithProxy( - rawToken, - masterMinterAccount, - pauserAccount, - blacklisterAccount, - longZero - ) - ); + var rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, masterMinterAccount, pauserAccount, blacklisterAccount, - shortZero + nullAccount ) ); }); diff --git a/test/Pausable.test.js b/test/Pausable.test.js index f585d8a7c..6d4c370c3 100644 --- a/test/Pausable.test.js +++ b/test/Pausable.test.js @@ -1,5 +1,3 @@ -var Tx = require("ethereumjs-tx"); - var Pausable = artifacts.require("Pausable"); var tokenUtils = require("./TokenTestUtils"); var BigNumber = require("bignumber.js"); @@ -9,11 +7,6 @@ var arbitraryAccount = tokenUtils.arbitraryAccount; var pauserAccount = tokenUtils.pauserAccount; var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -const should = require("chai") - .use(require("chai-as-promised")) - .use(require("chai-bignumber")(BigNumber)) - .should(); - contract("PausableTests", function (accounts) { var pause; beforeEach(async function checkBefore() { diff --git a/test/PositiveTests.js b/test/PositiveTests.js index a57631e6e..119590d3c 100644 --- a/test/PositiveTests.js +++ b/test/PositiveTests.js @@ -1,7 +1,6 @@ +var BN = require("bn.js"); var tokenUtils = require("./TokenTestUtils"); var BigNumber = require("bignumber.js"); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; @@ -62,7 +61,7 @@ async function run_tests(newToken, accounts) { var customVars = [ { variable: "allowance.arbitraryAccount.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -105,7 +104,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -123,7 +122,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -133,13 +132,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -156,13 +155,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [setup]); @@ -171,15 +170,15 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(0), + expectedValue: new BN(0), }, { variable: "balances.minterAccount", - expectedValue: new BigNumber(mintAmount - burnAmount), + expectedValue: new BN(mintAmount - burnAmount), }, { variable: "totalSupply", - expectedValue: new BigNumber(mintAmount - burnAmount), + expectedValue: new BN(mintAmount - burnAmount), }, ]; await checkVariables([token], [afterBurn]); @@ -198,13 +197,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); @@ -212,9 +211,9 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -231,7 +230,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -241,13 +240,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); @@ -255,15 +254,15 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); @@ -278,7 +277,7 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount), + expectedValue: new BN(amount), }, ]; await checkVariables([token], [customVars]); @@ -288,13 +287,13 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); @@ -308,14 +307,14 @@ async function run_tests(newToken, accounts) { { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); diff --git a/test/ProxyNegativeTests.js b/test/ProxyNegativeTests.js index 36b7498f4..1b7ecd2b8 100644 --- a/test/ProxyNegativeTests.js +++ b/test/ProxyNegativeTests.js @@ -1,7 +1,6 @@ +var BN = require("bn.js"); var tokenUtils = require("./TokenTestUtils"); var BigNumber = require("bignumber.js"); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; @@ -12,6 +11,7 @@ var name = tokenUtils.name; var symbol = tokenUtils.symbol; var currency = tokenUtils.currency; var decimals = tokenUtils.decimals; +var nullAccount = tokenUtils.nullAccount; var deployerAccount = tokenUtils.deployerAccount; var arbitraryAccount = tokenUtils.arbitraryAccount; var arbitraryAccount2 = tokenUtils.arbitraryAccount2; @@ -54,9 +54,8 @@ async function run_tests(newToken, accounts) { }); it("nut003 should fail to upgradeTo to null contract address", async function () { - var upgradedToken = await UpgradedFiatToken.new(); await expectRevert( - proxy.upgradeTo("0x0", token, { from: proxyOwnerAccount }) + proxy.upgradeTo(nullAccount, { from: proxyOwnerAccount }) ); customVars = []; @@ -67,7 +66,9 @@ async function run_tests(newToken, accounts) { var upgradedToken = await UpgradedFiatToken.new(); const initializeData = encodeCall("pauser", [], []); await expectRevert( - proxy.upgradeToAndCall("0x0", initializeData, { from: proxyOwnerAccount }) + proxy.upgradeToAndCall(nullAccount, initializeData, { + from: proxyOwnerAccount, + }) ); customVars = []; @@ -135,7 +136,7 @@ async function run_tests(newToken, accounts) { await expectRevert( proxy.upgradeTo(upgradedToken.address, { from: masterMinterAccount }) ); - var finalToken = FiatToken.at(proxy.address); + var finalToken = await FiatToken.at(proxy.address); var implementation = await proxy.implementation({ from: proxyOwnerAccount, }); @@ -157,7 +158,7 @@ async function run_tests(newToken, accounts) { from: masterMinterAccount, }) ); - var finalToken = FiatToken.at(proxy.address); + var finalToken = await FiatToken.at(proxy.address); var implementation = await proxy.implementation({ from: proxyOwnerAccount, }); @@ -215,15 +216,15 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([token], [customVars]); }); diff --git a/test/ProxyPositiveTests.js b/test/ProxyPositiveTests.js index 3dcfebdc3..6b1223e3c 100644 --- a/test/ProxyPositiveTests.js +++ b/test/ProxyPositiveTests.js @@ -1,7 +1,5 @@ var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; +var BN = require("bn.js"); var bigZero = tokenUtils.bigZero; var bigHundred = tokenUtils.bigHundred; @@ -67,15 +65,12 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, - { - variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), - }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "balances.pauserAccount", expectedValue: new BN(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); @@ -105,23 +100,17 @@ async function run_tests(newToken, accounts) { assert.equal(await newProxiedToken.newBool(), true); assert.equal(await newProxiedToken.newAddress(), pauserAccount); - assert.equal( - new BigNumber(12).isEqualTo(await newProxiedToken.newUint()), - true - ); + assert.equal(new BN(12).eq(await newProxiedToken.newUint()), true); customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, - { - variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), - }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "balances.pauserAccount", expectedValue: new BN(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); @@ -153,10 +142,7 @@ async function run_tests(newToken, accounts) { assert.equal(await newProxiedToken.newBool(), true); assert.equal(await newProxiedToken.newAddress(), pauserAccount); - assert.equal( - new BigNumber(12).isEqualTo(await newProxiedToken.newUint()), - true - ); + assert.equal(new BN(12).eq(await newProxiedToken.newUint()), true); await newProxiedToken.setNewAddress(masterMinterAccount); assert.equal(await newProxiedToken.newAddress(), masterMinterAccount); @@ -164,15 +150,15 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); @@ -316,15 +302,15 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount - 1), + expectedValue: new BN(amount - mintAmount - 1), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount + 1), + expectedValue: new BN(mintAmount + 1), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount + 1) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount + 1) }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); @@ -366,21 +352,24 @@ async function run_tests(newToken, accounts) { customVars = [ { variable: "minterAllowance.minterAccount", - expectedValue: new BigNumber(amount - mintAmount), + expectedValue: new BN(amount - mintAmount), }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", expectedValue: bigZero }, { variable: "balances.pauserAccount", - expectedValue: new BigNumber(mintAmount), + expectedValue: new BN(mintAmount), }, - { variable: "totalSupply", expectedValue: new BigNumber(mintAmount) }, + { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; await checkVariables([sameToken], [customVars]); }); it("upt009 should check that admin is set correctly by proxy constructor", async function () { - assert.equal(await getAdmin(token), upgraderAccount); + assert.equal( + web3.utils.toChecksumAddress(await getAdmin(token)), + upgraderAccount + ); }); it("upt011 should upgradeToAndCall while paused and upgraded contract should be paused as a result", async function () { diff --git a/test/TokenTestUtils.js b/test/TokenTestUtils.js index 93d702c61..811ec0a3a 100644 --- a/test/TokenTestUtils.js +++ b/test/TokenTestUtils.js @@ -5,12 +5,10 @@ var name = "Sample Fiat Token"; var symbol = "C-USD"; var currency = "USD"; var decimals = 2; -var BigNumber = require("bignumber.js"); +var BN = require("bn.js"); var trueInStorageFormat = "0x01"; -var bigZero = new BigNumber(0); -var bigHundred = new BigNumber(100); -var assertDiff = require("assert-diff"); -assertDiff.options.strict = true; +var bigZero = new BN(0); +var bigHundred = new BN(100); var Q = require("q"); var FiatToken = artifacts.require("FiatTokenV1"); var UpgradedFiatToken = artifacts.require("FiatTokenV2"); @@ -22,19 +20,20 @@ var FiatTokenProxy = artifacts.require("FiatTokenProxy"); // TODO: test really big numbers Does this still have to be done?? -var deployerAccount = "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1"; // accounts[0] -var arbitraryAccount = "0xffcf8fdee72ac11b5c542428b35eef5769c409f0"; // accounts[1] +const nullAccount = "0x0000000000000000000000000000000000000000"; +var deployerAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; // accounts[0] +var arbitraryAccount = "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0"; // accounts[1] var arbitraryAccountPrivateKey = "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; -var tokenOwnerAccount = "0xe11ba2b4d45eaed5996cd0823791e0c93114882d"; // accounts[3] -var blacklisterAccount = "0xd03ea8624c8c5987235048901fb614fdca89b117"; // accounts[4] Why Multiple blacklisterAccount?? -var arbitraryAccount2 = "0x95ced938f7991cd0dfcb48f0a06a40fa1af46ebc"; // accounts[5] -var masterMinterAccount = "0x3e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9"; // accounts[6] -var minterAccount = "0x28a8746e75304c0780e011bed21c72cd78cd535e"; // accounts[7] -var pauserAccount = "0xaca94ef8bd5ffee41947b4585a84bda5a3d3da6e"; // accounts[8] -//var blacklisterAccount = "0x1df62f291b2e969fb0849d99d9ce41e2f137006e"; // accounts[9] - -var proxyOwnerAccount = "0x2f560290fef1b3ada194b6aa9c40aa71f8e95598"; // accounts[14] +var tokenOwnerAccount = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; // accounts[3] +var blacklisterAccount = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; // accounts[4] Why Multiple blacklisterAccount?? +var arbitraryAccount2 = "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC"; // accounts[5] +var masterMinterAccount = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; // accounts[6] +var minterAccount = "0x28a8746e75304c0780E011BEd21C72cD78cd535E"; // accounts[7] +var pauserAccount = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; // accounts[8] +//var blacklisterAccount = "0x1dF62f291b2E969fB0849d99D9Ce41e2F137006e"; // accounts[9] + +var proxyOwnerAccount = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; // accounts[14] var upgraderAccount = proxyOwnerAccount; // accounts[14] var deployerAccountPrivateKey = @@ -66,12 +65,6 @@ var adminSlot = "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; var implSlot = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; -const should = require("chai") - .use(require("chai-as-promised")) - .use(require("chai-bignumber")(BigNumber)) - .should(); - -var BigNumber = require("bignumber.js"); // set to true to enable verbose logging in the tests var debugLogging = false; @@ -249,7 +242,7 @@ function buildExpectedState(token, customVars) { name: name, symbol: symbol, currency: currency, - decimals: new BigNumber(decimals), + decimals: new BN(decimals), masterMinter: masterMinterAccount, pauser: pauserAccount, blacklister: blacklisterAccount, @@ -391,6 +384,27 @@ function buildExpectedState(token, customVars) { return expectedState; } +// BN-aware deep comparison +function checkState(actual, expected, prefix) { + for (const k in actual) { + if (actual.hasOwnProperty(k)) { + const path = prefix ? prefix + "." + k : k; + const actualV = actual[k]; + const expectedV = expected[k]; + if (typeof actualV === "object" && !BN.isBN(actualV)) { + checkState(actualV, expectedV, path); + } else { + const msg = `expected ${path} to equal ${expectedV}, got ${actualV}`; + if (BN.isBN(actualV)) { + assert.isTrue(actualV.eq(expectedV), msg); + } else { + assert.equal(actualV, expectedV, msg); + } + } + } + } +} + // For testing variance of specific variables from their default values. // customVars is an array of objects of the form, // {'variable': , 'expectedValue': } @@ -411,11 +425,7 @@ async function checkVariables(_tokens, _customVars) { } let actualState = await getActualState(token); - assertDiff.deepEqual( - actualState, - expectedState, - "difference between expected and actual state" - ); + checkState(actualState, expectedState); // Check that sum of individual balances equals totalSupply var accounts = [ @@ -430,15 +440,19 @@ async function checkVariables(_tokens, _customVars) { var balanceSum = bigZero; var x; for (x = 0; x < accounts.length; x++) { - balanceSum = balanceSum.plus( - new BigNumber(await token.balanceOf(accounts[x])) - ); + balanceSum = balanceSum.add(await token.balanceOf(accounts[x])); } - var totalSupply = new BigNumber(await token.totalSupply()); - assert(balanceSum.isEqualTo(totalSupply)); + var totalSupply = await token.totalSupply(); + assert(balanceSum.eq(totalSupply)); } } +function hexToAddress(hex) { + return web3.utils.toChecksumAddress( + "0x" + hex.replace(/^0x/, "").padStart(40, "0") + ); +} + // build up actualState object to compare to expectedState object async function getActualState(token) { return Q.all([ @@ -629,12 +643,12 @@ async function getActualState(token) { symbol: symbol, currency: currency, decimals: decimals, - masterMinter: masterMinter, - pauser: pauser, - blacklister: blacklister, - tokenOwner: tokenOwner, - proxiedTokenAddress: proxiedTokenAddress, - upgrader: upgrader, + masterMinter: hexToAddress(masterMinter), + pauser: hexToAddress(pauser), + blacklister: hexToAddress(blacklister), + tokenOwner: hexToAddress(tokenOwner), + proxiedTokenAddress: hexToAddress(proxiedTokenAddress), + upgrader: hexToAddress(upgrader), initializedV1: initializedV1, balances: { arbitraryAccount: balancesA, @@ -776,7 +790,7 @@ async function mintRaw(token, to, amount, minter) { /* let totalSupply = await token.totalSupply(); totalSupply.should.be.bignumber.equal(initialTotalSupply); let minterAllowance = await token.minterAllowance(minter); - assert.isTrue(new BigNumber(initialMinterAllowance).minus(new BigNumber(amount)).isEqualTo(new BigNumber(minterAllowance)));*/ + assert.isTrue(new BN(initialMinterAllowance).sub(new BN(amount)).eq(new BN(minterAllowance)));*/ } async function blacklist(token, account) { @@ -800,13 +814,13 @@ async function setLongDecimalFeesTransferWithFees( feeBase = 1000000; await token.updateTransferFee(fee, feeBase); let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, ownerAccount, 1900); let initialBalanceFeeAccount = await token.balanceOf(feeAccount); await token.approve(arbitraryAccount, 1500); allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(1500))); + assert.isTrue(new BN(allowed).eq(new BN(1500))); let transfer = await token.transfer(arbitraryAccount, 1000, { from: ownerAccount, @@ -827,20 +841,20 @@ async function setLongDecimalFeesTransferWithFees( assert.equal(balance3, 1000); let balanceFeeAccount = await token.balanceOf(feeAccount); assert.isTrue( - new BigNumber(balanceFeeAccount) - .minus(new BigNumber(initialBalanceFeeAccount)) - .isEqualTo(new BigNumber(feeAmount)) + new BN(balanceFeeAccount) + .sub(new BN(initialBalanceFeeAccount)) + .eq(new BN(feeAmount)) ); } async function sampleTransfer(token, ownerAccount, arbitraryAccount, minter) { let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, ownerAccount, 1900, minter); await token.approve(arbitraryAccount, 1500); allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(1500))); + assert.isTrue(new BN(allowed).eq(new BN(1500))); let transfer = await token.transfer(arbitraryAccount, 1000, { from: ownerAccount, @@ -864,12 +878,12 @@ async function transferFromWithFees( feeBase = 10000; await token.updateTransferFee(fee, feeBase); let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, ownerAccount, 900, minter); let initialBalanceFeeAccount = await token.balanceOf(feeAccount); await token.approve(arbitraryAccount, 634); allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(634))); + assert.isTrue(new BN(allowed).eq(new BN(634))); transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { from: arbitraryAccount, @@ -880,19 +894,15 @@ async function transferFromWithFees( let balance0 = await token.balanceOf(ownerAccount); assert.isTrue( - new BigNumber(balance0).isEqualTo( - new BigNumber(900) - .minus(new BigNumber(534)) - .minus(new BigNumber(feeAmount)) - ) + new BN(balance0).eq(new BN(900).sub(new BN(534)).sub(new BN(feeAmount))) ); let balance3 = await token.balanceOf(arbitraryAccount); - assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(534))); + assert.isTrue(new BN(balance3).eq(new BN(534))); let balanceFeeAccount = await token.balanceOf(feeAccount); assert.isTrue( - new BigNumber(balanceFeeAccount) - .minus(new BigNumber(initialBalanceFeeAccount)) - .isEqualTo(new BigNumber(feeAmount)) + new BN(balanceFeeAccount) + .sub(new BN(initialBalanceFeeAccount)) + .eq(new BN(feeAmount)) ); } @@ -903,11 +913,11 @@ async function sampleTransferFrom( minter ) { let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(0))); + assert.isTrue(new BN(allowed).eq(new BN(0))); await mint(token, ownerAccount, 900, minter); // TODO maybe this await token.approve(arbitraryAccount, 634); // TODO not this allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this - assert.isTrue(new BigNumber(allowed).isEqualTo(new BigNumber(634))); + assert.isTrue(new BN(allowed).eq(new BN(634))); let transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { from: arbitraryAccount, @@ -916,13 +926,9 @@ async function sampleTransferFrom( checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534); let balance0 = await token.balanceOf(ownerAccount); - assert.isTrue( - new BigNumber(balance0).isEqualTo( - new BigNumber(900).minus(new BigNumber(534)) - ) - ); + assert.isTrue(new BN(balance0).eq(new BN(900).sub(new BN(534)))); let balance3 = await token.balanceOf(arbitraryAccount); - assert.isTrue(new BigNumber(balance3).isEqualTo(new BigNumber(534))); + assert.isTrue(new BN(balance3).eq(new BN(534))); } async function approve(token, to, amount, from) { @@ -964,7 +970,7 @@ async function customInitializeTokenWithProxy( const proxy = await FiatTokenProxy.new(rawToken.address, { from: proxyOwnerAccount, }); - proxiedToken = await FiatToken.at(proxy.address); + const proxiedToken = await FiatToken.at(proxy.address); await proxiedToken.initialize( name, symbol, @@ -990,7 +996,7 @@ async function upgradeTo(proxy, upgradedToken, proxyUpgraderAccount) { proxyUpgraderAccount = proxyOwnerAccount; } await proxy.upgradeTo(upgradedToken.address, { from: proxyUpgraderAccount }); - proxiedToken = await FiatToken.at(proxy.address); + const proxiedToken = await FiatToken.at(proxy.address); assert.equal(proxiedToken.address, proxy.address); return (tokenConfig = { proxy: proxy, @@ -1031,41 +1037,37 @@ function encodeCall(name, arguments, values) { return "0x" + methodId + params; } -function getAdmin(proxy) { - let adm = web3.eth.getStorageAt(proxy.address, adminSlot); - return adm; +async function getAdmin(proxy) { + let adm = await web3.eth.getStorageAt(proxy.address, adminSlot); + return web3.utils.toChecksumAddress("0x" + adm.slice(2).padStart(40, "0")); } -function getImplementation(proxy) { - let impl = web3.eth.getStorageAt(proxy.address, implSlot); - return impl; +async function getImplementation(proxy) { + let impl = await web3.eth.getStorageAt(proxy.address, implSlot); + return web3.utils.toChecksumAddress("0x" + impl.slice(2).padStart(40, "0")); } async function getInitializedV1(token) { - var slot8Data = await web3.eth.getStorageAt(token.address, 8); - var slot8DataLength = slot8Data.length; - var initialized; - var masterMinterStart; - var masterMinterAddress; - if (slot8DataLength == 4) { - //Validate proxy not yet initialized + const slot8Data = await web3.eth.getStorageAt(token.address, 8); + let initialized; + + if (slot8Data === "0x0") { + // validate proxy not yet initialized for (var i = 0; i <= 20; i++) { - assert.equal("0x00", await web3.eth.getStorageAt(token.address, i)); + assert.equal("0x0", await web3.eth.getStorageAt(token.address, i)); } - initialized = slot8Data; + initialized = "0x00"; } else { - if (slot8DataLength == 44) { - initialized = "0x" + slot8Data.substring(2, 4); // first 2 hex-chars after 0x - masterMinterStart = 4; - } else if (slot8DataLength == 40) { - initialized = "0x00"; - masterMinterStart = 2; - } else { - assert.fail("slot8Data incorrect size"); + const slot8DataPadded = slot8Data.slice(2).padStart(42, "0"); + if (slot8DataPadded.length != 42) { + assert.fail("slot8Data unexpected size"); } - masterMinterAddress = - "0x" + slot8Data.substring(masterMinterStart, masterMinterStart + 40); - assert.equal(await token.masterMinter.call(), masterMinterAddress); + const masterMinterAddress = await token.masterMinter.call(); + assert.isTrue( + slot8DataPadded.indexOf(masterMinterAddress.slice(2).toLowerCase()) === 2 + ); + + initialized = "0x" + slot8DataPadded.slice(0, 2); } return initialized; } @@ -1124,6 +1126,7 @@ module.exports = { expectJump: expectJump, encodeCall: encodeCall, getInitializedV1: getInitializedV1, + nullAccount: nullAccount, deployerAccount: deployerAccount, arbitraryAccount: arbitraryAccount, tokenOwnerAccount: tokenOwnerAccount, From 332ab678a9e92fba7420eb74851e5981c0152de5 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:42 -0700 Subject: [PATCH 08/22] Remove unused dependencies --- package.json | 11 +- truffle-config.js | 2 +- yarn.lock | 3419 ++++++++++++++++++++------------------------- 3 files changed, 1484 insertions(+), 1948 deletions(-) diff --git a/package.json b/package.json index cfa9b3aa0..9f72618ae 100644 --- a/package.json +++ b/package.json @@ -28,27 +28,20 @@ "zos-lib": "1.3.0" }, "devDependencies": { - "assert-diff": "^3.0.1", - "bignumber.js": "9.0.0", + "@truffle/hdwallet-provider": "^1.0.35", "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", - "chai-bignumber": "^3.0.0", "colors": "^1.4.0", "diff": "^4.0.2", "ethereumjs-abi": "^0.6.8", "ethereumjs-tx": "2.1.2", "ganache-cli": "6.9.1", "googleapis": "^50.0.0", - "lite-server": "^2.5.4", "lodash": "^4.17.15", - "mkdirp": "^1.0.4", - "mocha": "^7.1.2", "prettier": "2.0.5", "prettier-plugin-solidity": "1.0.0-alpha.51", "q": "^1.5.1", "solidity-coverage": "^0.7.5", - "truffle": "^5.1.24", - "truffle-hdwallet-provider": "^1.0.17" + "truffle": "^5.1.24" }, "engines": { "node": ">= 12.0.0", diff --git a/truffle-config.js b/truffle-config.js index 0c7b66504..fb5ffb185 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,5 +1,5 @@ // INFURA Setup - see validate/README.validate.md for more info -var HDWalletProvider = require("truffle-hdwallet-provider"); // These keys will be used only for CALL +var HDWalletProvider = require("@truffle/hdwallet-provider"); var mnemonic = "talisman"; var fs = require("fs"); var access_token = "none"; diff --git a/yarn.lock b/yarn.lock index bfbe22c33..ee6f38383 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,6 +45,22 @@ resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.7.tgz#e9db39885575647ef08bf624b0c13fe46d41a209" integrity sha512-UIfVKsXSXocKnn5+RNklUXNoGd/JVj7V8KmC48TQzmjU33HQI86PX0JDS7SpHMHasI3w9X//1q7Lu7nZtj3Zzg== +"@truffle/hdwallet-provider@^1.0.35": + version "1.0.35" + resolved "https://registry.yarnpkg.com/@truffle/hdwallet-provider/-/hdwallet-provider-1.0.35.tgz#9b65c7a53e748183908982e2f922290516a1125a" + integrity sha512-Jn/aAy4A2ulWpVPPBEhXjWIifosfLdjqhMwlEs8PgWLdhf3kOCfKYchqoOYZvMJ+PjO8qQ7q9NyfrQPJHZegrA== + dependencies: + any-promise "^1.3.0" + bindings "^1.5.0" + bip39 "^2.4.2" + ethereum-protocol "^1.0.1" + ethereumjs-tx "^1.0.0" + ethereumjs-util "^6.1.0" + ethereumjs-wallet "^0.6.3" + source-map-support "^0.5.19" + web3 "1.2.1" + web3-provider-engine "https://github.com/trufflesuite/provider-engine#web3-one" + "@truffle/interface-adapter@^0.3.0": version "0.3.3" resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.3.3.tgz#61305378cf81776769ef36c60d394e568ac4a2ee" @@ -141,7 +157,21 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -accepts@~1.3.4, accepts@~1.3.7: +abstract-leveldown@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" + integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + +accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== @@ -159,10 +189,10 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= -after@0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" - integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= +aes-js@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== agent-base@6: version "6.0.0" @@ -196,21 +226,11 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" @@ -238,22 +258,6 @@ any-promise@1.3.0, any-promise@^1.3.0: resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - app-module-path@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" @@ -266,21 +270,6 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -291,16 +280,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -arraybuffer.slice@~0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" - integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== - arrify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" @@ -322,14 +301,6 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -assert-diff@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/assert-diff/-/assert-diff-3.0.1.tgz#41720c433a2cef91a7cd4cedd2b21b4ba8719512" - integrity sha512-TxoFgLKQCGHNBDMEayf0YKSEf0CS3Xxmmx1RX6dsiun+YkwqO3NEoy6kpmQkrTw9e3juLbi4TUtrppUrXiYfrw== - dependencies: - assert-plus "1.0.0" - json-diff "0.5.4" - assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" @@ -340,41 +311,35 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each-series@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-0.1.1.tgz#7617c1917401fd8ca4a28aadce3dbae98afeb432" - integrity sha1-dhfBkXQB/Yykooqtzj266Yr+tDI= - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== +async-eventemitter@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@1.5.2, async@1.x: +async@1.x, async@^1.4.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= +async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -385,57 +350,549 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== -axios@0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" - integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ== +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.14, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== + dependencies: + 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" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + 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" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" -backo2@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= +babel-preset-env@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" + integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^3.2.6" + invariant "^2.2.2" + semver "^5.3.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + 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" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + 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@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + 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" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babelify@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" + integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= + dependencies: + babel-core "^6.0.14" + object-assign "^4.0.0" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-arraybuffer@0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" - integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= +base-x@^3.0.2: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" base64-js@^1.0.2, base64-js@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== -base64id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" - integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - 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" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" @@ -443,18 +900,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -better-assert@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" - integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= - dependencies: - callsite "1.0.0" - -bignumber.js@9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" - integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== - bignumber.js@^7.0.0, bignumber.js@^7.2.0: version "7.2.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" @@ -468,23 +913,24 @@ bignumber.js@^7.0.0, bignumber.js@^7.2.0: version "2.0.7" resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== - -bindings@^1.2.1, bindings@^1.3.1, bindings@^1.5.0: +bindings@^1.2.1, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== dependencies: file-uri-to-path "1.0.0" +bip39@^2.4.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.6.0.tgz#9e3a720b42ec8b3fbe4038f1e445317b6a99321c" + integrity sha512-RrnQRG2EgEoqO24ea+Q/fftuPUZLmrEM3qNhhGsA3PbaXaCW791LTzPuVyx/VprXQcTbPJ3K3UeTna8ZnVl2sg== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + bip66@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" @@ -500,11 +946,6 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -blob@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" - integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== - bluebird@^3.5.0: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -549,23 +990,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - 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" - -braces@^3.0.1, braces@~3.0.2: +braces@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -582,64 +1007,6 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browser-sync-client@^2.26.6: - version "2.26.6" - resolved "https://registry.yarnpkg.com/browser-sync-client/-/browser-sync-client-2.26.6.tgz#e5201d3ace8aee88af17656b7b0c0620b6f8e4ab" - integrity sha512-mGrkZdNzttKdf/16I+y+2dTQxoMCIpKbVIMJ/uP8ZpnKu9f9qa/2CYVtLtbjZG8nsM14EwiCrjuFTGBEnT3Gjw== - dependencies: - etag "1.8.1" - fresh "0.5.2" - mitt "^1.1.3" - rxjs "^5.5.6" - -browser-sync-ui@^2.26.4: - version "2.26.4" - resolved "https://registry.yarnpkg.com/browser-sync-ui/-/browser-sync-ui-2.26.4.tgz#3772f13c6b93f2d7d333f4be0ca1ec02aae97dba" - integrity sha512-u20P3EsZoM8Pt+puoi3BU3KlbQAH1lAcV+/O4saF26qokrBqIDotmGonfWwoRbUmdxZkM9MBmA0K39ZTG1h4sA== - dependencies: - async-each-series "0.1.1" - connect-history-api-fallback "^1" - immutable "^3" - server-destroy "1.0.1" - socket.io-client "^2.0.4" - stream-throttle "^0.1.3" - -browser-sync@^2.26.7: - version "2.26.7" - resolved "https://registry.yarnpkg.com/browser-sync/-/browser-sync-2.26.7.tgz#120287716eb405651a76cc74fe851c31350557f9" - integrity sha512-lY3emme0OyvA2ujEMpRmyRy9LY6gHLuTr2/ABxhIm3lADOiRXzP4dgekvnDrQqZ/Ec2Fz19lEjm6kglSG5766w== - dependencies: - browser-sync-client "^2.26.6" - browser-sync-ui "^2.26.4" - bs-recipes "1.3.4" - bs-snippet-injector "^2.0.1" - chokidar "^2.0.4" - connect "3.6.6" - connect-history-api-fallback "^1" - dev-ip "^1.0.1" - easy-extender "^2.3.4" - eazy-logger "^3" - etag "^1.8.1" - fresh "^0.5.2" - fs-extra "3.0.1" - http-proxy "1.15.2" - immutable "^3" - localtunnel "1.9.2" - micromatch "^3.1.10" - opn "5.3.0" - portscanner "2.1.1" - qs "6.2.3" - raw-body "^2.3.2" - resp-modifier "6.0.2" - rx "4.1.0" - send "0.16.2" - serve-index "1.9.1" - serve-static "1.13.2" - server-destroy "1.0.1" - socket.io "2.1.1" - ua-parser-js "0.7.17" - yargs "6.4.0" - browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -693,15 +1060,29 @@ browserify-sign@^4.0.0: parse-asn1 "^5.1.5" readable-stream "^3.6.0" -bs-recipes@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/bs-recipes/-/bs-recipes-1.3.4.tgz#0d2d4d48a718c8c044769fdc4f89592dc8b69585" - integrity sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU= +browserslist@^3.2.6: + version "3.2.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" + integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ== + dependencies: + caniuse-lite "^1.0.30000844" + electron-to-chromium "^1.3.47" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" -bs-snippet-injector@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz#61b5393f11f52559ed120693100343b6edb04dd5" - integrity sha1-YbU5PxH1JVntEgaTEANDtu2wTdU= +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" buffer-alloc-unsafe@^1.1.0: version "1.1.0" @@ -759,21 +1140,6 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - 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" - cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -787,38 +1153,21 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" -callsite@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" - integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +caniuse-lite@^1.0.30000844: + version "1.0.30001055" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001055.tgz#7b52c3537f7a8c0408aca867e83d2b04268b54cd" + integrity sha512-MbwsBmKrBSKIWldfdIagO5OJWZclpJtS4h0Jrk/4HFrXJxTdVdH23Fd+xCiHriVGvYcWyW8mR/CPsYajlH8Iuw== + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chai-as-promised@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai-bignumber@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chai-bignumber/-/chai-bignumber-3.0.0.tgz#e90cf1f468355bbb11a9acd051222586cd2648a9" - integrity sha512-SubOtaSI2AILWTWe2j0c6i2yFT/f9J6UBjeVGDuwDiPLkF/U5+/eTWUE3sbCZ1KgcPF6UJsDVYbIxaYA097MQA== - chai@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" @@ -831,7 +1180,7 @@ chai@^4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@^1.1.1: +chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -856,39 +1205,12 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - -chokidar@^2.0.4: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== +checkpoint-store@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" + integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - 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" - optionalDependencies: - fsevents "^1.2.7" + functional-red-black-tree "^1.0.1" chownr@^1.1.1: version "1.1.4" @@ -903,32 +1225,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cli-color@~0.1.6: - version "0.1.7" - resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-0.1.7.tgz#adc3200fa471cc211b0da7f566b71e98b9d67347" - integrity sha1-rcMgD6RxzCEbDaf1ZrcemLnWc0c= - dependencies: - es5-ext "0.8.x" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -945,24 +1241,16 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -992,7 +1280,7 @@ commander@2.15.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== -commander@^2.2.0, commander@~2.20.3: +commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -1004,52 +1292,20 @@ commander@~2.8.1: dependencies: graceful-readlink ">= 1.0.0" -component-bind@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" - integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= - -component-emitter@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -component-inherit@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" - integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -connect-history-api-fallback@^1, connect-history-api-fallback@^1.2.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== - -connect-logger@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/connect-logger/-/connect-logger-0.0.1.tgz#4d999978a1d20bb4608e7cd434d741652255174b" - integrity sha1-TZmZeKHSC7RgjnzUNNdBZSJVF0s= - dependencies: - moment "*" - -connect@3.6.6: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" - integrity sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ= +concat-stream@^1.5.1: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: - debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" - utils-merge "1.0.1" + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" content-disposition@0.5.3: version "0.5.3" @@ -1063,16 +1319,18 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== +convert-source-map@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - cookie@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" @@ -1083,10 +1341,10 @@ cookiejar@^2.1.1: resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.11" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1132,6 +1390,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-fetch@^2.1.0, cross-fetch@^2.1.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e" + integrity sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw== + dependencies: + node-fetch "2.1.2" + whatwg-fetch "2.0.4" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1185,35 +1451,35 @@ death@^1.1.0: resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" integrity sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg= -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: +debug@2.6.9, debug@^2.2.0, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@3.1.0, debug@=3.1.0, debug@~3.1.0: +debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@4, debug@4.1.1, debug@~4.1.0: +debug@4: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" -decamelize@^1.1.1, decamelize@^1.2.0: +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -1290,6 +1556,18 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" +deep-equal@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -1300,6 +1578,13 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +deferred-leveldown@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" + integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== + dependencies: + abstract-leveldown "~2.6.0" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -1307,27 +1592,10 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: +defined@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= delayed-stream@~1.0.0: version "1.0.0" @@ -1352,6 +1620,13 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + detect-port@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" @@ -1360,11 +1635,6 @@ detect-port@^1.3.0: address "^1.0.1" debug "^2.6.0" -dev-ip@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0" - integrity sha1-p2o+0YVb56ASu4rBbLgPPADcKPA= - diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -1384,13 +1654,6 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -difflib@~0.2.1: - version "0.2.4" - resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" - integrity sha1-teMDYabbAjF21WKJLbhZQKcY9H4= - dependencies: - heap ">= 0.2.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -1408,6 +1671,13 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +dotignore@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" + integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== + dependencies: + minimatch "^3.0.4" + drbg.js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" @@ -1417,32 +1687,11 @@ drbg.js@^1.0.1: create-hash "^1.1.2" create-hmac "^1.1.4" -dreamopt@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/dreamopt/-/dreamopt-0.6.0.tgz#d813ccdac8d39d8ad526775514a13dda664d6b4b" - integrity sha1-2BPM2sjTnYrVJndVFKE92mZNa0s= - dependencies: - wordwrap ">=0.0.2" - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -easy-extender@^2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/easy-extender/-/easy-extender-2.3.4.tgz#298789b64f9aaba62169c77a2b3b64b4c9589b8f" - integrity sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q== - dependencies: - lodash "^4.17.10" - -eazy-logger@^3: - version "3.0.2" - resolved "https://registry.yarnpkg.com/eazy-logger/-/eazy-logger-3.0.2.tgz#a325aa5e53d13a2225889b2ac4113b2b9636f4fc" - integrity sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw= - dependencies: - tfunk "^3.0.1" - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -1463,6 +1712,11 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +electron-to-chromium@^1.3.47: + version "1.3.432" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.432.tgz#3bf7b191978ff2e8bc3caf811bb52b1e9f9eab25" + integrity sha512-/GdNhXyLP5Yl2322CUX/+Xi8NhdHBqL6lD9VJVKjH6CjoPGakvwZ5CpKgj/oOlbzuWWjOvMjDw1bBuAIRCNTlw== + elliptic@6.3.3: version "6.3.3" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" @@ -1501,11 +1755,18 @@ emoji-regex@^9.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.0.0.tgz#48a2309cc8a1d2e9d23bc6a67c39b63032e76ea4" integrity sha512-6p1NII1Vm62wni/VR/cUMauVQoxmLVb9csqQlvLz+hO2gk8U2UYDfXHQSUYIBKmZwAKz867IDqG7B+u0mj+M6w== -encodeurl@~1.0.1, encodeurl@~1.0.2: +encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= + dependencies: + iconv-lite "~0.4.13" + end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -1513,80 +1774,12 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -engine.io-client@~3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36" - integrity sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw== - dependencies: - component-emitter "1.2.1" - component-inherit "0.0.3" - debug "~3.1.0" - engine.io-parser "~2.1.1" - has-cors "1.1.0" - indexof "0.0.1" - parseqs "0.0.5" - parseuri "0.0.5" - ws "~3.3.1" - xmlhttprequest-ssl "~1.5.4" - yeast "0.1.2" - -engine.io-client@~3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.4.1.tgz#922ddb47eecdcb541136a93aeead24718fd05461" - integrity sha512-RJNmA+A9Js+8Aoq815xpGAsgWH1VoSYM//2VgIiu9lNOaHFfLpTjH4tOzktBpjIs5lvOfiNY1dwf+NuU6D38Mw== - dependencies: - component-emitter "1.2.1" - component-inherit "0.0.3" - debug "~4.1.0" - engine.io-parser "~2.2.0" - has-cors "1.1.0" - indexof "0.0.1" - parseqs "0.0.5" - parseuri "0.0.5" - ws "~6.1.0" - xmlhttprequest-ssl "~1.5.4" - yeast "0.1.2" - -engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" - integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== - dependencies: - after "0.8.2" - arraybuffer.slice "~0.0.7" - base64-arraybuffer "0.1.5" - blob "0.0.5" - has-binary2 "~1.0.2" - -engine.io-parser@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.0.tgz#312c4894f57d52a02b420868da7b5c1c84af80ed" - integrity sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w== - dependencies: - after "0.8.2" - arraybuffer.slice "~0.0.7" - base64-arraybuffer "0.1.5" - blob "0.0.5" - has-binary2 "~1.0.2" - -engine.io@~3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.1.tgz#b60281c35484a70ee0351ea0ebff83ec8c9522a2" - integrity sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w== - dependencies: - accepts "~1.3.4" - base64id "1.0.0" - cookie "0.3.1" - debug "~3.1.0" - engine.io-parser "~2.1.0" - ws "~3.3.1" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== +errno@~0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== dependencies: - is-arrayish "^0.2.1" + prr "~1.0.1" es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: version "1.17.5" @@ -1614,11 +1807,6 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@0.8.x: - version "0.8.2" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.8.2.tgz#aba8d9e1943a895ac96837a62a39b3f55ecd94ab" - integrity sha1-q6jZ4ZQ6iVrJaDemKjmz9V7NlKs= - es5-ext@^0.10.35, es5-ext@^0.10.50: version "0.10.53" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" @@ -1699,11 +1887,24 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@1.8.1, etag@^1.8.1, etag@~1.8.1: +etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +eth-block-tracker@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" + integrity sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug== + dependencies: + eth-query "^2.1.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.3" + ethjs-util "^0.1.3" + json-rpc-engine "^3.6.0" + pify "^2.3.0" + tape "^4.6.3" + eth-ens-namehash@2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" @@ -1712,6 +1913,35 @@ eth-ens-namehash@2.0.8: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" +eth-json-rpc-infura@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" + integrity sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw== + dependencies: + cross-fetch "^2.1.1" + eth-json-rpc-middleware "^1.5.0" + json-rpc-engine "^3.4.0" + json-rpc-error "^2.0.0" + +eth-json-rpc-middleware@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" + integrity sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q== + dependencies: + async "^2.5.0" + eth-query "^2.1.2" + eth-tx-summary "^3.1.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.1.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^3.6.0" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + tape "^4.6.3" + eth-lib@0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" @@ -1742,6 +1972,38 @@ eth-lib@^0.2.8: elliptic "^6.4.0" xhr-request-promise "^0.1.2" +eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + +eth-sig-util@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" + integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= + dependencies: + ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" + ethereumjs-util "^5.1.1" + +eth-tx-summary@^3.1.2: + version "3.2.4" + resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" + integrity sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg== + dependencies: + async "^2.1.2" + clone "^2.0.0" + concat-stream "^1.5.1" + end-of-stream "^1.1.0" + eth-query "^2.0.2" + ethereumjs-block "^1.4.1" + ethereumjs-tx "^1.1.1" + ethereumjs-util "^5.0.1" + ethereumjs-vm "^2.6.0" + through2 "^2.0.3" + ethereum-bloom-filters@^1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz#b7b80735e385dbb7f944ce6b4533e24511306060" @@ -1749,6 +2011,21 @@ ethereum-bloom-filters@^1.0.6: dependencies: js-sha3 "^0.8.0" +ethereum-common@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" + integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== + +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + +ethereum-protocol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz#b7d68142f4105e0ae7b5e178cf42f8d4dc4b93cf" + integrity sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg== + ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" @@ -1757,7 +2034,45 @@ ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.8: bn.js "^4.11.8" ethereumjs-util "^6.0.0" -ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: +"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": + version "0.6.8" + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b" + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== + dependencies: + ethereumjs-util "^5.0.0" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== + dependencies: + async "^2.0.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-block@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" + integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== + dependencies: + async "^2.0.1" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.1" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz#4e75042473a64daec0ed9fe84323dd9576aa5dba" integrity sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ== @@ -1770,8 +2085,16 @@ ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1: ethereumjs-common "^1.5.0" ethereumjs-util "^6.0.0" -ethereumjs-util@6.1.0: - version "6.1.0" +ethereumjs-tx@^1.0.0, ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" + integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + +ethereumjs-util@6.1.0: + version "6.1.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8" integrity sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q== dependencies: @@ -1783,7 +2106,20 @@ ethereumjs-util@6.1.0: safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethereumjs-util@^6.0.0: +ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz#3e0c0d1741471acf1036052d048623dee54ad642" + integrity sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + ethjs-util "^0.1.3" + keccak "^1.0.2" + rlp "^2.0.0" + safe-buffer "^5.1.1" + secp256k1 "^3.0.1" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0: version "6.2.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== @@ -1796,6 +2132,38 @@ ethereumjs-util@^6.0.0: rlp "^2.2.3" secp256k1 "^3.0.1" +ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" + integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + ethereumjs-account "^2.0.3" + ethereumjs-block "~2.2.0" + ethereumjs-common "^1.1.0" + ethereumjs-util "^6.0.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + +ethereumjs-wallet@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz#b0eae6f327637c2aeb9ccb9047b982ac542e6ab1" + integrity sha512-qiXPiZOsStem+Dj/CQHbn5qex+FVkuPmGH7SvSnA9F3tdRDt8dLMyvIj3+U05QzVZNPYh4HXEdnzoYI4dZkr9w== + dependencies: + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereumjs-util "^6.0.0" + hdkey "^1.1.0" + randombytes "^2.0.6" + safe-buffer "^5.1.2" + scrypt.js "^0.3.0" + utf8 "^3.0.0" + uuid "^3.3.2" + ethers@4.0.0-beta.3: version "4.0.0-beta.3" resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.3.tgz#15bef14e57e94ecbeb7f9b39dd0a4bd435bc9066" @@ -1844,7 +2212,7 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" -ethjs-util@0.1.6: +ethjs-util@0.1.6, ethjs-util@^0.1.3: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== @@ -1857,16 +2225,16 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" - integrity sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg= - eventemitter3@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +events@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" + integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== + evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -1888,19 +2256,6 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - 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" - express@^4.14.0: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -1944,40 +2299,11 @@ ext@^1.1.2: dependencies: type "^2.0.0" -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - extend@^3.0.2, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - 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" - extract-comments@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/extract-comments/-/extract-comments-1.1.0.tgz#b90bca033a056bd69b8ba1c6b6b120fc2ee95c18" @@ -1996,6 +2322,13 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= +fake-merkle-patricia-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" + integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + dependencies: + checkpoint-store "^1.1.0" + fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" @@ -2047,6 +2380,13 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" +fetch-ponyfill@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" + integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + dependencies: + node-fetch "~1.7.1" + file-type@^3.8.0: version "3.9.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" @@ -2067,16 +2407,6 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2084,19 +2414,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" - integrity sha1-zgtoVbRYU+eRsvzGgARtiCU91/U= - dependencies: - debug "2.6.9" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" - unpipe "~1.0.0" - finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" @@ -2110,39 +2427,19 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-up@3.0.0, find-up@^3.0.0: +find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -flat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" - integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== - dependencies: - is-buffer "~2.0.3" - -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== +for-each@~0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== dependencies: - debug "=3.1.0" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + is-callable "^1.1.3" forever-agent@~0.6.1: version "0.6.1" @@ -2163,14 +2460,7 @@ forwarded@~0.1.2: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2, fresh@^0.5.2: +fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= @@ -2180,15 +2470,6 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -2219,24 +2500,16 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -function-bind@^1.1.1: +function-bind@^1.1.1, function-bind@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + ganache-cli@6.9.0: version "6.9.0" resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.9.0.tgz#94d7e26964dff80b7382a33829ec75e15709a948" @@ -2274,11 +2547,6 @@ gcp-metadata@^4.0.0: gaxios "^3.0.0" json-bigint "^0.3.0" -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -2316,11 +2584,6 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -2336,15 +2599,7 @@ ghost-testrpc@^0.0.2: chalk "^2.4.2" node-emoji "^1.10.0" -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.1.0, glob-parent@~5.1.0: +glob-parent@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -2363,18 +2618,6 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - 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" - glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -2386,7 +2629,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.3: +glob@^7.0.0, glob@^7.1.3, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -2422,6 +2665,11 @@ global@~4.3.0: min-document "^2.19.0" process "~0.5.1" +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -2515,7 +2763,7 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: +graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -2572,18 +2820,6 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-binary2@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" - integrity sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw== - dependencies: - isarray "2.0.1" - -has-cors@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" - integrity sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk= - has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" @@ -2611,38 +2847,7 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.3: +has@^1.0.3, has@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -2674,21 +2879,20 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hdkey@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.1.2.tgz#c60f9cf6f90fbf24a8a52ea06893f36a0108cd3e" + integrity sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ== + dependencies: + bs58check "^2.1.2" + safe-buffer "^5.1.1" + secp256k1 "^3.0.1" + he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -"heap@>= 0.2.0": - version "0.2.6" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" - integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= - hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -2698,10 +2902,13 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" http-cache-semantics@^4.0.0: version "4.1.0" @@ -2719,7 +2926,7 @@ http-errors@1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-errors@1.7.3, http-errors@~1.7.2: +http-errors@~1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== @@ -2730,29 +2937,11 @@ http-errors@1.7.3, http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-https@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= -http-proxy@1.15.2: - version "1.15.2" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.15.2.tgz#642fdcaffe52d3448d2bda3b0079e9409064da31" - integrity sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE= - dependencies: - eventemitter3 "1.x.x" - requires-port "1.x.x" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -2770,7 +2959,7 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -iconv-lite@0.4.24: +iconv-lite@0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -2794,15 +2983,10 @@ ignore@^5.1.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== -immutable@^3: - version "3.8.2" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" - integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM= - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= +immediate@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= inflight@^1.0.4: version "1.0.6" @@ -2812,7 +2996,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -2832,10 +3016,12 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" invert-kv@^2.0.0: version "2.0.0" @@ -2847,114 +3033,35 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-buffer@^2.0.2, is-buffer@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== -is-callable@^1.1.4, is-callable@^1.1.5: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-fullwidth-code-point@^1.0.0: +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-fn@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" + resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= is-fullwidth-code-point@^2.0.0: version "2.0.0" @@ -2971,14 +3078,7 @@ is-function@^1.0.1: resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -2995,20 +3095,6 @@ is-natural-number@^4.0.1: resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= -is-number-like@^1.0.3: - version "1.0.8" - resolved "https://registry.yarnpkg.com/is-number-like/-/is-number-like-1.0.8.tgz#2e129620b50891042e44e9bbbb30593e75cfbbe3" - integrity sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA== - dependencies: - lodash.isfinite "^3.3.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -3024,14 +3110,7 @@ is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-regex@^1.0.5: +is-regex@^1.0.4, is-regex@^1.0.5, is-regex@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== @@ -3043,7 +3122,7 @@ is-retry-allowed@^1.0.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== -is-stream@^1.0.0, is-stream@^1.1.0: +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -3065,48 +3144,21 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@1.0.0, isarray@~1.0.0: +isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -isarray@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" - integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3135,7 +3187,17 @@ js-sha3@^0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-yaml@3.13.1, js-yaml@3.x: +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@3.x: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -3148,6 +3210,16 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + json-bigint@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.3.0.tgz#0ccd912c4b8270d05f056fbd13814b53d3825b1e" @@ -3160,14 +3232,29 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-diff@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/json-diff/-/json-diff-0.5.4.tgz#7bc8198c441756632aab66c7d9189d365a7a035a" - integrity sha512-q5Xmx9QXNOzOzIlMoYtLrLiu4Jl/Ce2bn0CNcv54PhyH89CI4GWlGVDye8ei2Ijt9R3U+vsWPsXpLUNob8bs8Q== +json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" + integrity sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA== + dependencies: + async "^2.0.1" + babel-preset-env "^1.7.0" + babelify "^7.3.0" + json-rpc-error "^2.0.0" + promise-to-callback "^1.0.0" + safe-event-emitter "^1.0.1" + +json-rpc-error@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" + integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= dependencies: - cli-color "~0.1.6" - difflib "~0.2.1" - dreamopt "~0.6.0" + inherits "^2.0.1" + +json-rpc-random-id@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= json-schema-traverse@^0.3.0: version "0.3.1" @@ -3184,17 +3271,22 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= - optionalDependencies: - graceful-fs "^4.1.6" +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= jsonfile@^4.0.0: version "4.0.0" @@ -3203,6 +3295,11 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + jsonschema@^1.2.4: version "1.2.6" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.6.tgz#52b0a8e9dc06bbae7295249d03e4b9faee8a0c0b" @@ -3262,37 +3359,11 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -3300,50 +3371,63 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= +level-codec@~7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" + integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== + +level-errors@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" + integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" + errno "~0.1.1" -limiter@^1.0.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" - integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== +level-errors@~1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" + integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== + dependencies: + errno "~0.1.1" -lite-server@^2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/lite-server/-/lite-server-2.5.4.tgz#f1c1b25bb70ce0f83eb1ab0b08ef32c08accf4e2" - integrity sha512-57SverS67UqRFiRm0ktdzEG5yZeyzkywRJ9Q8PHVSGuLm9K97Mr6jF43XTu5v9lVe8g0WHJ4eKlIeGSd1Bq/sw== +level-iterator-stream@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" + integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= dependencies: - browser-sync "^2.26.7" - connect-history-api-fallback "^1.2.0" - connect-logger "0.0.1" - lodash "^4.17.15" - minimist "1.2.0" + inherits "^2.0.1" + level-errors "^1.0.3" + readable-stream "^1.0.33" + xtend "^4.0.0" -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= +level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" + integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" + readable-stream "~1.0.15" + xtend "~2.1.1" -localtunnel@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/localtunnel/-/localtunnel-1.9.2.tgz#0012fcabc29cf964c130a01858768aa2bb65b5af" - integrity sha512-NEKF7bDJE9U3xzJu3kbayF0WTvng6Pww7tzqNb/XtEARYwqw7CKEX7BvOMg98FtE9es2CRizl61gkV3hS8dqYg== +levelup@^1.2.1: + version "1.3.9" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" + integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~7.0.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.4.1" + xtend "~4.0.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: - axios "0.19.0" - debug "4.1.1" - openurl "1.1.1" - yargs "6.6.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" locate-path@^3.0.0: version "3.0.0" @@ -3353,27 +3437,22 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -lodash.isfinite@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" - integrity sha1-+4m2WpqAKBgz8LdHizpRBPiY67M= - lodash.toarray@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= -lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15: +lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: - chalk "^2.4.2" + js-tokens "^3.0.0 || ^4.0.0" lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" @@ -3392,6 +3471,11 @@ lru-cache@^5.0.0: dependencies: yallist "^3.0.2" +ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -3406,18 +3490,6 @@ map-age-cleaner@^0.1.1: dependencies: p-defer "^1.0.0" -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -3441,6 +3513,18 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memdown@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -3451,30 +3535,25 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== +merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" + integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== + dependencies: + async "^1.4.2" + ethereumjs-util "^5.0.0" + level-ws "0.0.0" + levelup "^1.2.1" + memdown "^1.0.0" + readable-stream "^2.0.0" + rlp "^2.0.0" + semaphore ">=1.0.1" + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - 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" - micromatch@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" @@ -3496,18 +3575,13 @@ mime-db@1.44.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: mime-db "1.44.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -3545,7 +3619,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -3557,12 +3631,7 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@^1.2.5: +minimist@^1.2.5, minimist@~1.2.0: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -3582,19 +3651,6 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" -mitt@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.2.0.tgz#cb24e6569c806e31bd4e3995787fe38a04fdf90d" - integrity sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw== - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - mkdirp-promise@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" @@ -3602,7 +3658,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@^1.0.4: +mkdirp@*: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -3614,7 +3670,7 @@ mkdirp@0.5.1: dependencies: minimist "0.0.8" -mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.0: +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -3638,46 +3694,11 @@ mocha@5.2.0: mkdirp "0.5.1" supports-color "5.4.0" -mocha@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" - integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - mock-fs@^4.1.0: version "4.12.0" resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.12.0.tgz#a5d50b12d2d75e5bec9dac3b67ffe3c41d31ade4" integrity sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== -moment@*: - version "2.25.3" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.3.tgz#252ff41319cf41e47761a1a88cab30edfe9808c0" - integrity sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -3693,7 +3714,7 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nan@^2.12.1, nan@^2.14.0, nan@^2.2.1: +nan@^2.0.8, nan@^2.14.0, nan@^2.2.1: version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== @@ -3703,23 +3724,6 @@ nano-json-stream-parser@^0.1.2: resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - 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" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -3747,19 +3751,24 @@ node-emoji@^1.10.0: dependencies: lodash.toarray "^4.4.0" -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" +node-fetch@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" + integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= node-fetch@^2.3.0: version "2.6.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== +node-fetch@~1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-forge@^0.9.0: version "0.9.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5" @@ -3772,28 +3781,6 @@ nopt@3.x: dependencies: abbrev "1" -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - normalize-url@^4.1.0: version "4.5.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" @@ -3806,11 +3793,6 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - number-to-bn@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" @@ -3824,48 +3806,35 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-component@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" - integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.7.0: +object-inspect@^1.7.0, object-inspect@~1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-is@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" + integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-path@^0.9.0: - version "0.9.2" - resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.9.2.tgz#0fd9a74fc5fad1ae3968b586bda5c632bd6c05a5" - integrity sha1-D9mnT8X60a45aLWGvaXGMr1sBaU= - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= -object.assign@4.1.0, object.assign@^4.1.0: +object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -3875,21 +3844,6 @@ object.assign@4.1.0, object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - oboe@2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" @@ -3911,11 +3865,6 @@ once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -openurl@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/openurl/-/openurl-1.1.1.tgz#3875b4b0ef7a52c156f0db41d4609dbb0f94b387" - integrity sha1-OHW0sO96UsFW8NtB1GCduw+Us4c= - openzeppelin-solidity@1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.11.0.tgz#f57a5e340aa45efd4a052f4bb514a7a619b0bbd0" @@ -3926,13 +3875,6 @@ openzeppelin-solidity@~1.10.0: resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.10.0.tgz#d77eee6653f5958d051318a61ba0b436f92216c0" integrity sha512-igkrumQQ2lrN2zjeQV4Dnb0GpTBj1fzMcd8HPyBUqwI0hhuscX/HzXiqKT6gFQl1j9Wy/ppVVs9fqL/foF7Gmg== -opn@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - integrity sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g== - dependencies: - is-wsl "^1.1.0" - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -3950,12 +3892,10 @@ original-require@1.0.1: resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= os-locale@^3.1.0: version "3.1.0" @@ -3966,6 +3906,11 @@ os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -4039,55 +3984,17 @@ parse-headers@^2.0.0: resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parseqs@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" - integrity sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0= - dependencies: - better-assert "~1.0.0" - -parseuri@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" - integrity sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo= - dependencies: - better-assert "~1.0.0" - -parseurl@~1.3.2, parseurl@~1.3.3: +parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= -path-is-absolute@^1.0.0: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= @@ -4107,15 +4014,6 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -4126,7 +4024,7 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= -pbkdf2@^3.0.3: +pbkdf2@^3.0.3, pbkdf2@^3.0.9: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== @@ -4147,12 +4045,12 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: +picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== -pify@^2.0.0, pify@^2.3.0: +pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= @@ -4179,18 +4077,10 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -portscanner@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.1.1.tgz#eabb409e4de24950f5a2a516d35ae769343fbb96" - integrity sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y= - dependencies: - async "1.5.2" - is-number-like "^1.0.3" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +precond@0.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= prelude-ls@~1.1.2: version "1.1.2" @@ -4226,6 +4116,11 @@ prettier@2.0.5, prettier@^2.0.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== +private@^0.1.6, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -4236,6 +4131,14 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= +promise-to-callback@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + dependencies: + is-fn "^1.0.0" + set-immediate-shim "^1.0.1" + proxy-addr@~2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" @@ -4244,6 +4147,11 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.1" +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -4284,11 +4192,6 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qs@6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.3.tgz#1cfcb25c10a9b2b483053ff39f5dfc9233908cfe" - integrity sha1-HPyyXBCpsrSDBT/zn138kjOQjP4= - qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" @@ -4313,7 +4216,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -4333,7 +4236,7 @@ randomhex@0.1.5: resolved "https://registry.yarnpkg.com/randomhex/-/randomhex-0.1.5.tgz#baceef982329091400f2a2912c6cd02f1094f585" integrity sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU= -range-parser@~1.2.0, range-parser@~1.2.1: +range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== @@ -4341,41 +4244,24 @@ range-parser@~1.2.0, range-parser@~1.2.1: raw-body@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@^2.3.2: - version "2.4.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" - integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== dependencies: bytes "3.1.0" - http-errors "1.7.3" + http-errors "1.7.2" iconv-lite "0.4.24" unpipe "1.0.0" -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= +readable-stream@^1.0.33: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" -readable-stream@^2.0.2, readable-stream@^2.3.0, readable-stream@^2.3.5: +readable-stream@^2.0.0, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -4397,21 +4283,15 @@ readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== +readable-stream@~1.0.15: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= dependencies: - picomatch "^2.0.4" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" rechoir@^0.6.2: version "0.6.2" @@ -4427,30 +4307,62 @@ recursive-readdir@^2.2.2: dependencies: minimatch "3.0.4" -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== +regenerate@^1.2.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= +regexp.prototype.flags@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= + dependencies: + jsesc "~0.5.0" -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" -request@^2.79.0: +request@^2.79.0, request@^2.85.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -4481,45 +4393,29 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requires-port@1.x.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.10.0: +resolve@^1.1.6: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -resp-modifier@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/resp-modifier/-/resp-modifier-6.0.2.tgz#b124de5c4fbafcba541f48ffa73970f4aa456b4f" - integrity sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08= +resolve@~1.15.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: - debug "^2.2.0" - minimatch "^3.0.2" + path-parse "^1.0.6" responselike@^1.0.2: version "1.0.2" @@ -4528,10 +4424,12 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +resumer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" + integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + dependencies: + through "~2.3.4" reusify@^1.0.4: version "1.0.4" @@ -4558,17 +4456,10 @@ run-parallel@^1.1.9: resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== -rx@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" - integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I= - -rxjs@^5.5.6: - version "5.5.12" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz#6fa61b8a77c3d793dbaf270bee2f43f652d741cc" - integrity sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw== - dependencies: - symbol-observable "1.0.1" +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -4576,16 +4467,16 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= +safe-event-emitter@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" + integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== dependencies: - ret "~0.1.10" + events "^3.0.0" "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" @@ -4629,11 +4520,34 @@ scrypt-js@2.0.4: scryptsy "^2.1.0" semver "^6.3.0" +scrypt.js@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/scrypt.js/-/scrypt.js-0.3.0.tgz#6c62d61728ad533c8c376a2e5e3e86d41a95c4c0" + integrity sha512-42LTc1nyFsyv/o0gcHtDztrn+aqpkaCNt5Qh7ATBZfhEZU7IC/0oT/qbBH+uRNoAPvs2fwiOId68FDEoSRA8/A== + dependencies: + scryptsy "^1.2.1" + optionalDependencies: + scrypt "^6.0.2" + +scrypt@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/scrypt/-/scrypt-6.0.3.tgz#04e014a5682b53fa50c2d5cce167d719c06d870d" + integrity sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0= + dependencies: + nan "^2.0.8" + scryptsy@2.1.0, scryptsy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== +scryptsy@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" + integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= + dependencies: + pbkdf2 "^3.0.3" + secp256k1@^3.0.1: version "3.8.0" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" @@ -4655,16 +4569,21 @@ seek-bzip@^1.0.5: dependencies: commander "~2.8.1" -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.7.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semaphore@>=1.0.1, semaphore@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== semver@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== +semver@^5.3.0, semver@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -4675,24 +4594,10 @@ semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" +semver@~5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== send@0.17.1: version "0.17.1" @@ -4713,29 +4618,6 @@ send@0.17.1: range-parser "~1.2.1" statuses "~1.5.0" -serve-index@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -4746,11 +4628,6 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" -server-destroy@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" - integrity sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0= - servify@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" @@ -4767,15 +4644,10 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= setimmediate@1.0.4: version "1.0.4" @@ -4787,11 +4659,6 @@ setimmediate@^1.0.5: resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - setprototypeof@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" @@ -4845,116 +4712,16 @@ simple-get@^2.7.0: once "^1.3.1" simple-concat "^1.0.0" +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - 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" - -socket.io-adapter@~1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" - integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g== - -socket.io-client@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" - integrity sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ== - dependencies: - backo2 "1.0.2" - base64-arraybuffer "0.1.5" - component-bind "1.0.0" - component-emitter "1.2.1" - debug "~3.1.0" - engine.io-client "~3.2.0" - has-binary2 "~1.0.2" - has-cors "1.1.0" - indexof "0.0.1" - object-component "0.0.3" - parseqs "0.0.5" - parseuri "0.0.5" - socket.io-parser "~3.2.0" - to-array "0.1.4" - -socket.io-client@^2.0.4: - version "2.3.0" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.3.0.tgz#14d5ba2e00b9bcd145ae443ab96b3f86cbcc1bb4" - integrity sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA== - dependencies: - backo2 "1.0.2" - base64-arraybuffer "0.1.5" - component-bind "1.0.0" - component-emitter "1.2.1" - debug "~4.1.0" - engine.io-client "~3.4.0" - has-binary2 "~1.0.2" - has-cors "1.1.0" - indexof "0.0.1" - object-component "0.0.3" - parseqs "0.0.5" - parseuri "0.0.5" - socket.io-parser "~3.3.0" - to-array "0.1.4" - -socket.io-parser@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077" - integrity sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA== - dependencies: - component-emitter "1.2.1" - debug "~3.1.0" - isarray "2.0.1" - -socket.io-parser@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.0.tgz#2b52a96a509fdf31440ba40fed6094c7d4f1262f" - integrity sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng== - dependencies: - component-emitter "1.2.1" - debug "~3.1.0" - isarray "2.0.1" - -socket.io@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980" - integrity sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA== - dependencies: - debug "~3.1.0" - engine.io "~3.2.0" - has-binary2 "~1.0.2" - socket.io-adapter "~1.1.0" - socket.io-client "2.1.1" - socket.io-parser "~3.2.0" - solidity-coverage@^0.7.5: version "0.7.5" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.5.tgz#29a738b5644b23687e540688520457ce6792ce94" @@ -4979,17 +4746,6 @@ solidity-coverage@^0.7.5: shelljs "^0.8.3" web3 "1.2.6" -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - source-map-support@0.5.12: version "0.5.12" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" @@ -4998,12 +4754,22 @@ source-map-support@0.5.12: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + +source-map-support@^0.5.19: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" -source-map@^0.5.6: +source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -5020,39 +4786,6 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -5073,59 +4806,16 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stream-throttle@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/stream-throttle/-/stream-throttle-0.1.3.tgz#add57c8d7cc73a81630d31cd55d3961cfafba9c3" - integrity sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM= - dependencies: - commander "^2.2.0" - limiter "^1.0.5" - strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -5144,6 +4834,15 @@ string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string.prototype.trim@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz#141233dff32c82bfad80684d7e5f0869ee0fb782" + integrity sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + string.prototype.trimend@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" @@ -5185,6 +4884,11 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -5192,20 +4896,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -5220,13 +4917,6 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - strip-dirs@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" @@ -5246,11 +4936,6 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - supports-color@5.4.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" @@ -5258,13 +4943,6 @@ supports-color@5.4.0: dependencies: has-flag "^3.0.0" -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -5302,10 +4980,26 @@ swarm-js@0.1.39: tar "^4.0.2" xhr-request-promise "^0.1.2" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= +tape@^4.6.3: + version "4.13.2" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.13.2.tgz#eb419b9d9bc004025b1a81a5b63093e07f425629" + integrity sha512-waWwC/OqYVE9TS6r1IynlP2sEdk4Lfo6jazlgkuNkPTHIbuG2BTABIaKdlQWwPeB6Oo4ksZ1j33Yt0NTOAlYMQ== + dependencies: + deep-equal "~1.1.1" + defined "~1.0.0" + dotignore "~0.1.2" + for-each "~0.3.3" + function-bind "~1.1.1" + glob "~7.1.6" + has "~1.0.3" + inherits "~2.0.4" + is-regex "~1.0.5" + minimist "~1.2.0" + object-inspect "~1.7.0" + resolve "~1.15.1" + resumer "~0.0.0" + string.prototype.trim "~1.2.1" + through "~2.3.8" tar-stream@^1.5.2: version "1.6.2" @@ -5333,15 +5027,15 @@ tar@^4.0.2: safe-buffer "^5.1.2" yallist "^3.0.3" -tfunk@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/tfunk/-/tfunk-3.1.0.tgz#38e4414fc64977d87afdaa72facb6d29f82f7b5b" - integrity sha1-OORBT8ZJd9h6/apy+sttKfgve1s= +through2@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== dependencies: - chalk "^1.1.1" - object-path "^0.9.0" + readable-stream "~2.3.6" + xtend "~4.0.1" -through@^2.3.8: +through@^2.3.8, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -5351,36 +5045,21 @@ timed-out@^4.0.0, timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= -to-array@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" - integrity sha1-F+bBH3PdTz10zaek/zI46a2b+JA= - to-buffer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= to-readable-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -5388,16 +5067,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -5411,6 +5080,11 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + truffle-blockchain-utils@^0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz#a4e5c064dadd69f782a137f3d276d21095da7a47" @@ -5441,25 +5115,15 @@ truffle-error@^0.0.3: resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.3.tgz#4bf55242e14deee1c7194932709182deff2c97ca" integrity sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o= -truffle-hdwallet-provider@^1.0.17: - version "1.0.17" - resolved "https://registry.yarnpkg.com/truffle-hdwallet-provider/-/truffle-hdwallet-provider-1.0.17.tgz#fe8edd0d6974eeb31af9959e41525fb19abd74ca" - integrity sha512-s6DvSP83jiIAc6TUcpr7Uqnja1+sLGJ8og3X7n41vfyC4OCaKmBtXL5HOHf+SsU3iblOvnbFDgmN6Y1VBL/fsg== - dependencies: - any-promise "^1.3.0" - bindings "^1.3.1" - web3 "1.2.1" - websocket "^1.0.28" - truffle-provisioner@^0.1.1: version "0.1.5" resolved "https://registry.yarnpkg.com/truffle-provisioner/-/truffle-provisioner-0.1.5.tgz#f940b2e0aa3a26d5227dfc4ebe8d29ebc68a9e03" integrity sha512-XSzD4Tj1T16E8qwoIHnQ9sOuvoemP1yqxX9Jg0VvvoLTdl8X17uau6dN08JgNR09hJroTrXPbkAi5Y8IfKhVMw== truffle@^5.1.24: - version "5.1.24" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.24.tgz#2e7afc28b1748f2b44f2da351b3605744f3546e4" - integrity sha512-2TAidfvwZD3cCBVM8cgyU7hAUR7NTSkKnBzsasdIIwCOGZ1+IqG/pALSuATjeeHbo4tqzjvs3Nau2U1yo5wDAw== + version "5.1.25" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.25.tgz#553e6fdb9f6d95d9d4725355356c4739c233ff27" + integrity sha512-7iGKMkITjInGD1AFD7mKwxowQiNmPYx08jym/u8oNXVsYPYCZ6NbkMNSdf6TFXTTrEQe+tPEIy+CNF1Oc6DDzA== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -5514,10 +5178,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -ua-parser-js@0.7.17: - version "0.7.17" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" - integrity sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g== +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= uglify-js@^3.1.4: version "3.9.2" @@ -5544,39 +5208,21 @@ underscore@1.9.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +unorm@^1.3.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" + integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -5584,11 +5230,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -5618,12 +5259,7 @@ url-to-options@^1.0.1: resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -utf8@3.0.0: +utf8@3.0.0, utf8@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== @@ -5663,14 +5299,6 @@ uuid@^8.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c" integrity sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw== -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -6201,6 +5829,31 @@ web3-net@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +"web3-provider-engine@https://github.com/trufflesuite/provider-engine#web3-one": + version "14.0.6" + resolved "https://github.com/trufflesuite/provider-engine#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" + dependencies: + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^3.0.0" + eth-json-rpc-infura "^3.1.0" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + web3-providers-http@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.1.tgz#c93ea003a42e7b894556f7e19dd3540f947f5013" @@ -6413,17 +6066,6 @@ web3@^0.18.4: xhr2 "*" xmlhttprequest "*" -websocket@^1.0.28: - version "1.0.31" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" - integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== - dependencies: - debug "^2.2.0" - es5-ext "^0.10.50" - nan "^2.14.0" - typedarray-to-buffer "^3.1.5" - yaeti "^0.0.6" - "websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": version "1.0.29" resolved "https://codeload.github.com/web3-js/WebSocket-Node/tar.gz/905deb4812572b344f5801f8c9ce8bb02799d82e" @@ -6434,53 +6076,33 @@ websocket@^1.0.28: typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: +which@^1.1.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= - word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wordwrap@>=0.0.2, wordwrap@^1.0.0: +wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -6495,7 +6117,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -ws@^3.0.0, ws@~3.3.1: +ws@^3.0.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== @@ -6504,10 +6126,10 @@ ws@^3.0.0, ws@~3.3.1: safe-buffer "~5.1.0" ultron "~1.1.0" -ws@~6.1.0: - version "6.1.4" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.4.tgz#5b5c8800afab925e94ccb29d153c8d02c1776ef9" - integrity sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA== +ws@^5.1.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== dependencies: async-limiter "~1.0.0" @@ -6543,7 +6165,7 @@ xhr2@*: resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.2.0.tgz#eddeff782f3b7551061b8d75645085269396e521" integrity sha512-BDtiD0i2iKPK/S8OAZfpk6tyzEDnKKSjxWHcMBVmh+LuqJ8A32qXTyOx+TVOg2dKvq6zGBq2sgKPkEeRs1qTRA== -xhr@^2.0.4, xhr@^2.3.3: +xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: version "2.5.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== @@ -6553,25 +6175,22 @@ xhr@^2.0.4, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" -xmlhttprequest-ssl@~1.5.4: - version "1.5.5" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" - integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= - xmlhttprequest@*, xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= -xtend@^4.0.0: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" y18n@^4.0.0: version "4.0.0" @@ -6588,7 +6207,7 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: +yargs-parser@^13.1.0: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== @@ -6596,22 +6215,6 @@ yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^4.1.0, yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" - integrity sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw= - dependencies: - camelcase "^3.0.0" - -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - yargs@13.2.4: version "13.2.4" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" @@ -6629,61 +6232,6 @@ yargs@13.2.4: y18n "^4.0.0" yargs-parser "^13.1.0" -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.4.0.tgz#816e1a866d5598ccf34e5596ddce22d92da490d4" - integrity sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ= - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^4.1.0" - -yargs@6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" - integrity sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg= - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^4.2.0" - yauzl@^2.4.2: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" @@ -6692,11 +6240,6 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" -yeast@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" - integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= - zos-lib@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/zos-lib/-/zos-lib-1.3.0.tgz#72a54227db97775041e581868c00ea047b91afbb" From e7b44a2fa9b3a1016a084305aa19e1a0c11a8031 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:44 -0700 Subject: [PATCH 09/22] Setup ESLint --- .eslintignore | 3 + .eslintrc.js | 19 + .prettierignore | 3 + .vscode/extensions.json | 6 +- package.json | 12 +- yarn.lock | 850 ++++++++++++++++++++++++++++++++++++++-- 6 files changed, 859 insertions(+), 34 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .prettierignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..2f9bd06a4 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules/ +coverage/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..d3dd8a777 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + extends: ["eslint:recommended", "standard", "plugin:prettier/recommended"], + env: { + es2020: true, + node: true, + mocha: true, + }, + globals: { + artifacts: "readonly", + contract: "readonly", + web3: true, + }, + rules: { + camelcase: [ + "error", + { properties: "never", allow: ["run_tests", "test_suite_name"] }, + ], + }, +}; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..2f9bd06a4 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules/ +coverage/ \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 8a1f9a227..eddb75a46 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,7 @@ { - "recommendations": ["esbenp.prettier-vscode", "juanblanco.solidity"] + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "juanblanco.solidity" + ] } diff --git a/package.json b/package.json index 9f72618ae..1eca2bc9f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "test": "test" }, "scripts": { - "fmt": "prettier --write **/*.sol **/*.js **/*.json **/*.md *.js *.json *.md", + "lint": "eslint '**/*.js' '*.js'", + "fmt": "prettier --write '**/*.sol' '**/*.js' '**/*.json' '**/*.md' '*.js' '*.json' '*.md'", "coverage": "truffle run coverage", "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --quiet", "test": "truffle test" @@ -30,8 +31,15 @@ "devDependencies": { "@truffle/hdwallet-provider": "^1.0.35", "chai": "^4.2.0", - "colors": "^1.4.0", "diff": "^4.0.2", + "eslint": "^7.0.0", + "eslint-config-prettier": "^6.11.0", + "eslint-config-standard": "^14.1.1", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.3", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", "ethereumjs-abi": "^0.6.8", "ethereumjs-tx": "2.1.2", "ganache-cli": "6.9.1", diff --git a/yarn.lock b/yarn.lock index ee6f38383..7723d4d19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,27 @@ # yarn lockfile v1 +"@babel/code-frame@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -87,6 +108,11 @@ dependencies: "@types/node" "*" +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -179,6 +205,16 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + +acorn@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe" + integrity sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== + address@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" @@ -211,7 +247,7 @@ ajv@^5.1.1: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.5.5: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -226,6 +262,13 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -253,6 +296,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + any-promise@1.3.0, any-promise@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -275,11 +326,28 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= +array-includes@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.flat@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + arrify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" @@ -311,6 +379,11 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + async-eventemitter@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" @@ -1153,6 +1226,11 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -1191,7 +1269,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1200,6 +1278,27 @@ chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" + integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" @@ -1225,6 +1324,18 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -1258,15 +1369,22 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -colors@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" @@ -1307,6 +1425,11 @@ concat-stream@^1.5.1: readable-stream "^2.2.2" typedarray "^0.0.6" +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + content-disposition@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" @@ -1409,6 +1532,15 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6" + integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-browserify@3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -1465,7 +1597,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4: +debug@4, debug@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -1568,7 +1700,7 @@ deep-equal@~1.1.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" -deep-is@~0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= @@ -1666,6 +1798,21 @@ dir-to-object@^2.0.0: resolved "https://registry.yarnpkg.com/dir-to-object/-/dir-to-object-2.0.0.tgz#29723e9bd1c3e58e4f307bd04ff634c0370c8f8a" integrity sha512-sXs0JKIhymON7T1UZuO2Ud6VTNAx/VTBXIl4+3mjb2RgfOpt+hectX0x04YqPOPdkeOAKoJuKqwqnXXURNPNEA== +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" @@ -1781,7 +1928,14 @@ errno@~0.1.1: dependencies: prr "~1.0.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: version "1.17.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== @@ -1860,6 +2014,160 @@ escodegen@1.8.x: optionalDependencies: source-map "~0.2.0" +eslint-config-prettier@^6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== + dependencies: + get-stdin "^6.0.0" + +eslint-config-standard@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + +eslint-import-resolver-node@^0.3.2: + version "0.3.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" + integrity sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.4.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-es@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz#98cb1bc8ab0aa807977855e11ad9d1c9422d014b" + integrity sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.20.2: + version "2.20.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz#91fc3807ce08be4837141272c8b99073906e588d" + integrity sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg== + dependencies: + array-includes "^3.0.3" + array.prototype.flat "^1.2.1" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.2" + eslint-module-utils "^2.4.1" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.0" + read-pkg-up "^2.0.0" + resolve "^1.12.0" + +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-prettier@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz#ae116a0fc0e598fdae48743a4430903de5b4e6ca" + integrity sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + +eslint-plugin-standard@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4" + integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ== + +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" + integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.0.0.tgz#c35dfd04a4372110bd78c69a8d79864273919a08" + integrity sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + eslint-visitor-keys "^1.1.0" + espree "^7.0.0" + esquery "^1.2.0" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash "^4.17.14" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.0.0.tgz#8a7a60f218e69f120a842dc24c5a88aa7748a74e" + integrity sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw== + dependencies: + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" + esprima-extract-comments@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz#0dacab567a5900240de6d344cf18c33617becbc9" @@ -1877,11 +2185,35 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +esquery@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -2304,6 +2636,15 @@ extend@^3.0.2, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + extract-comments@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/extract-comments/-/extract-comments-1.1.0.tgz#b90bca033a056bd69b8ba1c6b6b120fc2ee95c18" @@ -2339,6 +2680,11 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^3.0.3: version "3.2.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" @@ -2356,7 +2702,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -2387,6 +2733,20 @@ fetch-ponyfill@^4.0.0: dependencies: node-fetch "~1.7.1" +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + file-type@^3.8.0: version "3.9.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" @@ -2427,6 +2787,13 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -2434,6 +2801,20 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + for-each@~0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -2557,6 +2938,11 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stream@^2.2.0: version "2.3.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" @@ -2599,7 +2985,7 @@ ghost-testrpc@^0.0.2: chalk "^2.4.2" node-emoji "^1.10.0" -glob-parent@^5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -2665,6 +3051,13 @@ global@~4.3.0: min-document "^2.19.0" process "~0.5.1" +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -2830,6 +3223,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" @@ -2910,6 +3308,11 @@ home-or-tmp@^2.0.0: os-homedir "^1.0.0" os-tmpdir "^1.0.1" +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -2959,7 +3362,7 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -iconv-lite@0.4.24, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -2978,6 +3381,11 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + ignore@^5.1.1: version "5.1.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" @@ -2988,6 +3396,19 @@ immediate@^3.2.3: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3011,6 +3432,25 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +inquirer@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + interpret@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" @@ -3038,6 +3478,11 @@ is-arguments@^1.0.4: resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" @@ -3078,7 +3523,7 @@ is-function@^1.0.1: resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== -is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3132,6 +3577,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -3149,7 +3599,7 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@~1.0.0: +isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -3187,7 +3637,7 @@ js-sha3@^0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -"js-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -3197,7 +3647,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.x: +js-yaml@3.x, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -3271,6 +3721,11 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" @@ -3421,6 +3876,14 @@ levelup@^1.2.1: semver "~5.4.1" xtend "~4.0.0" +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -3429,6 +3892,24 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -3592,7 +4073,7 @@ mime@^2.2.0: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== -mimic-fn@^2.0.0: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -3714,6 +4195,11 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + nan@^2.0.8, nan@^2.14.0, nan@^2.2.1: version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" @@ -3724,6 +4210,11 @@ nano-json-stream-parser@^0.1.2: resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -3781,6 +4272,16 @@ nopt@3.x: dependencies: abbrev "1" +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + normalize-url@^4.1.0: version "4.5.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" @@ -3844,6 +4345,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.values@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + oboe@2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" @@ -3865,6 +4376,13 @@ once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + openzeppelin-solidity@1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.11.0.tgz#f57a5e340aa45efd4a052f4bb514a7a619b0bbd0" @@ -3887,6 +4405,18 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + original-require@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" @@ -3906,7 +4436,7 @@ os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-tmpdir@^1.0.1: +os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= @@ -3936,6 +4466,13 @@ p-is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + p-limit@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -3943,6 +4480,13 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -3957,11 +4501,23 @@ p-timeout@^1.1.1: dependencies: p-finally "^1.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-asn1@^5.0.0, parse-asn1@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" @@ -3984,6 +4540,13 @@ parse-headers@^2.0.0: resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -4004,6 +4567,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -4014,6 +4582,13 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -4050,7 +4625,7 @@ picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== -pify@^2.3.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= @@ -4077,11 +4652,23 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + precond@0.2: version "0.2.3" resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -4097,6 +4684,13 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier-plugin-solidity@1.0.0-alpha.51: version "1.0.0-alpha.51" resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.51.tgz#743fae6034a4f3d9a6bf3f9839c80fd9960172ef" @@ -4131,6 +4725,11 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + promise-to-callback@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" @@ -4251,6 +4850,23 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + readable-stream@^1.0.33: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -4334,6 +4950,11 @@ regexp.prototype.flags@^1.2.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +regexpp@^3.0.0, regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -4398,12 +5019,17 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -4424,6 +5050,14 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + resumer@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" @@ -4436,6 +5070,13 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -4451,6 +5092,11 @@ rlp@^2.0.0, rlp@^2.2.3: dependencies: bn.js "^4.11.1" +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + run-parallel@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" @@ -4461,6 +5107,13 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== +rxjs@^6.5.3: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== + dependencies: + tslib "^1.9.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -4574,22 +5227,22 @@ semaphore@>=1.0.1, semaphore@^1.0.3: resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + semver@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@^5.3.0, semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.3.0: +semver@^6.1.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.2: +semver@^7.2.1, semver@^7.3.2: version "7.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== @@ -4679,11 +5332,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shelljs@^0.8.3: version "0.8.4" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" @@ -4693,7 +5358,7 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== @@ -4722,6 +5387,15 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + solidity-coverage@^0.7.5: version "0.7.5" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.5.tgz#29a738b5644b23687e540688520457ce6792ce94" @@ -4786,6 +5460,32 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -4825,7 +5525,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.2.0: +string-width@^4.1.0, string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== @@ -4917,6 +5617,11 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + strip-dirs@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" @@ -4936,6 +5641,11 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" +strip-json-comments@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" + integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + supports-color@5.4.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" @@ -4962,6 +5672,13 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + swarm-js@0.1.39: version "0.1.39" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.39.tgz#79becb07f291d4b2a178c50fee7aa6e10342c0e8" @@ -4980,6 +5697,16 @@ swarm-js@0.1.39: tar "^4.0.2" xhr-request-promise "^0.1.2" +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + tape@^4.6.3: version "4.13.2" resolved "https://registry.yarnpkg.com/tape/-/tape-4.13.2.tgz#eb419b9d9bc004025b1a81a5b63093e07f425629" @@ -5027,6 +5754,11 @@ tar@^4.0.2: safe-buffer "^5.1.2" yallist "^3.0.3" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + through2@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -5035,7 +5767,7 @@ through2@^2.0.3: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.8, through@~2.3.4, through@~2.3.8: +through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -5045,6 +5777,13 @@ timed-out@^4.0.0, timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + to-buffer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" @@ -5129,6 +5868,11 @@ truffle@^5.1.24: mocha "5.2.0" original-require "1.0.1" +tslib@^1.9.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" + integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -5141,6 +5885,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -5153,6 +5904,16 @@ type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -5299,6 +6060,19 @@ uuid@^8.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c" integrity sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw== +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -6093,7 +6867,14 @@ which@^1.1.1, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -word-wrap@~1.2.3: +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -6117,6 +6898,13 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + ws@^3.0.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" From 977163012aaa9bf6c34ebac7b84e4694582b9395 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:45 -0700 Subject: [PATCH 10/22] Fix lint errors and tests Many tests were broken and were only accidentally passing because of rampant misuse of global assignments and test inter-dependencies --- README.md | 17 +- migrations/1_initial_migration.js | 2 +- migrations/2_deploy_usdc.js | 26 +- package.json | 10 +- test/ABITests.test.js | 217 +++-- test/ABIUtils.js | 43 +- test/EventsTests.js | 166 ++-- test/ExtendedPositiveTests.js | 215 +++-- test/FiatTokenLegacy.test.js | 586 +++++++------- test/MiscTests.js | 259 +++--- test/NegativeTests.js | 254 +++--- test/Pausable.test.js | 84 +- test/PositiveTests.js | 139 ++-- test/ProxyNegativeTests.js | 140 ++-- test/ProxyPositiveTests.js | 279 +++---- test/TestWrapper.js | 18 +- test/TokenTestUtils.js | 1044 +++++++++++-------------- truffle-config.js | 16 +- validate/contractDiff.js | 38 +- validate/validate.js | 91 ++- verification/GoogleSheets/index.js | 254 +++--- verification/verification_reporter.js | 115 ++- yarn.lock | 40 +- 23 files changed, 1950 insertions(+), 2103 deletions(-) diff --git a/README.md b/README.md index ecf33d11d..2e1d47028 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,21 @@ $ npm i -g yarn # Install yarn if you don't already have it $ yarn install # Install dependencies ``` +## Linting and Formatting + +To check code for problems: + +``` +$ yarn lint +$ yarn lint --fix # Fix problems where possible +``` + +To auto-format code: + +``` +$ yarn fmt +``` + ## Testing First, make sure Ganache is running. @@ -36,7 +51,7 @@ To run tests in a specific file, run: $ yarn test [path/to/file] ``` -to generate test coverage, run: +To run tests and generate test coverage, run: ``` $ yarn coverage diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index 9fc37c7bb..cf7559375 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,4 +1,4 @@ -var Migrations = artifacts.require("./Migrations.sol"); +const Migrations = artifacts.require("./Migrations.sol"); module.exports = function (deployer) { deployer.deploy(Migrations); diff --git a/migrations/2_deploy_usdc.js b/migrations/2_deploy_usdc.js index 5da526918..c2f32ef17 100644 --- a/migrations/2_deploy_usdc.js +++ b/migrations/2_deploy_usdc.js @@ -1,21 +1,23 @@ -var FiatTokenV1 = artifacts.require("./FiatTokenV1.sol"); -var FiatTokenProxy = artifacts.require("./FiatTokenProxy.sol"); +const FiatTokenV1 = artifacts.require("./FiatTokenV1.sol"); +const FiatTokenProxy = artifacts.require("./FiatTokenProxy.sol"); // Any address will do, preferably one we generated -var throwawayAddress = "0x64e078a8aa15a41b85890265648e965de686bae6"; +const throwawayAddress = "0x64e078a8aa15a41b85890265648e965de686bae6"; module.exports = function (deployer, network) { - if (["development", "coverage", "test"].includes(network)) { - // Change these to the cold storage addresses provided by ops - // these are the deterministic addresses from ganache, so the private keys are well known - // and match the values we use in the tests - var admin = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; - var masterMinter = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; - var pauser = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; - var blacklister = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; - var owner = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; + if (network === "mainnet") { + throw new Error("Please update 2_deploy_usdc.js and remove this line."); } + // Change these to the cold storage addresses provided by ops + // these are the deterministic addresses from ganache, so the private keys are well known + // and match the values we use in the tests + const admin = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; + const masterMinter = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; + const pauser = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; + const blacklister = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; + const owner = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; + console.log("deploying impl"); // deploy implementation contract diff --git a/package.json b/package.json index 1eca2bc9f..f5970527c 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "scripts": { "lint": "eslint '**/*.js' '*.js'", "fmt": "prettier --write '**/*.sol' '**/*.js' '**/*.json' '**/*.md' '*.js' '*.json' '*.md'", - "coverage": "truffle run coverage", "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --quiet", - "test": "truffle test" + "test": "truffle test", + "coverage": "truffle run coverage" }, "repository": { "type": "git", @@ -19,7 +19,7 @@ }, "keywords": [], "author": "", - "license": "ISC", + "license": "MIT", "bugs": { "url": "https://github.com/centrehq/centre-tokens/issues" }, @@ -41,8 +41,8 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "ethereumjs-abi": "^0.6.8", - "ethereumjs-tx": "2.1.2", - "ganache-cli": "6.9.1", + "ethereumjs-tx": "^2.1.2", + "ganache-cli": "^6.9.1", "googleapis": "^50.0.0", "lodash": "^4.17.15", "prettier": "2.0.5", diff --git a/test/ABITests.test.js b/test/ABITests.test.js index 2bd36ef1c..d50010a96 100644 --- a/test/ABITests.test.js +++ b/test/ABITests.test.js @@ -1,74 +1,45 @@ -var Transaction = require("ethereumjs-tx").Transaction; -var tokenUtils = require("./TokenTestUtils"); -var FiatToken = tokenUtils.FiatToken; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var BigNumber = require("bignumber.js"); -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var expectRevert = tokenUtils.expectRevert; -var masterMinterRole = tokenUtils.masterMinterRole; -var blacklisterRole = tokenUtils.blacklisterRole; -var pauserRole = tokenUtils.pauserRole; -var checkVariables = tokenUtils.checkVariables; -var checkFailureIsExpected = tokenUtils.checkFailureIsExpected; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var upgraderAccount = tokenUtils.upgraderAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; - -var deployerAccountPrivateKey = tokenUtils.deployerAccountPrivateKey; -var arbitraryAccountPrivateKey = tokenUtils.arbitraryAccountPrivateKey; -var tokenOwnerPrivateKey = tokenUtils.ownerAccountPrivateKey; -var upgraderAccountPrivateKey = tokenUtils.upgraderAccountPrivateKey; -var tokenOwnerPrivateKey = tokenUtils.tokenOwnerPrivateKey; -var blacklisterAccountPrivateKey = tokenUtils.blacklisterAccountPrivateKey; -var arbitraryAccount2PrivateKey = tokenUtils.arbitraryAccount2PrivateKey; -var masterMinterAccountPrivateKey = tokenUtils.masterMinterAccountPrivateKey; -var minterAccountPrivateKey = tokenUtils.minterAccountPrivateKey; -var pauserAccountPrivateKey = tokenUtils.pauserAccountPrivateKey; -var blacklisterAccountPrivateKey = tokenUtils.blacklisterAccountPrivateKey; - -var abiUtils = require("./ABIUtils"); -var makeRawTransaction = abiUtils.makeRawTransaction; -var sendRawTransaction = abiUtils.sendRawTransaction; -var functionSignature = abiUtils.functionSignature; -var encodeAddress = abiUtils.encodeAddress; -var encodeUint = abiUtils.encodeUint; -var msgData0 = abiUtils.msgData0; -var msgData = abiUtils.msgData; -var msgData1 = abiUtils.msgData1; -var msgData2 = abiUtils.msgData2; -var msgData3 = abiUtils.msgData3; +const assert = require("chai").assert; +const { Transaction } = require("ethereumjs-tx"); +const { + expectRevert, + checkVariables, + initializeTokenWithProxy, + arbitraryAccount, + pauserAccount, + tokenOwnerAccount, + arbitraryAccountPrivateKey, + tokenOwnerPrivateKey, + pauserAccountPrivateKey, +} = require("./TokenTestUtils"); +const { + makeRawTransaction, + sendRawTransaction, + functionSignature, + encodeAddress, + encodeUint, + msgData, +} = require("./ABIUtils"); // Encodes methodName, 32 byte string of 0, and address. function mockStringAddressEncode(methodName, address) { - var version = encodeUint(32) + encodeUint(0); // encode 32 byte string of 0's + const version = encodeUint(32) + encodeUint(0); // encode 32 byte string of 0's return functionSignature(methodName) + version + encodeAddress(address); } async function run_tests(newToken, accounts) { - beforeEach(async function checkBefore() { - rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await newToken(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); // sanity check for pausable - it("abi004 FiatToken pause() is public", async function () { - let badData = functionSignature("pause()"); - var tx = new Transaction({ + it("abi004 FiatToken pause() is public", async () => { + const badData = functionSignature("pause()"); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(pauserAccount) ), @@ -78,18 +49,18 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await sendRawTransaction(raw); - var customVars = [{ variable: "paused", expectedValue: true }]; + const customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); }); - it("abi040 Blacklistable constructor is not a function", async function () { - let badData = functionSignature("Blacklistable()"); - var tx = new Transaction({ + it("abi040 Blacklistable constructor is not a function", async () => { + const badData = functionSignature("Blacklistable()"); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(pauserAccount) ), @@ -99,16 +70,16 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await expectRevert(sendRawTransaction(raw)); }); - it("abi042 Ownable constructor is not a function", async function () { - let badData = functionSignature("Ownable()"); - var tx = new Transaction({ + it("abi042 Ownable constructor is not a function", async () => { + const badData = functionSignature("Ownable()"); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(pauserAccount) ), @@ -118,16 +89,16 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await expectRevert(sendRawTransaction(raw)); }); - it("abi005 Pausable constructor is not a function", async function () { - let badData = functionSignature("Pausable()"); - var tx = new Transaction({ + it("abi005 Pausable constructor is not a function", async () => { + const badData = functionSignature("Pausable()"); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(pauserAccount) ), @@ -137,16 +108,16 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await expectRevert(sendRawTransaction(raw)); }); - it("abi043 FiatTokenProxy constructor is not a function", async function () { - let badData = functionSignature("FiatTokenProxy()"); - var tx = new Transaction({ + it("abi043 FiatTokenProxy constructor is not a function", async () => { + const badData = functionSignature("FiatTokenProxy()"); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(pauserAccount) ), @@ -156,16 +127,16 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await expectRevert(sendRawTransaction(raw)); }); - it("abi027 UpgradeabilityProxy constructor", async function () { - let badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); - let raw = await makeRawTransaction( + it("abi027 UpgradeabilityProxy constructor", async () => { + const badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -174,9 +145,9 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi055 Proxy constructor is not a function", async function () { - let badData = functionSignature("Proxy()"); - let raw = await makeRawTransaction( + it("abi055 Proxy constructor is not a function", async () => { + const badData = functionSignature("Proxy()"); + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -185,9 +156,9 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi056 Proxy _delegate is internal", async function () { - let badData = msgData("_delegate(address)", arbitraryAccount); - let raw = await makeRawTransaction( + it("abi056 Proxy _delegate is internal", async () => { + const badData = msgData("_delegate(address)", arbitraryAccount); + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -196,9 +167,9 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi057 Proxy _willFallback is internal", async function () { - let badData = functionSignature("_willFallback()"); - let raw = await makeRawTransaction( + it("abi057 Proxy _willFallback is internal", async () => { + const badData = functionSignature("_willFallback()"); + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -207,9 +178,9 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi058 Proxy _fallback is internal", async function () { - let badData = functionSignature("_fallback()"); - let raw = await makeRawTransaction( + it("abi058 Proxy _fallback is internal", async () => { + const badData = functionSignature("_fallback()"); + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -218,9 +189,9 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi050 Upgradeability implementation is internal", async function () { - let badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); - let raw = await makeRawTransaction( + it("abi050 Upgradeability implementation is internal", async () => { + const badData = msgData("UpgradeabilityProxy(address)", arbitraryAccount); + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -229,12 +200,12 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi051 AdminUpgradeabillityProxy constructor is not a function", async function () { - let badData = msgData( + it("abi051 AdminUpgradeabillityProxy constructor is not a function", async () => { + const badData = msgData( "AdminUpgradeabillityProxy(address)", arbitraryAccount ); - let raw = await makeRawTransaction( + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -243,12 +214,12 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi053 AdminUpgradeabillityProxy _setAdmin is internal", async function () { - let badData = msgData( + it("abi053 AdminUpgradeabillityProxy _setAdmin is internal", async () => { + const badData = msgData( "AdminUpgradeabillityProxy(address)", arbitraryAccount ); - let raw = await makeRawTransaction( + const raw = await makeRawTransaction( badData, arbitraryAccount, arbitraryAccountPrivateKey, @@ -257,9 +228,9 @@ async function run_tests(newToken, accounts) { await expectRevert(sendRawTransaction(raw)); }); - it("abi041 FiatToken constructor is not a function", async function () { - let badData = functionSignature("FiatToken()"); - var tx = new Transaction({ + it("abi041 FiatToken constructor is not a function", async () => { + const badData = functionSignature("FiatToken()"); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(pauserAccount) ), @@ -269,16 +240,16 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); + const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await expectRevert(sendRawTransaction(raw)); }); - it("abi025 setOwner is internal", async function () { - let badData = msgData("setOwner(address)", pauserAccount); - var tx = new Transaction({ + it("abi025 setOwner is internal", async () => { + const badData = msgData("setOwner(address)", pauserAccount); + const tx = new Transaction({ nonce: web3.utils.toHex( await web3.eth.getTransactionCount(tokenOwnerAccount) ), @@ -288,19 +259,19 @@ async function run_tests(newToken, accounts) { value: 0, data: badData, }); - var privateKey = Buffer.from(tokenOwnerPrivateKey, "hex"); + const privateKey = Buffer.from(tokenOwnerPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); await expectRevert(sendRawTransaction(raw)); }); - it("abi028 UpgradeabilityProxy._upgradeTo is internal", async function () { - let badData = mockStringAddressEncode( + it("abi028 UpgradeabilityProxy._upgradeTo is internal", async () => { + const badData = mockStringAddressEncode( "_upgradeTo(string,address)", pauserAccount ); - let raw = await makeRawTransaction( + const raw = await makeRawTransaction( badData, tokenOwnerAccount, tokenOwnerPrivateKey, @@ -310,9 +281,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_ABIHackingTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/ABIUtils.js b/test/ABIUtils.js index 1f3e406d8..402c65721 100644 --- a/test/ABIUtils.js +++ b/test/ABIUtils.js @@ -1,28 +1,23 @@ -var Transaction = require("ethereumjs-tx").Transaction; +const { Transaction } = require("ethereumjs-tx"); -async function makeRawTransaction( - msgData, - msgSender, - hexPrivateKey, - contractAddress -) { - var tx = new Transaction({ - nonce: web3.utils.toHex(await web3.eth.getTransactionCount(msgSender)), +async function makeRawTransaction(data, from, hexPrivateKey, contractAddress) { + const tx = new Transaction({ + nonce: web3.utils.toHex(await web3.eth.getTransactionCount(from)), gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), gasLimit: 1000000, to: contractAddress, value: 0, - data: msgData, + data, }); - var privateKey = Buffer.from(hexPrivateKey, "hex"); + const privateKey = Buffer.from(hexPrivateKey, "hex"); tx.sign(privateKey); - var raw = "0x" + tx.serialize().toString("hex"); + const raw = "0x" + tx.serialize().toString("hex"); return raw; } function sendRawTransaction(raw) { - return new Promise(function (resolve, reject) { - web3.eth.sendSignedTransaction(raw, function (err, transactionHash) { + return new Promise((resolve, reject) => { + web3.eth.sendSignedTransaction(raw, (err, transactionHash) => { if (err !== null) return reject(err); resolve(transactionHash); }); @@ -80,14 +75,14 @@ function msgData3(methodName, address1, value1, address2, value2) { } module.exports = { - makeRawTransaction: makeRawTransaction, - sendRawTransaction: sendRawTransaction, - functionSignature: functionSignature, - encodeAddress: encodeAddress, - encodeUint: encodeUint, - msgData0: msgData0, - msgData: msgData, - msgData1: msgData1, - msgData2: msgData2, - msgData3: msgData3, + makeRawTransaction, + sendRawTransaction, + functionSignature, + encodeAddress, + encodeUint, + msgData0, + msgData, + msgData1, + msgData2, + msgData3, }; diff --git a/test/EventsTests.js b/test/EventsTests.js index da5f05140..0581e2f1b 100644 --- a/test/EventsTests.js +++ b/test/EventsTests.js @@ -1,124 +1,122 @@ -var tokenUtils = require("./TokenTestUtils"); -var FiatToken = tokenUtils.FiatToken; -var FiatTokenProxy = tokenUtils.FiatTokenProxy; -var minterAccount = tokenUtils.minterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var burnerAccount = tokenUtils.burnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var pauserAccount = tokenUtils.pauserAccount; -var proxyOwnerAccount = tokenUtils.proxyOwnerAccount; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; - -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var encodeCall = tokenUtils.encodeCall; - -var checkMintEvent = tokenUtils.checkMintEvent; -var checkMinterConfiguredEvent = tokenUtils.checkMinterConfiguredEvent; -var checkApprovalEvent = tokenUtils.checkApprovalEvent; -var checkBurnEvents = tokenUtils.checkBurnEvents; -var checkMinterRemovedEvent = tokenUtils.checkMinterRemovedEvent; -var checkBlacklistEvent = tokenUtils.checkBlacklistEvent; -var checkUnblacklistEvent = tokenUtils.checkUnblacklistEvent; -var checkPauserChangedEvent = tokenUtils.checkPauserChangedEvent; -var checkUnpauseEvent = tokenUtils.checkUnpauseEvent; -var checkTransferOwnershipEvent = tokenUtils.checkTransferOwnershipEvent; -var checkUpdateMasterMinterEvent = tokenUtils.checkUpdateMasterMinterEvent; -var checkBlacklisterChangedEvent = tokenUtils.checkBlacklisterChangedEvent; -var checkUpgradeEvent = tokenUtils.checkUpgradeEvent; -var checkAdminChangedEvent = tokenUtils.checkAdminChangedEvent; -var UpgradedFiatTokenNewFields = tokenUtils.UpgradedFiatTokenNewFields; -var checkPauseEvent = tokenUtils.checkPauseEvent; -var checkTransferEvents = tokenUtils.checkTransferEvents; - -var amount = 100; +const assert = require("chai").assert; +const { + FiatToken, + minterAccount, + masterMinterAccount, + arbitraryAccount, + arbitraryAccount2, + blacklisterAccount, + tokenOwnerAccount, + pauserAccount, + proxyOwnerAccount, + initializeTokenWithProxy, + encodeCall, + checkMintEvent, + checkMinterConfiguredEvent, + checkApprovalEvent, + checkBurnEvents, + checkMinterRemovedEvent, + checkBlacklistEvent, + checkUnblacklistEvent, + checkPauserChangedEvent, + checkUnpauseEvent, + checkTransferOwnershipEvent, + checkUpdateMasterMinterEvent, + checkBlacklisterChangedEvent, + checkUpgradeEvent, + checkAdminChangedEvent, + UpgradedFiatTokenNewFields, + checkPauseEvent, + checkTransferEvents, +} = require("./TokenTestUtils"); + +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { - rawToken = await FiatToken.new(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await FiatToken.new(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); - it("et000 should check MinterConfigured event", async function () { - let configureMinter = await token.configureMinter(minterAccount, amount, { + it("et000 should check MinterConfigured event", async () => { + const configureMinter = await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); checkMinterConfiguredEvent(configureMinter, minterAccount, amount); }); - it("et001 should check Mint/Transfer events", async function () { + it("et001 should check Mint/Transfer events", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - let mint = await token.mint(arbitraryAccount, amount, { + const mint = await token.mint(arbitraryAccount, amount, { from: minterAccount, }); checkMintEvent(mint, arbitraryAccount, amount, minterAccount); }); - it("et002 should check Burn/Transfer events", async function () { + it("et002 should check Burn/Transfer events", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.mint(minterAccount, amount, { from: minterAccount }); - let burn = await token.burn(amount, { from: minterAccount }); + const burn = await token.burn(amount, { from: minterAccount }); checkBurnEvents(burn, amount, minterAccount); }); - it("et003 should check MinterRemoved event", async function () { + it("et003 should check MinterRemoved event", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - let minterRemovedEvent = await token.removeMinter(minterAccount, { + const minterRemovedEvent = await token.removeMinter(minterAccount, { from: masterMinterAccount, }); checkMinterRemovedEvent(minterRemovedEvent, minterAccount); }); - it("et004 should check MasterMinterChanged event", async function () { - let updateMasterMinter = await token.updateMasterMinter(arbitraryAccount, { - from: tokenOwnerAccount, - }); + it("et004 should check MasterMinterChanged event", async () => { + const updateMasterMinter = await token.updateMasterMinter( + arbitraryAccount, + { + from: tokenOwnerAccount, + } + ); checkUpdateMasterMinterEvent(updateMasterMinter, arbitraryAccount); }); - it("et005 should check Blacklisted event", async function () { - let blacklist = await token.blacklist(arbitraryAccount, { + it("et005 should check Blacklisted event", async () => { + const blacklist = await token.blacklist(arbitraryAccount, { from: blacklisterAccount, }); checkBlacklistEvent(blacklist, arbitraryAccount); }); - it("et006 should check UnBlacklisted event", async function () { - let unblacklist = await token.unBlacklist(arbitraryAccount, { + it("et006 should check UnBlacklisted event", async () => { + const unblacklist = await token.unBlacklist(arbitraryAccount, { from: blacklisterAccount, }); checkUnblacklistEvent(unblacklist, arbitraryAccount); }); - it("et007 should check BlacklisterChanged event", async function () { - let blacklisterChanged = await token.updateBlacklister(arbitraryAccount, { + it("et007 should check BlacklisterChanged event", async () => { + const blacklisterChanged = await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount, }); checkBlacklisterChangedEvent(blacklisterChanged, arbitraryAccount); }); - it("et008 should check Upgraded event", async function () { - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + it("et008 should check Upgraded event", async () => { + const upgradedToken = await UpgradedFiatTokenNewFields.new(); const initializeData = encodeCall( "initV2", ["bool", "address", "uint256"], [true, pauserAccount, 12] ); - let upgrade = await proxy.upgradeToAndCall( + const upgrade = await proxy.upgradeToAndCall( upgradedToken.address, initializeData, { from: proxyOwnerAccount } @@ -126,15 +124,15 @@ async function run_tests(newToken, accounts) { checkUpgradeEvent(upgrade, upgradedToken.address); }); - it("et009 should check AdminChanged event", async function () { - let adminChanged = await proxy.changeAdmin(arbitraryAccount, { + it("et009 should check AdminChanged event", async () => { + const adminChanged = await proxy.changeAdmin(arbitraryAccount, { from: proxyOwnerAccount, }); checkAdminChangedEvent(adminChanged, proxyOwnerAccount, arbitraryAccount); }); - it("et010 should check OwnershipTransferred event", async function () { - let transferOwnership = await token.transferOwnership(arbitraryAccount, { + it("et010 should check OwnershipTransferred event", async () => { + const transferOwnership = await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount, }); checkTransferOwnershipEvent( @@ -144,48 +142,48 @@ async function run_tests(newToken, accounts) { ); }); - it("et011 should check Approval event", async function () { - let approval = await token.approve(arbitraryAccount2, amount, { + it("et011 should check Approval event", async () => { + const approval = await token.approve(arbitraryAccount2, amount, { from: arbitraryAccount, }); checkApprovalEvent(approval, arbitraryAccount, arbitraryAccount2, amount); }); - it("et012 should check Pause event", async function () { - let pause = await token.pause({ from: pauserAccount }); + it("et012 should check Pause event", async () => { + const pause = await token.pause({ from: pauserAccount }); checkPauseEvent(pause); }); - it("et013 should check Unpause event", async function () { - let unpause = await token.unpause({ from: pauserAccount }); + it("et013 should check Unpause event", async () => { + const unpause = await token.unpause({ from: pauserAccount }); checkUnpauseEvent(unpause); }); - it("et014 should check PauserChanged event", async function () { - let updatePauser = await token.updatePauser(arbitraryAccount, { + it("et014 should check PauserChanged event", async () => { + const updatePauser = await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount, }); checkPauserChangedEvent(updatePauser, arbitraryAccount); }); - it("et015 should check Transfer event", async function () { + it("et015 should check Transfer event", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.mint(arbitraryAccount, amount, { from: minterAccount }); - let transfer = await token.transfer(arbitraryAccount2, amount, { + const transfer = await token.transfer(arbitraryAccount2, amount, { from: arbitraryAccount, }); checkTransferEvents(transfer, arbitraryAccount, arbitraryAccount2, amount); }); - it("et016 should check Transfer event in transferFrom", async function () { + it("et016 should check Transfer event in transferFrom", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.mint(arbitraryAccount, amount, { from: minterAccount }); await token.approve(arbitraryAccount2, amount, { from: arbitraryAccount }); - let transferFrom = await token.transferFrom( + const transferFrom = await token.transferFrom( arbitraryAccount, blacklisterAccount, amount, @@ -200,9 +198,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_EventTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/ExtendedPositiveTests.js b/test/ExtendedPositiveTests.js index ba6db5af7..8c62b6794 100644 --- a/test/ExtendedPositiveTests.js +++ b/test/ExtendedPositiveTests.js @@ -1,103 +1,95 @@ -var BN = require("bn.js"); -var tokenUtils = require("./TokenTestUtils"); - -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var checkVariables = tokenUtils.checkVariables; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var upgraderAccount = tokenUtils.upgraderAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; -var FiatToken = tokenUtils.FiatToken; -var upgradeTo = tokenUtils.upgradeTo; - -var amount = 100; +const assert = require("chai").assert; +const BN = require("bn.js"); +const { + checkVariables, + arbitraryAccount, + upgraderAccount, + tokenOwnerAccount, + blacklisterAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + initializeTokenWithProxy, + UpgradedFiatToken, + upgradeTo, +} = require("./TokenTestUtils"); + +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { - rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await newToken(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); // Paused - it("ept001 should changeAdmin while paused", async function () { + it("ept001 should changeAdmin while paused", async () => { await token.pause({ from: pauserAccount }); await proxy.changeAdmin(arbitraryAccount, { from: upgraderAccount }); - var result = [ + const result = [ { variable: "paused", expectedValue: true }, { variable: "upgrader", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it("ept002 should updateMasterMinter while paused", async function () { + it("ept002 should updateMasterMinter while paused", async () => { await token.pause({ from: pauserAccount }); await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount, }); - var result = [ + const result = [ { variable: "masterMinter", expectedValue: arbitraryAccount }, { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it("ept003 should updateBlacklister while paused", async function () { + it("ept003 should updateBlacklister while paused", async () => { await token.pause({ from: pauserAccount }); await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount, }); - var result = [ + const result = [ { variable: "blacklister", expectedValue: arbitraryAccount }, { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it("ept004 should updatePauser while paused", async function () { + it("ept004 should updatePauser while paused", async () => { await token.pause({ from: pauserAccount }); await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); - var result = [ + const result = [ { variable: "pauser", expectedValue: arbitraryAccount }, { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it("ept005 should transferOwnership while paused", async function () { + it("ept005 should transferOwnership while paused", async () => { await token.pause({ from: pauserAccount }); await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount, }); - var result = [ + const result = [ { variable: "tokenOwner", expectedValue: arbitraryAccount }, { variable: "paused", expectedValue: true }, ]; await checkVariables([token], [result]); }); - it("ept006 should removeMinter while paused", async function () { + it("ept006 should removeMinter while paused", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.pause({ from: pauserAccount }); - var isAMinter = [ + const isAMinter = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -108,7 +100,7 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [isAMinter]); await token.removeMinter(minterAccount, { from: masterMinterAccount }); - var notAMinter = [ + const notAMinter = [ { variable: "isAccountMinter.minterAccount", expectedValue: false }, { variable: "minterAllowance.minterAccount", @@ -119,38 +111,36 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [notAMinter]); }); - it("ept008 should upgrade while paused", async function () { - var newRawToken = await UpgradedFiatToken.new(); + it("ept008 should upgrade while paused", async () => { + const newRawToken = await UpgradedFiatToken.new(); await token.pause({ from: pauserAccount }); - var tokenConfig = await upgradeTo(proxy, newRawToken); - var newProxiedToken = tokenConfig.token; - var newToken = newProxiedToken; - - var newToken_result = [ + const tokenConfig = await upgradeTo(proxy, newRawToken); + const newProxiedToken = tokenConfig.token; + const newTokenResult = [ { variable: "paused", expectedValue: true }, { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, ]; - await checkVariables([newToken], [newToken_result]); + await checkVariables([newProxiedToken], [newTokenResult]); }); // Blacklisted - it("ept013 should changeAdmin when msg.sender blacklisted", async function () { + it("ept013 should changeAdmin when msg.sender blacklisted", async () => { await token.blacklist(upgraderAccount, { from: blacklisterAccount }); await proxy.changeAdmin(arbitraryAccount, { from: upgraderAccount }); - var result = [ + const result = [ { variable: "isAccountBlacklisted.upgraderAccount", expectedValue: true }, { variable: "upgrader", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it("ept014 should updateMasterMinter when msg.sender blacklisted", async function () { + it("ept014 should updateMasterMinter when msg.sender blacklisted", async () => { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount, }); - var setup = [ + const setup = [ { variable: "masterMinter", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.tokenOwnerAccount", @@ -160,12 +150,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept015 should updateBlacklister when msg.sender blacklisted", async function () { + it("ept015 should updateBlacklister when msg.sender blacklisted", async () => { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount, }); - var setup = [ + const setup = [ { variable: "blacklister", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.tokenOwnerAccount", @@ -175,10 +165,10 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept016 should updatePauser when msg.sender blacklisted", async function () { + it("ept016 should updatePauser when msg.sender blacklisted", async () => { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); - var setup = [ + const setup = [ { variable: "pauser", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.tokenOwnerAccount", @@ -188,12 +178,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept017 should transferOwnership when msg.sender blacklisted", async function () { + it("ept017 should transferOwnership when msg.sender blacklisted", async () => { await token.blacklist(tokenOwnerAccount, { from: blacklisterAccount }); await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount, }); - var setup = [ + const setup = [ { variable: "tokenOwner", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.tokenOwnerAccount", @@ -203,19 +193,19 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept018 should pause when msg.sender blacklisted", async function () { + it("ept018 should pause when msg.sender blacklisted", async () => { await token.blacklist(pauserAccount, { from: blacklisterAccount }); await token.pause({ from: pauserAccount }); - var setup = [ + const setup = [ { variable: "paused", expectedValue: true }, { variable: "isAccountBlacklisted.pauserAccount", expectedValue: true }, ]; await checkVariables([token], [setup]); }); - it("ept019 should unpause when msg.sender blacklisted", async function () { + it("ept019 should unpause when msg.sender blacklisted", async () => { await token.pause({ from: pauserAccount }); - var setup = [{ variable: "paused", expectedValue: true }]; + let setup = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [setup]); await token.blacklist(pauserAccount, { from: blacklisterAccount }); @@ -226,10 +216,10 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept020 should blacklist when msg.sender blacklisted", async function () { + it("ept020 should blacklist when msg.sender blacklisted", async () => { await token.blacklist(blacklisterAccount, { from: blacklisterAccount }); await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - var setup = [ + const setup = [ { variable: "isAccountBlacklisted.blacklisterAccount", expectedValue: true, @@ -242,9 +232,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept021 should unBlacklist when msg.sender blacklisted", async function () { + it("ept021 should unBlacklist when msg.sender blacklisted", async () => { await token.blacklist(blacklisterAccount, { from: blacklisterAccount }); - var setup = [ + const setup = [ { variable: "isAccountBlacklisted.blacklisterAccount", expectedValue: true, @@ -256,38 +246,37 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [[]]); }); - it("ept022 should upgrade when msg.sender blacklisted", async function () { + it("ept022 should upgrade when msg.sender blacklisted", async () => { await token.blacklist(upgraderAccount, { from: blacklisterAccount }); - var newRawToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, newRawToken); - var newToken = tokenConfig.token; + const newRawToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo(proxy, newRawToken); + const newProxiedToken = tokenConfig.token; - var newToken_result = [ + const newTokenResult = [ { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, { variable: "isAccountBlacklisted.upgraderAccount", expectedValue: true }, ]; - await checkVariables([newToken], [newToken_result]); + await checkVariables([newProxiedToken], [newTokenResult]); }); - it("ept023 should upgrade to blacklisted address", async function () { - var newRawToken = await UpgradedFiatToken.new(); + it("ept023 should upgrade to blacklisted address", async () => { + const newRawToken = await UpgradedFiatToken.new(); await token.blacklist(newRawToken.address, { from: blacklisterAccount }); - var tokenConfig = await upgradeTo(proxy, newRawToken); - var newProxiedToken = tokenConfig.token; - var newToken = newProxiedToken; + const tokenConfig = await upgradeTo(proxy, newRawToken); + const newProxiedToken = tokenConfig.token; - var newToken_result = [ + const newTokenResult = [ { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, ]; - assert(await newToken.isBlacklisted(newRawToken.address)); - await checkVariables([newToken], [newToken_result]); + assert.isTrue(await newProxiedToken.isBlacklisted(newRawToken.address)); + await checkVariables([newProxiedToken], [newTokenResult]); }); - it("ept024 should blacklist a blacklisted address", async function () { + it("ept024 should blacklist a blacklisted address", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - var setup = [ + const setup = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -297,10 +286,10 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept025 should changeAdmin to blacklisted address", async function () { + it("ept025 should changeAdmin to blacklisted address", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await proxy.changeAdmin(arbitraryAccount, { from: upgraderAccount }); - var result = [ + const result = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -310,12 +299,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [result]); }); - it("ept026 should updateMasterMinter to blacklisted address", async function () { + it("ept026 should updateMasterMinter to blacklisted address", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount, }); - var setup = [ + const setup = [ { variable: "masterMinter", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -325,12 +314,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept027 should updateBlacklister to blacklisted address", async function () { + it("ept027 should updateBlacklister to blacklisted address", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount, }); - var setup = [ + const setup = [ { variable: "blacklister", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -340,10 +329,10 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept028 should updatePauser to blacklisted address", async function () { + it("ept028 should updatePauser to blacklisted address", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); - var setup = [ + const setup = [ { variable: "pauser", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -353,12 +342,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept029 should transferOwnership to blacklisted address", async function () { + it("ept029 should transferOwnership to blacklisted address", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount, }); - var setup = [ + const setup = [ { variable: "tokenOwner", expectedValue: arbitraryAccount }, { variable: "isAccountBlacklisted.arbitraryAccount", @@ -368,12 +357,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); }); - it("ept030 should configureMinter when masterMinter is blacklisted", async function () { + it("ept030 should configureMinter when masterMinter is blacklisted", async () => { await token.blacklist(masterMinterAccount, { from: blacklisterAccount }); await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var result = [ + const result = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -387,12 +376,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [result]); }); - it("ept032 should configureMinter when minter is blacklisted", async function () { + it("ept032 should configureMinter when minter is blacklisted", async () => { await token.blacklist(minterAccount, { from: blacklisterAccount }); await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var result = [ + const result = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -403,12 +392,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [result]); }); - it("ept033 should removeMinter when masterMinter is blacklisted", async function () { + it("ept033 should removeMinter when masterMinter is blacklisted", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.blacklist(masterMinterAccount, { from: blacklisterAccount }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -436,12 +425,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ept034 should removeMinter when minter is blacklisted", async function () { + it("ept034 should removeMinter when minter is blacklisted", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.blacklist(minterAccount, { from: blacklisterAccount }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -463,10 +452,10 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ept035 should unBlacklist while contract is paused", async function () { + it("ept035 should unBlacklist while contract is paused", async () => { await token.pause({ from: pauserAccount }); await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - var customVars = [ + let customVars = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -480,9 +469,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ept036 should blacklist while contract is paused", async function () { + it("ept036 should blacklist while contract is paused", async () => { await token.pause({ from: pauserAccount }); - var customVars = [{ variable: "paused", expectedValue: true }]; + let customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); @@ -496,9 +485,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ept037 should pause while contract is paused", async function () { + it("ept037 should pause while contract is paused", async () => { await token.pause({ from: pauserAccount }); - var customVars = [{ variable: "paused", expectedValue: true }]; + let customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); await token.pause({ from: pauserAccount }); @@ -507,9 +496,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_ExtendedPositiveTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/FiatTokenLegacy.test.js b/test/FiatTokenLegacy.test.js index 77b529c26..c1405be90 100644 --- a/test/FiatTokenLegacy.test.js +++ b/test/FiatTokenLegacy.test.js @@ -1,120 +1,118 @@ -var BN = require("bn.js"); -var tokenUtils = require("./TokenTestUtils"); -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var BigNumber = require("bignumber.js"); -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var burn = tokenUtils.burn; -var setMinter = tokenUtils.setMinter; -var expectRevert = tokenUtils.expectRevert; -var blacklist = tokenUtils.blacklist; -var sampleTransferFrom = tokenUtils.sampleTransferFrom; -var approve = tokenUtils.approve; -var unBlacklist = tokenUtils.unBlacklist; -var sampleTransfer = tokenUtils.sampleTransfer; -var checkTransferEvents = tokenUtils.checkTransferEvents; -var nullAccount = tokenUtils.nullAccount; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var proxyOwnerAccount = tokenUtils.proxyOwnerAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var upgradeTo = tokenUtils.upgradeTo; -var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; -var FiatToken = tokenUtils.FiatToken; -var getAdmin = tokenUtils.getAdmin; +const assert = require("chai").assert; +const BN = require("bn.js"); +const { + name, + symbol, + currency, + decimals, + mint, + burn, + setMinter, + expectRevert, + blacklist, + sampleTransferFrom, + approve, + unBlacklist, + sampleTransfer, + checkTransferEvents, + nullAccount, + deployerAccount, + tokenOwnerAccount, + arbitraryAccount2, + masterMinterAccount, + minterAccount, + pauserAccount, + blacklisterAccount, + proxyOwnerAccount, + initializeTokenWithProxy, + upgradeTo, + UpgradedFiatToken, + FiatToken, + getAdmin, +} = require("./TokenTestUtils"); // these tests are for reference and do not track side effects on all variables async function run_tests(newToken, accounts) { - beforeEach(async function () { - rawToken = await FiatToken.new(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await FiatToken.new(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); - it("should start with a totalSupply of 0", async function () { - let totalSupply = await token.totalSupply(); - assert.isTrue(new BN(totalSupply).eq(new BN(0))); + it("should start with a totalSupply of 0", async () => { + const totalSupply = await token.totalSupply(); + assert.isTrue(new BN(totalSupply).eqn(0)); }); - it("should add multiple mints to a given address in address balance", async function () { + it("should add multiple mints to a given address in address balance", async () => { await mint(token, accounts[0], 100, minterAccount); await mint(token, accounts[0], 200, minterAccount); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 300); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(new BN(balance0).eqn(300)); }); - it("should fail to mint to a null address", async function () { - let initialTotalSupply = await token.totalSupply(); + it("should fail to mint to a null address", async () => { + const initialTotalSupply = await token.totalSupply(); await expectRevert(mint(token, nullAccount, 100, minterAccount)); - totalSupply = await token.totalSupply(); + const totalSupply = await token.totalSupply(); assert.isTrue(new BN(totalSupply).eq(new BN(initialTotalSupply))); }); - it("should add multiple mints to a given address in address balance", async function () { + it("should add multiple mints to a given address in address balance", async () => { await mint(token, accounts[0], 100, minterAccount); await mint(token, accounts[0], 200, minterAccount); - let balance0 = await token.balanceOf(accounts[0]); - assert.isTrue(new BN(balance0).eq(new BN(300))); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(new BN(balance0).eqn(300)); }); - it("should add multiple mints to total supply", async function () { - let initialTotalSupply = await token.totalSupply(); + it("should add multiple mints to total supply", async () => { + const initialTotalSupply = await token.totalSupply(); await mint(token, accounts[0], 100, minterAccount); await mint(token, accounts[0], 400, minterAccount); await mint(token, accounts[1], 600, minterAccount); - let totalSupply = await token.totalSupply(); + const totalSupply = await token.totalSupply(); assert.isTrue( - new BN(totalSupply).sub(new BN(initialTotalSupply)).eq(new BN(1100)) + new BN(totalSupply).sub(new BN(initialTotalSupply)).eqn(1100) ); }); - it("should fail to mint from blacklisted minter", async function () { + it("should fail to mint from blacklisted minter", async () => { await setMinter(token, accounts[2], 200); await blacklist(token, accounts[2]); await expectRevert(token.mint(accounts[0], 100, { from: accounts[2] })); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 0); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(0)); }); - it("should fail to mint to blacklisted address", async function () { + it("should fail to mint to blacklisted address", async () => { await blacklist(token, accounts[3]); await expectRevert(mint(token, accounts[3], 100, minterAccount)); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 0); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(0)); }); - it("should fail to mint from a non-minter call", async function () { + it("should fail to mint from a non-minter call", async () => { await mint(token, accounts[0], 400, minterAccount); await expectRevert(token.mint(accounts[0], 100, { from: accounts[0] })); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 400); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(400)); }); - it("should complete transferFrom", async function () { + it("should complete transferFrom", async () => { await sampleTransferFrom( token, deployerAccount, @@ -123,13 +121,13 @@ async function run_tests(newToken, accounts) { ); }); - it("should approve", async function () { + it("should approve", async () => { await approve(token, accounts[3], 100, accounts[2]); - let allowance = await token.allowance(accounts[2], accounts[3]); - assert.isTrue(new BN(allowance).eq(new BN(100))); + const allowance = await token.allowance(accounts[2], accounts[3]); + assert.isTrue(new BN(allowance).eqn(100)); }); - it("should complete sample transfer", async function () { + it("should complete sample transfer", async () => { await sampleTransfer( token, deployerAccount, @@ -138,112 +136,112 @@ async function run_tests(newToken, accounts) { ); }); - it("should complete transfer from non-owner", async function () { + it("should complete transfer from non-owner", async () => { await mint(token, accounts[2], 1900, minterAccount); - let transfer = await token.transfer(accounts[3], 1000, { + const transfer = await token.transfer(accounts[3], 1000, { from: accounts[2], }); checkTransferEvents(transfer, accounts[2], accounts[3], 1000); - let balance0 = await token.balanceOf(accounts[2]); - assert.equal(balance0, 1900 - 1000); - let balance3 = await token.balanceOf(accounts[3]); - assert.equal(balance3, 1000); + const balance0 = await token.balanceOf(accounts[2]); + assert.isTrue(balance0.eqn(1900 - 1000)); + const balance3 = await token.balanceOf(accounts[3]); + assert.isTrue(balance3.eqn(1000)); }); - it("should set allowance and balances before and after approved transfer", async function () { + it("should set allowance and balances before and after approved transfer", async () => { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(0))); + assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(100))); + assert.isTrue(new BN(allowed).eqn(100)); - let transfer = await token.transferFrom(accounts[0], accounts[3], 50, { + const transfer = await token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[3], }); checkTransferEvents(transfer, accounts[0], accounts[3], 50); - let balance0 = await token.balanceOf(accounts[0]); - assert.isTrue(new BN(balance0).eq(new BN(450))); - let balance3 = await token.balanceOf(accounts[3]); - assert.isTrue(new BN(balance3).eq(new BN(50))); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(new BN(balance0).eqn(450)); + const balance3 = await token.balanceOf(accounts[3]); + assert.isTrue(new BN(balance3).eqn(50)); }); - it("should fail on unauthorized approved transfer and not change balances", async function () { + it("should fail on unauthorized approved transfer and not change balances", async () => { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(0))); + assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(100))); + assert.isTrue(new BN(allowed).eqn(100)); await expectRevert( token.transferFrom(accounts[0], accounts[3], 50, { from: accounts[4] }) ); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 500); - let balance3 = await token.balanceOf(accounts[3]); - assert.equal(balance3, 0); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(500)); + const balance3 = await token.balanceOf(accounts[3]); + assert.isTrue(balance3.eqn(0)); }); - it("should fail on invalid approved transfer amount and not change balances", async function () { + it("should fail on invalid approved transfer amount and not change balances", async () => { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(0))); + assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(100))); + assert.isTrue(new BN(allowed).eqn(100)); await expectRevert( token.transferFrom(accounts[0], accounts[3], 450, { from: accounts[3] }) ); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 500); - let balance3 = await token.balanceOf(accounts[3]); - assert.equal(balance3, 0); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(500)); + const balance3 = await token.balanceOf(accounts[3]); + assert.isTrue(balance3.eqn(0)); }); - it("should fail on invalid transfer recipient (zero-account) and not change balances", async function () { + it("should fail on invalid transfer recipient (zero-account) and not change balances", async () => { await mint(token, accounts[0], 500, minterAccount); await token.approve(accounts[3], 100); - let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(100))); + const allowed = await token.allowance.call(accounts[0], accounts[3]); + assert.isTrue(new BN(allowed).eqn(100)); await expectRevert( token.transferFrom(accounts[0], nullAccount, 50, { from: accounts[3] }) ); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, 500); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(500)); }); - it("should test consistency of transfer(x) and approve(x) + transferFrom(x)", async function () { + it("should test consistency of transfer(x) and approve(x) + transferFrom(x)", async () => { let allowed = await token.allowance.call(accounts[0], accounts[3]); - assert.isTrue(new BN(allowed).eq(new BN(0))); - let transferAmount = 650; - let totalAmount = transferAmount; + assert.isTrue(new BN(allowed).eqn(0)); + const transferAmount = 650; + const totalAmount = transferAmount; await mint(token, accounts[0], totalAmount, minterAccount); let transfer = await token.transfer(accounts[3], transferAmount); checkTransferEvents(transfer, accounts[0], accounts[3], transferAmount); - let balance0 = await token.balanceOf(accounts[0]); - assert.equal(balance0, totalAmount - transferAmount); - let balance3 = await token.balanceOf(accounts[3]); - assert.equal(balance3, transferAmount); + const balance0 = await token.balanceOf(accounts[0]); + assert.isTrue(balance0.eqn(totalAmount - transferAmount)); + const balance3 = await token.balanceOf(accounts[3]); + assert.isTrue(balance3.eqn(transferAmount)); await token.allowance.call(accounts[1], accounts[4]); - assert.isTrue(new BN(allowed).eq(new BN(0))); + assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[1], totalAmount, minterAccount); await token.approve(accounts[4], transferAmount, { from: accounts[1] }); allowed = await token.allowance.call(accounts[1], accounts[4]); - assert.isTrue(new BN(allowed).eq(new BN(transferAmount))); + assert.isTrue(allowed.eqn(transferAmount)); transfer = await token.transferFrom( accounts[1], @@ -254,17 +252,17 @@ async function run_tests(newToken, accounts) { checkTransferEvents(transfer, accounts[1], accounts[4], transferAmount); - let balance1 = await token.balanceOf(accounts[1]); - assert.equal(balance0, totalAmount - transferAmount); - let balance4 = await token.balanceOf(accounts[4]); - assert.equal(balance3, transferAmount); + const balance1 = await token.balanceOf(accounts[1]); + assert.isTrue(balance1.eqn(totalAmount - transferAmount)); + const balance4 = await token.balanceOf(accounts[4]); + assert.isTrue(balance4.eqn(transferAmount)); }); - it("should pause and should not be able to transfer", async function () { + it("should pause and should not be able to transfer", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await token.pause({ from: pauserAccount }); - assert.equal(await token.paused.call(), true); + assert.strictEqual(await token.paused.call(), true); await expectRevert( sampleTransferFrom( @@ -276,11 +274,11 @@ async function run_tests(newToken, accounts) { ); }); - it("should pause and should not be able to transfer, then unpause and be able to transfer", async function () { + it("should pause and should not be able to transfer, then unpause and be able to transfer", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await token.pause({ from: pauserAccount }); - assert.equal(await token.paused.call(), true); + assert.strictEqual(await token.paused.call(), true); await expectRevert( sampleTransferFrom( @@ -292,7 +290,7 @@ async function run_tests(newToken, accounts) { ); await token.unpause({ from: pauserAccount }); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await sampleTransferFrom( token, deployerAccount, @@ -301,54 +299,54 @@ async function run_tests(newToken, accounts) { ); }); - it("should pause and should not be able to transferFrom", async function () { + it("should pause and should not be able to transferFrom", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await token.pause({ from: pauserAccount }); - assert.equal(await token.paused.call(), true); + assert.strictEqual(await token.paused.call(), true); await expectRevert( sampleTransfer(token, deployerAccount, arbitraryAccount2, minterAccount) ); }); - it("should pause and should not be able to approve", async function () { + it("should pause and should not be able to approve", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await token.pause({ from: pauserAccount }); - assert.equal(await token.paused.call(), true); + assert.strictEqual(await token.paused.call(), true); await expectRevert(approve(token, accounts[2], 50, accounts[3])); }); - it("should pause and should not be able to mint", async function () { + it("should pause and should not be able to mint", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await token.pause({ from: pauserAccount }); - assert.equal(await token.paused.call(), true); + assert.strictEqual(await token.paused.call(), true); await expectRevert(mint(token, accounts[2], 1900, minterAccount)); }); - it("should try to pause with non-pauser and fail to pause", async function () { + it("should try to pause with non-pauser and fail to pause", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await expectRevert(token.pause({ from: accounts[0] })); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); }); - it("should try to pause with non-pauser and fail to pause", async function () { + it("should try to pause with non-pauser and fail to pause", async () => { await mint(token, accounts[2], 1900, minterAccount); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); await expectRevert(token.pause({ from: accounts[0] })); - assert.equal(await token.paused.call(), false); + assert.strictEqual(await token.paused.call(), false); }); - it("should approve and fail to transfer more than balance", async function () { + it("should approve and fail to transfer more than balance", async () => { await mint(token, accounts[2], 100, minterAccount); await token.approve(accounts[1], 600, { from: accounts[2] }); @@ -356,21 +354,21 @@ async function run_tests(newToken, accounts) { token.transferFrom(accounts[2], accounts[1], 600, { from: accounts[1] }) ); - let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(100))); + const balance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(100)); }); - it("should blacklist and make transfer impossible", async function () { + it("should blacklist and make transfer impossible", async () => { await mint(token, accounts[2], 1900, minterAccount); await blacklist(token, accounts[2]); await expectRevert(token.transfer(accounts[3], 600, { from: accounts[2] })); - let balance = await token.balanceOf(accounts[2]); - assert.equal(balance, 1900); + const balance = await token.balanceOf(accounts[2]); + assert.isTrue(balance.eqn(1900)); }); - it("should blacklist recipient and make transfer to recipient impossible", async function () { + it("should blacklist recipient and make transfer to recipient impossible", async () => { await mint(token, accounts[2], 1900, minterAccount); await mint(token, accounts[9], 1600, minterAccount); await blacklist(token, accounts[2]); @@ -378,14 +376,14 @@ async function run_tests(newToken, accounts) { await expectRevert(token.transfer(accounts[2], 600, { from: accounts[9] })); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1900))); + assert.isTrue(new BN(balance).eqn(1900)); balance = await token.balanceOf(accounts[9]); - assert.isTrue(new BN(balance).eq(new BN(1600))); + assert.isTrue(new BN(balance).eqn(1600)); }); - it("should blacklist and make transferFrom impossible with the approved transferer", async function () { - let isBlacklistedBefore = await token.isBlacklisted(accounts[2]); - assert.equal(isBlacklistedBefore, false); + it("should blacklist and make transferFrom impossible with the approved transferer", async () => { + const isBlacklistedBefore = await token.isBlacklisted(accounts[2]); + assert.strictEqual(isBlacklistedBefore, false); await mint(token, accounts[2], 1900, minterAccount); await token.approve(accounts[1], 600, { from: accounts[2] }); @@ -395,14 +393,14 @@ async function run_tests(newToken, accounts) { token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[1] }) ); - let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1900))); + const balance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(1900)); - let isBlacklistedAfter = await token.isBlacklisted(accounts[2]); - assert.equal(isBlacklistedAfter, true); + const isBlacklistedAfter = await token.isBlacklisted(accounts[2]); + assert.strictEqual(isBlacklistedAfter, true); }); - it("should make transferFrom impossible with the approved and blacklisted transferer", async function () { + it("should make transferFrom impossible with the approved and blacklisted transferer", async () => { await mint(token, accounts[2], 1900, minterAccount); await token.approve(accounts[1], 600, { from: accounts[2] }); await blacklist(token, accounts[1]); @@ -411,11 +409,11 @@ async function run_tests(newToken, accounts) { token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[1] }) ); - let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1900))); + const balance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(1900)); }); - it("should blacklist recipient and make transfer to recipient using transferFrom impossible", async function () { + it("should blacklist recipient and make transfer to recipient using transferFrom impossible", async () => { await mint(token, accounts[2], 1900, minterAccount); await token.approve(accounts[3], 600, { from: accounts[2] }); await blacklist(token, accounts[3]); @@ -424,53 +422,53 @@ async function run_tests(newToken, accounts) { token.transferFrom(accounts[2], accounts[3], 600, { from: accounts[2] }) ); - let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1900))); + const balance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(1900)); }); - it("should blacklist and make approve impossible", async function () { + it("should blacklist and make approve impossible", async () => { await mint(token, accounts[1], 1900, minterAccount); await blacklist(token, accounts[1]); await expectRevert(token.approve(accounts[2], 600, { from: accounts[1] })); - let approval = await token.allowance(accounts[1], accounts[2]); - assert.isTrue(new BN(approval).eq(new BN(0))); + const approval = await token.allowance(accounts[1], accounts[2]); + assert.isTrue(new BN(approval).eqn(0)); }); - it("should make giving approval to blacklisted account impossible", async function () { + it("should make giving approval to blacklisted account impossible", async () => { await mint(token, accounts[2], 1900, minterAccount); await blacklist(token, accounts[1]); await expectRevert(token.approve(accounts[1], 600, { from: accounts[2] })); - let approval = await token.allowance(accounts[2], accounts[1]); - assert.isTrue(new BN(approval).eq(new BN(0))); + const approval = await token.allowance(accounts[2], accounts[1]); + assert.isTrue(new BN(approval).eqn(0)); }); - it("should blacklist then unblacklist to make a transfer possible", async function () { + it("should blacklist then unblacklist to make a transfer possible", async () => { await mint(token, accounts[2], 1900, minterAccount); await blacklist(token, accounts[2]); await unBlacklist(token, accounts[2]); await token.transfer(accounts[3], 600, { from: accounts[2] }); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1300))); + assert.isTrue(new BN(balance).eqn(1300)); balance = await token.balanceOf(accounts[3]); - assert.isTrue(new BN(balance).eq(new BN(600))); + assert.isTrue(new BN(balance).eqn(600)); }); - it("should fail to blacklist with non-blacklister account", async function () { + it("should fail to blacklist with non-blacklister account", async () => { await mint(token, accounts[2], 1900, minterAccount); await expectRevert(token.blacklist(accounts[2], { from: pauserAccount })); await token.transfer(accounts[3], 600, { from: accounts[2] }); let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1300))); + assert.isTrue(new BN(balance).eqn(1300)); balance = await token.balanceOf(accounts[3]); - assert.isTrue(new BN(balance).eq(new BN(600))); + assert.isTrue(new BN(balance).eqn(600)); }); - it("should unblacklist when paused", async function () { + it("should unblacklist when paused", async () => { await mint(token, accounts[2], 1900, minterAccount); await token.blacklist(accounts[2], { from: blacklisterAccount }); let blacklisted = await token.isBlacklisted(accounts[2]); @@ -483,16 +481,16 @@ async function run_tests(newToken, accounts) { blacklisted = await token.isBlacklisted(accounts[2]); assert.isFalse(blacklisted); - let balance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(1900))); + const balance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(1900)); }); - it("should change the minter and mint as well as fail to mint with the old minter", async function () { + it("should change the minter and mint as well as fail to mint with the old minter", async () => { let update = await token.removeMinter(minterAccount, { from: masterMinterAccount, }); - assert.equal(update.logs[0].event, "MinterRemoved"); - assert.equal(update.logs[0].args.oldMinter, minterAccount); + assert.strictEqual(update.logs[0].event, "MinterRemoved"); + assert.strictEqual(update.logs[0].args.oldMinter, minterAccount); update = await setMinter(token, accounts[3], 10000, { from: masterMinterAccount, }); @@ -500,82 +498,82 @@ async function run_tests(newToken, accounts) { await expectRevert(token.mint(accounts[1], 200, { from: minterAccount })); - let isMinter = await token.isMinter(minterAccount); - assert.equal(isMinter, false); - let balance = await token.balanceOf(accounts[1]); - assert.equal(balance, 100); + const isMinter = await token.isMinter(minterAccount); + assert.strictEqual(isMinter, false); + const balance = await token.balanceOf(accounts[1]); + assert.isTrue(balance.eqn(100)); }); - it("should remove a minter even if the contract is paused", async function () { + it("should remove a minter even if the contract is paused", async () => { await token.configureMinter(accounts[3], 200, { from: masterMinterAccount, }); let isAccountMinter = await token.isMinter(accounts[3]); - assert.equal(isAccountMinter, true); + assert.strictEqual(isAccountMinter, true); await token.pause({ from: pauserAccount }); await token.removeMinter(accounts[3], { from: masterMinterAccount }); isAccountMinter = await token.isMinter(accounts[3]); - assert.equal(isAccountMinter, false); + assert.strictEqual(isAccountMinter, false); }); - it("should pause contract even when contract is already paused", async function () { + it("should pause contract even when contract is already paused", async () => { await token.pause({ from: pauserAccount }); await token.pause({ from: pauserAccount }); - let isPaused = await token.paused(); - assert.equal(isPaused, true); + const isPaused = await token.paused(); + assert.strictEqual(isPaused, true); }); - it("should unpause contract even when contract is already unpaused", async function () { + it("should unpause contract even when contract is already unpaused", async () => { await token.unpause({ from: pauserAccount }); - let isPaused = await token.paused(); - assert.equal(isPaused, false); + const isPaused = await token.paused(); + assert.strictEqual(isPaused, false); }); - it("should fail to updateMinterAllowance from non-masterMinter", async function () { - let minterAllowanceBefore = await token.minterAllowance(minterAccount); - assert.equal(minterAllowanceBefore, 0); + it("should fail to updateMinterAllowance from non-masterMinter", async () => { + const minterAllowanceBefore = await token.minterAllowance(minterAccount); + assert.isTrue(minterAllowanceBefore.eqn(0)); await expectRevert( token.configureMinter(minterAccount, 100, { from: tokenOwnerAccount }) ); - let minterAllowanceAfter = await token.minterAllowance(minterAccount); - assert.equal(minterAllowanceAfter, 0); + const minterAllowanceAfter = await token.minterAllowance(minterAccount); + assert.isTrue(minterAllowanceAfter.eqn(0)); }); - it("should have correct name", async function () { - let actual = await token.name.call(); - assert.equal(actual, name); + it("should have correct name", async () => { + const actual = await token.name.call(); + assert.strictEqual(actual, name); }); - it("should have correct symbol", async function () { - let actual = await token.symbol.call(); - assert.equal(actual, symbol); + it("should have correct symbol", async () => { + const actual = await token.symbol.call(); + assert.strictEqual(actual, symbol); }); - it("should have correct decimals", async function () { - let actual = await token.decimals.call(); - assert.equal(actual, decimals); + it("should have correct decimals", async () => { + const actual = await token.decimals.call(); + assert.isTrue(actual.eqn(decimals)); }); - it("should have correct currency", async function () { - let actual = await token.currency.call(); - assert.equal(actual, currency); + it("should have correct currency", async () => { + const actual = await token.currency.call(); + assert.strictEqual(actual, currency); }); - it("should mint and burn tokens", async function () { - let burnerAddress = accounts[3]; - let amount = 500; + it("should mint and burn tokens", async () => { + const burnerAddress = accounts[3]; + const amount = 500; await setMinter(token, burnerAddress, amount); - let totalSupply = await token.totalSupply(); - let minterBalance = await token.balanceOf(burnerAddress); - assert.isTrue(new BN(totalSupply).eq(new BN(0))); - assert.isTrue(new BN(minterBalance).eq(new BN(0))); + const totalSupply = await token.totalSupply(); + const minterBalance = await token.balanceOf(burnerAddress); + assert.isTrue(new BN(totalSupply).eqn(0)); + assert.isTrue(new BN(minterBalance).eqn(0)); // mint tokens to burnerAddress await mint(token, burnerAddress, amount, minterAccount); - let totalSupply1 = await token.totalSupply(); - let minterBalance1 = await token.balanceOf(burnerAddress); + const totalSupply1 = await token.totalSupply(); + const minterBalance1 = await token.balanceOf(burnerAddress); assert.isTrue( new BN(totalSupply1).eq(new BN(totalSupply).add(new BN(amount))) ); @@ -585,159 +583,159 @@ async function run_tests(newToken, accounts) { // burn tokens await burn(token, amount, burnerAddress); - let totalSupply2 = await token.totalSupply(); + const totalSupply2 = await token.totalSupply(); assert.isTrue( new BN(totalSupply2).eq(new BN(totalSupply1).sub(new BN(amount))) ); // check that minter's balance has been reduced - let minterBalance2 = await token.balanceOf(burnerAddress); + const minterBalance2 = await token.balanceOf(burnerAddress); assert.isTrue( new BN(minterBalance2).eq(new BN(minterBalance1).sub(new BN(amount))) ); }); - it("should try to burn tokens from a non-minter and fail", async function () { - let burnerAddress = accounts[3]; - let amount = 1000; + it("should try to burn tokens from a non-minter and fail", async () => { + const burnerAddress = accounts[3]; + const amount = 1000; await expectRevert(token.burn(amount, { from: burnerAddress })); }); - it("should fail to burn from a blacklisted address", async function () { - let burnerAddress = accounts[3]; + it("should fail to burn from a blacklisted address", async () => { + const burnerAddress = accounts[3]; await setMinter(token, burnerAddress, 200); await mint(token, burnerAddress, 200, minterAccount); await blacklist(token, burnerAddress); await expectRevert(token.burn(100, { from: burnerAddress })); - let balance0 = await token.balanceOf(burnerAddress); - assert.equal(balance0, 200); + const balance0 = await token.balanceOf(burnerAddress); + assert.isTrue(balance0.eqn(200)); }); - it("should try to burn more tokens than balance and fail", async function () { - let burnerAddress = accounts[3]; - let amount = 500; + it("should try to burn more tokens than balance and fail", async () => { + const burnerAddress = accounts[3]; + const amount = 500; await setMinter(token, burnerAddress, 250); await mint(token, burnerAddress, 100, minterAccount); await expectRevert(token.burn(amount, { from: burnerAddress })); }); - it("should upgrade and preserve data", async function () { + it("should upgrade and preserve data", async () => { await mint(token, accounts[2], 200, minterAccount); - let initialBalance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(initialBalance).eq(new BN(200))); + const initialBalance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(initialBalance).eqn(200)); - var newRawToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, newRawToken); - var newProxiedToken = tokenConfig.token; - var newToken = newProxiedToken; + const newRawToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo(proxy, newRawToken); + const newProxiedToken = tokenConfig.token; + const newToken = newProxiedToken; - let upgradedBalance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BN(upgradedBalance).eq(new BN(200))); + const upgradedBalance = await newToken.balanceOf(accounts[2]); + assert.isTrue(new BN(upgradedBalance).eqn(200)); await newToken.configureMinter(minterAccount, 500, { from: masterMinterAccount, }); await newToken.mint(accounts[2], 200, { from: minterAccount }); - let balance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(400))); + const balance = await newToken.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(400)); }); - it("should updateRoleAddress for masterMinter", async function () { - let address1 = accounts[7]; - let address2 = accounts[6]; + it("should updateRoleAddress for masterMinter", async () => { + const address1 = accounts[7]; + const address2 = accounts[6]; await token.updateMasterMinter(address1, { from: tokenOwnerAccount }); - let masterMinter1 = await token.masterMinter(); - assert.equal(masterMinter1, address1); + const masterMinter1 = await token.masterMinter(); + assert.strictEqual(masterMinter1, address1); await token.updateMasterMinter(address2, { from: tokenOwnerAccount }); - let masterMinter2 = await token.masterMinter(); - assert.equal(masterMinter2, address2); + const masterMinter2 = await token.masterMinter(); + assert.strictEqual(masterMinter2, address2); }); - it("should updateRoleAddress for blacklister", async function () { - let address1 = accounts[7]; - let address2 = accounts[6]; + it("should updateRoleAddress for blacklister", async () => { + const address1 = accounts[7]; + const address2 = accounts[6]; await token.updateBlacklister(address1, { from: tokenOwnerAccount }); - let blacklister1 = await token.blacklister(); - assert.equal(blacklister1, address1); + const blacklister1 = await token.blacklister(); + assert.strictEqual(blacklister1, address1); await token.updateBlacklister(address2, { from: tokenOwnerAccount }); - let blacklister2 = await token.blacklister(); - assert.equal(blacklister2, address2); + const blacklister2 = await token.blacklister(); + assert.strictEqual(blacklister2, address2); }); - it("should updateRoleAddress for pauser", async function () { - let address1 = accounts[7]; - let address2 = accounts[6]; + it("should updateRoleAddress for pauser", async () => { + const address1 = accounts[7]; + const address2 = accounts[6]; await token.updatePauser(address1, { from: tokenOwnerAccount }); - let pauser1 = await token.pauser(); - assert.equal(pauser1, address1); + const pauser1 = await token.pauser(); + assert.strictEqual(pauser1, address1); await token.updatePauser(address2, { from: tokenOwnerAccount }); - let pauser2 = await token.pauser(); - assert.equal(pauser2, address2); + const pauser2 = await token.pauser(); + assert.strictEqual(pauser2, address2); }); - it("should updateUpgraderAddress for upgrader", async function () { + it("should updateUpgraderAddress for upgrader", async () => { let upgrader = await getAdmin(proxy); - assert.equal(proxyOwnerAccount, upgrader); - let address1 = accounts[10]; - let updated = await proxy.changeAdmin(address1, { + assert.strictEqual(proxyOwnerAccount, upgrader); + const address1 = accounts[10]; + await proxy.changeAdmin(address1, { from: proxyOwnerAccount, }); upgrader = await getAdmin(proxy); - assert.equal(upgrader, address1); + assert.strictEqual(upgrader, address1); - //Test upgrade with new upgrader account + // Test upgrade with new upgrader account await token.configureMinter(minterAccount, 1000, { from: masterMinterAccount, }); await token.mint(accounts[2], 200, { from: minterAccount }); - let initialBalance = await token.balanceOf(accounts[2]); - assert.isTrue(new BN(initialBalance).eq(new BN(200))); + const initialBalance = await token.balanceOf(accounts[2]); + assert.isTrue(new BN(initialBalance).eqn(200)); - var newRawToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, newRawToken, address1); - var newProxiedToken = tokenConfig.token; - var newToken = newProxiedToken; + const newRawToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo(proxy, newRawToken, address1); + const newProxiedToken = tokenConfig.token; + const newToken = newProxiedToken; - let upgradedBalance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BN(upgradedBalance).eq(new BN(200))); + const upgradedBalance = await newToken.balanceOf(accounts[2]); + assert.isTrue(new BN(upgradedBalance).eqn(200)); await newToken.configureMinter(minterAccount, 500, { from: masterMinterAccount, }); await newToken.mint(accounts[2], 200, { from: minterAccount }); - let balance = await newToken.balanceOf(accounts[2]); - assert.isTrue(new BN(balance).eq(new BN(400))); + const balance = await newToken.balanceOf(accounts[2]); + assert.isTrue(new BN(balance).eqn(400)); }); - it("should fail to updateUpgraderAddress for upgrader using non-upgrader account", async function () { - let address1 = accounts[7]; + it("should fail to updateUpgraderAddress for upgrader using non-upgrader account", async () => { + const address1 = accounts[7]; await expectRevert( proxy.changeAdmin(address1, { from: tokenOwnerAccount }) ); - let upgrader = await getAdmin(proxy); + const upgrader = await getAdmin(proxy); assert.notEqual(upgrader, address1); }); - it("should updateRoleAddress for roleAddressChanger", async function () { - let address1 = accounts[7]; - let address2 = accounts[6]; + it("should updateRoleAddress for roleAddressChanger", async () => { + const address1 = accounts[7]; + const address2 = accounts[6]; await token.transferOwnership(address1, { from: tokenOwnerAccount }); - let roleAddressChanger1 = await token.owner(); - assert.equal(roleAddressChanger1, address1); + const roleAddressChanger1 = await token.owner(); + assert.strictEqual(roleAddressChanger1, address1); await token.transferOwnership(address2, { from: address1 }); - let roleAddressChanger2 = await token.owner(); - assert.equal(roleAddressChanger2, address2); + const roleAddressChanger2 = await token.owner(); + assert.strictEqual(roleAddressChanger2, address2); }); - it("should fail to updateRoleAddress from a non-roleAddressChanger", async function () { - let nonRoleAddressChanger = accounts[2]; - let address1 = accounts[7]; + it("should fail to updateRoleAddress from a non-roleAddressChanger", async () => { + const nonRoleAddressChanger = accounts[2]; + const address1 = accounts[7]; await expectRevert( token.updateMasterMinter(address1, { from: nonRoleAddressChanger }) @@ -745,9 +743,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_LegacyTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/MiscTests.js b/test/MiscTests.js index 667a64e01..da34f0b95 100644 --- a/test/MiscTests.js +++ b/test/MiscTests.js @@ -1,48 +1,40 @@ -var BN = require("bn.js"); -var FiatTokenProxy = artifacts.require("FiatTokenProxy"); - -var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); - -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var checkVariables = tokenUtils.checkVariables; -var expectRevert = tokenUtils.expectRevert; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var getInitializedV1 = tokenUtils.getInitializedV1; -var FiatToken = tokenUtils.FiatToken; - -var maxAmount = +const assert = require("chai").assert; +const BN = require("bn.js"); +const { + checkVariables, + expectRevert, + arbitraryAccount, + arbitraryAccount2, + blacklisterAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + initializeTokenWithProxy, + getInitializedV1, + FiatToken, +} = require("./TokenTestUtils"); + +const FiatTokenProxy = artifacts.require("FiatTokenProxy"); + +const maxAmount = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; -var maxAmountBN = new BN(maxAmount.slice(2), 16); -var amount = 100; +const maxAmountBN = new BN(maxAmount.slice(2), 16); +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { - rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await newToken(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); // No Payable Function - it("ms001 no payable function", async function () { - var success = false; + it("ms001 no payable function", async () => { + let success = false; try { await web3.eth.sendTransaction({ from: arbitraryAccount, @@ -52,13 +44,13 @@ async function run_tests(newToken, accounts) { } catch (e) { success = true; } - assert.equal(true, success); + assert.strictEqual(true, success); }); // Same Address - it("ms002 should transfer to self has correct final balance", async function () { - let mintAmount = 50; + it("ms002 should transfer to self has correct final balance", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); @@ -67,7 +59,7 @@ async function run_tests(newToken, accounts) { from: arbitraryAccount, }); - var customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount), @@ -82,8 +74,8 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms003 should transferFrom to self from approved account and have correct final balance", async function () { - let mintAmount = 50; + it("ms003 should transferFrom to self from approved account and have correct final balance", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -94,7 +86,7 @@ async function run_tests(newToken, accounts) { await token.transferFrom(arbitraryAccount, arbitraryAccount, mintAmount, { from: pauserAccount, }); - customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -109,8 +101,8 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms004 should transferFrom to self from approved self and have correct final balance", async function () { - let mintAmount = 50; + it("ms004 should transferFrom to self from approved self and have correct final balance", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -123,7 +115,7 @@ async function run_tests(newToken, accounts) { await token.transferFrom(arbitraryAccount, arbitraryAccount, mintAmount, { from: arbitraryAccount, }); - customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -138,13 +130,13 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms005 should mint to self with correct final balance", async function () { - var mintAmount = 50; + it("ms005 should mint to self with correct final balance", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -169,13 +161,13 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms006 should approve correct allowance for self", async function () { - var mintAmount = 50; + it("ms006 should approve correct allowance for self", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -205,11 +197,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms007 should configureMinter for masterMinter", async function () { + it("ms007 should configureMinter for masterMinter", async () => { await token.configureMinter(masterMinterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.masterMinterAccount", expectedValue: true }, { variable: "minterAllowance.masterMinterAccount", @@ -221,14 +213,14 @@ async function run_tests(newToken, accounts) { // Multiple Minters - it("ms009 should configure two minters", async function () { + it("ms009 should configure two minters", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -243,9 +235,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms010 should configure two minters and each mint distinct amounts", async function () { - var mintAmount1 = 10; - var mintAmount2 = 20; + it("ms010 should configure two minters and each mint distinct amounts", async () => { + const mintAmount1 = 10; + const mintAmount2 = 20; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -255,7 +247,7 @@ async function run_tests(newToken, accounts) { }); await token.mint(pauserAccount, mintAmount1, { from: minterAccount }); await token.mint(pauserAccount, mintAmount2, { from: arbitraryAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -278,9 +270,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms011 should configure two minters, each minting distinct amounts and then remove one minter", async function () { - var mintAmount1 = 10; - var mintAmount2 = 20; + it("ms011 should configure two minters, each minting distinct amounts and then remove one minter", async () => { + const mintAmount1 = 10; + const mintAmount2 = 20; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -291,7 +283,7 @@ async function run_tests(newToken, accounts) { await token.mint(pauserAccount, mintAmount1, { from: minterAccount }); await token.mint(pauserAccount, mintAmount2, { from: arbitraryAccount }); await token.removeMinter(arbitraryAccount, { from: masterMinterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -309,8 +301,8 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms012 should configure two minters and adjust both allowances", async function () { - var adjustment = 10; + it("ms012 should configure two minters and adjust both allowances", async () => { + const adjustment = 10; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -318,7 +310,7 @@ async function run_tests(newToken, accounts) { await token.configureMinter(arbitraryAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -338,7 +330,7 @@ async function run_tests(newToken, accounts) { await token.configureMinter(arbitraryAccount, amount + adjustment, { from: masterMinterAccount, }); - var customVars = [ + customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -353,8 +345,8 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms013 should configure two minters, one with zero allowance fails to mint", async function () { - var mintAmount = 10; + it("ms013 should configure two minters, one with zero allowance fails to mint", async () => { + const mintAmount = 10; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -363,7 +355,7 @@ async function run_tests(newToken, accounts) { from: masterMinterAccount, }); await token.mint(pauserAccount, mintAmount, { from: minterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -379,12 +371,12 @@ async function run_tests(newToken, accounts) { await expectRevert( token.mint(pauserAccount, mintAmount, { from: arbitraryAccount }) ); - //await expectRevert(token.mint(pauserAccount, 0, { from: arbitraryAccount })); + // await expectRevert(token.mint(pauserAccount, 0, { from: arbitraryAccount })); await checkVariables([token], [customVars]); }); - it("ms014 should configure two minters and fail to mint when paused", async function () { - var mintAmount = 10; + it("ms014 should configure two minters and fail to mint when paused", async () => { + const mintAmount = 10; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -393,7 +385,7 @@ async function run_tests(newToken, accounts) { from: masterMinterAccount, }); await token.pause({ from: pauserAccount }); - var customVars = [ + const customVars = [ { variable: "paused", expectedValue: true }, { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, @@ -415,8 +407,8 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms015 should configure two minters, blacklist one and ensure it cannot mint, then unblacklist and ensure it can mint", async function () { - var mintAmount = 10; + it("ms015 should configure two minters, blacklist one and ensure it cannot mint, then unblacklist and ensure it can mint", async () => { + const mintAmount = 10; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -426,7 +418,7 @@ async function run_tests(newToken, accounts) { }); await token.blacklist(minterAccount, { from: blacklisterAccount }); await token.mint(pauserAccount, mintAmount, { from: arbitraryAccount }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -451,7 +443,8 @@ async function run_tests(newToken, accounts) { await token.unBlacklist(minterAccount, { from: blacklisterAccount }); await token.mint(pauserAccount, mintAmount, { from: minterAccount }); - var customVars = [ + + customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -474,10 +467,10 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms016 should configure two minters, each mints to themselves and then burns certain amount", async function () { - var mintAmount1 = 10; - var mintAmount2 = 20; - var burnAmount = 10; + it("ms016 should configure two minters, each mints to themselves and then burns certain amount", async () => { + const mintAmount1 = 10; + const mintAmount2 = 20; + const burnAmount = 10; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -487,7 +480,7 @@ async function run_tests(newToken, accounts) { }); await token.mint(minterAccount, mintAmount1, { from: minterAccount }); await token.mint(arbitraryAccount, mintAmount2, { from: arbitraryAccount }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -515,7 +508,7 @@ async function run_tests(newToken, accounts) { await token.burn(burnAmount, { from: minterAccount }); await token.burn(burnAmount, { from: arbitraryAccount }); - var customVars = [ + customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "isAccountMinter.arbitraryAccount", expectedValue: true }, { @@ -546,29 +539,29 @@ async function run_tests(newToken, accounts) { // 0 Input - it("ms018 should approve 0 token allowance with unchanged state", async function () { + it("ms018 should approve 0 token allowance with unchanged state", async () => { await token.approve(minterAccount, 0, { from: arbitraryAccount }); await checkVariables([token], [[]]); }); - it("ms019 should transferFrom 0 tokens with unchanged state", async function () { + it("ms019 should transferFrom 0 tokens with unchanged state", async () => { await token.transferFrom(arbitraryAccount, pauserAccount, 0, { from: arbitraryAccount2, }); await checkVariables([token], [[]]); }); - it("ms020 should transfer 0 tokens with unchanged state", async function () { + it("ms020 should transfer 0 tokens with unchanged state", async () => { await token.transfer(arbitraryAccount, 0, { from: arbitraryAccount2 }); await checkVariables([token], [[]]); }); - it("ms036 should get allowance for same address", async function () { + it("ms036 should get allowance for same address", async () => { await token.approve(arbitraryAccount, amount, { from: arbitraryAccount }); - var allowance = new BN( + const allowance = new BN( await token.allowance(arbitraryAccount, arbitraryAccount) ); - assert(allowance.eq(new BN(amount))); + assert.isTrue(allowance.eq(new BN(amount))); }); // Return value @@ -588,13 +581,13 @@ async function run_tests(newToken, accounts) { * (https://truffleframework.com/docs/getting_started/contracts) */ - it("ms039 should return true on mint", async function () { - var mintAmount = 50; + it("ms039 should return true on mint", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -609,21 +602,21 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms040 should return true on approve", async function () { - assert( + it("ms040 should return true on approve", async () => { + assert.isTrue( await token.approve.call(minterAccount, amount, { from: arbitraryAccount, }) ); }); - it("ms041 should return true on transferFrom", async function () { - let mintAmount = 50; + it("ms041 should return true on transferFrom", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -652,7 +645,7 @@ async function run_tests(newToken, accounts) { expectedValue: new BN(mintAmount), }, ]; - assert( + assert.isTrue( await token.transferFrom.call( arbitraryAccount, pauserAccount, @@ -663,13 +656,13 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms042 should return true on transfer", async function () { - let mintAmount = 50; + it("ms042 should return true on transfer", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -691,7 +684,7 @@ async function run_tests(newToken, accounts) { }, { variable: "totalSupply", expectedValue: new BN(mintAmount) }, ]; - assert( + assert.isTrue( await token.transfer.call(pauserAccount, mintAmount, { from: arbitraryAccount, }) @@ -699,42 +692,42 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms043 should return true on configureMinter", async function () { - assert( + it("ms043 should return true on configureMinter", async () => { + assert.isTrue( await token.configureMinter.call(minterAccount, amount, { from: masterMinterAccount, }) ); }); - it("ms044 should return true on removeMinter", async function () { - assert( + it("ms044 should return true on removeMinter", async () => { + assert.isTrue( await token.removeMinter.call(minterAccount, { from: masterMinterAccount, }) ); }); - it("ms045 initialized should be in slot 8, byte 21", async function () { - var initialized = await getInitializedV1(token); - assert.equal("0x01", initialized); + it("ms045 initialized should be in slot 8, byte 21", async () => { + const initialized = await getInitializedV1(token); + assert.strictEqual("0x01", initialized); }); - it("ms046 initialized should be 0 before initialization", async function () { - var rawToken = await newToken(); - var newProxy = await FiatTokenProxy.new(rawToken.address, { + it("ms046 initialized should be 0 before initialization", async () => { + const rawToken = await newToken(); + const newProxy = await FiatTokenProxy.new(rawToken.address, { from: arbitraryAccount, }); - var token = await FiatToken.at(newProxy.address); - var initialized = await getInitializedV1(token); - assert.equal("0x00", initialized); + const token = await FiatToken.at(newProxy.address); + const initialized = await getInitializedV1(token); + assert.strictEqual("0x00", initialized); }); - it("ms047 configureMinter works on amount=2^256-1", async function () { + it("ms047 configureMinter works on amount=2^256-1", async () => { await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -744,11 +737,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms048 mint works on amount=2^256-1", async function () { + it("ms048 mint works on amount=2^256-1", async () => { await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -773,12 +766,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms049 burn on works on amount=2^256-1", async function () { + it("ms049 burn on works on amount=2^256-1", async () => { await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount, }); await token.mint(minterAccount, maxAmount, { from: minterAccount }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.minterAccount", @@ -795,12 +788,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms050 approve works on amount=2^256-1", async function () { + it("ms050 approve works on amount=2^256-1", async () => { await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount, }); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", @@ -826,12 +819,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms051 transfer works on amount=2^256-1", async function () { + it("ms051 transfer works on amount=2^256-1", async () => { await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount, }); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", @@ -853,13 +846,13 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("ms052 transferFrom works on amount=2^256-1", async function () { + it("ms052 transferFrom works on amount=2^256-1", async () => { await token.configureMinter(minterAccount, maxAmount, { from: masterMinterAccount, }); await token.mint(arbitraryAccount, maxAmount, { from: minterAccount }); await token.approve(pauserAccount, maxAmount, { from: arbitraryAccount }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.arbitraryAccount", @@ -888,9 +881,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_MiscTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/NegativeTests.js b/test/NegativeTests.js index 970a51d79..4c7c6d60e 100644 --- a/test/NegativeTests.js +++ b/test/NegativeTests.js @@ -1,52 +1,42 @@ -var BN = require("bn.js"); -var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); - -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var checkVariables = tokenUtils.checkVariables; -var expectRevert = tokenUtils.expectRevert; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var nullAccount = tokenUtils.nullAccount; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var proxyOwnerAccount = tokenUtils.proxyOwnerAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var customInitializeTokenWithProxy = tokenUtils.customInitializeTokenWithProxy; -var upgradeTo = tokenUtils.upgradeTo; -var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; -var FiatToken = tokenUtils.FiatToken; - -var amount = 100; +const assert = require("chai").assert; +const BN = require("bn.js"); +const { + checkVariables, + expectRevert, + nullAccount, + arbitraryAccount, + arbitraryAccount2, + tokenOwnerAccount, + blacklisterAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + initializeTokenWithProxy, + customInitializeTokenWithProxy, + upgradeTo, + UpgradedFiatToken, +} = require("./TokenTestUtils"); + +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { - var rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await newToken(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); // Mint - it("nt001 should fail to mint when paused", async function () { + it("nt001 should fail to mint when paused", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.pause({ from: pauserAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -60,20 +50,20 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt002 should fail to mint when msg.sender is not a minter", async function () { - //Note: minterAccount has not yet been configured as a minter + it("nt002 should fail to mint when msg.sender is not a minter", async () => { + // Note: minterAccount has not yet been configured as a minter await expectRevert( token.mint(arbitraryAccount, 50, { from: minterAccount }) ); await checkVariables([token], [[]]); }); - it("nt003 should fail to mint when msg.sender is blacklisted", async function () { + it("nt003 should fail to mint when msg.sender is blacklisted", async () => { await token.blacklist(minterAccount, { from: blacklisterAccount }); await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -87,12 +77,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt004 should fail to mint when recipient is blacklisted", async function () { + it("nt004 should fail to mint when recipient is blacklisted", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -109,11 +99,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt005 should fail to mint when allowance of minter is less than amount", async function () { + it("nt005 should fail to mint when allowance of minter is less than amount", async () => { await token.configureMinter(minterAccount, amount - 1, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -126,11 +116,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt006 should fail to mint to 0x0 address", async function () { + it("nt006 should fail to mint to 0x0 address", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -145,9 +135,9 @@ async function run_tests(newToken, accounts) { // Approve - it("nt008 should fail to approve when spender is blacklisted", async function () { + it("nt008 should fail to approve when spender is blacklisted", async () => { await token.blacklist(minterAccount, { from: blacklisterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountBlacklisted.minterAccount", expectedValue: true }, ]; await expectRevert( @@ -156,9 +146,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt009 should fail to approve when msg.sender is blacklisted", async function () { + it("nt009 should fail to approve when msg.sender is blacklisted", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -170,9 +160,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt010 should fail to approve when contract is paused", async function () { + it("nt010 should fail to approve when contract is paused", async () => { await token.pause({ from: pauserAccount }); - var customVars = [{ variable: "paused", expectedValue: true }]; + const customVars = [{ variable: "paused", expectedValue: true }]; await expectRevert( token.approve(minterAccount, 100, { from: arbitraryAccount }) ); @@ -181,11 +171,11 @@ async function run_tests(newToken, accounts) { // TransferFrom - it("nt012 should fail to transferFrom to 0x0 address", async function () { + it("nt012 should fail to transferFrom to 0x0 address", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -220,11 +210,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt013 should fail to transferFrom an amount greater than balance", async function () { + it("nt013 should fail to transferFrom an amount greater than balance", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -259,11 +249,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt014 should fail to transferFrom to blacklisted recipient", async function () { + it("nt014 should fail to transferFrom to blacklisted recipient", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -303,11 +293,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt015 should fail to transferFrom from blacklisted msg.sender", async function () { + it("nt015 should fail to transferFrom from blacklisted msg.sender", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -347,11 +337,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt016 should fail to transferFrom when from is blacklisted", async function () { + it("nt016 should fail to transferFrom when from is blacklisted", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -391,11 +381,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt017 should fail to transferFrom an amount greater than allowed for msg.sender", async function () { + it("nt017 should fail to transferFrom an amount greater than allowed for msg.sender", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -430,11 +420,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt018 should fail to transferFrom when paused", async function () { + it("nt018 should fail to transferFrom when paused", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -473,11 +463,11 @@ async function run_tests(newToken, accounts) { // Transfer - it("nt020 should fail to transfer to 0x0 address", async function () { + it("nt020 should fail to transfer to 0x0 address", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -505,11 +495,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt021 should fail to transfer an amount greater than balance", async function () { + it("nt021 should fail to transfer an amount greater than balance", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -519,7 +509,7 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); await token.mint(arbitraryAccount, 50, { from: minterAccount }); - var customVars = [ + customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -537,11 +527,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt022 should fail to transfer to blacklisted recipient", async function () { + it("nt022 should fail to transfer to blacklisted recipient", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -574,11 +564,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt023 should fail to transfer when sender is blacklisted", async function () { + it("nt023 should fail to transfer when sender is blacklisted", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -611,11 +601,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt024 should fail to transfer when paused", async function () { + it("nt024 should fail to transfer when paused", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -647,17 +637,17 @@ async function run_tests(newToken, accounts) { // ConfigureMinter - it("nt026 should fail to configureMinter when sender is not masterMinter", async function () { - assert.isFalse(arbitraryAccount == masterMinterAccount); + it("nt026 should fail to configureMinter when sender is not masterMinter", async () => { + assert.notEqual(arbitraryAccount, masterMinterAccount); await expectRevert( token.configureMinter(minterAccount, amount, { from: arbitraryAccount }) ); await checkVariables([token], [[]]); }); - it("nt028 should fail to configureMinter when paused", async function () { + it("nt028 should fail to configureMinter when paused", async () => { await token.pause({ from: pauserAccount }); - customVars = [{ variable: "paused", expectedValue: true }]; + const customVars = [{ variable: "paused", expectedValue: true }]; await expectRevert( token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -668,11 +658,11 @@ async function run_tests(newToken, accounts) { // RemoveMinter - it("nt029 should fail to removeMinter when sender is not masterMinter", async function () { + it("nt029 should fail to removeMinter when sender is not masterMinter", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -687,11 +677,11 @@ async function run_tests(newToken, accounts) { // Burn - it("nt031 should fail to burn when balance is less than amount", async function () { + it("nt031 should fail to burn when balance is less than amount", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -702,12 +692,12 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt032 should fail to burn when amount is -1", async function () { + it("nt032 should fail to burn when amount is -1", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.mint(minterAccount, amount, { from: minterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -723,11 +713,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt033 should fail to burn when sender is blacklisted", async function () { + it("nt033 should fail to burn when sender is blacklisted", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -752,11 +742,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt034 should fail to burn when paused", async function () { + it("nt034 should fail to burn when paused", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -781,11 +771,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt035 should fail to burn when sender is not minter", async function () { + it("nt035 should fail to burn when sender is not minter", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -808,11 +798,11 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt036 should fail to burn after removeMinter", async function () { + it("nt036 should fail to burn after removeMinter", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -849,21 +839,21 @@ async function run_tests(newToken, accounts) { // Update functions - it("nt050 should fail to updatePauser when sender is not owner", async function () { + it("nt050 should fail to updatePauser when sender is not owner", async () => { await expectRevert( token.updatePauser(arbitraryAccount, { from: pauserAccount }) ); await checkVariables([token], [[]]); }); - it("nt049 should fail to updateMasterMinter when sender is not owner", async function () { + it("nt049 should fail to updateMasterMinter when sender is not owner", async () => { await expectRevert( token.updateMasterMinter(arbitraryAccount, { from: pauserAccount }) ); await checkVariables([token], [[]]); }); - it("nt048 should fail to updateBlacklister when sender is not owner", async function () { + it("nt048 should fail to updateBlacklister when sender is not owner", async () => { await expectRevert( token.updateBlacklister(arbitraryAccount, { from: pauserAccount }) ); @@ -872,30 +862,30 @@ async function run_tests(newToken, accounts) { // Pause and Unpause - it("nt040 should fail to pause when sender is not pauser", async function () { + it("nt040 should fail to pause when sender is not pauser", async () => { await expectRevert(token.pause({ from: arbitraryAccount })); await checkVariables([token], [[]]); }); - it("nt041 should fail to unpause when sender is not pauser", async function () { + it("nt041 should fail to unpause when sender is not pauser", async () => { await token.pause({ from: pauserAccount }); - customVars = [{ variable: "paused", expectedValue: true }]; + const customVars = [{ variable: "paused", expectedValue: true }]; await expectRevert(token.unpause({ from: arbitraryAccount })); await checkVariables([token], [customVars]); }); // Blacklist and Unblacklist - it("nt042 should fail to blacklist when sender is not blacklister", async function () { + it("nt042 should fail to blacklist when sender is not blacklister", async () => { await expectRevert( token.blacklist(tokenOwnerAccount, { from: arbitraryAccount }) ); await checkVariables([token], [[]]); }); - it("nt043 should fail to unblacklist when sender is not blacklister", async function () { + it("nt043 should fail to unblacklist when sender is not blacklister", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - customVars = [ + const customVars = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -909,14 +899,14 @@ async function run_tests(newToken, accounts) { // Upgrade - it("nt054 should fail to transferOwnership when sender is not owner", async function () { + it("nt054 should fail to transferOwnership when sender is not owner", async () => { // Create upgraded token - var newRawToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, newRawToken); - var newProxiedToken = tokenConfig.token; - var newToken = newProxiedToken; + const newRawToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo(proxy, newRawToken); + const newProxiedToken = tokenConfig.token; + const newToken = newProxiedToken; - var newToken_result = [ + const newTokenResult = [ { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, ]; @@ -924,16 +914,16 @@ async function run_tests(newToken, accounts) { await expectRevert( newToken.transferOwnership(arbitraryAccount, { from: arbitraryAccount2 }) ); - await checkVariables([newToken], [newToken_result]); + await checkVariables([newToken], [newTokenResult]); }); - it("nt055 should fail to mint when amount = 0", async function () { + it("nt055 should fail to mint when amount = 0", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await expectRevert(token.mint(pauserAccount, 0, { from: minterAccount })); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -943,13 +933,13 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt056 should fail to burn when amount = 0", async function () { + it("nt056 should fail to burn when amount = 0", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.mint(minterAccount, amount, { from: minterAccount }); await expectRevert(token.burn(0, { from: minterAccount })); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "balances.minterAccount", @@ -960,32 +950,32 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("nt064 transferOwnership should fail on 0x0", async function () { + it("nt064 transferOwnership should fail on 0x0", async () => { await expectRevert( token.transferOwnership(nullAccount, { from: tokenOwnerAccount }) ); }); - it("nt057 updateMasterMinter should fail on 0x0", async function () { + it("nt057 updateMasterMinter should fail on 0x0", async () => { await expectRevert( token.updateMasterMinter(nullAccount, { from: tokenOwnerAccount }) ); }); - it("nt058 updatePauser should fail on 0x0", async function () { + it("nt058 updatePauser should fail on 0x0", async () => { await expectRevert( token.updatePauser(nullAccount, { from: tokenOwnerAccount }) ); }); - it("nt059 updateBlacklister should fail on 0x0", async function () { + it("nt059 updateBlacklister should fail on 0x0", async () => { await expectRevert( token.updateBlacklister(nullAccount, { from: tokenOwnerAccount }) ); }); - it("nt060 initialize should fail when _masterMinter is 0x0", async function () { - var rawToken = await newToken(); + it("nt060 initialize should fail when _masterMinter is 0x0", async () => { + const rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, @@ -997,8 +987,8 @@ async function run_tests(newToken, accounts) { ); }); - it("nt061 initialize should fail when _pauser is 0x0", async function () { - var rawToken = await newToken(); + it("nt061 initialize should fail when _pauser is 0x0", async () => { + const rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, @@ -1010,8 +1000,8 @@ async function run_tests(newToken, accounts) { ); }); - it("nt062 initialize should fail when _blacklister is 0x0", async function () { - var rawToken = await newToken(); + it("nt062 initialize should fail when _blacklister is 0x0", async () => { + const rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, @@ -1023,8 +1013,8 @@ async function run_tests(newToken, accounts) { ); }); - it("nt063 initialize should fail when _owner is 0x0", async function () { - var rawToken = await newToken(); + it("nt063 initialize should fail when _owner is 0x0", async () => { + const rawToken = await newToken(); await expectRevert( customInitializeTokenWithProxy( rawToken, @@ -1037,9 +1027,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_NegativeTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/Pausable.test.js b/test/Pausable.test.js index 6d4c370c3..1840b6a19 100644 --- a/test/Pausable.test.js +++ b/test/Pausable.test.js @@ -1,85 +1,87 @@ -var Pausable = artifacts.require("Pausable"); -var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); -var expectRevert = tokenUtils.expectRevert; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var pauserAccount = tokenUtils.pauserAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; - -contract("PausableTests", function (accounts) { - var pause; - beforeEach(async function checkBefore() { - pause = await Pausable.new(); - await pause.updatePauser(pauserAccount); +const assert = require("chai").assert; +const { + expectRevert, + deployerAccount, + arbitraryAccount, + pauserAccount, +} = require("./TokenTestUtils"); + +const Pausable = artifacts.require("Pausable"); + +contract("PausableTests", (accounts) => { + let pausable; + + beforeEach(async () => { + pausable = await Pausable.new(); + await pausable.updatePauser(pauserAccount); }); - it("constructor owner", async function () { - var actualOwner = await pause.owner.call(); - assert.equal(deployerAccount, actualOwner, "wrong owner"); + it("constructor owner", async () => { + const actualOwner = await pausable.owner.call(); + assert.strictEqual(deployerAccount, actualOwner, "wrong owner"); }); - it("constructor pauser", async function () { - var actualOwner = await pause.pauser.call(); - assert.equal(pauserAccount, actualOwner, "wrong pauser"); + it("constructor pauser", async () => { + const actualOwner = await pausable.pauser.call(); + assert.strictEqual(pauserAccount, actualOwner, "wrong pauser"); }); - it("paused after pausing", async function () { + it("paused after pausing", async () => { await checkUnPaused(); - await pause.pause({ from: pauserAccount }); + await pausable.pause({ from: pauserAccount }); await checkPaused(); // should stay paused even if we call it again - await pause.pause({ from: pauserAccount }); + await pausable.pause({ from: pauserAccount }); await checkPaused(); - await pause.unpause({ from: pauserAccount }); + await pausable.unpause({ from: pauserAccount }); await checkUnPaused(); }); - it("update pauser", async function () { + it("update pauser", async () => { // pause from original pauser - await pause.pause({ from: pauserAccount }); + await pausable.pause({ from: pauserAccount }); await checkPaused("should have paused from original pauser account"); - await pause.updatePauser(arbitraryAccount, { from: deployerAccount }); - var newPauser = await pause.pauser.call(); - assert.equal(arbitraryAccount, newPauser); + await pausable.updatePauser(arbitraryAccount, { from: deployerAccount }); + const newPauser = await pausable.pauser.call(); + assert.strictEqual(arbitraryAccount, newPauser); // double check we're still paused await checkPaused("should still be paused after changing pauser"); - await pause.unpause({ from: arbitraryAccount }); + await pausable.unpause({ from: arbitraryAccount }); await checkUnPaused(); - //original pauser shouldn't work anymore - await expectRevert(pause.pause({ from: pauserAccount })); + // original pauser shouldn't work anymore + await expectRevert(pausable.pause({ from: pauserAccount })); }); - it("fail to update pauser from wrong account", async function () { + it("fail to update pauser from wrong account", async () => { await expectRevert( - pause.updatePauser(arbitraryAccount, { from: arbitraryAccount }) + pausable.updatePauser(arbitraryAccount, { from: arbitraryAccount }) ); }); - it("fail to pause from wrong account", async function () { - await expectRevert(pause.pause({ from: arbitraryAccount })); + it("fail to pause from wrong account", async () => { + await expectRevert(pausable.pause({ from: arbitraryAccount })); }); - it("fail to unpause from wrong account", async function () { - await pause.pause({ from: pauserAccount }); + it("fail to unpause from wrong account", async () => { + await pausable.pause({ from: pauserAccount }); await checkPaused(); - await expectRevert(pause.unpause({ from: arbitraryAccount })); + await expectRevert(pausable.unpause({ from: arbitraryAccount })); }); async function checkPaused(msg) { - var paused = await pause.paused.call(); + const paused = await pausable.paused.call(); assert.isTrue(paused, msg); } async function checkUnPaused(msg) { - var paused = await pause.paused.call(); + const paused = await pausable.paused.call(); assert.isFalse(paused, msg); } }); diff --git a/test/PositiveTests.js b/test/PositiveTests.js index 119590d3c..4b1d57493 100644 --- a/test/PositiveTests.js +++ b/test/PositiveTests.js @@ -1,54 +1,45 @@ -var BN = require("bn.js"); -var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); - -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var checkVariables = tokenUtils.checkVariables; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var upgraderAccount = tokenUtils.upgraderAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var proxyOwnerAccount = tokenUtils.proxyOwnerAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var FiatToken = tokenUtils.FiatToken; - -var amount = 100; +const assert = require("chai").assert; +const BN = require("bn.js"); + +const { + bigZero, + checkVariables, + arbitraryAccount, + tokenOwnerAccount, + blacklisterAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + initializeTokenWithProxy, +} = require("./TokenTestUtils"); + +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { - rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + let proxy, token; + + beforeEach(async () => { + const rawToken = await newToken(); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); - it("pt000 should check that default variable values are correct", async function () { + it("pt000 should check that default variable values are correct", async () => { await checkVariables([token], [[]]); }); // Pause and Unpause - it("pt011 should pause and set paused to true", async function () { + it("pt011 should pause and set paused to true", async () => { await token.pause({ from: pauserAccount }); - var customVars = [{ variable: "paused", expectedValue: true }]; + const customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); }); - it("pt006 should unpause and set paused to false", async function () { + it("pt006 should unpause and set paused to false", async () => { await token.pause({ from: pauserAccount }); - var customVars = [{ variable: "paused", expectedValue: true }]; + const customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); await token.unpause({ from: pauserAccount }); await checkVariables([token], [[]]); @@ -56,9 +47,9 @@ async function run_tests(newToken, accounts) { // Approve - it("pt020 should approve a spend and set allowed amount", async function () { + it("pt020 should approve a spend and set allowed amount", async () => { await token.approve(minterAccount, amount, { from: arbitraryAccount }); - var customVars = [ + const customVars = [ { variable: "allowance.arbitraryAccount.minterAccount", expectedValue: new BN(amount), @@ -69,9 +60,9 @@ async function run_tests(newToken, accounts) { // Blacklist and Unblacklist - it("pt019 should blacklist and set blacklisted to true", async function () { + it("pt019 should blacklist and set blacklisted to true", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -80,9 +71,9 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("pt018 should blacklist and set blacklisted to true, then unblacklist and set blacklisted to false", async function () { + it("pt018 should blacklist and set blacklisted to true, then unblacklist and set blacklisted to false", async () => { await token.blacklist(arbitraryAccount, { from: blacklisterAccount }); - var customVars = [ + const customVars = [ { variable: "isAccountBlacklisted.arbitraryAccount", expectedValue: true, @@ -96,11 +87,11 @@ async function run_tests(newToken, accounts) { // Configure minter - it("pt015 should configureMinter, setting the minter to true and mintingAllowance to amount", async function () { + it("pt015 should configureMinter, setting the minter to true and mintingAllowance to amount", async () => { await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + const customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -112,13 +103,13 @@ async function run_tests(newToken, accounts) { // Mint and Burn - it("pt012 should mint the amount, increasing balance of recipient by amount, increasing total supply by amount, and decreasing minterAllowed by amount", async function () { - var mintAmount = 50; + it("pt012 should mint the amount, increasing balance of recipient by amount, increasing total supply by amount, and decreasing minterAllowed by amount", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -143,15 +134,15 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("pt017 should burn amount of tokens and reduce balance and total supply by amount", async function () { - var mintAmount = 11; - var burnAmount = 10; + it("pt017 should burn amount of tokens and reduce balance and total supply by amount", async () => { + const mintAmount = 11; + const burnAmount = 10; await token.configureMinter(minterAccount, mintAmount, { from: masterMinterAccount, }); await token.mint(minterAccount, mintAmount, { from: minterAccount }); - var setup = [ + const setup = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -166,7 +157,7 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [setup]); await token.burn(burnAmount, { from: minterAccount }); - var afterBurn = [ + const afterBurn = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -186,14 +177,14 @@ async function run_tests(newToken, accounts) { // Remove minter - it("pt010 should removeMinter, setting the minter to false and minterAllowed to 0", async function () { - let mintAmount = 11; + it("pt010 should removeMinter, setting the minter to false and minterAllowed to 0", async () => { + const mintAmount = 11; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -220,13 +211,13 @@ async function run_tests(newToken, accounts) { // Transfer and transferFrom - it("pt008 should transfer, reducing sender balance by amount and increasing recipient balance by amount", async function () { - let mintAmount = 50; + it("pt008 should transfer, reducing sender balance by amount and increasing recipient balance by amount", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -267,13 +258,13 @@ async function run_tests(newToken, accounts) { await checkVariables([token], [customVars]); }); - it("pt007 should transferFrom, reducing sender balance by amount and increasing recipient balance by amount", async function () { - let mintAmount = 50; + it("pt007 should transferFrom, reducing sender balance by amount and increasing recipient balance by amount", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, }); - var customVars = [ + let customVars = [ { variable: "isAccountMinter.minterAccount", expectedValue: true }, { variable: "minterAllowance.minterAccount", @@ -321,44 +312,48 @@ async function run_tests(newToken, accounts) { // Update methods - it("pt004 should updateMasterMinter", async function () { + it("pt004 should updateMasterMinter", async () => { await token.updateMasterMinter(arbitraryAccount, { from: tokenOwnerAccount, }); - var result = [ + const result = [ { variable: "masterMinter", expectedValue: arbitraryAccount }, ]; await checkVariables([token], [result]); }); - it("pt005 should updateBlacklister", async function () { + it("pt005 should updateBlacklister", async () => { await token.updateBlacklister(arbitraryAccount, { from: tokenOwnerAccount, }); - var result = [{ variable: "blacklister", expectedValue: arbitraryAccount }]; + const result = [ + { variable: "blacklister", expectedValue: arbitraryAccount }, + ]; await checkVariables([token], [result]); }); - it("pt003 should updatePauser", async function () { + it("pt003 should updatePauser", async () => { await token.updatePauser(arbitraryAccount, { from: tokenOwnerAccount }); - var result = [{ variable: "pauser", expectedValue: arbitraryAccount }]; + const result = [{ variable: "pauser", expectedValue: arbitraryAccount }]; await checkVariables([token], [result]); }); // Transfer Ownership - it("pt009 should set owner to _newOwner", async function () { + it("pt009 should set owner to _newOwner", async () => { await token.transferOwnership(arbitraryAccount, { from: tokenOwnerAccount, }); - var result = [{ variable: "tokenOwner", expectedValue: arbitraryAccount }]; + const result = [ + { variable: "tokenOwner", expectedValue: arbitraryAccount }, + ]; await checkVariables([token], [result]); }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_PositiveTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/ProxyNegativeTests.js b/test/ProxyNegativeTests.js index 1b7ecd2b8..ccf27761a 100644 --- a/test/ProxyNegativeTests.js +++ b/test/ProxyNegativeTests.js @@ -1,69 +1,62 @@ -var BN = require("bn.js"); -var tokenUtils = require("./TokenTestUtils"); -var BigNumber = require("bignumber.js"); - -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var expectRevert = tokenUtils.expectRevert; -var checkVariables = tokenUtils.checkVariables; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var nullAccount = tokenUtils.nullAccount; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var upgraderAccount = tokenUtils.upgraderAccount; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var proxyOwnerAccount = tokenUtils.proxyOwnerAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var upgradeTo = tokenUtils.upgradeTo; -var encodeCall = tokenUtils.encodeCall; -var validateTransferEvent = tokenUtils.validateTransferEvent; -var FiatToken = tokenUtils.FiatToken; -var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; -var UpgradedFiatTokenNewFields = tokenUtils.UpgradedFiatTokenNewFields; - -var amount = 100; +const assert = require("chai").assert; +const BN = require("bn.js"); +const { + bigZero, + expectRevert, + checkVariables, + name, + symbol, + currency, + decimals, + nullAccount, + arbitraryAccount, + tokenOwnerAccount, + blacklisterAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + proxyOwnerAccount, + initializeTokenWithProxy, + encodeCall, + FiatToken, + UpgradedFiatToken, + UpgradedFiatTokenNewFields, +} = require("./TokenTestUtils"); + +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { + let rawToken, proxy, token; + + beforeEach(async () => { rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); - it("nut002 should fail to switch adminAccount with non-adminAccount as caller", async function () { + it("nut002 should fail to switch adminAccount with non-adminAccount as caller", async () => { await expectRevert( proxy.changeAdmin(masterMinterAccount, { from: masterMinterAccount }) ); - assert.equal( + assert.strictEqual( await proxy.admin({ from: proxyOwnerAccount }), proxyOwnerAccount ); - customVars = []; + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut003 should fail to upgradeTo to null contract address", async function () { + it("nut003 should fail to upgradeTo to null contract address", async () => { await expectRevert( proxy.upgradeTo(nullAccount, { from: proxyOwnerAccount }) ); - customVars = []; + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut004 should fail to upgradeToAndCall to null contract address", async function () { - var upgradedToken = await UpgradedFiatToken.new(); + it("nut004 should fail to upgradeToAndCall to null contract address", async () => { const initializeData = encodeCall("pauser", [], []); await expectRevert( proxy.upgradeToAndCall(nullAccount, initializeData, { @@ -71,11 +64,11 @@ async function run_tests(newToken, accounts) { }) ); - customVars = []; + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut005 should fail to initialize contract twice", async function () { + it("nut005 should fail to initialize contract twice", async () => { await expectRevert( token.initialize( name, @@ -88,29 +81,30 @@ async function run_tests(newToken, accounts) { tokenOwnerAccount ) ); - customVars = []; + + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut006 should fail to call contract function with adminAccount", async function () { + it("nut006 should fail to call contract function with adminAccount", async () => { await expectRevert( token.allowance(minterAccount, arbitraryAccount, { from: proxyOwnerAccount, }) ); - customVars = []; + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut007 should fail to call proxy function with non-adminAccount", async function () { + it("nut007 should fail to call proxy function with non-adminAccount", async () => { await expectRevert(proxy.admin({ from: masterMinterAccount })); - customVars = []; + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut008 shoud fail to update proxy storage if state-changing function called directly in FiatToken", async function () { + it("nut008 shoud fail to update proxy storage if state-changing function called directly in FiatToken", async () => { await rawToken.initialize( name, symbol, @@ -121,33 +115,33 @@ async function run_tests(newToken, accounts) { blacklisterAccount, tokenOwnerAccount ); - assert.equal(await rawToken.pauser(), pauserAccount); + assert.strictEqual(await rawToken.pauser(), pauserAccount); await rawToken.updatePauser(masterMinterAccount, { from: tokenOwnerAccount, }); - assert.equal(await rawToken.pauser(), masterMinterAccount); + assert.strictEqual(await rawToken.pauser(), masterMinterAccount); - customVars = []; + const customVars = []; await checkVariables([token], [customVars]); }); - it("nut009 should fail to call upgradeTo with non-adminAccount", async function () { - var upgradedToken = await UpgradedFiatToken.new(); + it("nut009 should fail to call upgradeTo with non-adminAccount", async () => { + const upgradedToken = await UpgradedFiatToken.new(); await expectRevert( proxy.upgradeTo(upgradedToken.address, { from: masterMinterAccount }) ); - var finalToken = await FiatToken.at(proxy.address); - var implementation = await proxy.implementation({ + const finalToken = await FiatToken.at(proxy.address); + const implementation = await proxy.implementation({ from: proxyOwnerAccount, }); finalToken.proxiedTokenAddress = implementation; - customVars = []; + const customVars = []; await checkVariables([finalToken], [customVars]); }); - it("nut010 should fail to call updateToAndCall with non-adminAccount", async function () { - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + it("nut010 should fail to call updateToAndCall with non-adminAccount", async () => { + const upgradedToken = await UpgradedFiatTokenNewFields.new(); const initializeData = encodeCall( "initialize", ["bool", "address", "uint256"], @@ -158,18 +152,18 @@ async function run_tests(newToken, accounts) { from: masterMinterAccount, }) ); - var finalToken = await FiatToken.at(proxy.address); - var implementation = await proxy.implementation({ + const finalToken = await FiatToken.at(proxy.address); + const implementation = await proxy.implementation({ from: proxyOwnerAccount, }); finalToken.proxiedTokenAddress = implementation; - customVars = []; + const customVars = []; await checkVariables([finalToken], [customVars]); }); - it("nut011 should fail to upgradeToAndCall with initialize (already set variables)", async function () { - let mintAmount = 50; + it("nut011 should fail to upgradeToAndCall with initialize (already set variables)", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -177,8 +171,8 @@ async function run_tests(newToken, accounts) { await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - var upgradedToken = await UpgradedFiatTokenNewFields.new(); - var data = encodeCall( + const upgradedToken = await UpgradedFiatTokenNewFields.new(); + const data = encodeCall( "initialize", [ "string", @@ -213,7 +207,7 @@ async function run_tests(newToken, accounts) { }) ); - customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount), @@ -230,9 +224,9 @@ async function run_tests(newToken, accounts) { }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_ProxyNegativeTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/ProxyPositiveTests.js b/test/ProxyPositiveTests.js index 6b1223e3c..7aeef764e 100644 --- a/test/ProxyPositiveTests.js +++ b/test/ProxyPositiveTests.js @@ -1,56 +1,47 @@ -var tokenUtils = require("./TokenTestUtils"); -var BN = require("bn.js"); - -var bigZero = tokenUtils.bigZero; -var bigHundred = tokenUtils.bigHundred; -var mint = tokenUtils.mint; -var checkVariables = tokenUtils.checkVariables; -var name = tokenUtils.name; -var symbol = tokenUtils.symbol; -var currency = tokenUtils.currency; -var decimals = tokenUtils.decimals; -var deployerAccount = tokenUtils.deployerAccount; -var arbitraryAccount = tokenUtils.arbitraryAccount; -var arbitraryAccount2 = tokenUtils.arbitraryAccount2; -var upgraderAccount = tokenUtils.upgraderAccount; -var upgraderAccountPrivateKey = tokenUtils.upgraderAccountPrivateKey; -var proxyOwnerAccountPrivateKey = tokenUtils.proxyOwnerAccountPrivateKey; -var tokenOwnerAccount = tokenUtils.tokenOwnerAccount; -var blacklisterAccount = tokenUtils.blacklisterAccount; -var masterMinterAccount = tokenUtils.masterMinterAccount; -var masterMinterAccountPrivateKey = tokenUtils.masterMinterAccountPrivateKey; -var minterAccount = tokenUtils.minterAccount; -var pauserAccount = tokenUtils.pauserAccount; -var proxyOwnerAccount = tokenUtils.proxyOwnerAccount; -var initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -var upgradeTo = tokenUtils.upgradeTo; -var encodeCall = tokenUtils.encodeCall; -var validateTransferEvent = tokenUtils.validateTransferEvent; -var FiatToken = tokenUtils.FiatToken; -var FiatTokenProxy = tokenUtils.FiatTokenProxy; -var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; -var UpgradedFiatTokenNewFields = tokenUtils.UpgradedFiatTokenNewFields; -var UpgradedFiatTokenNewFieldsNewLogic = - tokenUtils.UpgradedFiatTokenNewFieldsNewLogic; -var getAdmin = tokenUtils.getAdmin; - -var abiUtils = require("./ABIUtils"); -var makeRawTransaction = abiUtils.makeRawTransaction; -var sendRawTransaction = abiUtils.sendRawTransaction; - -var amount = 100; +const assert = require("chai").assert; +const BN = require("bn.js"); +const { + bigZero, + checkVariables, + name, + symbol, + currency, + decimals, + arbitraryAccount, + upgraderAccount, + tokenOwnerAccount, + blacklisterAccount, + masterMinterAccount, + masterMinterAccountPrivateKey, + minterAccount, + pauserAccount, + proxyOwnerAccount, + initializeTokenWithProxy, + upgradeTo, + encodeCall, + validateTransferEvent, + FiatTokenProxy, + UpgradedFiatToken, + UpgradedFiatTokenNewFields, + UpgradedFiatTokenNewFieldsNewLogic, + getAdmin, +} = require("./TokenTestUtils"); +const { makeRawTransaction, sendRawTransaction } = require("./ABIUtils"); + +const amount = 100; async function run_tests(newToken, accounts) { - beforeEach("Make fresh token contract", async function () { + let rawToken, proxy, token; + + beforeEach(async () => { rawToken = await newToken(); - var tokenConfig = await initializeTokenWithProxy(rawToken); - proxy = tokenConfig.proxy; - token = tokenConfig.token; - assert.equal(proxy.address, token.address); + const tokenConfig = await initializeTokenWithProxy(rawToken); + ({ proxy, token } = tokenConfig); + assert.strictEqual(proxy.address, token.address); }); - it("upt001 should upgradeTo new contract and preserve data field values", async function () { - let mintAmount = 50; + it("upt001 should upgradeTo new contract and preserve data field values", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -58,11 +49,15 @@ async function run_tests(newToken, accounts) { await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - var upgradedToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); - var newToken = tokenConfig.token; + const upgradedToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo( + proxy, + upgradedToken, + proxyOwnerAccount + ); + const newToken = tokenConfig.token; - customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount), @@ -76,8 +71,8 @@ async function run_tests(newToken, accounts) { await checkVariables([newToken], [customVars]); }); - it("upt002 should upgradeToandCall to contract with new data fields set on initVX and ensure new fields are correct and old data is preserved", async function () { - let mintAmount = 50; + it("upt002 should upgradeToandCall to contract with new data fields set on initVX and ensure new fields are correct and old data is preserved", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -85,7 +80,7 @@ async function run_tests(newToken, accounts) { await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + const upgradedToken = await UpgradedFiatTokenNewFields.new(); const initializeData = encodeCall( "initV2", ["bool", "address", "uint256"], @@ -94,15 +89,15 @@ async function run_tests(newToken, accounts) { await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount, }); - newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); - assert.equal(newProxiedToken.address, proxy.address); + const newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); + assert.strictEqual(newProxiedToken.address, proxy.address); assert.notEqual(newProxiedToken.address, upgradedToken.address); - assert.equal(await newProxiedToken.newBool(), true); - assert.equal(await newProxiedToken.newAddress(), pauserAccount); - assert.equal(new BN(12).eq(await newProxiedToken.newUint()), true); + assert.strictEqual(await newProxiedToken.newBool(), true); + assert.strictEqual(await newProxiedToken.newAddress(), pauserAccount); + assert.strictEqual(new BN(12).eq(await newProxiedToken.newUint()), true); - customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount), @@ -116,8 +111,8 @@ async function run_tests(newToken, accounts) { await checkVariables([newProxiedToken], [customVars]); }); - it("upt003 should upgradeToAndCall to contract with new data fields set on initVX and new logic and ensure old data preserved,new logic works, and new fields correct", async function () { - let mintAmount = 50; + it("upt003 should upgradeToAndCall to contract with new data fields set on initVX and new logic and ensure old data preserved,new logic works, and new fields correct", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -125,7 +120,7 @@ async function run_tests(newToken, accounts) { await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - var upgradedToken = await UpgradedFiatTokenNewFieldsNewLogic.new(); + const upgradedToken = await UpgradedFiatTokenNewFieldsNewLogic.new(); const initializeData = encodeCall( "initV2", ["bool", "address", "uint256"], @@ -134,20 +129,20 @@ async function run_tests(newToken, accounts) { await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount, }); - newProxiedToken = await UpgradedFiatTokenNewFieldsNewLogic.at( + const newProxiedToken = await UpgradedFiatTokenNewFieldsNewLogic.at( proxy.address ); - assert.equal(newProxiedToken.address, proxy.address); + assert.strictEqual(newProxiedToken.address, proxy.address); assert.notEqual(newProxiedToken.address, upgradedToken.address); - assert.equal(await newProxiedToken.newBool(), true); - assert.equal(await newProxiedToken.newAddress(), pauserAccount); - assert.equal(new BN(12).eq(await newProxiedToken.newUint()), true); + assert.strictEqual(await newProxiedToken.newBool(), true); + assert.strictEqual(await newProxiedToken.newAddress(), pauserAccount); + assert.strictEqual(new BN(12).eq(await newProxiedToken.newUint()), true); await newProxiedToken.setNewAddress(masterMinterAccount); - assert.equal(await newProxiedToken.newAddress(), masterMinterAccount); + assert.strictEqual(await newProxiedToken.newAddress(), masterMinterAccount); - customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount), @@ -164,14 +159,14 @@ async function run_tests(newToken, accounts) { await checkVariables([newProxiedToken], [customVars]); }); - it("upt008 should deploy upgraded version of contract with new data fields and without previous deployment and ensure new fields correct", async function () { - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + it("upt008 should deploy upgraded version of contract with new data fields and without previous deployment and ensure new fields correct", async () => { + const upgradedToken = await UpgradedFiatTokenNewFields.new(); const newProxy = await FiatTokenProxy.new(upgradedToken.address, { from: proxyOwnerAccount, }); - proxiedToken = await UpgradedFiatTokenNewFields.at(newProxy.address); + const proxiedToken = await UpgradedFiatTokenNewFields.at(newProxy.address); - var data = encodeCall( + const data = encodeCall( "initialize", [ "string", @@ -200,7 +195,7 @@ async function run_tests(newToken, accounts) { 12, ] ); - var upgradeToRawTx = await makeRawTransaction( + const upgradeToRawTx = await makeRawTransaction( data, masterMinterAccount, masterMinterAccountPrivateKey, @@ -208,24 +203,26 @@ async function run_tests(newToken, accounts) { ); await sendRawTransaction(upgradeToRawTx); - assert.equal(await proxiedToken.newUint(), 12); - assert.equal(await proxiedToken.newBool(), true); - assert.equal(await proxiedToken.newAddress(), pauserAccount); + assert.isTrue((await proxiedToken.newUint()).eqn(12)); + assert.strictEqual(await proxiedToken.newBool(), true); + assert.strictEqual(await proxiedToken.newAddress(), pauserAccount); - customVars = [ + const customVars = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([proxiedToken], [customVars]); }); - it("upt010 should deploy upgraded version of contract with new data fields and logic without previous deployment and ensure new logic works, and new fields correct", async function () { - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + it("upt010 should deploy upgraded version of contract with new data fields and logic without previous deployment and ensure new logic works, and new fields correct", async () => { + const upgradedToken = await UpgradedFiatTokenNewFieldsNewLogic.new(); const newProxy = await FiatTokenProxy.new(upgradedToken.address, { from: proxyOwnerAccount, }); - proxiedToken = await UpgradedFiatTokenNewFields.at(newProxy.address); + const proxiedToken = await UpgradedFiatTokenNewFieldsNewLogic.at( + newProxy.address + ); - var data = encodeCall( + const data = encodeCall( "initialize", [ "string", @@ -254,7 +251,7 @@ async function run_tests(newToken, accounts) { 12, ] ); - var upgradeToRawTx = await makeRawTransaction( + const upgradeToRawTx = await makeRawTransaction( data, masterMinterAccount, masterMinterAccountPrivateKey, @@ -262,27 +259,29 @@ async function run_tests(newToken, accounts) { ); await sendRawTransaction(upgradeToRawTx); - assert.equal(await proxiedToken.newUint(), 12); - assert.equal(await proxiedToken.newBool(), true); - assert.equal(await proxiedToken.newAddress(), pauserAccount); + assert.isTrue((await proxiedToken.newUint()).eqn(12)); + assert.strictEqual(await proxiedToken.newBool(), true); + assert.strictEqual(await proxiedToken.newAddress(), pauserAccount); - await newProxiedToken.setNewAddress(masterMinterAccount); - assert.equal(await newProxiedToken.newAddress(), masterMinterAccount); + await proxiedToken.setNewAddress(masterMinterAccount); + assert.strictEqual(await proxiedToken.newAddress(), masterMinterAccount); - customVars = [ + const customVars = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([proxiedToken], [customVars]); }); - it("upt004 should update proxy adminAccount with previous adminAccount", async function () { + it("upt004 should update proxy adminAccount with previous adminAccount", async () => { await proxy.changeAdmin(masterMinterAccount, { from: proxyOwnerAccount }); - customVars = [{ variable: "upgrader", expectedValue: masterMinterAccount }]; + const customVars = [ + { variable: "upgrader", expectedValue: masterMinterAccount }, + ]; await checkVariables([token], [customVars]); }); - it("upt005 should receive Transfer event on transfer when proxied after upgrade", async function () { - let mintAmount = 50; + it("upt005 should receive Transfer event on transfer when proxied after upgrade", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -290,16 +289,20 @@ async function run_tests(newToken, accounts) { await token.mint(arbitraryAccount, mintAmount + 1, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - var upgradedToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); - var newToken = tokenConfig.token; + const upgradedToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo( + proxy, + upgradedToken, + proxyOwnerAccount + ); + const newToken = tokenConfig.token; - transfer = await newToken.transfer(pauserAccount, 1, { + const transfer = await newToken.transfer(pauserAccount, 1, { from: arbitraryAccount, }); - validateTransferEvent(transfer, arbitraryAccount, pauserAccount, 1); + validateTransferEvent(transfer, arbitraryAccount, pauserAccount, new BN(1)); - customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount - 1), @@ -316,13 +319,17 @@ async function run_tests(newToken, accounts) { await checkVariables([newToken], [customVars]); }); - it("upt006 should upgrade while paused and upgraded contract should be paused as a result; then unpause should unpause contract", async function () { + it("upt006 should upgrade while paused and upgraded contract should be paused as a result; then unpause should unpause contract", async () => { await token.pause({ from: pauserAccount }); - var upgradedToken = await UpgradedFiatToken.new(); - var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); - var newToken = tokenConfig.token; + const upgradedToken = await UpgradedFiatToken.new(); + const tokenConfig = await upgradeTo( + proxy, + upgradedToken, + proxyOwnerAccount + ); + const newToken = tokenConfig.token; - customVars = [ + const customVars = [ { variable: "paused", expectedValue: true }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; @@ -330,14 +337,14 @@ async function run_tests(newToken, accounts) { await newToken.unpause({ from: pauserAccount }); - customVars2 = [ + const customVars2 = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars2]); }); - it("upt007 should upgrade contract to original address", async function () { - let mintAmount = 50; + it("upt007 should upgrade contract to original address", async () => { + const mintAmount = 50; await token.configureMinter(minterAccount, amount, { from: masterMinterAccount, @@ -345,11 +352,11 @@ async function run_tests(newToken, accounts) { await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - var tokenConfig = await upgradeTo(proxy, rawToken, proxyOwnerAccount); - var sameToken = tokenConfig.token; + const tokenConfig = await upgradeTo(proxy, rawToken, proxyOwnerAccount); + const sameToken = tokenConfig.token; sameToken.proxiedTokenAddress = rawToken.address; - customVars = [ + const customVars = [ { variable: "minterAllowance.minterAccount", expectedValue: new BN(amount - mintAmount), @@ -365,17 +372,17 @@ async function run_tests(newToken, accounts) { await checkVariables([sameToken], [customVars]); }); - it("upt009 should check that admin is set correctly by proxy constructor", async function () { - assert.equal( + it("upt009 should check that admin is set correctly by proxy constructor", async () => { + assert.strictEqual( web3.utils.toChecksumAddress(await getAdmin(token)), upgraderAccount ); }); - it("upt011 should upgradeToAndCall while paused and upgraded contract should be paused as a result", async function () { + it("upt011 should upgradeToAndCall while paused and upgraded contract should be paused as a result", async () => { await token.pause({ from: pauserAccount }); - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + const upgradedToken = await UpgradedFiatTokenNewFields.new(); const initializeData = encodeCall( "initV2", ["bool", "address", "uint256"], @@ -384,21 +391,21 @@ async function run_tests(newToken, accounts) { await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount, }); - newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); - assert.equal(newProxiedToken.address, proxy.address); + const newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); + assert.strictEqual(newProxiedToken.address, proxy.address); assert.notEqual(newProxiedToken.address, upgradedToken.address); - customVars = [ + const customVars = [ { variable: "paused", expectedValue: true }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it("upt012 should upgradeToAndCall while upgrader is blacklisted", async function () { + it("upt012 should upgradeToAndCall while upgrader is blacklisted", async () => { await token.blacklist(proxyOwnerAccount, { from: blacklisterAccount }); - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + const upgradedToken = await UpgradedFiatTokenNewFields.new(); const initializeData = encodeCall( "initV2", ["bool", "address", "uint256"], @@ -407,17 +414,17 @@ async function run_tests(newToken, accounts) { await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount, }); - newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); + const newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); - customVars = [ + const customVars = [ { variable: "isAccountBlacklisted.upgraderAccount", expectedValue: true }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it("upt013 should upgradeToAndCall while new logic is blacklisted", async function () { - var upgradedToken = await UpgradedFiatTokenNewFields.new(); + it("upt013 should upgradeToAndCall while new logic is blacklisted", async () => { + const upgradedToken = await UpgradedFiatTokenNewFields.new(); await token.blacklist(upgradedToken.address, { from: blacklisterAccount }); const initializeData = encodeCall( @@ -428,31 +435,35 @@ async function run_tests(newToken, accounts) { await proxy.upgradeToAndCall(upgradedToken.address, initializeData, { from: proxyOwnerAccount, }); - newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); + const newProxiedToken = await UpgradedFiatTokenNewFields.at(proxy.address); - customVars = [ + const customVars = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newProxiedToken], [customVars]); }); - it("upt014 should upgradeTo while new logic is blacklisted", async function () { - var upgradedToken = await UpgradedFiatToken.new(); + it("upt014 should upgradeTo while new logic is blacklisted", async () => { + const upgradedToken = await UpgradedFiatToken.new(); await token.blacklist(upgradedToken.address, { from: blacklisterAccount }); - var tokenConfig = await upgradeTo(proxy, upgradedToken, proxyOwnerAccount); - var newToken = tokenConfig.token; + const tokenConfig = await upgradeTo( + proxy, + upgradedToken, + proxyOwnerAccount + ); + const newToken = tokenConfig.token; - customVars = [ + const customVars = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; await checkVariables([newToken], [customVars]); }); } -var testWrapper = require("./TestWrapper"); +const testWrapper = require("./TestWrapper"); testWrapper.execute("FiatToken_ProxyPositiveTests", run_tests); module.exports = { - run_tests: run_tests, + run_tests, }; diff --git a/test/TestWrapper.js b/test/TestWrapper.js index e7aa7850b..df98a3d3d 100644 --- a/test/TestWrapper.js +++ b/test/TestWrapper.js @@ -1,33 +1,29 @@ -var tokenUtils = require("./TokenTestUtils"); -var UpgradedFiatToken = tokenUtils.UpgradedFiatToken; -var FiatToken = tokenUtils.FiatToken; +const { UpgradedFiatToken, FiatToken } = require("./TokenTestUtils"); // The following helpers make fresh original/upgraded tokens before each test. async function newToken() { - var token = await FiatToken.new(); + const token = await FiatToken.new(); return token; } async function newUpgradedToken() { - var token = await UpgradedFiatToken.new(); + const token = await UpgradedFiatToken.new(); return token; } // Executes the run_tests_function using an original and -// an upgraded token. The test_suite_name is printed standard output. +// an upgraded token. The test_suite_name is printed standard output. function execute(test_suite_name, run_tests_function) { - contract(test_suite_name, async function (accounts) { + contract(test_suite_name, async (accounts) => { await run_tests_function(newToken, accounts); }); - contract(test_suite_name + " Upgraded", async function (accounts) { + contract(test_suite_name + " Upgraded", async (accounts) => { await run_tests_function(newUpgradedToken, accounts); }); - - return; } module.exports = { - execute: execute, + execute, }; diff --git a/test/TokenTestUtils.js b/test/TokenTestUtils.js index 811ec0a3a..b4083f11e 100644 --- a/test/TokenTestUtils.js +++ b/test/TokenTestUtils.js @@ -1,75 +1,73 @@ +const assert = require("chai").assert; const util = require("util"); const abi = require("ethereumjs-abi"); -var _ = require("lodash"); -var name = "Sample Fiat Token"; -var symbol = "C-USD"; -var currency = "USD"; -var decimals = 2; -var BN = require("bn.js"); -var trueInStorageFormat = "0x01"; -var bigZero = new BN(0); -var bigHundred = new BN(100); -var Q = require("q"); -var FiatToken = artifacts.require("FiatTokenV1"); -var UpgradedFiatToken = artifacts.require("FiatTokenV2"); -var UpgradedFiatTokenNewFields = artifacts.require("FiatTokenV2NewFieldsTest"); -var UpgradedFiatTokenNewFieldsNewLogic = artifacts.require( +const _ = require("lodash"); +const BN = require("bn.js"); +const Q = require("q"); + +const FiatToken = artifacts.require("FiatTokenV1"); +const UpgradedFiatToken = artifacts.require("FiatTokenV2"); +const UpgradedFiatTokenNewFields = artifacts.require( + "FiatTokenV2NewFieldsTest" +); +const UpgradedFiatTokenNewFieldsNewLogic = artifacts.require( "FiatTokenV2NewFieldsNewLogicTest" ); -var FiatTokenProxy = artifacts.require("FiatTokenProxy"); +const FiatTokenProxy = artifacts.require("FiatTokenProxy"); + +const name = "Sample Fiat Token"; +const symbol = "C-USD"; +const currency = "USD"; +const decimals = 2; +const trueInStorageFormat = "0x01"; +const bigZero = new BN(0); +const bigHundred = new BN(100); // TODO: test really big numbers Does this still have to be done?? const nullAccount = "0x0000000000000000000000000000000000000000"; -var deployerAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; // accounts[0] -var arbitraryAccount = "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0"; // accounts[1] -var arbitraryAccountPrivateKey = - "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; -var tokenOwnerAccount = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; // accounts[3] -var blacklisterAccount = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; // accounts[4] Why Multiple blacklisterAccount?? -var arbitraryAccount2 = "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC"; // accounts[5] -var masterMinterAccount = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; // accounts[6] -var minterAccount = "0x28a8746e75304c0780E011BEd21C72cD78cd535E"; // accounts[7] -var pauserAccount = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; // accounts[8] -//var blacklisterAccount = "0x1dF62f291b2E969fB0849d99D9Ce41e2F137006e"; // accounts[9] - -var proxyOwnerAccount = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; // accounts[14] -var upgraderAccount = proxyOwnerAccount; // accounts[14] - -var deployerAccountPrivateKey = +const deployerAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; // accounts[0] +const arbitraryAccount = "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0"; // accounts[1] +const tokenOwnerAccount = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; // accounts[3] +const blacklisterAccount = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; // accounts[4] +const arbitraryAccount2 = "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC"; // accounts[5] +const masterMinterAccount = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; // accounts[6] +const minterAccount = "0x28a8746e75304c0780E011BEd21C72cD78cd535E"; // accounts[7] +const pauserAccount = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; // accounts[8] + +const proxyOwnerAccount = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; // accounts[14] +const upgraderAccount = proxyOwnerAccount; // accounts[14] + +const deployerAccountPrivateKey = "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; // accounts[0] -var arbitraryAccountPrivateKey = +const arbitraryAccountPrivateKey = "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; -var upgraderAccountPrivateKey = - "6370fd033278c143179d81c5526140625662b8daa446c22ee2d73db3707e620c"; // accounts[2] -var proxyOwnerAccountPrivateKey = - "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46;"; //accounts[14] -var tokenOwnerPrivateKey = +const tokenOwnerPrivateKey = "646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a7913"; // accounts[3] -var blacklisterAccountPrivateKey = +const blacklisterAccountPrivateKey = "add53f9a7e588d003326d1cbf9e4a43c061aadd9bc938c843a79e7b4fd2ad743"; // accounts[4] -var arbitraryAccount2PrivateKey = +const arbitraryAccount2PrivateKey = "395df67f0c2d2d9fe1ad08d1bc8b6627011959b79c53d7dd6a3536a33ab8a4fd"; // accounts[5] -var masterMinterAccountPrivateKey = +const masterMinterAccountPrivateKey = "e485d098507f54e7733a205420dfddbe58db035fa577fc294ebd14db90767a52"; // accounts[6] -var minterAccountPrivateKey = +const minterAccountPrivateKey = "a453611d9419d0e56f499079478fd72c37b251a94bfde4d19872c44cf65386e3"; // accounts[7] -var pauserAccountPrivateKey = +const pauserAccountPrivateKey = "829e924fdf021ba3dbbc4225edfece9aca04b929d6e75613329ca6f1d31c0bb4"; // accounts[9] -var proxyOwnerAccountPrivateKey = +const proxyOwnerAccountPrivateKey = "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46"; // accounts[14] -var upgraderAccountPrivateKey = proxyOwnerAccountPrivateKey; -//var blacklisterAccountPrivateKey = "b0057716d5917badaf911b193b12b910811c1497b5bada8d7711f758981c3773"; // accounts[9] +const upgraderAccountPrivateKey = proxyOwnerAccountPrivateKey; +// var blacklisterAccountPrivateKey = "b0057716d5917badaf911b193b12b910811c1497b5bada8d7711f758981c3773"; // accounts[9] -var adminSlot = +const adminSlot = "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; -var implSlot = +const implSlot = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; // set to true to enable verbose logging in the tests -var debugLogging = false; +const debugLogging = false; -function calculateFeeAmount(amount) { +function calculateFeeAmount(amount, fee, feeBase) { return Math.floor((fee / feeBase) * amount); } @@ -78,71 +76,64 @@ function checkMinterConfiguredEvent( minter, minterAllowedAmount ) { - assert.equal(configureMinterEvent.logs[0].event, "MinterConfigured"); - assert.equal(configureMinterEvent.logs[0].args.minter, minter); - assert.equal( - configureMinterEvent.logs[0].args.minterAllowedAmount, - minterAllowedAmount + assert.strictEqual(configureMinterEvent.logs[0].event, "MinterConfigured"); + assert.strictEqual(configureMinterEvent.logs[0].args.minter, minter); + assert.isTrue( + configureMinterEvent.logs[0].args.minterAllowedAmount.eq( + new BN(minterAllowedAmount) + ) ); } function checkMinterRemovedEvent(minterRemovedEvent, minter) { - assert.equal(minterRemovedEvent.logs[0].event, "MinterRemoved"); - assert.equal(minterRemovedEvent.logs[0].args.oldMinter, minter); -} - -function checkTransferEventsWithFee(transferEvent, from, to, value, feeAmount) { - assert.equal(transferEvent.logs[0].event, "Fee"); - assert.equal(transferEvent.logs[0].args.from, from); - assert.equal(transferEvent.logs[0].args.feeAccount, feeAccount); - assert.equal(transferEvent.logs[0].args.feeAmount, feeAmount); - assert.equal(transferEvent.logs[1].event, "Transfer"); - assert.equal(transferEvent.logs[1].args.from, from); - assert.equal(transferEvent.logs[1].args.to, to); - assert.equal(transferEvent.logs[1].args.value, value); + assert.strictEqual(minterRemovedEvent.logs[0].event, "MinterRemoved"); + assert.strictEqual(minterRemovedEvent.logs[0].args.oldMinter, minter); } function checkTransferEvents(transferEvent, from, to, value) { - assert.equal(transferEvent.logs[0].event, "Transfer"); - assert.equal(transferEvent.logs[0].args.from, from); - assert.equal(transferEvent.logs[0].args.to, to); - assert.equal(transferEvent.logs[0].args.value, value); + assert.strictEqual(transferEvent.logs[0].event, "Transfer"); + assert.strictEqual(transferEvent.logs[0].args.from, from); + assert.strictEqual(transferEvent.logs[0].args.to, to); + assert.isTrue(transferEvent.logs[0].args.value.eq(new BN(value))); } function checkApprovalEvent(approvalEvent, approver, spender, value) { - assert.equal(approvalEvent.logs[0].event, "Approval"); - assert.equal(approvalEvent.logs[0].args.owner, approver); - assert.equal(approvalEvent.logs[0].args.spender, spender); - assert.equal(approvalEvent.logs[0].args.value, value); + assert.strictEqual(approvalEvent.logs[0].event, "Approval"); + assert.strictEqual(approvalEvent.logs[0].args.owner, approver); + assert.strictEqual(approvalEvent.logs[0].args.spender, spender); + assert.isTrue(approvalEvent.logs[0].args.value.eq(new BN(value))); } function checkBurnEvent(burnEvent, burner, amount) { - assert.equal(burnEvent.logs[0].event, "Burn"); - assert.equal(burnEvent.logs[0].args.burner, burner); - assert.equal(burnEvent.logs[0].args.amount, amount); + assert.strictEqual(burnEvent.logs[0].event, "Burn"); + assert.strictEqual(burnEvent.logs[0].args.burner, burner); + assert.isTrue(burnEvent.logs[0].args.amount.eq(new BN(amount))); } function checkBlacklistEvent(blacklistEvent, account) { - assert.equal(blacklistEvent.logs[0].event, "Blacklisted"); - assert.equal(blacklistEvent.logs[0].args._account, account); + assert.strictEqual(blacklistEvent.logs[0].event, "Blacklisted"); + assert.strictEqual(blacklistEvent.logs[0].args._account, account); } function checkUnblacklistEvent(unblacklistEvent, account) { - assert.equal(unblacklistEvent.logs[0].event, "UnBlacklisted"); - assert.equal(unblacklistEvent.logs[0].args._account, account); + assert.strictEqual(unblacklistEvent.logs[0].event, "UnBlacklisted"); + assert.strictEqual(unblacklistEvent.logs[0].args._account, account); } function checkBlacklisterChangedEvent(blacklisterChangedEvent, blacklister) { - assert.equal(blacklisterChangedEvent.logs[0].event, "BlacklisterChanged"); - assert.equal( + assert.strictEqual( + blacklisterChangedEvent.logs[0].event, + "BlacklisterChanged" + ); + assert.strictEqual( blacklisterChangedEvent.logs[0].args.newBlacklister, blacklister ); } function checkPauserChangedEvent(pauserChangedEvent, pauser) { - assert.equal(pauserChangedEvent.logs[0].event, "PauserChanged"); - assert.equal(pauserChangedEvent.logs[0].args.newAddress, pauser); + assert.strictEqual(pauserChangedEvent.logs[0].event, "PauserChanged"); + assert.strictEqual(pauserChangedEvent.logs[0].args.newAddress, pauser); } function checkTransferOwnershipEvent( @@ -150,98 +141,82 @@ function checkTransferOwnershipEvent( previousOwner, newOwner ) { - assert.equal(transferOwnershipEvent.logs[0].event, "OwnershipTransferred"); - assert.equal( + assert.strictEqual( + transferOwnershipEvent.logs[0].event, + "OwnershipTransferred" + ); + assert.strictEqual( transferOwnershipEvent.logs[0].args.previousOwner, previousOwner ); - assert.equal(transferOwnershipEvent.logs[0].args.newOwner, newOwner); + assert.strictEqual(transferOwnershipEvent.logs[0].args.newOwner, newOwner); } -function checkUpdateMasterMinterEvent( - checkUpdateMasterMinterEvent, - newMasterMinter -) { - assert.equal( - checkUpdateMasterMinterEvent.logs[0].event, - "MasterMinterChanged" - ); - assert.equal( - checkUpdateMasterMinterEvent.logs[0].args.newMasterMinter, +function checkUpdateMasterMinterEvent(updateMasterMinter, newMasterMinter) { + assert.strictEqual(updateMasterMinter.logs[0].event, "MasterMinterChanged"); + assert.strictEqual( + updateMasterMinter.logs[0].args.newMasterMinter, newMasterMinter ); } function checkAdminChangedEvent(adminChangedEvent, previousAdmin, newAdmin) { - assert.equal(adminChangedEvent.logs[0].event, "AdminChanged"); - assert.equal(adminChangedEvent.logs[0].args.previousAdmin, previousAdmin); - assert.equal(adminChangedEvent.logs[0].args.newAdmin, newAdmin); + assert.strictEqual(adminChangedEvent.logs[0].event, "AdminChanged"); + assert.strictEqual( + adminChangedEvent.logs[0].args.previousAdmin, + previousAdmin + ); + assert.strictEqual(adminChangedEvent.logs[0].args.newAdmin, newAdmin); } function checkUpgradeEvent(upgradeEvent, implementation) { - assert.equal(upgradeEvent.logs[0].event, "Upgraded"); - assert.equal(upgradeEvent.logs[0].args.implementation, implementation); -} - -function checkTransferProxyOwnershipEvent( - transferProxyOwnershipEvent, - previousOwner, - newOwner -) { - assert.equal( - transferProxyOwnershipEvent.logs[0].event, - "ProxyOwnershipTransferred" - ); - assert.equal( - transferProxyOwnershipEvent.logs[0].args.previousOwner, - previousOwner - ); - assert.equal(transferProxyOwnershipEvent.logs[0].args.newOwner, newOwner); + assert.strictEqual(upgradeEvent.logs[0].event, "Upgraded"); + assert.strictEqual(upgradeEvent.logs[0].args.implementation, implementation); } function checkPauseEvent(pause) { - assert.equal(pause.logs[0].event, "Pause"); + assert.strictEqual(pause.logs[0].event, "Pause"); } function checkUnpauseEvent(unpause) { - assert.equal(unpause.logs[0].event, "Unpause"); + assert.strictEqual(unpause.logs[0].event, "Unpause"); } function checkMintEvent(minting, to, amount, minter) { // Mint Event - assert.equal(minting.logs[0].event, "Mint"); - assert.equal(minting.logs[0].args.minter, minter); - assert.equal(minting.logs[0].args.to, to); - assert.equal(minting.logs[0].args.amount, amount); + assert.strictEqual(minting.logs[0].event, "Mint"); + assert.strictEqual(minting.logs[0].args.minter, minter); + assert.strictEqual(minting.logs[0].args.to, to); + assert.isTrue(minting.logs[0].args.amount.eq(new BN(amount))); // Transfer from 0 Event - assert.equal(minting.logs[1].event, "Transfer"); - assert.equal(minting.logs[1].args.from, 0); - assert.equal(minting.logs[1].args.to, to); - assert.equal(minting.logs[1].args.value, amount); + assert.strictEqual(minting.logs[1].event, "Transfer"); + assert.strictEqual(minting.logs[1].args.from, nullAccount); + assert.strictEqual(minting.logs[1].args.to, to); + assert.isTrue(minting.logs[1].args.value.eq(new BN(amount))); } function checkBurnEvents(burning, amount, burner) { // Burn Event - assert.equal(burning.logs[0].event, "Burn"); - assert.equal(burning.logs[0].args.burner, burner); - assert.equal(burning.logs[0].args.amount, amount); + assert.strictEqual(burning.logs[0].event, "Burn"); + assert.strictEqual(burning.logs[0].args.burner, burner); + assert.isTrue(burning.logs[0].args.amount.eq(new BN(amount))); // Transfer to 0 Event - assert.equal(burning.logs[1].event, "Transfer"); - assert.equal(burning.logs[1].args.from, burner); - assert.equal(burning.logs[1].args.to, 0); - assert.equal(burning.logs[1].args.value, amount); + assert.strictEqual(burning.logs[1].event, "Transfer"); + assert.strictEqual(burning.logs[1].args.from, burner); + assert.strictEqual(burning.logs[1].args.to, nullAccount); + assert.isTrue(burning.logs[1].args.value.eq(new BN(amount))); } // Creates a state object, with default values replaced by // customVars where appropriate. function buildExpectedState(token, customVars) { // set each variable's default value - var expectedState = { - name: name, - symbol: symbol, - currency: currency, + const expectedState = { + name, + symbol, + currency, decimals: new BN(decimals), masterMinter: masterMinterAccount, pauser: pauserAccount, @@ -356,11 +331,11 @@ function buildExpectedState(token, customVars) { }; // for each item in customVars, set the item in expectedState - var i; + let i; for (i = 0; i < customVars.length; ++i) { if (_.has(expectedState, customVars[i].variable)) { if ( - expectedState[customVars[i].variable] == customVars[i].expectedValue + expectedState[customVars[i].variable] === customVars[i].expectedValue ) { throw new Error( "variable " + @@ -387,7 +362,7 @@ function buildExpectedState(token, customVars) { // BN-aware deep comparison function checkState(actual, expected, prefix) { for (const k in actual) { - if (actual.hasOwnProperty(k)) { + if (Object.prototype.hasOwnProperty.call(actual, k)) { const path = prefix ? prefix + "." + k : k; const actualV = actual[k]; const expectedV = expected[k]; @@ -398,7 +373,7 @@ function checkState(actual, expected, prefix) { if (BN.isBN(actualV)) { assert.isTrue(actualV.eq(expectedV), msg); } else { - assert.equal(actualV, expectedV, msg); + assert.strictEqual(actualV, expectedV, msg); } } } @@ -411,24 +386,24 @@ function checkState(actual, expected, prefix) { // to reference nested variables, name variable using dot syntax, e.g. 'allowance.arbitraryAccount.minterAccount' async function checkVariables(_tokens, _customVars) { // Iterate over array of tokens. - var numTokens = _tokens.length; - assert.equal(numTokens, _customVars.length); - var n; + const numTokens = _tokens.length; + assert.strictEqual(numTokens, _customVars.length); + let n; for (n = 0; n < numTokens; n++) { - var token = _tokens[n]; - var customVars = _customVars[n]; - let expectedState = buildExpectedState(token, customVars); + const token = _tokens[n]; + const customVars = _customVars[n]; + const expectedState = buildExpectedState(token, customVars); if (debugLogging) { console.log( util.inspect(expectedState, { showHidden: false, depth: null }) ); } - let actualState = await getActualState(token); + const actualState = await getActualState(token); checkState(actualState, expectedState); // Check that sum of individual balances equals totalSupply - var accounts = [ + const accounts = [ arbitraryAccount, masterMinterAccount, minterAccount, @@ -437,13 +412,12 @@ async function checkVariables(_tokens, _customVars) { tokenOwnerAccount, upgraderAccount, ]; - var balanceSum = bigZero; - var x; - for (x = 0; x < accounts.length; x++) { - balanceSum = balanceSum.add(await token.balanceOf(accounts[x])); + let balanceSum = bigZero; + for (let i = 0; i < accounts.length; i++) { + balanceSum = balanceSum.add(await token.balanceOf(accounts[i])); } - var totalSupply = await token.totalSupply(); - assert(balanceSum.eq(totalSupply)); + const totalSupply = await token.totalSupply(); + assert.isTrue(balanceSum.eq(totalSupply)); } } @@ -546,232 +520,234 @@ async function getActualState(token) { await token.minterAllowance(tokenOwnerAccount), await token.minterAllowance(upgraderAccount), await token.paused(), - ]).spread(function ( - name, - symbol, - currency, - decimals, - masterMinter, - pauser, - blacklister, - tokenOwner, - proxiedTokenAddress, - upgrader, - initializedV1, - balancesA, - balancesMM, - balancesM, - balancesP, - balancesB, - balancesRAC, - balancesU, - allowanceAtoMM, - allowanceAtoM, - allowanceAtoP, - allowanceAtoB, - allowanceAtoRAC, - allowanceAtoA, - allowanceAtoU, - allowanceMMtoA, - allowanceMMtoM, - allowanceMMtoP, - allowanceMMtoB, - allowanceMMtoRAC, - allowanceMMtoMM, - allowanceMMtoU, - allowanceMtoA, - allowanceMtoMM, - allowanceMtoP, - allowanceMtoB, - allowanceMtoRAC, - allowanceMtoM, - allowanceMtoU, - allowancePtoA, - allowancePtoMM, - allowancePtoM, - allowancePtoB, - allowancePtoRAC, - allowancePtoP, - allowancePtoU, - allowanceBtoA, - allowanceBtoMM, - allowanceBtoM, - allowanceBtoP, - allowanceBtoRAC, - allowanceBtoB, - allowanceBtoU, - allowanceRACtoA, - allowanceRACtoMM, - allowanceRACtoM, - allowanceRACtoP, - allowanceRACtoB, - allowanceRACtoRAC, - allowanceRACtoU, - allowanceUtoA, - allowanceUtoMM, - allowanceUtoM, - allowanceUtoP, - allowanceUtoB, - allowanceUtoRAC, - allowanceUtoU, - totalSupply, - isAccountBlacklistedA, - isAccountBlacklistedMM, - isAccountBlacklistedM, - isAccountBlacklistedP, - isAccountBlacklistedB, - isAccountBlacklistedRAC, - isAccountBlacklistedU, - isAccountMinterA, - isAccountMinterMM, - isAccountMinterM, - isAccountMinterP, - isAccountMinterB, - isAccountMinterRAC, - isAccountMinterU, - minterAllowanceA, - minterAllowanceMM, - minterAllowanceM, - minterAllowanceP, - minterAllowanceB, - minterAllowanceRAC, - minterAllowanceU, - paused - ) { - var actualState = { - name: name, - symbol: symbol, - currency: currency, - decimals: decimals, - masterMinter: hexToAddress(masterMinter), - pauser: hexToAddress(pauser), - blacklister: hexToAddress(blacklister), - tokenOwner: hexToAddress(tokenOwner), - proxiedTokenAddress: hexToAddress(proxiedTokenAddress), - upgrader: hexToAddress(upgrader), - initializedV1: initializedV1, - balances: { - arbitraryAccount: balancesA, - masterMinterAccount: balancesMM, - minterAccount: balancesM, - pauserAccount: balancesP, - blacklisterAccount: balancesB, - tokenOwnerAccount: balancesRAC, - upgraderAccount: balancesU, - }, - allowance: { - arbitraryAccount: { - masterMinterAccount: allowanceAtoMM, - minterAccount: allowanceAtoM, - pauserAccount: allowanceAtoP, - blacklisterAccount: allowanceAtoB, - tokenOwnerAccount: allowanceAtoRAC, - arbitraryAccount: allowanceAtoA, - upgraderAccount: allowanceAtoU, + ]).spread( + ( + name, + symbol, + currency, + decimals, + masterMinter, + pauser, + blacklister, + tokenOwner, + proxiedTokenAddress, + upgrader, + initializedV1, + balancesA, + balancesMM, + balancesM, + balancesP, + balancesB, + balancesRAC, + balancesU, + allowanceAtoMM, + allowanceAtoM, + allowanceAtoP, + allowanceAtoB, + allowanceAtoRAC, + allowanceAtoA, + allowanceAtoU, + allowanceMMtoA, + allowanceMMtoM, + allowanceMMtoP, + allowanceMMtoB, + allowanceMMtoRAC, + allowanceMMtoMM, + allowanceMMtoU, + allowanceMtoA, + allowanceMtoMM, + allowanceMtoP, + allowanceMtoB, + allowanceMtoRAC, + allowanceMtoM, + allowanceMtoU, + allowancePtoA, + allowancePtoMM, + allowancePtoM, + allowancePtoB, + allowancePtoRAC, + allowancePtoP, + allowancePtoU, + allowanceBtoA, + allowanceBtoMM, + allowanceBtoM, + allowanceBtoP, + allowanceBtoRAC, + allowanceBtoB, + allowanceBtoU, + allowanceRACtoA, + allowanceRACtoMM, + allowanceRACtoM, + allowanceRACtoP, + allowanceRACtoB, + allowanceRACtoRAC, + allowanceRACtoU, + allowanceUtoA, + allowanceUtoMM, + allowanceUtoM, + allowanceUtoP, + allowanceUtoB, + allowanceUtoRAC, + allowanceUtoU, + totalSupply, + isAccountBlacklistedA, + isAccountBlacklistedMM, + isAccountBlacklistedM, + isAccountBlacklistedP, + isAccountBlacklistedB, + isAccountBlacklistedRAC, + isAccountBlacklistedU, + isAccountMinterA, + isAccountMinterMM, + isAccountMinterM, + isAccountMinterP, + isAccountMinterB, + isAccountMinterRAC, + isAccountMinterU, + minterAllowanceA, + minterAllowanceMM, + minterAllowanceM, + minterAllowanceP, + minterAllowanceB, + minterAllowanceRAC, + minterAllowanceU, + paused + ) => { + const actualState = { + name, + symbol, + currency, + decimals, + masterMinter: hexToAddress(masterMinter), + pauser: hexToAddress(pauser), + blacklister: hexToAddress(blacklister), + tokenOwner: hexToAddress(tokenOwner), + proxiedTokenAddress: hexToAddress(proxiedTokenAddress), + upgrader: hexToAddress(upgrader), + initializedV1, + balances: { + arbitraryAccount: balancesA, + masterMinterAccount: balancesMM, + minterAccount: balancesM, + pauserAccount: balancesP, + blacklisterAccount: balancesB, + tokenOwnerAccount: balancesRAC, + upgraderAccount: balancesU, }, - masterMinterAccount: { - arbitraryAccount: allowanceMMtoA, - minterAccount: allowanceMMtoM, - pauserAccount: allowanceMMtoP, - blacklisterAccount: allowanceMMtoB, - tokenOwnerAccount: allowanceMMtoRAC, - masterMinterAccount: allowanceMMtoMM, - upgraderAccount: allowanceMMtoU, + allowance: { + arbitraryAccount: { + masterMinterAccount: allowanceAtoMM, + minterAccount: allowanceAtoM, + pauserAccount: allowanceAtoP, + blacklisterAccount: allowanceAtoB, + tokenOwnerAccount: allowanceAtoRAC, + arbitraryAccount: allowanceAtoA, + upgraderAccount: allowanceAtoU, + }, + masterMinterAccount: { + arbitraryAccount: allowanceMMtoA, + minterAccount: allowanceMMtoM, + pauserAccount: allowanceMMtoP, + blacklisterAccount: allowanceMMtoB, + tokenOwnerAccount: allowanceMMtoRAC, + masterMinterAccount: allowanceMMtoMM, + upgraderAccount: allowanceMMtoU, + }, + minterAccount: { + arbitraryAccount: allowanceMtoA, + masterMinterAccount: allowanceMtoMM, + pauserAccount: allowanceMtoP, + blacklisterAccount: allowanceMtoB, + tokenOwnerAccount: allowanceMtoRAC, + minterAccount: allowanceMtoM, + upgraderAccount: allowanceMtoU, + }, + pauserAccount: { + arbitraryAccount: allowancePtoA, + masterMinterAccount: allowancePtoMM, + minterAccount: allowancePtoM, + blacklisterAccount: allowancePtoB, + tokenOwnerAccount: allowancePtoRAC, + pauserAccount: allowancePtoP, + upgraderAccount: allowancePtoU, + }, + blacklisterAccount: { + arbitraryAccount: allowanceBtoA, + masterMinterAccount: allowanceBtoMM, + minterAccount: allowanceBtoM, + pauserAccount: allowanceBtoP, + tokenOwnerAccount: allowanceBtoRAC, + blacklisterAccount: allowanceBtoB, + upgraderAccount: allowanceBtoU, + }, + tokenOwnerAccount: { + arbitraryAccount: allowanceRACtoA, + masterMinterAccount: allowanceRACtoMM, + minterAccount: allowanceRACtoM, + pauserAccount: allowanceRACtoP, + blacklisterAccount: allowanceRACtoB, + tokenOwnerAccount: allowanceRACtoRAC, + upgraderAccount: allowanceRACtoU, + }, + upgraderAccount: { + arbitraryAccount: allowanceUtoA, + masterMinterAccount: allowanceUtoMM, + minterAccount: allowanceUtoM, + pauserAccount: allowanceUtoP, + blacklisterAccount: allowanceUtoB, + tokenOwnerAccount: allowanceUtoRAC, + upgraderAccount: allowanceUtoU, + }, }, - minterAccount: { - arbitraryAccount: allowanceMtoA, - masterMinterAccount: allowanceMtoMM, - pauserAccount: allowanceMtoP, - blacklisterAccount: allowanceMtoB, - tokenOwnerAccount: allowanceMtoRAC, - minterAccount: allowanceMtoM, - upgraderAccount: allowanceMtoU, + totalSupply, + isAccountBlacklisted: { + arbitraryAccount: isAccountBlacklistedA, + masterMinterAccount: isAccountBlacklistedMM, + minterAccount: isAccountBlacklistedM, + pauserAccount: isAccountBlacklistedP, + blacklisterAccount: isAccountBlacklistedB, + tokenOwnerAccount: isAccountBlacklistedRAC, + upgraderAccount: isAccountBlacklistedU, }, - pauserAccount: { - arbitraryAccount: allowancePtoA, - masterMinterAccount: allowancePtoMM, - minterAccount: allowancePtoM, - blacklisterAccount: allowancePtoB, - tokenOwnerAccount: allowancePtoRAC, - pauserAccount: allowancePtoP, - upgraderAccount: allowancePtoU, + isAccountMinter: { + arbitraryAccount: isAccountMinterA, + masterMinterAccount: isAccountMinterMM, + minterAccount: isAccountMinterM, + pauserAccount: isAccountMinterP, + blacklisterAccount: isAccountMinterB, + tokenOwnerAccount: isAccountMinterRAC, + upgraderAccount: isAccountMinterU, }, - blacklisterAccount: { - arbitraryAccount: allowanceBtoA, - masterMinterAccount: allowanceBtoMM, - minterAccount: allowanceBtoM, - pauserAccount: allowanceBtoP, - tokenOwnerAccount: allowanceBtoRAC, - blacklisterAccount: allowanceBtoB, - upgraderAccount: allowanceBtoU, + minterAllowance: { + arbitraryAccount: minterAllowanceA, + masterMinterAccount: minterAllowanceMM, + minterAccount: minterAllowanceM, + pauserAccount: minterAllowanceP, + blacklisterAccount: minterAllowanceB, + tokenOwnerAccount: minterAllowanceRAC, + upgraderAccount: minterAllowanceU, }, - tokenOwnerAccount: { - arbitraryAccount: allowanceRACtoA, - masterMinterAccount: allowanceRACtoMM, - minterAccount: allowanceRACtoM, - pauserAccount: allowanceRACtoP, - blacklisterAccount: allowanceRACtoB, - tokenOwnerAccount: allowanceRACtoRAC, - upgraderAccount: allowanceRACtoU, - }, - upgraderAccount: { - arbitraryAccount: allowanceUtoA, - masterMinterAccount: allowanceUtoMM, - minterAccount: allowanceUtoM, - pauserAccount: allowanceUtoP, - blacklisterAccount: allowanceUtoB, - tokenOwnerAccount: allowanceUtoRAC, - upgraderAccount: allowanceUtoU, - }, - }, - totalSupply: totalSupply, - isAccountBlacklisted: { - arbitraryAccount: isAccountBlacklistedA, - masterMinterAccount: isAccountBlacklistedMM, - minterAccount: isAccountBlacklistedM, - pauserAccount: isAccountBlacklistedP, - blacklisterAccount: isAccountBlacklistedB, - tokenOwnerAccount: isAccountBlacklistedRAC, - upgraderAccount: isAccountBlacklistedU, - }, - isAccountMinter: { - arbitraryAccount: isAccountMinterA, - masterMinterAccount: isAccountMinterMM, - minterAccount: isAccountMinterM, - pauserAccount: isAccountMinterP, - blacklisterAccount: isAccountMinterB, - tokenOwnerAccount: isAccountMinterRAC, - upgraderAccount: isAccountMinterU, - }, - minterAllowance: { - arbitraryAccount: minterAllowanceA, - masterMinterAccount: minterAllowanceMM, - minterAccount: minterAllowanceM, - pauserAccount: minterAllowanceP, - blacklisterAccount: minterAllowanceB, - tokenOwnerAccount: minterAllowanceRAC, - upgraderAccount: minterAllowanceU, - }, - paused: paused, - }; - return actualState; - }); + paused, + }; + return actualState; + } + ); } async function setMinter(token, minter, amount) { - let update = await token.configureMinter(minter, amount, { + const update = await token.configureMinter(minter, amount, { from: masterMinterAccount, }); - assert.equal(update.logs[0].event, "MinterConfigured"); - assert.equal(update.logs[0].args.minter, minter); - assert.equal(update.logs[0].args.minterAllowedAmount, amount); - let minterAllowance = await token.minterAllowance(minter); + assert.strictEqual(update.logs[0].event, "MinterConfigured"); + assert.strictEqual(update.logs[0].args.minter, minter); + assert.isTrue(update.logs[0].args.minterAllowedAmount.eq(new BN(amount))); + const minterAllowance = await token.minterAllowance(minter); - assert.equal(minterAllowance, amount); + assert.isTrue(minterAllowance.eq(new BN(amount))); } async function burn(token, amount, burner) { - let burning = await token.burn(amount, { from: burner }); + const burning = await token.burn(amount, { from: burner }); checkBurnEvents(burning, amount, burner); } @@ -781,129 +757,50 @@ async function mint(token, to, amount, minter) { } async function mintRaw(token, to, amount, minter) { - let initialTotalSupply = await token.totalSupply(); - let initialMinterAllowance = await token.minterAllowance(minter); - let minting = await token.mint(to, amount, { from: minter }); + const initialTotalSupply = await token.totalSupply(); + const initialMinterAllowance = await token.minterAllowance(minter); + const minting = await token.mint(to, amount, { from: minter }); checkMintEvent(minting, to, amount, minter); - // TODO revisit this - /* let totalSupply = await token.totalSupply(); - totalSupply.should.be.bignumber.equal(initialTotalSupply); - let minterAllowance = await token.minterAllowance(minter); - assert.isTrue(new BN(initialMinterAllowance).sub(new BN(amount)).eq(new BN(minterAllowance)));*/ + const totalSupply = await token.totalSupply(); + assert.isTrue(totalSupply.eq(initialTotalSupply.add(new BN(amount)))); + const minterAllowance = await token.minterAllowance(minter); + assert.isTrue(initialMinterAllowance.sub(new BN(amount)).eq(minterAllowance)); } async function blacklist(token, account) { - let blacklist = await token.blacklist(account, { from: blacklisterAccount }); + const blacklist = await token.blacklist(account, { + from: blacklisterAccount, + }); checkBlacklistEvent(blacklist, account); } async function unBlacklist(token, account) { - let unblacklist = await token.unBlacklist(account, { + const unblacklist = await token.unBlacklist(account, { from: blacklisterAccount, }); checkUnblacklistEvent(unblacklist, account); } -async function setLongDecimalFeesTransferWithFees( - token, - ownerAccount, - arbitraryAccount -) { - fee = 123589; - feeBase = 1000000; - await token.updateTransferFee(fee, feeBase); - let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BN(allowed).eq(new BN(0))); - await mint(token, ownerAccount, 1900); - let initialBalanceFeeAccount = await token.balanceOf(feeAccount); - - await token.approve(arbitraryAccount, 1500); - allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BN(allowed).eq(new BN(1500))); - - let transfer = await token.transfer(arbitraryAccount, 1000, { - from: ownerAccount, - }); - - let feeAmount = calculateFeeAmount(1000); - checkTransferEvents( - transfer, - ownerAccount, - arbitraryAccount, - 1000, - feeAmount - ); - - let balance0 = await token.balanceOf(ownerAccount); - assert.equal(balance0, 1900 - 1000 - feeAmount); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.equal(balance3, 1000); - let balanceFeeAccount = await token.balanceOf(feeAccount); - assert.isTrue( - new BN(balanceFeeAccount) - .sub(new BN(initialBalanceFeeAccount)) - .eq(new BN(feeAmount)) - ); -} - async function sampleTransfer(token, ownerAccount, arbitraryAccount, minter) { let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BN(allowed).eq(new BN(0))); + assert.isTrue(new BN(allowed).eqn(0)); await mint(token, ownerAccount, 1900, minter); await token.approve(arbitraryAccount, 1500); allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BN(allowed).eq(new BN(1500))); + assert.isTrue(new BN(allowed).eqn(1500)); - let transfer = await token.transfer(arbitraryAccount, 1000, { + const transfer = await token.transfer(arbitraryAccount, 1000, { from: ownerAccount, }); checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 1000); - let balance0 = await token.balanceOf(ownerAccount); - assert.equal(balance0, 1900 - 1000); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.equal(balance3, 1000); -} - -async function transferFromWithFees( - token, - ownerAccount, - arbitraryAccount, - minter -) { - fee = 1235; - feeBase = 10000; - await token.updateTransferFee(fee, feeBase); - let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BN(allowed).eq(new BN(0))); - await mint(token, ownerAccount, 900, minter); - let initialBalanceFeeAccount = await token.balanceOf(feeAccount); - await token.approve(arbitraryAccount, 634); - allowed = await token.allowance.call(ownerAccount, arbitraryAccount); - assert.isTrue(new BN(allowed).eq(new BN(634))); - - transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { - from: arbitraryAccount, - }); - - let feeAmount = calculateFeeAmount(534); - checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534, feeAmount); - - let balance0 = await token.balanceOf(ownerAccount); - assert.isTrue( - new BN(balance0).eq(new BN(900).sub(new BN(534)).sub(new BN(feeAmount))) - ); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.isTrue(new BN(balance3).eq(new BN(534))); - let balanceFeeAccount = await token.balanceOf(feeAccount); - assert.isTrue( - new BN(balanceFeeAccount) - .sub(new BN(initialBalanceFeeAccount)) - .eq(new BN(feeAmount)) - ); + const balance0 = await token.balanceOf(ownerAccount); + assert.isTrue(balance0.eqn(1900 - 1000)); + const balance3 = await token.balanceOf(arbitraryAccount); + assert.isTrue(balance3.eqn(1000)); } async function sampleTransferFrom( @@ -913,41 +810,46 @@ async function sampleTransferFrom( minter ) { let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this - assert.isTrue(new BN(allowed).eq(new BN(0))); + assert.isTrue(new BN(allowed).eqn(0)); await mint(token, ownerAccount, 900, minter); // TODO maybe this await token.approve(arbitraryAccount, 634); // TODO not this allowed = await token.allowance.call(ownerAccount, arbitraryAccount); // TODO not this - assert.isTrue(new BN(allowed).eq(new BN(634))); + assert.isTrue(new BN(allowed).eqn(634)); - let transfer = await token.transferFrom(ownerAccount, arbitraryAccount, 534, { - from: arbitraryAccount, - }); // TODO not this + const transfer = await token.transferFrom( + ownerAccount, + arbitraryAccount, + 534, + { + from: arbitraryAccount, + } + ); // TODO not this checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534); - let balance0 = await token.balanceOf(ownerAccount); - assert.isTrue(new BN(balance0).eq(new BN(900).sub(new BN(534)))); - let balance3 = await token.balanceOf(arbitraryAccount); - assert.isTrue(new BN(balance3).eq(new BN(534))); + const balance0 = await token.balanceOf(ownerAccount); + assert.isTrue(new BN(balance0).eqn(900 - 534)); + const balance3 = await token.balanceOf(arbitraryAccount); + assert.isTrue(new BN(balance3).eqn(534)); } async function approve(token, to, amount, from) { - await token.approve(to, amount, { from: from }); + await token.approve(to, amount, { from }); } async function redeem(token, account, amount) { - let redeemResult = await token.redeem(amount, { from: account }); - assert.equal(redeemResult.logs[0].event, "Redeem"); - assert.equal(redeemResult.logs[0].args.redeemedAddress, account); - assert.equal(redeemResult.logs[0].args.amount, amount); + const redeemResult = await token.redeem(amount, { from: account }); + assert.strictEqual(redeemResult.logs[0].event, "Redeem"); + assert.strictEqual(redeemResult.logs[0].args.redeemedAddress, account); + assert.isTrue(redeemResult.logs[0].args.amount.eq(new BN(amount))); } function validateTransferEvent(transferEvent, from, to, value) { - let eventResult = transferEvent.logs[0]; - assert.equal(eventResult.event, "Transfer"); - assert.equal(eventResult.args.from, from); - assert.equal(eventResult.args.to, to); - assert.equal(eventResult.args.value, value); + const eventResult = transferEvent.logs[0]; + assert.strictEqual(eventResult.event, "Transfer"); + assert.strictEqual(eventResult.args.from, from); + assert.strictEqual(eventResult.args.to, to); + assert.isTrue(eventResult.args.value.eq(new BN(value))); } async function initializeTokenWithProxy(rawToken) { @@ -982,10 +884,10 @@ async function customInitializeTokenWithProxy( _owner ); proxiedToken.proxiedTokenAddress = rawToken.address; - assert.equal(proxiedToken.address, proxy.address); + assert.strictEqual(proxiedToken.address, proxy.address); assert.notEqual(proxiedToken.address, rawToken.address); - var tokenConfig = { - proxy: proxy, + const tokenConfig = { + proxy, token: proxiedToken, }; return tokenConfig; @@ -997,20 +899,19 @@ async function upgradeTo(proxy, upgradedToken, proxyUpgraderAccount) { } await proxy.upgradeTo(upgradedToken.address, { from: proxyUpgraderAccount }); const proxiedToken = await FiatToken.at(proxy.address); - assert.equal(proxiedToken.address, proxy.address); - return (tokenConfig = { - proxy: proxy, + assert.strictEqual(proxiedToken.address, proxy.address); + return { + proxy, token: proxiedToken, - }); + }; } async function expectRevert(contractPromise) { try { await contractPromise; } catch (error) { - const revert = error.message.search("revert") >= 0; - assert( - revert, + assert.isTrue( + error.message.includes("revert"), "Expected error of type revert, got '" + error + "' instead" ); return; @@ -1023,27 +924,26 @@ async function expectJump(contractPromise) { await contractPromise; assert.fail("Expected invalid opcode not received"); } catch (error) { - const invalidOpcodeReceived = error.message.search("invalid opcode") >= 0; - assert( - invalidOpcodeReceived, + assert.isTrue( + error.message.includes("invalid opcode"), `Expected "invalid opcode", got ${error} instead` ); } } -function encodeCall(name, arguments, values) { - const methodId = abi.methodID(name, arguments).toString("hex"); - const params = abi.rawEncode(arguments, values).toString("hex"); +function encodeCall(name, args, values) { + const methodId = abi.methodID(name, args).toString("hex"); + const params = abi.rawEncode(args, values).toString("hex"); return "0x" + methodId + params; } async function getAdmin(proxy) { - let adm = await web3.eth.getStorageAt(proxy.address, adminSlot); + const adm = await web3.eth.getStorageAt(proxy.address, adminSlot); return web3.utils.toChecksumAddress("0x" + adm.slice(2).padStart(40, "0")); } async function getImplementation(proxy) { - let impl = await web3.eth.getStorageAt(proxy.address, implSlot); + const impl = await web3.eth.getStorageAt(proxy.address, implSlot); return web3.utils.toChecksumAddress("0x" + impl.slice(2).padStart(40, "0")); } @@ -1053,13 +953,13 @@ async function getInitializedV1(token) { if (slot8Data === "0x0") { // validate proxy not yet initialized - for (var i = 0; i <= 20; i++) { - assert.equal("0x0", await web3.eth.getStorageAt(token.address, i)); + for (let i = 0; i <= 20; i++) { + assert.strictEqual("0x0", await web3.eth.getStorageAt(token.address, i)); } initialized = "0x00"; } else { const slot8DataPadded = slot8Data.slice(2).padStart(42, "0"); - if (slot8DataPadded.length != 42) { + if (slot8DataPadded.length !== 42) { assert.fail("slot8Data unexpected size"); } const masterMinterAddress = await token.masterMinter.call(); @@ -1073,75 +973,71 @@ async function getInitializedV1(token) { } module.exports = { - FiatToken: FiatToken, - FiatTokenProxy: FiatTokenProxy, - UpgradedFiatToken: UpgradedFiatToken, - UpgradedFiatTokenNewFields: UpgradedFiatTokenNewFields, - UpgradedFiatTokenNewFieldsNewLogic: UpgradedFiatTokenNewFieldsNewLogic, - name: name, - symbol: symbol, - currency: currency, - decimals: decimals, - bigZero: bigZero, - bigHundred: bigHundred, - debugLogging: debugLogging, - calculateFeeAmount: calculateFeeAmount, - checkTransferEventsWithFee: checkTransferEventsWithFee, - checkTransferEvents: checkTransferEvents, - checkMinterConfiguredEvent: checkMinterConfiguredEvent, - checkMintEvent: checkMintEvent, - checkApprovalEvent: checkApprovalEvent, - checkBurnEvents: checkBurnEvents, - checkBurnEvent: checkBurnEvent, - checkMinterRemovedEvent: checkMinterRemovedEvent, - checkBlacklistEvent: checkBlacklistEvent, - checkUnblacklistEvent: checkUnblacklistEvent, - checkPauseEvent: checkPauseEvent, - checkUnpauseEvent: checkUnpauseEvent, - checkPauserChangedEvent: checkPauserChangedEvent, - checkTransferOwnershipEvent: checkTransferOwnershipEvent, - checkUpdateMasterMinterEvent: checkUpdateMasterMinterEvent, - checkBlacklisterChangedEvent: checkBlacklisterChangedEvent, - checkUpgradeEvent: checkUpgradeEvent, - checkAdminChangedEvent: checkAdminChangedEvent, + FiatToken, + FiatTokenProxy, + UpgradedFiatToken, + UpgradedFiatTokenNewFields, + UpgradedFiatTokenNewFieldsNewLogic, + name, + symbol, + currency, + decimals, + bigZero, + bigHundred, + debugLogging, + calculateFeeAmount, + checkTransferEvents, + checkMinterConfiguredEvent, + checkMintEvent, + checkApprovalEvent, + checkBurnEvents, + checkBurnEvent, + checkMinterRemovedEvent, + checkBlacklistEvent, + checkUnblacklistEvent, + checkPauseEvent, + checkUnpauseEvent, + checkPauserChangedEvent, + checkTransferOwnershipEvent, + checkUpdateMasterMinterEvent, + checkBlacklisterChangedEvent, + checkUpgradeEvent, + checkAdminChangedEvent, buildExpectedState, - checkVariables: checkVariables, - setMinter: setMinter, - mint: mint, - burn: burn, - mintRaw: mintRaw, - blacklist: blacklist, - unBlacklist: unBlacklist, - setLongDecimalFeesTransferWithFees: setLongDecimalFeesTransferWithFees, - sampleTransfer: sampleTransfer, - transferFromWithFees: transferFromWithFees, - sampleTransferFrom: sampleTransferFrom, - approve: approve, - redeem: redeem, - validateTransferEvent: validateTransferEvent, - initializeTokenWithProxy: initializeTokenWithProxy, - customInitializeTokenWithProxy: customInitializeTokenWithProxy, - upgradeTo: upgradeTo, - expectRevert: expectRevert, - expectJump: expectJump, - encodeCall: encodeCall, - getInitializedV1: getInitializedV1, - nullAccount: nullAccount, - deployerAccount: deployerAccount, - arbitraryAccount: arbitraryAccount, - tokenOwnerAccount: tokenOwnerAccount, - arbitraryAccount2: arbitraryAccount2, - masterMinterAccount: masterMinterAccount, - minterAccount: minterAccount, - pauserAccount: pauserAccount, - blacklisterAccount: blacklisterAccount, - proxyOwnerAccount: proxyOwnerAccount, - proxyOwnerAccountPrivateKey: proxyOwnerAccountPrivateKey, - upgraderAccount: upgraderAccount, - getAdmin: getAdmin, + checkVariables, + setMinter, + mint, + burn, + mintRaw, + blacklist, + unBlacklist, + sampleTransfer, + sampleTransferFrom, + approve, + redeem, + validateTransferEvent, + initializeTokenWithProxy, + customInitializeTokenWithProxy, + upgradeTo, + expectRevert, + expectJump, + encodeCall, + getInitializedV1, + nullAccount, + deployerAccount, + arbitraryAccount, + tokenOwnerAccount, + arbitraryAccount2, + masterMinterAccount, + minterAccount, + pauserAccount, + blacklisterAccount, + proxyOwnerAccount, + proxyOwnerAccountPrivateKey, + upgraderAccount, + getAdmin, arbitraryAccountPrivateKey, upgraderAccountPrivateKey, - proxyOwnerAccountPrivateKey, tokenOwnerPrivateKey, blacklisterAccountPrivateKey, arbitraryAccount2PrivateKey, diff --git a/truffle-config.js b/truffle-config.js index fb5ffb185..8fffd6947 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,10 +1,10 @@ // INFURA Setup - see validate/README.validate.md for more info -var HDWalletProvider = require("@truffle/hdwallet-provider"); -var mnemonic = "talisman"; -var fs = require("fs"); -var access_token = "none"; +const HDWalletProvider = require("@truffle/hdwallet-provider"); +const mnemonic = "talisman"; +const fs = require("fs"); +let infuraKey = "none"; try { - access_token = fs.readFileSync("./validate/apikey.infura", "utf8"); + infuraKey = fs.readFileSync("./validate/apikey.infura", "utf8"); } catch (err) { console.log( "No Infura access token detected. Unit tests will still work. See ./validate/README.validate.md for more details." @@ -31,10 +31,10 @@ module.exports = { }, // INFURA Setup infura_mainnet: { - provider: function () { + provider() { return new HDWalletProvider( mnemonic, - "https://mainnet.infura.io/" + access_token + "https://mainnet.infura.io/v3/" + infuraKey ); }, network_id: 1, @@ -46,7 +46,7 @@ module.exports = { * the reporter is set to 'Spec' by commenting/uncommenting the lines below. */ reporter: "Spec", - //reporter: './verification/verification_reporter.js', + // reporter: './verification/verification_reporter.js', }, plugins: ["solidity-coverage"], }; diff --git a/validate/contractDiff.js b/validate/contractDiff.js index 20a4b3b4c..2eac2cc2e 100644 --- a/validate/contractDiff.js +++ b/validate/contractDiff.js @@ -1,4 +1,4 @@ -var fs = require("fs"); +const fs = require("fs"); const chalk = require("chalk"); const diff = require("diff"); @@ -6,14 +6,10 @@ function readFileSync(filename) { return fs.readFileSync(filename, "utf8"); } -function writeFileSync(filename, text) { - fs.writeFileSync(filename, text); -} - function getFilenamesFromCode(code) { // find all lines with prefix "// File:" - var filenames = code.match(/\/\/\s*File:\s*\S+\n/gi); - for (var i = 0; i < filenames.length; i++) { + const filenames = code.match(/\/\/\s*File:\s*\S+\n/gi); + for (let i = 0; i < filenames.length; i++) { // remove prefix "// File: ". filenames[i] = filenames[i].replace(/\/\/\s*File:\s*/i, ""); filenames[i] = filenames[i].replace(/\s+/i, ""); @@ -36,8 +32,8 @@ function getFilenamesFromCode(code) { } function createCodeFile(filenames) { - var code = ""; - for (var i = 0; i < filenames.length; i++) { + let code = ""; + for (let i = 0; i < filenames.length; i++) { try { console.log("Reading file " + filenames[i]); } catch (err) { @@ -51,8 +47,8 @@ function createCodeFile(filenames) { function diffText(code1, code2) { const diffOutput = diff.diffTrimmedLines(code1, code2); - for (var i = 0; i < diffOutput.length; i++) { - var diffLine = diffOutput[i]; + for (let i = 0; i < diffOutput.length; i++) { + const diffLine = diffOutput[i]; if (diffLine.added) { process.stdout.write(chalk.green(`+ ${diffLine.value}`)); } else if (diffLine.removed) { @@ -62,15 +58,15 @@ function diffText(code1, code2) { } function removeExtraComments(code) { - var modified = code.replace(/\/\/\s*File:\s*\S+\n/gi, ""); + const modified = code.replace(/\/\/\s*File:\s*\S+\n/gi, ""); return modified; } function validate(filename) { - var code = readFileSync(filename); + let code = readFileSync(filename); - var filenames = getFilenamesFromCode(code); - var expectedCode = createCodeFile(filenames); + const filenames = getFilenamesFromCode(code); + const expectedCode = createCodeFile(filenames); code = removeExtraComments(code); diffText(code, expectedCode); @@ -86,13 +82,13 @@ function main() { return; } - var fail = 0; - var total = process.argv.length - 2; - var goodFiles = ""; - var badFiles = ""; + let fail = 0; + const total = process.argv.length - 2; + let goodFiles = ""; + let badFiles = ""; - for (var i = 2; i < process.argv.length; i++) { - var filename = process.argv[i]; + for (let i = 2; i < process.argv.length; i++) { + const filename = process.argv[i]; console.log("Checking: " + filename); try { validate(filename); diff --git a/validate/validate.js b/validate/validate.js index 7e3df25d5..ddbd48ead 100644 --- a/validate/validate.js +++ b/validate/validate.js @@ -1,32 +1,32 @@ // Address of the FiatToken Implementation -var fiatTokenAddress = "0x0882477e7895bdc5cea7cb1552ed914ab157fe56"; +const fiatTokenAddress = "0x0882477e7895bdc5cea7cb1552ed914ab157fe56"; // Address of the FiatToken Proxy -var fiatTokenProxyAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; +const fiatTokenProxyAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; // role addresses -var MASTER_MINTER = 0x1500a138523709ce66c8b9abe678abc1b6c5a7b7; -var PAUSER = 0xe8e13e1b6d363c270ef3a5ab466ebad8326311bb; -var UPGRADER = 0x69005ff70072c57547dc44ea975d85ea60e5b196; -var OWNER = 0xa61e278899a8553d93d14eb19ba2791e05069e87; -var BLACKLISTER = 0x063d13783a0a2ce65b1ca00d9e897e6c8b1ec86b; +const MASTER_MINTER = 0x1500a138523709ce66c8b9abe678abc1b6c5a7b7; +const PAUSER = 0xe8e13e1b6d363c270ef3a5ab466ebad8326311bb; +const UPGRADER = 0x69005ff70072c57547dc44ea975d85ea60e5b196; +const OWNER = 0xa61e278899a8553d93d14eb19ba2791e05069e87; +const BLACKLISTER = 0x063d13783a0a2ce65b1ca00d9e897e6c8b1ec86b; // Addresses of known minters - currently fake minters // If replacing with real minters need to modify printMinterInfo -var minters = ["0x0000", "0x0001"]; +const minters = ["0x0000", "0x0001"]; -var NAME = "USD//C"; -var SYMBOL = "USDC"; -var CURRENCY = "USD"; -var DECIMALS = 6; -var TOTALSUPPLY = 0; -var PAUSED = false; +const NAME = "USD//C"; +const SYMBOL = "USDC"; +const CURRENCY = "USD"; +const DECIMALS = 6; +const TOTALSUPPLY = 0; +const PAUSED = false; // Name of current implementation artifact as stored in ./build/contracts/*.json -var FiatToken = artifacts.require("FiatTokenV1"); +const FiatToken = artifacts.require("FiatTokenV1"); // Name of current proxy artifact as stored in ./build/contracts/*.json -var FiatTokenProxy = artifacts.require("FiatTokenProxy"); +artifacts.require("FiatTokenProxy"); // // @@ -34,9 +34,9 @@ var FiatTokenProxy = artifacts.require("FiatTokenProxy"); // // -var adminSlot = +const adminSlot = "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; -var implSlot = +const implSlot = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; const asyncGetStorageAt = (address, slot) => @@ -53,16 +53,16 @@ async function printMinterInfo(proxiedToken) { for (const minter of minters) { console.log("\nMinter: " + minter); - let isMinter = await proxiedToken.isMinter.call(minter); + const isMinter = await proxiedToken.isMinter.call(minter); print("isMinter", isMinter, false); - let minterAllowance = await proxiedToken.minterAllowance.call(minter); + const minterAllowance = await proxiedToken.minterAllowance.call(minter); print("mintAllowance", minterAllowance, 0); - let balanceOf = await proxiedToken.balanceOf.call(minter); + const balanceOf = await proxiedToken.balanceOf.call(minter); print("balanceOf", balanceOf, 0); - let isBlacklisted = await proxiedToken.isBlacklisted.call(minter); + const isBlacklisted = await proxiedToken.isBlacklisted.call(minter); print("isBlacklisted", isBlacklisted, false); } } @@ -73,7 +73,7 @@ function getAddressFromSlotData(slotData) { } function compare(actual, expected) { - if (actual == expected) { + if (actual === expected) { return "(ok)"; } else { return "(expect " + expected + ")"; @@ -86,63 +86,68 @@ function print(name, actual, expected) { async function Validate() { console.log("Connecting to contract..."); - var token = await FiatToken.at(fiatTokenAddress); + await FiatToken.at(fiatTokenAddress); console.log("Token found."); - var proxiedToken = await FiatToken.at(fiatTokenProxyAddress); + const proxiedToken = await FiatToken.at(fiatTokenProxyAddress); console.log("Proxied token created."); // initialized needs to retrieved manually - var slot8Data = await asyncGetStorageAt(proxiedToken.address, 8); - var initialized = slot8Data.substring(24, 26); + let slot8Data = await asyncGetStorageAt(proxiedToken.address, 8); + let initialized = slot8Data.substring(24, 26); print("init proxy", initialized, "01"); - var slot8Data = await asyncGetStorageAt(fiatTokenAddress, 8); - var initialized = slot8Data.substring(24, 26); + slot8Data = await asyncGetStorageAt(fiatTokenAddress, 8); + initialized = slot8Data.substring(24, 26); print("init logic", initialized, "01"); - var name = await proxiedToken.name.call(); + const name = await proxiedToken.name.call(); print("name ", name, NAME); - var symbol = await proxiedToken.symbol.call(); + const symbol = await proxiedToken.symbol.call(); print("symbol ", symbol, SYMBOL); - var decimals = await proxiedToken.decimals.call(); + const decimals = await proxiedToken.decimals.call(); print("decimals", decimals, DECIMALS); - var currency = await proxiedToken.currency.call(); + const currency = await proxiedToken.currency.call(); print("currency", currency, CURRENCY); - var totalSupply = await proxiedToken.totalSupply.call(); + const totalSupply = await proxiedToken.totalSupply.call(); print("totalSupply", totalSupply, TOTALSUPPLY); - var paused = await proxiedToken.paused.call(); + const paused = await proxiedToken.paused.call(); print("paused ", paused, PAUSED); // implementation - var implementation = await asyncGetStorageAt(proxiedToken.address, implSlot); + const implementation = await asyncGetStorageAt( + proxiedToken.address, + implSlot + ); print("implement", getAddressFromSlotData(implementation), fiatTokenAddress); - var admin = await asyncGetStorageAt(proxiedToken.address, adminSlot); + const admin = await asyncGetStorageAt(proxiedToken.address, adminSlot); print("upgrader", getAddressFromSlotData(admin), UPGRADER); - var owner = await proxiedToken.owner.call(); + const owner = await proxiedToken.owner.call(); print("owner ", owner, OWNER); - var masterMinter = await proxiedToken.masterMinter.call(); + const masterMinter = await proxiedToken.masterMinter.call(); print("masterMinter", masterMinter, MASTER_MINTER); - var pauser = await proxiedToken.pauser.call(); + const pauser = await proxiedToken.pauser.call(); print("pauser ", pauser, PAUSER); - var blacklister = await proxiedToken.blacklister.call(); + const blacklister = await proxiedToken.blacklister.call(); print("blacklister", blacklister, BLACKLISTER); await printMinterInfo(proxiedToken); } -module.exports = async function (callback) { +module.exports = async (callback) => { try { await Validate(); - } catch (e) {} + } catch (e) { + // continue + } callback(); }; diff --git a/verification/GoogleSheets/index.js b/verification/GoogleSheets/index.js index c6c8ad3dd..c92a0411c 100644 --- a/verification/GoogleSheets/index.js +++ b/verification/GoogleSheets/index.js @@ -1,34 +1,33 @@ -const fs = require('fs'); -const readline = require('readline'); -const {google} = require('googleapis'); - -const SCOPES = ['https://www.googleapis.com/auth/spreadsheets.readonly']; -const CREDENTIALS_PATH = __dirname + '/credentials.json'; -const TOKEN_PATH = __dirname + '/token.json'; - -var indent = ' '; +const fs = require("fs"); +const readline = require("readline"); +const { google } = require("googleapis"); +const path = require("path"); +const SCOPES = ["https://www.googleapis.com/auth/spreadsheets.readonly"]; +const CREDENTIALS_PATH = path.join(__dirname, "credentials.json"); +const TOKEN_PATH = path.join(__dirname, "/token.json"); /** -* Authorize access to GoogleSheets API and load spreadsheet data. -*/ + * Authorize access to GoogleSheets API and load spreadsheet data. + */ function load() { return new Promise((resolve, reject) => { // Load client secrets from a local file. fs.readFile(CREDENTIALS_PATH, async (err, content) => { if (err) { - reject('Error loading credentials file:' + err); + reject(new Error("Error loading credentials file:" + err)); } // If no error loading client secrets, authorize and run getTests(). - var res = await authorize(JSON.parse(content), getTests).catch((err) => { - reject(err); - }); + const res = await authorize(JSON.parse(content), getTests).catch( + (err) => { + reject(err); + } + ); resolve(res); }); }); } - /** * Create an OAuth2 client with the given credentials, and then execute the * given callback function. @@ -36,23 +35,28 @@ function load() { * @param {function} callback The callback to call with the authorized client. */ function authorize(credentials, callback) { - const {client_secret, client_id, redirect_uris} = credentials.installed; + // eslint-disable-next-line camelcase + const { client_secret, client_id, redirect_uris } = credentials.installed; const oAuth2Client = new google.auth.OAuth2( - client_id, client_secret, redirect_uris[0]); + client_id, + client_secret, + redirect_uris[0] + ); return new Promise((resolve, reject) => { // Check if we have previously stored an OAuth token. fs.readFile(TOKEN_PATH, async (err, token) => { // If we have not previously stored an OAuth token, get a new one and // call getTests(). + let res; if (err) { - var res = await getNewToken(oAuth2Client, callback).catch((err) => { + res = await getNewToken(oAuth2Client, callback).catch((err) => { reject(err); }); } else { // If we have previously stored an OAuth token, call getTests(). oAuth2Client.setCredentials(JSON.parse(token)); - var res = await callback(oAuth2Client).catch((err) => { + res = await callback(oAuth2Client).catch((err) => { reject(err); }); } @@ -61,7 +65,6 @@ function authorize(credentials, callback) { }); } - /** * Get and store new token after prompting for user authorization, and then * execute the given callback with the authorized OAuth2 client. @@ -70,17 +73,17 @@ function authorize(credentials, callback) { */ function getNewToken(oAuth2Client, callback) { const authUrl = oAuth2Client.generateAuthUrl({ - access_type: 'offline', + access_type: "offline", scope: SCOPES, }); - console.log('Authorize this app by visiting this url:', authUrl); + console.log("Authorize this app by visiting this url:", authUrl); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); return new Promise((resolve, reject) => { - rl.question('Enter the code from that page here: ', (code) => { + rl.question("Enter the code from that page here: ", (code) => { rl.close(); oAuth2Client.getToken(code, async (err, token) => { if (err) { @@ -92,9 +95,9 @@ function getNewToken(oAuth2Client, callback) { if (err) { console.error(err); } - console.log('Token stored to', TOKEN_PATH); + console.log("Token stored to", TOKEN_PATH); }); - var res = await callback(oAuth2Client).catch((err) => { + const res = await callback(oAuth2Client).catch((err) => { reject(err); }); resolve(res); @@ -103,101 +106,102 @@ function getNewToken(oAuth2Client, callback) { }); } - /** -* Gets the tests to verify from the GoogleSheets spreadsheet. -* @see https://docs.google.com/spreadsheets/d/1zP1_q8XbLH8YrWMJ0Od80PKleklUnvBAX96wypJaVTU/edit?usp=sharing -* @param {google.auth.OAuth2} auth The authenticated Google OAuth client. -*/ + * Gets the tests to verify from the GoogleSheets spreadsheet. + * @see https://docs.google.com/spreadsheets/d/1zP1_q8XbLH8YrWMJ0Od80PKleklUnvBAX96wypJaVTU/edit?usp=sharing + * @param {google.auth.OAuth2} auth The authenticated Google OAuth client. + */ function getTests(auth) { - const sheets = google.sheets({version: 'v4', auth}); + const sheets = google.sheets({ version: "v4", auth }); return new Promise((resolve, reject) => { - sheets.spreadsheets.get({ - spreadsheetId: '1zP1_q8XbLH8YrWMJ0Od80PKleklUnvBAX96wypJaVTU', - includeGridData: true, - }, (err, res) => { - if (err) { - reject('The GoogleSheets API returned an error: ' + err); - } - var tests = {}; - let tabs = res.data.sheets; - if (tabs.length) { - tabs.map((tab) => { - let tab_name = tab.properties.title; - if (tab_name == 'UnitTestCompleteness') { - load_UnitTestCompleteness(tests, tab); - return; - } - let rows = tab.data[0].rowData; - let top_row = rows.shift().values; - let col = getCol(top_row); - if (typeof col == 'undefined') { - console.log('\nNo code column found in tab "' - + tab_name + '". Skipping.\n'); - return; - } - rows.map((rowData) => { - let row = rowData.values; - if (row) { - processRow(row, tab_name, tests, col); + sheets.spreadsheets.get( + { + spreadsheetId: "1zP1_q8XbLH8YrWMJ0Od80PKleklUnvBAX96wypJaVTU", + includeGridData: true, + }, + (err, res) => { + if (err) { + reject(new Error("The GoogleSheets API returned an error: " + err)); + } + const tests = {}; + const tabs = res.data.sheets; + if (tabs.length) { + tabs.map((tab) => { + const tabName = tab.properties.title; + if (tabName === "UnitTestCompleteness") { + loadUnitTestCompleteness(tests, tab); + return; } + const rows = tab.data[0].rowData; + const topRow = rows.shift().values; + const col = getCol(topRow); + if (typeof col === "undefined") { + console.log( + '\nNo code column found in tab "' + tabName + '". Skipping.\n' + ); + return; + } + rows.map((rowData) => { + const row = rowData.values; + if (row) { + processRow(row, tabName, tests, col); + } + }); }); - }); - } else { - reject('No GoogleSheets data found.'); + } else { + reject(new Error("No GoogleSheets data found.")); + } + resolve(tests); } - resolve(tests); - }); + ); }); } - /** -* Helper function that gets the test code and test description from a row in a -* given speadsheet tab and adds them to the tests object returned by getTests(). -* @param {Array} row The row of the spreadsheet to processs. -* @param {String} tab_name The name of the spreadsheet tab currently loading. -* @param {Object} tests Contains all the spreadsheet test data to verify. -* @param {Int} col The index of the test code column of the spreadsheet tab. -*/ -function processRow(row, tab_name, tests, col) { - let code_cell = row[col]; - let desc_cell = row[col+1]; - if (code_cell && desc_cell) { - let test_code = code_cell.formattedValue; - let test_desc = desc_cell.formattedValue; - if (test_code && test_desc) { - let pending = test_code.match(/ -p/); - if (pending) { - test_code = test_code.replace(pending[0], ''); - } - categorize_test( - tests, - test_code.trim(), - test_desc.trim(), - tab_name.trim(), - pending - ); + * Helper function that gets the test code and test description from a row in a + * given speadsheet tab and adds them to the tests object returned by getTests(). + * @param {Array} row The row of the spreadsheet to processs. + * @param {String} tabName The name of the spreadsheet tab currently loading. + * @param {Object} tests Contains all the spreadsheet test data to verify. + * @param {Int} col The index of the test code column of the spreadsheet tab. + */ +function processRow(row, tabName, tests, col) { + const codeCell = row[col]; + const descCell = row[col + 1]; + if (codeCell && descCell) { + let testCode = codeCell.formattedValue; + const testDesc = descCell.formattedValue; + if (testCode && testDesc) { + const pending = testCode.match(/ -p/); + if (pending) { + testCode = testCode.replace(pending[0], ""); + } + categorizeTest( + tests, + testCode.trim(), + testDesc.trim(), + tabName.trim(), + pending + ); } } } - /** -* Helper function that gets all test codes included in tab UnitTestCompleteness. -* @param {Object} tab The UnitTestCompleteness tab object. -* @param {Object} tests Contains all the spreadsheet test data to verify. -*/ -function load_UnitTestCompleteness(tests, tab) { + * Helper function that gets all test codes included in tab UnitTestCompleteness. + * @param {Object} tab The UnitTestCompleteness tab object. + * @param {Object} tests Contains all the spreadsheet test data to verify. + */ +function loadUnitTestCompleteness(tests, tab) { tests.completeness = {}; - let rows = tab.data[0].rowData; + const rows = tab.data[0].rowData; rows.map((row) => { row = row.values; row.map((cell) => { cell = cell.formattedValue; if (cell) { - let codes = cell.match(/([a-z]{2,})([0-9]+)/g); + const codes = cell.match(/([a-z]{2,})([0-9]+)/g); if (codes != null) { codes.map((code) => { if (!tests.completeness[code]) { @@ -210,40 +214,38 @@ function load_UnitTestCompleteness(tests, tab) { }); } - /** -* Helper function that adds a test code and description to the tests object -* returned by getTests(). -* @param {Object} tests Contains all the spreadsheet test data to verify. -* @param {String} code The test code to add to tests. -* @param {String} desc The test description to add to tests. -* @param {String} tab The name of the spreadsheet tab currently loading. -* @param {Array?} pending [' -p'] if test is pending, 'undefined' otherwise. -*/ -function categorize_test(tests, code, desc, tab, pending) { + * Helper function that adds a test code and description to the tests object + * returned by getTests(). + * @param {Object} tests Contains all the spreadsheet test data to verify. + * @param {String} code The test code to add to tests. + * @param {String} desc The test description to add to tests. + * @param {String} tab The name of the spreadsheet tab currently loading. + * @param {Array?} pending [' -p'] if test is pending, 'undefined' otherwise. + */ +function categorizeTest(tests, code, desc, tab, pending) { if (pending) { - tab = 'pending'; + tab = "pending"; } if (!tests[tab]) { tests[tab] = {}; } - let tab_tests = tests[tab]; - tab_tests[code] = desc.replace(code, ''); - tests[tab] = tab_tests; + const tabTests = tests[tab]; + tabTests[code] = desc.replace(code, ""); + tests[tab] = tabTests; } - /** -* Helper function that finds the 'Code' or 'code' column in a spreadsheet tab. -* @param {Array} top_row An array containing all the cells along the top row of -* the spreadsheet tab. Should contain column headers. -*/ -function getCol(top_row) { - var col; - for (let i = 0; i < top_row.length; i++) { - let cell = top_row[i]; - let label = cell.formattedValue; - if(label == 'code' || label == 'Code') { + * Helper function that finds the 'Code' or 'code' column in a spreadsheet tab. + * @param {Array} topRow An array containing all the cells along the top row of + * the spreadsheet tab. Should contain column headers. + */ +function getCol(topRow) { + let col; + for (let i = 0; i < topRow.length; i++) { + const cell = topRow[i]; + const label = cell.formattedValue; + if (label === "code" || label === "Code") { col = i; } } @@ -251,5 +253,5 @@ function getCol(top_row) { } module.exports = { - load: load, -} + load, +}; diff --git a/verification/verification_reporter.js b/verification/verification_reporter.js index 099d5f49a..489fc430e 100644 --- a/verification/verification_reporter.js +++ b/verification/verification_reporter.js @@ -1,48 +1,47 @@ const mocha = require("mocha"); -const spec_reporter = mocha.reporters.Spec; -const base_reporter = mocha.reporters.Base; -const color = base_reporter.color; -const inherits = mocha.utils.inherits; +const specReporter = mocha.reporters.Spec; +const baseReporter = mocha.reporters.Base; +const { color } = baseReporter; +const { inherits } = mocha.utils; const sheets = require("./GoogleSheets/index"); const _ = require("lodash"); const jsdiff = require("diff"); -const colors = require("colors"); // Global variables for text output. -const green_x = color("bright pass", base_reporter.symbols.err); -const red_x = color("bright fail", base_reporter.symbols.err); -const green_ok = color("bright pass", base_reporter.symbols.ok); -const red_ok = color("bright fail", base_reporter.symbols.ok); +const greenX = color("bright pass", baseReporter.symbols.err); +const redX = color("bright fail", baseReporter.symbols.err); +const greenOk = color("bright pass", baseReporter.symbols.ok); +// const redOk = color("bright fail", baseReporter.symbols.ok); const indent = " "; -module.exports = verification_reporter; +module.exports = verificationReporter; // Extends default Mocha reporter, 'Spec'. -inherits(verification_reporter, spec_reporter); +inherits(verificationReporter, specReporter); -function verification_reporter(runner) { - spec_reporter.call(this, runner); +function verificationReporter(runner) { + specReporter.call(this, runner); - var spreadsheet; - var spreadsheet_clone; - var errs = []; - var pending = {}; + let spreadsheet; + let spreadsheetClone; + const errs = []; + const pending = {}; // Runs before tests are executed. Loads tests from spreadsheet. - before("load_spreadsheet_tests", async function () { + before("load_spreadsheetTests", async () => { this.timeout(200000); console.log("Loading spreadsheet...\n"); spreadsheet = await sheets.load().catch((err) => { console.log(err); }); - spreadsheet_clone = JSON.parse(JSON.stringify(spreadsheet)); + spreadsheetClone = JSON.parse(JSON.stringify(spreadsheet)); }); // Runs at the beginning of each contract block execution. - runner.on("suite", function (suite) { + runner.on("suite", (suite) => { // If contract block title is marked 'Legacy', // we skip verification. (See README.verification) - var legacy = suite.title.match(/Legacy/gi); + const legacy = suite.title.match(/Legacy/gi); if (legacy) { console.log( indent + 'This test file is marked "Legacy". Skipping verification.' @@ -51,8 +50,8 @@ function verification_reporter(runner) { // We also skip verification on the 'PausableTests' file. // Remove this block and the one indicated below to re-enable. - var pausable_tests = suite.title.match(/PausableTests/gi); - if (pausable_tests) { + const pausableTests = suite.title.match(/PausableTests/gi); + if (pausableTests) { console.log( indent + "Verification tool configured to skip PausableTests file." ); @@ -60,23 +59,23 @@ function verification_reporter(runner) { }); // Runs at the end of every test. - runner.on("test end", function (test) { + runner.on("test end", (test) => { // If contract block title is marked 'Legacy', // we skip verification. (See README.verification) - var legacy = test.parent.title.match(/Legacy/gi); + const legacy = test.parent.title.match(/Legacy/gi); if (legacy) { return; } // We also skip verification on the 'PausableTests' file. // Remove this block and the one indicated above to re-enable. - var pausable_tests = test.parent.title.match(/PausableTests/gi); - if (pausable_tests) { + const pausableTests = test.parent.title.match(/PausableTests/gi); + if (pausableTests) { return; } // Parse test title. - var file = test.parent.title.match(/[a-z]+Tests/gi); + let file = test.parent.title.match(/[a-z]+Tests/gi); if (file) { file = file[0]; } else { @@ -93,7 +92,7 @@ function verification_reporter(runner) { ); return; } - var id = test.title.match(/([a-z]{2,})([0-9]+)/g); + let id = test.title.match(/([a-z]{2,})([0-9]+)/g); if (id) { id = id[0]; } else { @@ -110,7 +109,7 @@ function verification_reporter(runner) { ); return; } - var test_ran = test.title.replace(id, ""); + const testRan = test.title.replace(id, ""); // Check if test is in UnitTestCompleteness tab and "cross-off" if it is. if (!_.isEmpty(spreadsheet.completeness)) { @@ -120,23 +119,23 @@ function verification_reporter(runner) { } // If test is marked pending in spreadsheet, record for later output. - if (spreadsheet.pending && spreadsheet.pending[id] == test_ran) { - console.log(indent + green_x + color("bright pass", " pending")); - pending[id] = test_ran; + if (spreadsheet.pending && spreadsheet.pending[id] === testRan) { + console.log(indent + greenX + color("bright pass", " pending")); + pending[id] = testRan; } else { // Verify test is in spreadsheet. if (spreadsheet[file]) { - let spreadsheet_test = - spreadsheet[file][id] || spreadsheet_clone[file][id]; - if (spreadsheet_test) { + const spreadsheetTest = + spreadsheet[file][id] || spreadsheetClone[file][id]; + if (spreadsheetTest) { // Verify test descriptions match. - if (spreadsheet_test == test_ran) { - console.log(indent + green_x); + if (spreadsheetTest === testRan) { + console.log(indent + greenX); } else { // If test is in spreadsheet, but descriptions don't match. console.log( indent + - red_x + + redX + color( "fail", " test description inconsistent with spreadsheet for " + @@ -146,10 +145,10 @@ function verification_reporter(runner) { ) ); // Print test description string diff. - let diff = getStringDiff(test_ran, spreadsheet_test); + const diff = getStringDiff(testRan, spreadsheetTest); console.log(indent + diff); errs.push( - red_x + + redX + color( "fail", " Test descriptions do not match for " + id + ", " + file @@ -157,11 +156,11 @@ function verification_reporter(runner) { "\n" + indent + "In spreadsheet: " + - spreadsheet_test + + spreadsheetTest + "\n" + indent + "In test file: " + - test_ran + + testRan + "\n" + indent + "Diff: " + @@ -176,11 +175,11 @@ function verification_reporter(runner) { // If test is not in spreadsheet. console.log( indent + - red_x + + redX + color("fail", " " + id + " missing from spreadsheet tab " + file) ); errs.push( - red_x + + redX + color( "fail", " Test " + id + " missing from " + file + " spreadsheet tab." @@ -191,14 +190,14 @@ function verification_reporter(runner) { // If test file not found in spreadsheet tabs. console.log( indent + - red_x + + redX + color( "fail", " test file " + file + " does not match a spreadsheet tab" ) ); errs.push( - red_x + + redX + color( "fail", " Test file " + @@ -214,7 +213,7 @@ function verification_reporter(runner) { }); // Runs at the end of test suite execution. Prints verification summary. - runner.on("end", function () { + runner.on("end", () => { console.log("\n\nSpreadsheet Verification Summary:\n"); // If there are pending tests included in the test suite... if (!_.isEmpty(pending)) { @@ -232,7 +231,7 @@ function verification_reporter(runner) { if (!_.isEmpty(spreadsheet.completeness)) { console.log( "\n" + - red_x + + redX + color( "bright fail", " UnitTestCompleteness tab includes tests that are not present in test suite:" @@ -242,7 +241,7 @@ function verification_reporter(runner) { ); } else { console.log( - green_ok + + greenOk + color( "bright pass", " Test suite suite contains all tests in UnitTestCompleteness tab." @@ -251,7 +250,7 @@ function verification_reporter(runner) { } delete spreadsheet.completeness; // If all the tests in a tab are present, 'cross-off' tab by deleting. - for (var file in spreadsheet) { + for (const file in spreadsheet) { if (_.isEmpty(spreadsheet[file])) { delete spreadsheet[file]; } @@ -260,7 +259,7 @@ function verification_reporter(runner) { if (_.isEmpty(spreadsheet)) { console.log( "\n" + - green_ok + + greenOk + color("bright pass", " Test suite contains all tests in spreadsheet.") ); } else { @@ -287,7 +286,7 @@ function verification_reporter(runner) { } else { console.log( "\n" + - green_ok + + greenOk + color("bright pass", " Spreadsheet contains all tests in test suite.") ); } @@ -296,12 +295,12 @@ function verification_reporter(runner) { // Helper function that takes in two strings and returns a color coded diff. function getStringDiff(string1, string2) { - var diff = ""; - var diff_list = jsdiff.diffChars(string1, string2); - diff_list.map((part) => { + let diff = ""; + const diffList = jsdiff.diffChars(string1, string2); + diffList.map((part) => { // green for additions, red for deletions, grey for common parts - let color = part.added ? "green" : part.removed ? "red" : "grey"; - diff += part.value[color]; + const col = part.added ? "green" : part.removed ? "red" : "grey"; + diff += part.value[col]; }); return diff; } diff --git a/yarn.lock b/yarn.lock index 7723d4d19..c36726559 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1860,9 +1860,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.47: - version "1.3.432" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.432.tgz#3bf7b191978ff2e8bc3caf811bb52b1e9f9eab25" - integrity sha512-/GdNhXyLP5Yl2322CUX/+Xi8NhdHBqL6lD9VJVKjH6CjoPGakvwZ5CpKgj/oOlbzuWWjOvMjDw1bBuAIRCNTlw== + version "1.3.434" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.434.tgz#a67dcb268e93768e2169399999ccffa4783f048e" + integrity sha512-WjzGrE6appXvMyc2kH9Ide7OxsgTuRzag9sjQ5AcbOnbS9ut7P1HzOeEbJFLhr81IR7n2Hlr6qTTSGTXLIX5Pg== elliptic@6.3.3: version "6.3.3" @@ -2409,14 +2409,6 @@ ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz#4e75042473a64daec0ed9fe84323dd9576aa5dba" integrity sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ== -ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== - dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" - ethereumjs-tx@^1.0.0, ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: version "1.3.7" resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" @@ -2425,6 +2417,14 @@ ethereumjs-tx@^1.0.0, ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@ ethereum-common "^0.0.18" ethereumjs-util "^5.0.0" +ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + ethereumjs-util@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8" @@ -2713,9 +2713,9 @@ fast-text-encoding@^1.0.0: integrity sha512-5rQdinSsycpzvAoHga2EDn+LRX1d5xLFsuNG0Kg61JrAT/tASXcLL0nf/33v+sAxlQcfYmWbTURa1mmAf55jGw== fastq@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.7.0.tgz#fcd79a08c5bd7ec5b55cd3f5c4720db551929801" - integrity sha512-YOadQRnHd5q6PogvAR/x62BGituF2ufiEA6s8aavQANw5YKHERI4AREboX6KotzP8oX2klxYF2wcV/7bn1clfQ== + version "1.8.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" + integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== dependencies: reusify "^1.0.4" @@ -2900,7 +2900,7 @@ ganache-cli@6.9.0: source-map-support "0.5.12" yargs "13.2.4" -ganache-cli@6.9.1: +ganache-cli@^6.9.1: version "6.9.1" resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.9.1.tgz#1e13eee098fb9f19b031a191ec3f62ae926ea8b3" integrity sha512-VPBumkNUZzXDRQwVOby5YyQpd5t1clkr06xMgB28lZdEIn5ht1GMwUskOTFOAxdkQ4J12IWP0gdeacVRGowqbA== @@ -5869,9 +5869,9 @@ truffle@^5.1.24: original-require "1.0.1" tslib@^1.9.0: - version "1.11.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" - integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== + version "1.12.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.12.0.tgz#d1fc9cacd06a1456c62f2902b361573e83d66473" + integrity sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA== tunnel-agent@^0.6.0: version "0.6.0" @@ -6603,9 +6603,9 @@ web3-net@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" -"web3-provider-engine@https://github.com/trufflesuite/provider-engine#web3-one": +"web3-provider-engine@git+https://github.com/trufflesuite/provider-engine.git#web3-one": version "14.0.6" - resolved "https://github.com/trufflesuite/provider-engine#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" + resolved "git+https://github.com/trufflesuite/provider-engine.git#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" dependencies: async "^2.5.0" backoff "^2.5.0" From 626553f7b0c2916f51e07b9246208d35e5012493 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 16:05:46 -0700 Subject: [PATCH 11/22] Cleanup migrations --- build-dev.sh | 2 +- migrations/1_initial_migration.js | 4 +- migrations/2_deploy_usdc.js | 144 ++++++++++++++++-------------- truffle-config.js | 3 +- 4 files changed, 83 insertions(+), 70 deletions(-) diff --git a/build-dev.sh b/build-dev.sh index 7e7019484..6a9956e10 100755 --- a/build-dev.sh +++ b/build-dev.sh @@ -4,7 +4,7 @@ DOCROOT="$( cd "$( dirname "$0" )" && pwd )" docker-compose -f $DOCROOT/docker-compose.yml run --rm truffle compile # run solidity tests -docker-compose -f $DOCROOT/docker-compose.yml run --rm truffle --network localTestNet test +docker-compose -f $DOCROOT/docker-compose.yml run --rm truffle --network local_testnet test #stop containers docker-compose -f $DOCROOT/docker-compose.yml down diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index cf7559375..862062913 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,5 +1,5 @@ const Migrations = artifacts.require("./Migrations.sol"); -module.exports = function (deployer) { - deployer.deploy(Migrations); +module.exports = async (deployer) => { + await deployer.deploy(Migrations); }; diff --git a/migrations/2_deploy_usdc.js b/migrations/2_deploy_usdc.js index c2f32ef17..70b3434c9 100644 --- a/migrations/2_deploy_usdc.js +++ b/migrations/2_deploy_usdc.js @@ -4,73 +4,87 @@ const FiatTokenProxy = artifacts.require("./FiatTokenProxy.sol"); // Any address will do, preferably one we generated const throwawayAddress = "0x64e078a8aa15a41b85890265648e965de686bae6"; -module.exports = function (deployer, network) { - if (network === "mainnet") { - throw new Error("Please update 2_deploy_usdc.js and remove this line."); +module.exports = async (deployer, network) => { + let admin, masterMinter, pauser, blacklister, owner; + + if (network.toLowerCase().includes("mainnet")) { + const { + ADMIN_ADDRESS, + MASTERMINTER_ADDRESS, + PAUSER_ADDRESS, + BLACKLISTER_ADDRESS, + OWNER_ADDDRESS, + } = process.env; + + if ( + !ADMIN_ADDRESS || + !MASTERMINTER_ADDRESS || + !PAUSER_ADDRESS || + !BLACKLISTER_ADDRESS || + !OWNER_ADDDRESS + ) { + throw new Error( + "Env vars ADMIN_ADDRESS, MASTERMINTER_ADDRESS, PAUSER_ADDRESS, " + + "BLACKLISTER_ADDRESS, and OWNER_ADDRESS must be defined for " + + "mainnet deployment" + ); + } + + admin = ADMIN_ADDRESS; + masterMinter = MASTERMINTER_ADDRESS; + pauser = PAUSER_ADDRESS; + blacklister = BLACKLISTER_ADDRESS; + owner = OWNER_ADDDRESS; + } else { + // Do not use these addresses for mainnet - these are the deterministic + // addresses from ganache, so the private keys are well known and match the + // values we use in the tests + admin = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; + masterMinter = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; + pauser = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; + blacklister = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; + owner = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; } - // Change these to the cold storage addresses provided by ops - // these are the deterministic addresses from ganache, so the private keys are well known - // and match the values we use in the tests - const admin = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; - const masterMinter = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; - const pauser = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; - const blacklister = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; - const owner = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; + console.log("Deploying implementation contract..."); + await deployer.deploy(FiatTokenV1); + const fiatTokenV1 = await FiatTokenV1.deployed(); + console.log("Deployed implementation contract at", FiatTokenV1.address); - console.log("deploying impl"); + console.log("Initializing implementation contract with dummy values..."); + await fiatTokenV1.initialize( + "", + "", + "", + 0, + throwawayAddress, + throwawayAddress, + throwawayAddress, + throwawayAddress + ); - // deploy implementation contract - deployer - .deploy(FiatTokenV1) - .then(function () { - return FiatTokenV1.deployed(); - }) - .then(function (fiatTokenV1) { - console.log("initializing impl with dummy values"); - return fiatTokenV1.initialize( - "", - "", - "", - 0, - throwawayAddress, - throwawayAddress, - throwawayAddress, - throwawayAddress - ); - }) - .then(function () { - console.log("deploying proxy"); - return deployer.deploy(FiatTokenProxy, FiatTokenV1.address); - }) - .then(function () { - return FiatTokenProxy.deployed(); - }) - .then(function (fiatTokenProxy) { - console.log("reassigning proxy admin"); - // need to change admin first, or the call to initialize won't work - // since admin can only call methods in the proxy, and not forwarded methods - return fiatTokenProxy.changeAdmin(admin); - }) - .then(function () { - return FiatTokenV1.at(FiatTokenProxy.address); - }) - .then(function (fiatTokenProxyAsFiatTokenV1) { - console.log("initializing proxy"); - // Pretend that the proxy address is a FiatTokenV1 - // this is fine because the proxy will forward all the calls to the FiatTokenV1 impl - return fiatTokenProxyAsFiatTokenV1.initialize( - "USD//C", - "USDC", - "USD", - 6, - masterMinter, - pauser, - blacklister, - owner - ); - }) - .then(function () { - console.log("deployed proxy at ", FiatTokenProxy.address); - }); + console.log("Deploying proxy contract..."); + await deployer.deploy(FiatTokenProxy, FiatTokenV1.address); + const fiatTokenProxy = await FiatTokenProxy.deployed(); + console.log("Deployed proxy contract at", FiatTokenProxy.address); + + console.log("Reassigning proxy contract admin..."); + // need to change admin first, or the call to initialize won't work + // since admin can only call methods in the proxy, and not forwarded methods + await fiatTokenProxy.changeAdmin(admin); + + console.log("Initializing proxy contract..."); + const fiatTokenV1Proxied = await FiatTokenV1.at(FiatTokenProxy.address); + // Pretend that the proxy address is a FiatTokenV1 - this is fine because the + // proxy will forward all the calls to the FiatTokenV1 impl + await fiatTokenV1Proxied.initialize( + "USD//C", + "USDC", + "USD", + 6, + masterMinter, + pauser, + blacklister, + owner + ); }; diff --git a/truffle-config.js b/truffle-config.js index 8fffd6947..c18f0870a 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -23,8 +23,7 @@ module.exports = { port: 8545, network_id: "*", // Match any network id }, - // network to refer to ganache by name so it works with truffle/ganache in separate docker containers - localTestNet: { + local_testnet: { host: "ganache", port: 8545, network_id: "*", // Match any network id From f0480e882a8ad71f8f472b506e629c259acaf8ed Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 17:15:48 -0700 Subject: [PATCH 12/22] Set up TypeScript --- .eslintignore | 3 +- .eslintrc.js | 50 +- .gitattributes | 2 + .gitignore | 2 +- .../generated/AdminUpgradeabilityProxy.d.ts | 216 +++ @types/generated/Blacklistable.d.ts | 269 ++++ @types/generated/Erc20.d.ts | 217 +++ @types/generated/Erc20Basic.d.ts | 94 ++ @types/generated/FiatTokenProxy.d.ts | 215 +++ @types/generated/FiatTokenV1.d.ts | 1092 +++++++++++++++ @types/generated/FiatTokenV2.d.ts | 1092 +++++++++++++++ .../FiatTokenV2NewFieldsNewLogicTest.d.ts | 1209 +++++++++++++++++ .../generated/FiatTokenV2NewFieldsTest.d.ts | 1173 ++++++++++++++++ @types/generated/Migrations.d.ts | 112 ++ @types/generated/Ownable.d.ts | 93 ++ @types/generated/Pausable.d.ts | 209 +++ @types/generated/Proxy.d.ts | 27 + @types/generated/UpgradeabilityProxy.d.ts | 39 + @types/generated/index.d.ts | 74 + @types/generated/types.d.ts | 117 ++ README.md | 11 +- package.json | 20 +- truffle-config.js | 8 +- tsconfig.json | 23 + yarn.lock | 549 +++++++- 25 files changed, 6869 insertions(+), 47 deletions(-) create mode 100644 .gitattributes create mode 100644 @types/generated/AdminUpgradeabilityProxy.d.ts create mode 100644 @types/generated/Blacklistable.d.ts create mode 100644 @types/generated/Erc20.d.ts create mode 100644 @types/generated/Erc20Basic.d.ts create mode 100644 @types/generated/FiatTokenProxy.d.ts create mode 100644 @types/generated/FiatTokenV1.d.ts create mode 100644 @types/generated/FiatTokenV2.d.ts create mode 100644 @types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts create mode 100644 @types/generated/FiatTokenV2NewFieldsTest.d.ts create mode 100644 @types/generated/Migrations.d.ts create mode 100644 @types/generated/Ownable.d.ts create mode 100644 @types/generated/Pausable.d.ts create mode 100644 @types/generated/Proxy.d.ts create mode 100644 @types/generated/UpgradeabilityProxy.d.ts create mode 100644 @types/generated/index.d.ts create mode 100644 @types/generated/types.d.ts create mode 100644 tsconfig.json diff --git a/.eslintignore b/.eslintignore index 2f9bd06a4..60388cc6b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ .DS_Store node_modules/ -coverage/ \ No newline at end of file +coverage/ +@types/generated/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index d3dd8a777..ab196933c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - extends: ["eslint:recommended", "standard", "plugin:prettier/recommended"], + root: true, env: { es2020: true, node: true, @@ -8,12 +8,48 @@ module.exports = { globals: { artifacts: "readonly", contract: "readonly", + assert: "readonly", web3: true, }, - rules: { - camelcase: [ - "error", - { properties: "never", allow: ["run_tests", "test_suite_name"] }, - ], - }, + overrides: [ + { + files: ["**/*.ts"], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", + ], + rules: { + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_" }, + ], + "@typescript-eslint/no-use-before-define": [ + "error", + { functions: false, classes: false }, + ], + "prettier/prettier": "warn", + }, + }, + { + files: ["**/*.js"], + extends: [ + "eslint:recommended", + "standard", + "plugin:prettier/recommended", + ], + rules: { + camelcase: [ + "error", + { properties: "never", allow: ["run_tests", "test_suite_name"] }, + ], + "no-unused-vars": ["error", { argsIgnorePattern: "^_" }], + "prettier/prettier": "warn", + "no-var": "error", + }, + }, + ], }; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..6e1727aa2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +@types/generated/**/* linguist-generated=true + diff --git a/.gitignore b/.gitignore index d4012c411..f27d6f2ed 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ coverage/ coverage.json package-lock.json .idea/ -#local codebuild results artifacts/ contracts/.DS_Store token.json @@ -15,3 +14,4 @@ validate/apikey.infura ganache-blockchain-log.txt .coverage_artifacts .coverage_contracts +yarn-error.log \ No newline at end of file diff --git a/@types/generated/AdminUpgradeabilityProxy.d.ts b/@types/generated/AdminUpgradeabilityProxy.d.ts new file mode 100644 index 000000000..1d7056a1f --- /dev/null +++ b/@types/generated/AdminUpgradeabilityProxy.d.ts @@ -0,0 +1,216 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface AdminUpgradeabilityProxyContract + extends Truffle.Contract { + "new"( + _implementation: string, + meta?: Truffle.TransactionDetails + ): Promise; +} + +export interface AdminChanged { + name: "AdminChanged"; + args: { + previousAdmin: string; + newAdmin: string; + 0: string; + 1: string; + }; +} + +export interface Upgraded { + name: "Upgraded"; + args: { + implementation: string; + 0: string; + }; +} + +type AllEvents = AdminChanged | Upgraded; + +export interface AdminUpgradeabilityProxyInstance + extends Truffle.ContractInstance { + /** + * @returns The address of the proxy admin. + */ + admin(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * @returns The address of the implementation. + */ + implementation(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Changes the admin of the proxy. Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + changeAdmin: { + (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Upgrade the backing implementation of the proxy. Only the admin can call this function. + * @param newImplementation Address of the new implementation. + */ + upgradeTo: { + ( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract. + * @param data Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. + * @param newImplementation Address of the new implementation. + */ + upgradeToAndCall: { + ( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + /** + * @returns The address of the proxy admin. + */ + admin(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * @returns The address of the implementation. + */ + implementation(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Changes the admin of the proxy. Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + changeAdmin: { + (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Upgrade the backing implementation of the proxy. Only the admin can call this function. + * @param newImplementation Address of the new implementation. + */ + upgradeTo: { + ( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract. + * @param data Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. + * @param newImplementation Address of the new implementation. + */ + upgradeToAndCall: { + ( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Blacklistable.d.ts b/@types/generated/Blacklistable.d.ts new file mode 100644 index 000000000..50039c309 --- /dev/null +++ b/@types/generated/Blacklistable.d.ts @@ -0,0 +1,269 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface BlacklistableContract + extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Blacklisted { + name: "Blacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface BlacklisterChanged { + name: "BlacklisterChanged"; + args: { + newBlacklister: string; + 0: string; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +type AllEvents = + | Blacklisted + | UnBlacklisted + | BlacklisterChanged + | OwnershipTransferred; + +export interface BlacklistableInstance extends Truffle.ContractInstance { + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Erc20.d.ts b/@types/generated/Erc20.d.ts new file mode 100644 index 000000000..edfd4f522 --- /dev/null +++ b/@types/generated/Erc20.d.ts @@ -0,0 +1,217 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface Erc20Contract extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = Approval | Transfer; + +export interface Erc20Instance extends Truffle.ContractInstance { + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; + + transfer: { + ( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + transferFrom: { + ( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + approve: { + ( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; + + transfer: { + ( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + transferFrom: { + ( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + from: string, + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + approve: { + ( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Erc20Basic.d.ts b/@types/generated/Erc20Basic.d.ts new file mode 100644 index 000000000..9380a36f9 --- /dev/null +++ b/@types/generated/Erc20Basic.d.ts @@ -0,0 +1,94 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface Erc20BasicContract + extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = Transfer; + +export interface Erc20BasicInstance extends Truffle.ContractInstance { + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; + + transfer: { + ( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; + + transfer: { + ( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + to: string, + value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/FiatTokenProxy.d.ts b/@types/generated/FiatTokenProxy.d.ts new file mode 100644 index 000000000..81184bb45 --- /dev/null +++ b/@types/generated/FiatTokenProxy.d.ts @@ -0,0 +1,215 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface FiatTokenProxyContract + extends Truffle.Contract { + "new"( + _implementation: string, + meta?: Truffle.TransactionDetails + ): Promise; +} + +export interface AdminChanged { + name: "AdminChanged"; + args: { + previousAdmin: string; + newAdmin: string; + 0: string; + 1: string; + }; +} + +export interface Upgraded { + name: "Upgraded"; + args: { + implementation: string; + 0: string; + }; +} + +type AllEvents = AdminChanged | Upgraded; + +export interface FiatTokenProxyInstance extends Truffle.ContractInstance { + /** + * Upgrade the backing implementation of the proxy. Only the admin can call this function. + * @param newImplementation Address of the new implementation. + */ + upgradeTo: { + ( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract. + * @param data Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. + * @param newImplementation Address of the new implementation. + */ + upgradeToAndCall: { + ( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * @returns The address of the implementation. + */ + implementation(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Changes the admin of the proxy. Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + changeAdmin: { + (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * @returns The address of the proxy admin. + */ + admin(txDetails?: Truffle.TransactionDetails): Promise; + + methods: { + /** + * Upgrade the backing implementation of the proxy. Only the admin can call this function. + * @param newImplementation Address of the new implementation. + */ + upgradeTo: { + ( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract. + * @param data Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. + * @param newImplementation Address of the new implementation. + */ + upgradeToAndCall: { + ( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newImplementation: string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * @returns The address of the implementation. + */ + implementation(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Changes the admin of the proxy. Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + changeAdmin: { + (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * @returns The address of the proxy admin. + */ + admin(txDetails?: Truffle.TransactionDetails): Promise; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/FiatTokenV1.d.ts b/@types/generated/FiatTokenV1.d.ts new file mode 100644 index 000000000..793d411a2 --- /dev/null +++ b/@types/generated/FiatTokenV1.d.ts @@ -0,0 +1,1092 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface FiatTokenV1Contract + extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Mint { + name: "Mint"; + args: { + minter: string; + to: string; + amount: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Burn { + name: "Burn"; + args: { + burner: string; + amount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterConfigured { + name: "MinterConfigured"; + args: { + minter: string; + minterAllowedAmount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterRemoved { + name: "MinterRemoved"; + args: { + oldMinter: string; + 0: string; + }; +} + +export interface MasterMinterChanged { + name: "MasterMinterChanged"; + args: { + newMasterMinter: string; + 0: string; + }; +} + +export interface Blacklisted { + name: "Blacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface BlacklisterChanged { + name: "BlacklisterChanged"; + args: { + newBlacklister: string; + 0: string; + }; +} + +export interface Pause { + name: "Pause"; + args: {}; +} + +export interface Unpause { + name: "Unpause"; + args: {}; +} + +export interface PauserChanged { + name: "PauserChanged"; + args: { + newAddress: string; + 0: string; + }; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = + | Mint + | Burn + | MinterConfigured + | MinterRemoved + | MasterMinterChanged + | Blacklisted + | UnBlacklisted + | BlacklisterChanged + | Pause + | Unpause + | PauserChanged + | Approval + | OwnershipTransferred + | Transfer; + +export interface FiatTokenV1Instance extends Truffle.ContractInstance { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + initialize: { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + initialize: { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/FiatTokenV2.d.ts b/@types/generated/FiatTokenV2.d.ts new file mode 100644 index 000000000..80bdc433a --- /dev/null +++ b/@types/generated/FiatTokenV2.d.ts @@ -0,0 +1,1092 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface FiatTokenV2Contract + extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Mint { + name: "Mint"; + args: { + minter: string; + to: string; + amount: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Burn { + name: "Burn"; + args: { + burner: string; + amount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterConfigured { + name: "MinterConfigured"; + args: { + minter: string; + minterAllowedAmount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterRemoved { + name: "MinterRemoved"; + args: { + oldMinter: string; + 0: string; + }; +} + +export interface MasterMinterChanged { + name: "MasterMinterChanged"; + args: { + newMasterMinter: string; + 0: string; + }; +} + +export interface Blacklisted { + name: "Blacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface BlacklisterChanged { + name: "BlacklisterChanged"; + args: { + newBlacklister: string; + 0: string; + }; +} + +export interface Pause { + name: "Pause"; + args: {}; +} + +export interface Unpause { + name: "Unpause"; + args: {}; +} + +export interface PauserChanged { + name: "PauserChanged"; + args: { + newAddress: string; + 0: string; + }; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = + | Mint + | Burn + | MinterConfigured + | MinterRemoved + | MasterMinterChanged + | Blacklisted + | UnBlacklisted + | BlacklisterChanged + | Pause + | Unpause + | PauserChanged + | Approval + | OwnershipTransferred + | Transfer; + +export interface FiatTokenV2Instance extends Truffle.ContractInstance { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + initialize: { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + methods: { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + initialize: { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts b/@types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts new file mode 100644 index 000000000..c79374cbf --- /dev/null +++ b/@types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts @@ -0,0 +1,1209 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface FiatTokenV2NewFieldsNewLogicTestContract + extends Truffle.Contract { + "new"( + meta?: Truffle.TransactionDetails + ): Promise; +} + +export interface Mint { + name: "Mint"; + args: { + minter: string; + to: string; + amount: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Burn { + name: "Burn"; + args: { + burner: string; + amount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterConfigured { + name: "MinterConfigured"; + args: { + minter: string; + minterAllowedAmount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterRemoved { + name: "MinterRemoved"; + args: { + oldMinter: string; + 0: string; + }; +} + +export interface MasterMinterChanged { + name: "MasterMinterChanged"; + args: { + newMasterMinter: string; + 0: string; + }; +} + +export interface Blacklisted { + name: "Blacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface BlacklisterChanged { + name: "BlacklisterChanged"; + args: { + newBlacklister: string; + 0: string; + }; +} + +export interface Pause { + name: "Pause"; + args: {}; +} + +export interface Unpause { + name: "Unpause"; + args: {}; +} + +export interface PauserChanged { + name: "PauserChanged"; + args: { + newAddress: string; + 0: string; + }; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = + | Mint + | Burn + | MinterConfigured + | MinterRemoved + | MasterMinterChanged + | Blacklisted + | UnBlacklisted + | BlacklisterChanged + | Pause + | Unpause + | PauserChanged + | Approval + | OwnershipTransferred + | Transfer; + +export interface FiatTokenV2NewFieldsNewLogicTestInstance + extends Truffle.ContractInstance { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + initV2: { + ( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + setNewAddress: { + (_newAddress: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newAddress: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newAddress: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newAddress: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + initV2: { + ( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + setNewAddress: { + (_newAddress: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newAddress: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newAddress: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newAddress: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + "initialize(string,string,string,uint8,address,address,address,address)": { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + "initialize(string,string,string,uint8,address,address,address,address,bool,address,uint256)": { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/FiatTokenV2NewFieldsTest.d.ts b/@types/generated/FiatTokenV2NewFieldsTest.d.ts new file mode 100644 index 000000000..33f43acf0 --- /dev/null +++ b/@types/generated/FiatTokenV2NewFieldsTest.d.ts @@ -0,0 +1,1173 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface FiatTokenV2NewFieldsTestContract + extends Truffle.Contract { + "new"( + meta?: Truffle.TransactionDetails + ): Promise; +} + +export interface Mint { + name: "Mint"; + args: { + minter: string; + to: string; + amount: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Burn { + name: "Burn"; + args: { + burner: string; + amount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterConfigured { + name: "MinterConfigured"; + args: { + minter: string; + minterAllowedAmount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterRemoved { + name: "MinterRemoved"; + args: { + oldMinter: string; + 0: string; + }; +} + +export interface MasterMinterChanged { + name: "MasterMinterChanged"; + args: { + newMasterMinter: string; + 0: string; + }; +} + +export interface Blacklisted { + name: "Blacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface BlacklisterChanged { + name: "BlacklisterChanged"; + args: { + newBlacklister: string; + 0: string; + }; +} + +export interface Pause { + name: "Pause"; + args: {}; +} + +export interface Unpause { + name: "Unpause"; + args: {}; +} + +export interface PauserChanged { + name: "PauserChanged"; + args: { + newAddress: string; + 0: string; + }; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = + | Mint + | Burn + | MinterConfigured + | MinterRemoved + | MasterMinterChanged + | Blacklisted + | UnBlacklisted + | BlacklisterChanged + | Pause + | Unpause + | PauserChanged + | Approval + | OwnershipTransferred + | Transfer; + +export interface FiatTokenV2NewFieldsTestInstance + extends Truffle.ContractInstance { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + initV2: { + ( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + initV2: { + ( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + "initialize(string,string,string,uint8,address,address,address,address)": { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + "initialize(string,string,string,uint8,address,address,address,address,bool,address,uint256)": { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + _newBool: boolean, + _newAddress: string, + _newUint: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Migrations.d.ts b/@types/generated/Migrations.d.ts new file mode 100644 index 000000000..63bd2bbdd --- /dev/null +++ b/@types/generated/Migrations.d.ts @@ -0,0 +1,112 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface MigrationsContract + extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +type AllEvents = never; + +export interface MigrationsInstance extends Truffle.ContractInstance { + last_completed_migration(txDetails?: Truffle.TransactionDetails): Promise; + + owner(txDetails?: Truffle.TransactionDetails): Promise; + + setCompleted: { + ( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + upgrade: { + (new_address: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + new_address: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + new_address: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + new_address: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + last_completed_migration( + txDetails?: Truffle.TransactionDetails + ): Promise; + + owner(txDetails?: Truffle.TransactionDetails): Promise; + + setCompleted: { + ( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + completed: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + upgrade: { + (new_address: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + new_address: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + new_address: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + new_address: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Ownable.d.ts b/@types/generated/Ownable.d.ts new file mode 100644 index 000000000..2abb4ebf3 --- /dev/null +++ b/@types/generated/Ownable.d.ts @@ -0,0 +1,93 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface OwnableContract extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +type AllEvents = OwnershipTransferred; + +export interface OwnableInstance extends Truffle.ContractInstance { + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Pausable.d.ts b/@types/generated/Pausable.d.ts new file mode 100644 index 000000000..909720915 --- /dev/null +++ b/@types/generated/Pausable.d.ts @@ -0,0 +1,209 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface PausableContract extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Pause { + name: "Pause"; + args: {}; +} + +export interface Unpause { + name: "Unpause"; + args: {}; +} + +export interface PauserChanged { + name: "PauserChanged"; + args: { + newAddress: string; + 0: string; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +type AllEvents = Pause | Unpause | PauserChanged | OwnershipTransferred; + +export interface PausableInstance extends Truffle.ContractInstance { + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Proxy.d.ts b/@types/generated/Proxy.d.ts new file mode 100644 index 000000000..424d3ac85 --- /dev/null +++ b/@types/generated/Proxy.d.ts @@ -0,0 +1,27 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface ProxyContract extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +type AllEvents = never; + +export interface ProxyInstance extends Truffle.ContractInstance { + methods: {}; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/UpgradeabilityProxy.d.ts b/@types/generated/UpgradeabilityProxy.d.ts new file mode 100644 index 000000000..5a2d6cf13 --- /dev/null +++ b/@types/generated/UpgradeabilityProxy.d.ts @@ -0,0 +1,39 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface UpgradeabilityProxyContract + extends Truffle.Contract { + "new"( + _implementation: string, + meta?: Truffle.TransactionDetails + ): Promise; +} + +export interface Upgraded { + name: "Upgraded"; + args: { + implementation: string; + 0: string; + }; +} + +type AllEvents = Upgraded; + +export interface UpgradeabilityProxyInstance extends Truffle.ContractInstance { + methods: {}; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/index.d.ts b/@types/generated/index.d.ts new file mode 100644 index 000000000..9d2282b6e --- /dev/null +++ b/@types/generated/index.d.ts @@ -0,0 +1,74 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { AdminUpgradeabilityProxyContract } from "./AdminUpgradeabilityProxy"; +import { BlacklistableContract } from "./Blacklistable"; +import { Erc20Contract } from "./Erc20"; +import { Erc20BasicContract } from "./Erc20Basic"; +import { FiatTokenProxyContract } from "./FiatTokenProxy"; +import { FiatTokenV1Contract } from "./FiatTokenV1"; +import { FiatTokenV2Contract } from "./FiatTokenV2"; +import { FiatTokenV2NewFieldsNewLogicTestContract } from "./FiatTokenV2NewFieldsNewLogicTest"; +import { FiatTokenV2NewFieldsTestContract } from "./FiatTokenV2NewFieldsTest"; +import { MigrationsContract } from "./Migrations"; +import { OwnableContract } from "./Ownable"; +import { PausableContract } from "./Pausable"; +import { ProxyContract } from "./Proxy"; +import { UpgradeabilityProxyContract } from "./UpgradeabilityProxy"; + +declare global { + namespace Truffle { + interface Artifacts { + require( + name: "AdminUpgradeabilityProxy" + ): AdminUpgradeabilityProxyContract; + require(name: "Blacklistable"): BlacklistableContract; + require(name: "ERC20"): Erc20Contract; + require(name: "ERC20Basic"): Erc20BasicContract; + require(name: "FiatTokenProxy"): FiatTokenProxyContract; + require(name: "FiatTokenV1"): FiatTokenV1Contract; + require(name: "FiatTokenV2"): FiatTokenV2Contract; + require( + name: "FiatTokenV2NewFieldsNewLogicTest" + ): FiatTokenV2NewFieldsNewLogicTestContract; + require( + name: "FiatTokenV2NewFieldsTest" + ): FiatTokenV2NewFieldsTestContract; + require(name: "Migrations"): MigrationsContract; + require(name: "Ownable"): OwnableContract; + require(name: "Pausable"): PausableContract; + require(name: "Proxy"): ProxyContract; + require(name: "UpgradeabilityProxy"): UpgradeabilityProxyContract; + } + } +} + +export { + AdminUpgradeabilityProxyContract, + AdminUpgradeabilityProxyInstance +} from "./AdminUpgradeabilityProxy"; +export { BlacklistableContract, BlacklistableInstance } from "./Blacklistable"; +export { Erc20Contract, Erc20Instance } from "./Erc20"; +export { Erc20BasicContract, Erc20BasicInstance } from "./Erc20Basic"; +export { + FiatTokenProxyContract, + FiatTokenProxyInstance +} from "./FiatTokenProxy"; +export { FiatTokenV1Contract, FiatTokenV1Instance } from "./FiatTokenV1"; +export { FiatTokenV2Contract, FiatTokenV2Instance } from "./FiatTokenV2"; +export { + FiatTokenV2NewFieldsNewLogicTestContract, + FiatTokenV2NewFieldsNewLogicTestInstance +} from "./FiatTokenV2NewFieldsNewLogicTest"; +export { + FiatTokenV2NewFieldsTestContract, + FiatTokenV2NewFieldsTestInstance +} from "./FiatTokenV2NewFieldsTest"; +export { MigrationsContract, MigrationsInstance } from "./Migrations"; +export { OwnableContract, OwnableInstance } from "./Ownable"; +export { PausableContract, PausableInstance } from "./Pausable"; +export { ProxyContract, ProxyInstance } from "./Proxy"; +export { + UpgradeabilityProxyContract, + UpgradeabilityProxyInstance +} from "./UpgradeabilityProxy"; diff --git a/@types/generated/types.d.ts b/@types/generated/types.d.ts new file mode 100644 index 000000000..c4195c55d --- /dev/null +++ b/@types/generated/types.d.ts @@ -0,0 +1,117 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ +/** + * Globals + */ +/// +/// + +declare type BN = import("bn.js"); +declare type Web3 = import("web3").default; + +declare const assert: Chai.AssertStatic; +declare const expect: Chai.ExpectStatic; + +declare const web3: Web3; + +declare const artifacts: Truffle.Artifacts; + +/** + * Global contract function + */ +interface ContractFunction extends Mocha.SuiteFunction { + ( + title: string, + fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void + ): Mocha.Suite; + only: ExclusiveContractFunction; + skip: PendingContractFunction; +} + +interface ExclusiveContractFunction extends Mocha.ExclusiveSuiteFunction { + ( + title: string, + fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void + ): Mocha.Suite; +} + +interface PendingContractFunction extends Mocha.PendingSuiteFunction { + ( + title: string, + fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void + ): Mocha.Suite | void; +} + +declare const contract: ContractFunction; + +/** + * Namespace + */ +declare namespace Truffle { + type Accounts = string[]; + + interface TransactionDetails { + from?: string; + gas?: BN | number | string; + gasPrice?: BN | number | string; + value?: BN | string; + } + + export interface TransactionLog { + address: string; + event: EVENTS["name"]; + args: EVENTS["args"]; + blockHash: string; + blockNumber: number; + logIndex: number; + transactionHash: string; + transactionIndex: number; + type: string; + } + + export interface TransactionResponse { + tx: string; + receipt: any; + logs: TransactionLog[]; + } + + export interface AnyEvent { + name: string; + args: any; + } + + interface Contract extends ContractNew { + deployed(): Promise; + at(address: string): Promise; + address: string; + contractName: string; + } + + interface ContractInstance { + address: string; + contract: any; + transactionHash: string; + } + + interface ContractNew { + "new"(...args: ARGs): any; + } + + interface Deployer { + link( + library: Truffle.Contract, + destination: Truffle.Contract + ): Deployer; + link( + library: Truffle.Contract, + destinations: Array> + ): Deployer; + deploy(c: ContractNew, ...args: T): Deployer; + } + + type Migration = ( + deploy: Deployer, + network: string, + accounts: Accounts + ) => void; +} diff --git a/README.md b/README.md index 2e1d47028..a6578f110 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ $ yarn install # Install dependencies To check code for problems: ``` -$ yarn lint +$ yarn typecheck # Type-check TypeScript code +$ yarn lint # Check JavaScript and TypeScript code $ yarn lint --fix # Fix problems where possible ``` @@ -31,6 +32,14 @@ To auto-format code: $ yarn fmt ``` +## TypeScript type definition files for the contracts + +To generate type definitions: + +``` +$ yarn compile && yarn typechain +``` + ## Testing First, make sure Ganache is running. diff --git a/package.json b/package.json index f5970527c..ba6d408c6 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,11 @@ "test": "test" }, "scripts": { - "lint": "eslint '**/*.js' '*.js'", - "fmt": "prettier --write '**/*.sol' '**/*.js' '**/*.json' '**/*.md' '*.js' '*.json' '*.md'", + "compile": "rm -rf './build' && truffle compile", + "typechain": "yarn compile && rm -rf './@types/generated' && typechain --target=truffle-v5 --outDir './@types/generated' 'build/contracts/**/*.json'", + "typecheck": "tsc -p . --noEmit", + "lint": "eslint --ext '.js,.ts' './**/*.{j,t}s'", + "fmt": "prettier --write './**/*.sol' './**/*.js' './**/*.ts' './**/*.json' './**/*.md'", "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --quiet", "test": "truffle test", "coverage": "truffle run coverage" @@ -30,6 +33,11 @@ }, "devDependencies": { "@truffle/hdwallet-provider": "^1.0.35", + "@typechain/truffle-v5": "^2.0.1", + "@types/chai": "^4.2.11", + "@types/mocha": "^7.0.2", + "@typescript-eslint/eslint-plugin": "^2.33.0", + "@typescript-eslint/parser": "^2.33.0", "chai": "^4.2.0", "diff": "^4.0.2", "eslint": "^7.0.0", @@ -43,13 +51,17 @@ "ethereumjs-abi": "^0.6.8", "ethereumjs-tx": "^2.1.2", "ganache-cli": "^6.9.1", - "googleapis": "^50.0.0", + "googleapis": "^51.0.0", "lodash": "^4.17.15", "prettier": "2.0.5", "prettier-plugin-solidity": "1.0.0-alpha.51", "q": "^1.5.1", "solidity-coverage": "^0.7.5", - "truffle": "^5.1.24" + "truffle": "^5.1.24", + "ts-node": "^8.10.1", + "typechain": "^2.0.0", + "typescript": "^3.9.2", + "web3": "^1.2.7" }, "engines": { "node": ">= 12.0.0", diff --git a/truffle-config.js b/truffle-config.js index c18f0870a..367fe5b88 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,7 +1,13 @@ -// INFURA Setup - see validate/README.validate.md for more info +process.env.TS_NODE_FILES = "true"; +require("ts-node/register/transpile-only"); +// Fix Typescript callsite reporting +Object.defineProperty(Error, "prepareStackTrace", { writable: false }); + const HDWalletProvider = require("@truffle/hdwallet-provider"); const mnemonic = "talisman"; const fs = require("fs"); + +// INFURA Setup - see validate/README.validate.md for more info let infuraKey = "none"; try { infuraKey = fs.readFileSync("./validate/apikey.infura", "utf8"); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..230509337 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "allowJs": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "lib": ["ES2019"], + "module": "CommonJS", + "moduleResolution": "node", + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "target": "ES2019" + }, + "include": ["**/*.ts", "*.ts"], + "exclude": ["node_modules", "build"] +} diff --git a/yarn.lock b/yarn.lock index c36726559..a72666668 100644 --- a/yarn.lock +++ b/yarn.lock @@ -101,6 +101,11 @@ "@truffle/interface-adapter" "^0.3.0" web3 "1.2.1" +"@typechain/truffle-v5@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@typechain/truffle-v5/-/truffle-v5-2.0.1.tgz#0b949dcbe07942a7aaff3e9811081276071c43d6" + integrity sha512-9pDWrpSF6T0ZlJHRF8IasnOM7CBWBxwOpj8cr8KvEwQYu6xtdtRV2Q+tsb8YYAKsWtvP65ArC9o0jQss9FpdmA== + "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" @@ -108,11 +113,21 @@ dependencies: "@types/node" "*" +"@types/chai@^4.2.11": + version "4.2.11" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.11.tgz#d3614d6c5f500142358e6ed24e1bf16657536c50" + integrity sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/eslint-visitor-keys@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" + integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -127,15 +142,32 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/json-schema@^7.0.3": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" + integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== + "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== +"@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + +"@types/mocha@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" + integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== + "@types/node@*": - version "13.13.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.5.tgz#96ec3b0afafd64a4ccea9107b75bf8489f0e5765" - integrity sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g== + version "14.0.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.1.tgz#5d93e0a099cd0acd5ef3d5bde3c086e1f49ff68c" + integrity sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA== "@types/node@^10.12.18", "@types/node@^10.3.2": version "10.17.21" @@ -143,9 +175,64 @@ integrity sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ== "@types/node@^12.6.1": - version "12.12.38" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.38.tgz#58841a382f231ad005dbb935c36d44aa1118a26b" - integrity sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA== + version "12.12.39" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.39.tgz#532d25c1e639d89dd6f3aa1d7b3962e3e7fa943d" + integrity sha512-pADGfwnDkr6zagDwEiCVE4yQrv7XDkoeVa4OfA9Ju/zRTk6YNDLGtQbkdL4/56mCQQCs4AhNrBIag6jrp7ZuOg== + +"@types/prettier@^1.13.2": + version "1.19.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" + integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== + +"@types/resolve@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +"@typescript-eslint/eslint-plugin@^2.33.0": + version "2.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.33.0.tgz#d6c8319d5011b4783bb3d2dadf105d8bdd499bd5" + integrity sha512-QV6P32Btu1sCI/kTqjTNI/8OpCYyvlGjW5vD8MpTIg+HGE5S88HtT1G+880M4bXlvXj/NjsJJG0aGcVh0DdbeQ== + dependencies: + "@typescript-eslint/experimental-utils" "2.33.0" + functional-red-black-tree "^1.0.1" + regexpp "^3.0.0" + tsutils "^3.17.1" + +"@typescript-eslint/experimental-utils@2.33.0": + version "2.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.33.0.tgz#000f1e5f344fbea1323dc91cc174805d75f99a03" + integrity sha512-qzPM2AuxtMrRq78LwyZa8Qn6gcY8obkIrBs1ehqmQADwkYzTE1Pb4y2W+U3rE/iFkSWcWHG2LS6MJfj6SmHApg== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.33.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/parser@^2.33.0": + version "2.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.33.0.tgz#395c0ef229ebef883608f8632a34f0acf02b9bdd" + integrity sha512-AUtmwUUhJoH6yrtxZMHbRUEMsC2G6z5NSxg9KsROOGqNXasM71I8P2NihtumlWTUCRld70vqIZ6Pm4E5PAziEA== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "2.33.0" + "@typescript-eslint/typescript-estree" "2.33.0" + eslint-visitor-keys "^1.1.0" + +"@typescript-eslint/typescript-estree@2.33.0": + version "2.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.33.0.tgz#33504c050ccafd38f397a645d4e9534d2eccbb5c" + integrity sha512-d8rY6/yUxb0+mEwTShCQF2zYQdLlqihukNfG9IUlLYz5y1CH6G/9XYbrxQLq3Z14RNvkCC6oe+OcFlyUpwUbkg== + dependencies: + debug "^4.1.1" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" "@web3-js/scrypt-shim@^0.1.0": version "0.1.0" @@ -314,6 +401,11 @@ app-module-path@^2.2.0: resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -321,6 +413,20 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + +array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -978,6 +1084,11 @@ bignumber.js@^7.0.0, bignumber.js@^7.2.0: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== +bignumber.js@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" + integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== + "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": version "2.0.7" resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" @@ -1237,9 +1348,9 @@ camelcase@^5.0.0: integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== caniuse-lite@^1.0.30000844: - version "1.0.30001055" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001055.tgz#7b52c3537f7a8c0408aca867e83d2b04268b54cd" - integrity sha512-MbwsBmKrBSKIWldfdIagO5OJWZclpJtS4h0Jrk/4HFrXJxTdVdH23Fd+xCiHriVGvYcWyW8mR/CPsYajlH8Iuw== + version "1.0.30001058" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001058.tgz#9f8a318389e28f060272274ac93a661d17f8bf0d" + integrity sha512-UiRZmBYd1HdVVdFKy7PuLVx9e2NS7SMyx7QpWvFjiklYrLJKpLd19cRnRNqlw4zYa7vVejS3c8JUVobX241zHQ== caseless@~0.12.0: version "0.12.0" @@ -1393,6 +1504,15 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +command-line-args@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + commander@2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -1597,7 +1717,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1: +debug@4, debug@^4.0.1, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -1772,7 +1892,7 @@ diff@3.5.0: resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -diff@^4.0.2: +diff@^4.0.1, diff@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== @@ -1860,9 +1980,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.47: - version "1.3.434" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.434.tgz#a67dcb268e93768e2169399999ccffa4783f048e" - integrity sha512-WjzGrE6appXvMyc2kH9Ide7OxsgTuRzag9sjQ5AcbOnbS9ut7P1HzOeEbJFLhr81IR7n2Hlr6qTTSGTXLIX5Pg== + version "1.3.437" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.437.tgz#110f1cd407e5d09b43d5585e5f237b71063412cf" + integrity sha512-PBQn2q68ErqMyBUABh9Gh8R6DunGky8aB5y3N5lPM7OVpldwyUbAK5AX9WcwE/5F6ceqvQ+iQLYkJYRysAs6Bg== elliptic@6.3.3: version "6.3.3" @@ -2562,6 +2682,11 @@ eventemitter3@3.1.2: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + events@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" @@ -2787,6 +2912,14 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -2860,6 +2993,15 @@ fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -3015,7 +3157,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.3, glob@~7.1.6: +glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -3111,10 +3253,10 @@ googleapis-common@^4.1.0: url-template "^2.0.8" uuid "^8.0.0" -googleapis@^50.0.0: - version "50.0.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-50.0.0.tgz#861aacb96190f9a19dec19c08f0858369ecc1f4e" - integrity sha512-AJdOpPbDiNauraQZr51RR85cA53ygYtzLUj6Nq0cTr3g+GQ+GxjyLT6IMGgSE+/0dGLTpRVCemkZjZQA0XMb5Q== +googleapis@^51.0.0: + version "51.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-51.0.0.tgz#59ca84a578f8bc41f6257b49fc439bb17b91fe4a" + integrity sha512-ZicnODSX5apolF05lNXc3AHW/zazeaWL8zSiQ7a/Bd4pfHU+TJzX7GP38phjyOVPzIG3qnrJ0SMASJgljlFZlQ== dependencies: google-auth-library "^6.0.0" googleapis-common "^4.1.0" @@ -3964,6 +4106,11 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + map-age-cleaner@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" @@ -4710,6 +4857,11 @@ prettier@2.0.5, prettier@^2.0.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== +prettier@^1.14.2: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -5029,7 +5181,7 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -5435,7 +5587,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.19: +source-map-support@^0.5.17, source-map-support@^0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -5474,9 +5626,9 @@ spdx-exceptions@^2.1.0: integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" @@ -5697,6 +5849,23 @@ swarm-js@0.1.39: tar "^4.0.2" xhr-request-promise "^0.1.2" +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + table@^5.2.3: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" @@ -5754,6 +5923,14 @@ tar@^4.0.2: safe-buffer "^5.1.2" yallist "^3.0.3" +test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -5868,10 +6045,53 @@ truffle@^5.1.24: mocha "5.2.0" original-require "1.0.1" -tslib@^1.9.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.12.0.tgz#d1fc9cacd06a1456c62f2902b361573e83d66473" - integrity sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA== +ts-essentials@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== + +ts-essentials@^6.0.3: + version "6.0.5" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.5.tgz#dd5b98f73bd56dc94d15dfbc0fbf01da3163eb42" + integrity sha512-RSAKlpu+E0DCGY8FsbG92EveRLw2Y+UgK3ksX01w1VaHeG01dKkYo/KtAV4q0qPT6nPbLfyerb2YPVSediP+8g== + +ts-generator@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.0.8.tgz#7bd48ca064db026d9520bcb682b69efc20971d6a" + integrity sha512-Gi+aZCELpVL7Mqb+GuMgM+n8JZ/arZZib1iD/R9Ok8JDjOCOCrqS9b1lr72ku7J45WeDCFZxyJoRsiQvhokCnw== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^1.13.2" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^1.14.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + +ts-node@^8.10.1: + version "8.10.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.1.tgz#77da0366ff8afbe733596361d2df9a60fc9c9bd3" + integrity sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + +tslib@^1.8.1, tslib@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + +tsutils@^3.17.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + dependencies: + tslib "^1.8.1" tunnel-agent@^0.6.0: version "0.6.0" @@ -5932,6 +6152,19 @@ type@^2.0.0: resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== +typechain@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-2.0.0.tgz#62143b48cdf8f95a777f1b76617af077b2d44eee" + integrity sha512-O+hsAUwtBpqCfoq46Grm52OEdm0GBEu78LxrEzkkGdwUdCoCZpNb2HPzPoNB1MXiRnNhEOGMFyf05UbT2/bUEw== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^6.0.3" + ts-generator "^0.0.8" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -5944,10 +6177,20 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -uglify-js@^3.1.4: +typescript@^3.9.2: version "3.9.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.2.tgz#012b74fb6a2e440d9ba1f79110a479d3b1f2d48d" - integrity sha512-zGVwKslUAD/EeqOrD1nQaBmXIHl1Vw371we8cvS8I6mYK9rmgX5tv8AAeJdfsQ3Kk5mGax2SVV/AizxdNGhl7Q== + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" + integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== + +typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + +uglify-js@^3.1.4: + version "3.9.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.3.tgz#4a285d1658b8a2ebaef9e51366b3a0f7acd79ec2" + integrity sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA== dependencies: commander "~2.20.3" @@ -6116,6 +6359,16 @@ web3-bzz@1.2.6: swarm-js "0.1.39" underscore "1.9.1" +web3-bzz@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.7.tgz#aa0f3d162f0777a5f35367dc5b70012dd1e129d0" + integrity sha512-iTIWBR+Z+Bn09WprtKm46LmyNOasg2lUn++AjXkBTB8UNxlUybxtza84yl2ETTZUs0zuFzdSSAEgbjhygG+9oA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + web3-core-helpers@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" @@ -6143,6 +6396,15 @@ web3-core-helpers@1.2.6: web3-eth-iban "1.2.6" web3-utils "1.2.6" +web3-core-helpers@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.7.tgz#522f859775ea0d15e7e40359c46d4efc5da92aee" + integrity sha512-bdU++9QATGeCetVrMp8pV97aQtVkN5oLBf/TWu/qumC6jK/YqrvLlBJLdwbz0QveU8zOSap6GCvJbqKvmmbV2A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.7" + web3-utils "1.2.7" + web3-core-method@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" @@ -6176,6 +6438,17 @@ web3-core-method@1.2.6: web3-core-subscriptions "1.2.6" web3-utils "1.2.6" +web3-core-method@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.7.tgz#73fd80d2bf0765ff6efc454db49ac83d1769a45e" + integrity sha512-e1TI0QUnByDMbQ8QHwnjxfjKw0LIgVRY4TYrlPijET9ebqUJU1HCayn/BHIMpV6LKyR1fQj9EldWyT64wZQXkg== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-core-promievent "1.2.7" + web3-core-subscriptions "1.2.7" + web3-utils "1.2.7" + web3-core-promievent@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" @@ -6200,6 +6473,13 @@ web3-core-promievent@1.2.6: any-promise "1.3.0" eventemitter3 "3.1.2" +web3-core-promievent@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.7.tgz#fc7fa489f4cf76a040800f3dfd4b45c51bd3a39f" + integrity sha512-jNmsM/czCeMGQqKKwM9/HZVTJVIF96hdMVNN/V9TGvp+EEE7vDhB4pUocDnc/QF9Z/5QFBCVmvNWttlRgZmU0A== + dependencies: + eventemitter3 "3.1.2" + web3-core-requestmanager@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" @@ -6233,6 +6513,17 @@ web3-core-requestmanager@1.2.6: web3-providers-ipc "1.2.6" web3-providers-ws "1.2.6" +web3-core-requestmanager@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.7.tgz#9da0efce898ead7004d4ac50f748f5131cfe4d79" + integrity sha512-HJb/txjHixu1dxIebiZQKBoJCaNu4gsh7mq/uj6Z/w6tIHbybL90s/7ADyMED353yyJ2tDWtYJqeMVAR+KtdaA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-providers-http "1.2.7" + web3-providers-ipc "1.2.7" + web3-providers-ws "1.2.7" + web3-core-subscriptions@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" @@ -6260,6 +6551,15 @@ web3-core-subscriptions@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-core-subscriptions@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.7.tgz#30c64aede03182832883b17c77e21cbb0933c86e" + integrity sha512-W/CzQYOUawdMDvkgA/fmLsnG5aMpbjrs78LZMbc0MFXLpH3ofqAgO2by4QZrrTShUUTeWS0ZuEkFFL/iFrSObw== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-core@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" @@ -6294,6 +6594,19 @@ web3-core@1.2.6: web3-core-requestmanager "1.2.6" web3-utils "1.2.6" +web3-core@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.7.tgz#9248b04331e458c76263d758c51b0cc612953900" + integrity sha512-QA0MTae0gXcr3KHe3cQ4x56+Wh43ZKWfMwg1gfCc3NNxPRM1jJ8qudzyptCAUcxUGXWpDG8syLIn1APDz5J8BQ== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-requestmanager "1.2.7" + web3-utils "1.2.7" + web3-eth-abi@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz#9b915b1c9ebf82f70cca631147035d5419064689" @@ -6321,6 +6634,15 @@ web3-eth-abi@1.2.6: underscore "1.9.1" web3-utils "1.2.6" +web3-eth-abi@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.7.tgz#6f3471b578649fddd844a14d397a3dd430fc44a5" + integrity sha512-4FnlT1q+D0XBkxSMXlIb/eG337uQeMaUdtVQ4PZ3XzxqpcoDuMgXm4o+3NRxnWmr4AMm6QKjM+hcC7c0mBKcyg== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.7" + web3-eth-accounts@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" @@ -6374,6 +6696,23 @@ web3-eth-accounts@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +web3-eth-accounts@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.7.tgz#087f55d04a01b815b93151aac2fc1677436b9c59" + integrity sha512-AE7QWi/iIQIjXwlAPtlMabm/OPFF0a1PhxT1EiTckpYNP8fYs6jW7lYxEtJPPJIKqfMjoi1xkEqTVR1YZQ88lg== + dependencies: + "@web3-js/scrypt-shim" "^0.1.0" + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-utils "1.2.7" + web3-eth-contract@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" @@ -6418,6 +6757,21 @@ web3-eth-contract@1.2.6: web3-eth-abi "1.2.6" web3-utils "1.2.6" +web3-eth-contract@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.7.tgz#13d7f6003d6221f9a5fd61c2d3b5d039477c9674" + integrity sha512-uW23Y0iL7XroRNbf9fWZ1N6OYhEYTJX8gTuYASuRnpYrISN5QGiQML6pq/NCzqypR1bl5E0fuINZQSK/xefIVw== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-promievent "1.2.7" + web3-core-subscriptions "1.2.7" + web3-eth-abi "1.2.7" + web3-utils "1.2.7" + web3-eth-ens@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" @@ -6460,6 +6814,20 @@ web3-eth-ens@1.2.6: web3-eth-contract "1.2.6" web3-utils "1.2.6" +web3-eth-ens@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.7.tgz#0bfa7d4b6c7753abbb31a2eb01a364b538f4c860" + integrity sha512-SPRnvUNWQ0CnnTDBteGIJkvFWEizJcAHlVsrFLICwcwFZu+appjX1UOaoGu2h3GXWtc/XZlu7B451Gi+Os2cTg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-promievent "1.2.7" + web3-eth-abi "1.2.7" + web3-eth-contract "1.2.7" + web3-utils "1.2.7" + web3-eth-iban@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" @@ -6484,6 +6852,14 @@ web3-eth-iban@1.2.6: bn.js "4.11.8" web3-utils "1.2.6" +web3-eth-iban@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.7.tgz#832809c28586be3c667a713b77a2bcba11b7970f" + integrity sha512-2NrClz1PoQ3nSJBd+91ylCOVga9qbTxjRofq/oSCoHVAEvz3WZyttx9k5DC+0rWqwJF1h69ufFvdHAAlmN/4lg== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.7" + web3-eth-personal@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" @@ -6519,6 +6895,18 @@ web3-eth-personal@1.2.6: web3-net "1.2.6" web3-utils "1.2.6" +web3-eth-personal@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.7.tgz#322cc2b14c37737b21772a53e4185686a04bf9be" + integrity sha512-2OAa1Spz0uB29dwCM8+1y0So7E47A4gKznjBEwXIYEcUIsvwT5X7ofFhC2XxyRpqlIWZSQAxRSSJFyupRRXzyw== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-net "1.2.7" + web3-utils "1.2.7" + web3-eth@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" @@ -6576,6 +6964,25 @@ web3-eth@1.2.6: web3-net "1.2.6" web3-utils "1.2.6" +web3-eth@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.7.tgz#9427daefd3641200679c2946f77fc184dbfb5b4c" + integrity sha512-ljLd0oB4IjWkzFGVan4HkYhJXhSXgn9iaSaxdJixKGntZPgWMJfxeA+uLwTrlxrWzhvy4f+39WnT7wCh5e9TGg== + dependencies: + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-subscriptions "1.2.7" + web3-eth-abi "1.2.7" + web3-eth-accounts "1.2.7" + web3-eth-contract "1.2.7" + web3-eth-ens "1.2.7" + web3-eth-iban "1.2.7" + web3-eth-personal "1.2.7" + web3-net "1.2.7" + web3-utils "1.2.7" + web3-net@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" @@ -6603,6 +7010,15 @@ web3-net@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +web3-net@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.7.tgz#c355621a8769c9c1a967c801e7db90c92a0e3808" + integrity sha512-j9qeZrS1FNyCeA0BfdLojkxOZQz3FKa1DJI+Dw9fEVhZS68vLOFANu2RB96gR9BoPHo5+k5D3NsKOoxt1gw3Gg== + dependencies: + web3-core "1.2.7" + web3-core-method "1.2.7" + web3-utils "1.2.7" + "web3-provider-engine@git+https://github.com/trufflesuite/provider-engine.git#web3-one": version "14.0.6" resolved "git+https://github.com/trufflesuite/provider-engine.git#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" @@ -6652,6 +7068,14 @@ web3-providers-http@1.2.6: web3-core-helpers "1.2.6" xhr2-cookies "1.1.0" +web3-providers-http@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.7.tgz#31eb15390c103169b3d7d31bdb1ccae9e3f1629d" + integrity sha512-vazGx5onuH/zogrwkUaLFJwFcJ6CckP65VFSHoiV+GTQdkOqgoDIha7StKkslvDz4XJ2FuY/zOZHbtuOYeltXQ== + dependencies: + web3-core-helpers "1.2.7" + xhr2-cookies "1.1.0" + web3-providers-ipc@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" @@ -6679,6 +7103,15 @@ web3-providers-ipc@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-providers-ipc@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.7.tgz#4e6716e8723d431df3d6bfa1acd2f7c04e7071ad" + integrity sha512-/zc0y724H2zbkV4UbGGMhsEiLfafjagIzfrsWZnyTZUlSB0OGRmmFm2EkLJAgtXrLiodaHHyXKM0vB8S24bxdA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-providers-ws@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" @@ -6706,6 +7139,16 @@ web3-providers-ws@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-providers-ws@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.7.tgz#95b1cc5dc25e9b9d6630d6754f9354313b62f532" + integrity sha512-b5XzqDpRkNVe6MFs5K6iqOEyjQikHtg3KuU2/ClCDV37hm0WN4xCRVMC0LwegulbDXZej3zT9+1CYzGaGFREzA== + dependencies: + "@web3-js/websocket" "^1.0.29" + eventemitter3 "^4.0.0" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-shh@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" @@ -6736,6 +7179,16 @@ web3-shh@1.2.6: web3-core-subscriptions "1.2.6" web3-net "1.2.6" +web3-shh@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.7.tgz#5382c7bc2f39539eb2841c4576d23ade25720461" + integrity sha512-f6PAgcpG0ZAo98KqCmeHoDEx5qzm3d5plet18DkT4U6WIeYowKdec8vZaLPRR7c2XreXFJ2gQf45CB7oqR7U/w== + dependencies: + web3-core "1.2.7" + web3-core-method "1.2.7" + web3-core-subscriptions "1.2.7" + web3-net "1.2.7" + web3-utils@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.1.tgz#21466e38291551de0ab34558de21512ac4274534" @@ -6777,6 +7230,20 @@ web3-utils@1.2.6: underscore "1.9.1" utf8 "3.0.0" +web3-utils@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.7.tgz#b68e232917e4376f81cf38ef79878e5903d18e93" + integrity sha512-FBh/CPJND+eiPeUF9KVbTyTZtXNWxPWtByBaWS6e2x4ACazPX711EeNaZaChIOGSLGe6se2n7kg6wnawe/MjuQ== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + web3@0.20.6: version "0.20.6" resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.6.tgz#3e97306ae024fb24e10a3d75c884302562215120" @@ -6840,6 +7307,19 @@ web3@^0.18.4: xhr2 "*" xmlhttprequest "*" +web3@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.7.tgz#fcb83571036c1c6f475bc984785982a444e8d78e" + integrity sha512-jAAJHMfUlTps+jH2li1ckDFEpPrEEriU/ubegSTGRl3KRdNhEqT93+3kd7FHJTn3NgjcyURo2+f7Da1YcZL8Mw== + dependencies: + web3-bzz "1.2.7" + web3-core "1.2.7" + web3-eth "1.2.7" + web3-eth-personal "1.2.7" + web3-net "1.2.7" + web3-shh "1.2.7" + web3-utils "1.2.7" + "websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": version "1.0.29" resolved "https://codeload.github.com/web3-js/WebSocket-Node/tar.gz/905deb4812572b344f5801f8c9ce8bb02799d82e" @@ -6928,7 +7408,7 @@ xhr-request-promise@^0.1.2: dependencies: xhr-request "^1.1.0" -xhr-request@^1.1.0: +xhr-request@^1.0.1, xhr-request@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== @@ -7028,6 +7508,11 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + zos-lib@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/zos-lib/-/zos-lib-1.3.0.tgz#72a54227db97775041e581868c00ea047b91afbb" From 3bb13638806215873e9a02f61d4f37462c0d9208 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 12 May 2020 17:16:45 -0700 Subject: [PATCH 13/22] Move V1 tests to test/v1 and fix lint errors --- test/{ => v1}/ABITests.test.js | 3 +-- test/{ => v1}/ABIUtils.js | 0 test/{ => v1}/EventsTests.js | 3 +-- test/{ => v1}/ExtendedPositiveTests.js | 3 +-- test/{ => v1}/FiatTokenLegacy.test.js | 3 +-- test/{ => v1}/MiscTests.js | 3 +-- test/{ => v1}/NegativeTests.js | 3 +-- test/{ => v1}/Pausable.test.js | 3 +-- test/{ => v1}/PositiveTests.js | 3 +-- test/{ => v1}/ProxyNegativeTests.js | 3 +-- test/{ => v1}/ProxyPositiveTests.js | 3 +-- test/{ => v1}/TestWrapper.js | 0 test/{ => v1}/TokenTestUtils.js | 1 - 13 files changed, 10 insertions(+), 21 deletions(-) rename test/{ => v1}/ABITests.test.js (99%) rename test/{ => v1}/ABIUtils.js (100%) rename test/{ => v1}/EventsTests.js (98%) rename test/{ => v1}/ExtendedPositiveTests.js (99%) rename test/{ => v1}/FiatTokenLegacy.test.js (99%) rename test/{ => v1}/MiscTests.js (99%) rename test/{ => v1}/NegativeTests.js (99%) rename test/{ => v1}/Pausable.test.js (96%) rename test/{ => v1}/PositiveTests.js (99%) rename test/{ => v1}/ProxyNegativeTests.js (98%) rename test/{ => v1}/ProxyPositiveTests.js (99%) rename test/{ => v1}/TestWrapper.js (100%) rename test/{ => v1}/TokenTestUtils.js (99%) diff --git a/test/ABITests.test.js b/test/v1/ABITests.test.js similarity index 99% rename from test/ABITests.test.js rename to test/v1/ABITests.test.js index d50010a96..1ab512074 100644 --- a/test/ABITests.test.js +++ b/test/v1/ABITests.test.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const { Transaction } = require("ethereumjs-tx"); const { expectRevert, @@ -26,7 +25,7 @@ function mockStringAddressEncode(methodName, address) { return functionSignature(methodName) + version + encodeAddress(address); } -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/ABIUtils.js b/test/v1/ABIUtils.js similarity index 100% rename from test/ABIUtils.js rename to test/v1/ABIUtils.js diff --git a/test/EventsTests.js b/test/v1/EventsTests.js similarity index 98% rename from test/EventsTests.js rename to test/v1/EventsTests.js index 0581e2f1b..69ec91821 100644 --- a/test/EventsTests.js +++ b/test/v1/EventsTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const { FiatToken, minterAccount, @@ -32,7 +31,7 @@ const { const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(_newToken, _accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/ExtendedPositiveTests.js b/test/v1/ExtendedPositiveTests.js similarity index 99% rename from test/ExtendedPositiveTests.js rename to test/v1/ExtendedPositiveTests.js index 8c62b6794..c304115ee 100644 --- a/test/ExtendedPositiveTests.js +++ b/test/v1/ExtendedPositiveTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { checkVariables, @@ -16,7 +15,7 @@ const { const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/FiatTokenLegacy.test.js b/test/v1/FiatTokenLegacy.test.js similarity index 99% rename from test/FiatTokenLegacy.test.js rename to test/v1/FiatTokenLegacy.test.js index c1405be90..873763223 100644 --- a/test/FiatTokenLegacy.test.js +++ b/test/v1/FiatTokenLegacy.test.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { name, @@ -32,7 +31,7 @@ const { } = require("./TokenTestUtils"); // these tests are for reference and do not track side effects on all variables -async function run_tests(newToken, accounts) { +async function run_tests(_newToken, accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/MiscTests.js b/test/v1/MiscTests.js similarity index 99% rename from test/MiscTests.js rename to test/v1/MiscTests.js index da34f0b95..35786271f 100644 --- a/test/MiscTests.js +++ b/test/v1/MiscTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { checkVariables, @@ -21,7 +20,7 @@ const maxAmount = const maxAmountBN = new BN(maxAmount.slice(2), 16); const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/NegativeTests.js b/test/v1/NegativeTests.js similarity index 99% rename from test/NegativeTests.js rename to test/v1/NegativeTests.js index 4c7c6d60e..65425ab03 100644 --- a/test/NegativeTests.js +++ b/test/v1/NegativeTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { checkVariables, @@ -19,7 +18,7 @@ const { const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/Pausable.test.js b/test/v1/Pausable.test.js similarity index 96% rename from test/Pausable.test.js rename to test/v1/Pausable.test.js index 1840b6a19..8e46be189 100644 --- a/test/Pausable.test.js +++ b/test/v1/Pausable.test.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const { expectRevert, deployerAccount, @@ -8,7 +7,7 @@ const { const Pausable = artifacts.require("Pausable"); -contract("PausableTests", (accounts) => { +contract("PausableTests", (_accounts) => { let pausable; beforeEach(async () => { diff --git a/test/PositiveTests.js b/test/v1/PositiveTests.js similarity index 99% rename from test/PositiveTests.js rename to test/v1/PositiveTests.js index 4b1d57493..339047de8 100644 --- a/test/PositiveTests.js +++ b/test/v1/PositiveTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { @@ -15,7 +14,7 @@ const { const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let proxy, token; beforeEach(async () => { diff --git a/test/ProxyNegativeTests.js b/test/v1/ProxyNegativeTests.js similarity index 98% rename from test/ProxyNegativeTests.js rename to test/v1/ProxyNegativeTests.js index ccf27761a..e1f19edbd 100644 --- a/test/ProxyNegativeTests.js +++ b/test/v1/ProxyNegativeTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { bigZero, @@ -25,7 +24,7 @@ const { const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let rawToken, proxy, token; beforeEach(async () => { diff --git a/test/ProxyPositiveTests.js b/test/v1/ProxyPositiveTests.js similarity index 99% rename from test/ProxyPositiveTests.js rename to test/v1/ProxyPositiveTests.js index 7aeef764e..37378a3a7 100644 --- a/test/ProxyPositiveTests.js +++ b/test/v1/ProxyPositiveTests.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const BN = require("bn.js"); const { bigZero, @@ -30,7 +29,7 @@ const { makeRawTransaction, sendRawTransaction } = require("./ABIUtils"); const amount = 100; -async function run_tests(newToken, accounts) { +async function run_tests(newToken, _accounts) { let rawToken, proxy, token; beforeEach(async () => { diff --git a/test/TestWrapper.js b/test/v1/TestWrapper.js similarity index 100% rename from test/TestWrapper.js rename to test/v1/TestWrapper.js diff --git a/test/TokenTestUtils.js b/test/v1/TokenTestUtils.js similarity index 99% rename from test/TokenTestUtils.js rename to test/v1/TokenTestUtils.js index b4083f11e..6a3782751 100644 --- a/test/TokenTestUtils.js +++ b/test/v1/TokenTestUtils.js @@ -1,4 +1,3 @@ -const assert = require("chai").assert; const util = require("util"); const abi = require("ethereumjs-abi"); const _ = require("lodash"); From 8592ac2ba1e979394c0d57b6545b526363d272b2 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Wed, 13 May 2020 10:39:52 -0700 Subject: [PATCH 14/22] Rename mock upgraded contract --- @types/generated/UpgradedFiatToken.d.ts | 1092 +++++++++++++++++ ...gradedFiatTokenNewFieldsNewLogicTest.d.ts} | 8 +- ...ts => UpgradedFiatTokenNewFieldsTest.d.ts} | 8 +- @types/generated/index.d.ts | 38 +- contracts/test/UpgradedFiatToken.sol | 34 + ...pgradedFiatTokenNewFieldsNewLogicTest.sol} | 6 +- ...sol => UpgradedFiatTokenNewFieldsTest.sol} | 6 +- migrations/1_initial_migration.js | 2 +- .../{2_deploy_usdc.js => 2_deploy_v1.js} | 4 +- test/v1/EventsTests.js | 4 +- test/v1/FiatTokenLegacy.test.js | 4 +- test/v1/MiscTests.js | 4 +- test/v1/ProxyNegativeTests.js | 6 +- test/v1/TestWrapper.js | 4 +- test/v1/TokenTestUtils.js | 14 +- validate/validate.js | 6 +- 16 files changed, 1186 insertions(+), 54 deletions(-) create mode 100644 @types/generated/UpgradedFiatToken.d.ts rename @types/generated/{FiatTokenV2NewFieldsNewLogicTest.d.ts => UpgradedFiatTokenNewFieldsNewLogicTest.d.ts} (99%) rename @types/generated/{FiatTokenV2NewFieldsTest.d.ts => UpgradedFiatTokenNewFieldsTest.d.ts} (99%) create mode 100644 contracts/test/UpgradedFiatToken.sol rename contracts/test/{FiatTokenV2NewFieldsNewLogicTest.sol => UpgradedFiatTokenNewFieldsNewLogicTest.sol} (94%) rename contracts/test/{FiatTokenV2NewFieldsTest.sol => UpgradedFiatTokenNewFieldsTest.sol} (94%) rename migrations/{2_deploy_usdc.js => 2_deploy_v1.js} (95%) diff --git a/@types/generated/UpgradedFiatToken.d.ts b/@types/generated/UpgradedFiatToken.d.ts new file mode 100644 index 000000000..f57efabd8 --- /dev/null +++ b/@types/generated/UpgradedFiatToken.d.ts @@ -0,0 +1,1092 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface UpgradedFiatTokenContract + extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Mint { + name: "Mint"; + args: { + minter: string; + to: string; + amount: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Burn { + name: "Burn"; + args: { + burner: string; + amount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterConfigured { + name: "MinterConfigured"; + args: { + minter: string; + minterAllowedAmount: BN; + 0: string; + 1: BN; + }; +} + +export interface MinterRemoved { + name: "MinterRemoved"; + args: { + oldMinter: string; + 0: string; + }; +} + +export interface MasterMinterChanged { + name: "MasterMinterChanged"; + args: { + newMasterMinter: string; + 0: string; + }; +} + +export interface Blacklisted { + name: "Blacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + +export interface BlacklisterChanged { + name: "BlacklisterChanged"; + args: { + newBlacklister: string; + 0: string; + }; +} + +export interface Pause { + name: "Pause"; + args: {}; +} + +export interface Unpause { + name: "Unpause"; + args: {}; +} + +export interface PauserChanged { + name: "PauserChanged"; + args: { + newAddress: string; + 0: string; + }; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = + | Mint + | Burn + | MinterConfigured + | MinterRemoved + | MasterMinterChanged + | Blacklisted + | UnBlacklisted + | BlacklisterChanged + | Pause + | Unpause + | PauserChanged + | Approval + | OwnershipTransferred + | Transfer; + +export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + initialize: { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + methods: { + name(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Adds blacklisted check to approve + * @returns True if the operation was successful. + */ + approve: { + ( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _spender: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Removes account from blacklist + * @param _account The address to remove from the blacklist + */ + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @returns bool success + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + * @returns True if the operation was successful. + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + initialize: { + ( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _name: string, + _symbol: string, + _currency: string, + _decimals: number | BN | string, + _masterMinter: string, + _pauser: string, + _blacklister: string, + _owner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Function to mint tokens + * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. + * @param _to The address that will receive the minted tokens. + * @returns A boolean that indicates if the operation was successful. + */ + mint: { + ( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned + */ + burn: { + ( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter + * @returns True if the operation was successful. + */ + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * update the pauser role + */ + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newPauser: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get token balance of an account + * @param account address The account + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + /** + * Get minter allowance for an account + * @param minter The address of the minter + */ + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Tells the address of the owner + * @returns the address of the owner + */ + owner(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + * @returns bool success + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is a minter + * @param account The address to check + */ + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newOwner: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Adds account to blacklist + * @param _account The address to blacklist + */ + blacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts b/@types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts similarity index 99% rename from @types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts rename to @types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts index c79374cbf..db2a0a478 100644 --- a/@types/generated/FiatTokenV2NewFieldsNewLogicTest.d.ts +++ b/@types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts @@ -4,11 +4,11 @@ import BN from "bn.js"; import { EventData, PastEventOptions } from "web3-eth-contract"; -export interface FiatTokenV2NewFieldsNewLogicTestContract - extends Truffle.Contract { +export interface UpgradedFiatTokenNewFieldsNewLogicTestContract + extends Truffle.Contract { "new"( meta?: Truffle.TransactionDetails - ): Promise; + ): Promise; } export interface Mint { @@ -151,7 +151,7 @@ type AllEvents = | OwnershipTransferred | Transfer; -export interface FiatTokenV2NewFieldsNewLogicTestInstance +export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance extends Truffle.ContractInstance { name(txDetails?: Truffle.TransactionDetails): Promise; diff --git a/@types/generated/FiatTokenV2NewFieldsTest.d.ts b/@types/generated/UpgradedFiatTokenNewFieldsTest.d.ts similarity index 99% rename from @types/generated/FiatTokenV2NewFieldsTest.d.ts rename to @types/generated/UpgradedFiatTokenNewFieldsTest.d.ts index 33f43acf0..a680ed49d 100644 --- a/@types/generated/FiatTokenV2NewFieldsTest.d.ts +++ b/@types/generated/UpgradedFiatTokenNewFieldsTest.d.ts @@ -4,11 +4,11 @@ import BN from "bn.js"; import { EventData, PastEventOptions } from "web3-eth-contract"; -export interface FiatTokenV2NewFieldsTestContract - extends Truffle.Contract { +export interface UpgradedFiatTokenNewFieldsTestContract + extends Truffle.Contract { "new"( meta?: Truffle.TransactionDetails - ): Promise; + ): Promise; } export interface Mint { @@ -151,7 +151,7 @@ type AllEvents = | OwnershipTransferred | Transfer; -export interface FiatTokenV2NewFieldsTestInstance +export interface UpgradedFiatTokenNewFieldsTestInstance extends Truffle.ContractInstance { name(txDetails?: Truffle.TransactionDetails): Promise; diff --git a/@types/generated/index.d.ts b/@types/generated/index.d.ts index 9d2282b6e..3ccac9e50 100644 --- a/@types/generated/index.d.ts +++ b/@types/generated/index.d.ts @@ -8,13 +8,14 @@ import { Erc20BasicContract } from "./Erc20Basic"; import { FiatTokenProxyContract } from "./FiatTokenProxy"; import { FiatTokenV1Contract } from "./FiatTokenV1"; import { FiatTokenV2Contract } from "./FiatTokenV2"; -import { FiatTokenV2NewFieldsNewLogicTestContract } from "./FiatTokenV2NewFieldsNewLogicTest"; -import { FiatTokenV2NewFieldsTestContract } from "./FiatTokenV2NewFieldsTest"; import { MigrationsContract } from "./Migrations"; import { OwnableContract } from "./Ownable"; import { PausableContract } from "./Pausable"; import { ProxyContract } from "./Proxy"; import { UpgradeabilityProxyContract } from "./UpgradeabilityProxy"; +import { UpgradedFiatTokenContract } from "./UpgradedFiatToken"; +import { UpgradedFiatTokenNewFieldsNewLogicTestContract } from "./UpgradedFiatTokenNewFieldsNewLogicTest"; +import { UpgradedFiatTokenNewFieldsTestContract } from "./UpgradedFiatTokenNewFieldsTest"; declare global { namespace Truffle { @@ -28,17 +29,18 @@ declare global { require(name: "FiatTokenProxy"): FiatTokenProxyContract; require(name: "FiatTokenV1"): FiatTokenV1Contract; require(name: "FiatTokenV2"): FiatTokenV2Contract; - require( - name: "FiatTokenV2NewFieldsNewLogicTest" - ): FiatTokenV2NewFieldsNewLogicTestContract; - require( - name: "FiatTokenV2NewFieldsTest" - ): FiatTokenV2NewFieldsTestContract; require(name: "Migrations"): MigrationsContract; require(name: "Ownable"): OwnableContract; require(name: "Pausable"): PausableContract; require(name: "Proxy"): ProxyContract; require(name: "UpgradeabilityProxy"): UpgradeabilityProxyContract; + require(name: "UpgradedFiatToken"): UpgradedFiatTokenContract; + require( + name: "UpgradedFiatTokenNewFieldsNewLogicTest" + ): UpgradedFiatTokenNewFieldsNewLogicTestContract; + require( + name: "UpgradedFiatTokenNewFieldsTest" + ): UpgradedFiatTokenNewFieldsTestContract; } } } @@ -56,14 +58,6 @@ export { } from "./FiatTokenProxy"; export { FiatTokenV1Contract, FiatTokenV1Instance } from "./FiatTokenV1"; export { FiatTokenV2Contract, FiatTokenV2Instance } from "./FiatTokenV2"; -export { - FiatTokenV2NewFieldsNewLogicTestContract, - FiatTokenV2NewFieldsNewLogicTestInstance -} from "./FiatTokenV2NewFieldsNewLogicTest"; -export { - FiatTokenV2NewFieldsTestContract, - FiatTokenV2NewFieldsTestInstance -} from "./FiatTokenV2NewFieldsTest"; export { MigrationsContract, MigrationsInstance } from "./Migrations"; export { OwnableContract, OwnableInstance } from "./Ownable"; export { PausableContract, PausableInstance } from "./Pausable"; @@ -72,3 +66,15 @@ export { UpgradeabilityProxyContract, UpgradeabilityProxyInstance } from "./UpgradeabilityProxy"; +export { + UpgradedFiatTokenContract, + UpgradedFiatTokenInstance +} from "./UpgradedFiatToken"; +export { + UpgradedFiatTokenNewFieldsNewLogicTestContract, + UpgradedFiatTokenNewFieldsNewLogicTestInstance +} from "./UpgradedFiatTokenNewFieldsNewLogicTest"; +export { + UpgradedFiatTokenNewFieldsTestContract, + UpgradedFiatTokenNewFieldsTestInstance +} from "./UpgradedFiatTokenNewFieldsTest"; diff --git a/contracts/test/UpgradedFiatToken.sol b/contracts/test/UpgradedFiatToken.sol new file mode 100644 index 000000000..d7b8c905e --- /dev/null +++ b/contracts/test/UpgradedFiatToken.sol @@ -0,0 +1,34 @@ +/** + * Copyright CENTRE SECZ 2018-2020 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +pragma solidity ^0.4.24; + +import "../FiatTokenV1.sol"; + + +/** + * @title UpgradedFiatToken + * @dev ERC20 Token backed by fiat reserves + */ +contract UpgradedFiatToken is FiatTokenV1 { + +} diff --git a/contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol similarity index 94% rename from contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol rename to contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol index 2ef00ab1c..e8a5ec25a 100644 --- a/contracts/test/FiatTokenV2NewFieldsNewLogicTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol @@ -22,14 +22,14 @@ pragma solidity ^0.4.24; -import "./../FiatTokenV1.sol"; +import "../FiatTokenV1.sol"; /** - * @title FiatTokenV2NewFieldsNewLogicTest + * @title UpgradedFiatTokenNewFieldsNewLogicTest * @dev ERC20 Token backed by fiat reserves */ -contract FiatTokenV2NewFieldsNewLogicTest is FiatTokenV1 { +contract UpgradedFiatTokenNewFieldsNewLogicTest is FiatTokenV1 { bool public newBool; address public newAddress; uint256 public newUint; diff --git a/contracts/test/FiatTokenV2NewFieldsTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol similarity index 94% rename from contracts/test/FiatTokenV2NewFieldsTest.sol rename to contracts/test/UpgradedFiatTokenNewFieldsTest.sol index 2c6def29a..fe9c8ab4c 100644 --- a/contracts/test/FiatTokenV2NewFieldsTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol @@ -22,14 +22,14 @@ pragma solidity ^0.4.24; -import "./../FiatTokenV1.sol"; +import "../FiatTokenV1.sol"; /** - * @title FiatTokenV2NewFieldsTest + * @title UpgradedFiatTokenNewFieldsTest * @dev ERC20 Token backed by fiat reserves */ -contract FiatTokenV2NewFieldsTest is FiatTokenV1 { +contract UpgradedFiatTokenNewFieldsTest is FiatTokenV1 { bool public newBool; address public newAddress; uint256 public newUint; diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index 862062913..4d19593c3 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,4 +1,4 @@ -const Migrations = artifacts.require("./Migrations.sol"); +const Migrations = artifacts.require("Migrations"); module.exports = async (deployer) => { await deployer.deploy(Migrations); diff --git a/migrations/2_deploy_usdc.js b/migrations/2_deploy_v1.js similarity index 95% rename from migrations/2_deploy_usdc.js rename to migrations/2_deploy_v1.js index 70b3434c9..a3e293919 100644 --- a/migrations/2_deploy_usdc.js +++ b/migrations/2_deploy_v1.js @@ -1,5 +1,5 @@ -const FiatTokenV1 = artifacts.require("./FiatTokenV1.sol"); -const FiatTokenProxy = artifacts.require("./FiatTokenProxy.sol"); +const FiatTokenV1 = artifacts.require("FiatTokenV1"); +const FiatTokenProxy = artifacts.require("FiatTokenProxy"); // Any address will do, preferably one we generated const throwawayAddress = "0x64e078a8aa15a41b85890265648e965de686bae6"; diff --git a/test/v1/EventsTests.js b/test/v1/EventsTests.js index 69ec91821..5d5e1fbb2 100644 --- a/test/v1/EventsTests.js +++ b/test/v1/EventsTests.js @@ -1,5 +1,5 @@ const { - FiatToken, + FiatTokenV1, minterAccount, masterMinterAccount, arbitraryAccount, @@ -35,7 +35,7 @@ async function run_tests(_newToken, _accounts) { let proxy, token; beforeEach(async () => { - const rawToken = await FiatToken.new(); + const rawToken = await FiatTokenV1.new(); const tokenConfig = await initializeTokenWithProxy(rawToken); ({ proxy, token } = tokenConfig); assert.strictEqual(proxy.address, token.address); diff --git a/test/v1/FiatTokenLegacy.test.js b/test/v1/FiatTokenLegacy.test.js index 873763223..3e24747c8 100644 --- a/test/v1/FiatTokenLegacy.test.js +++ b/test/v1/FiatTokenLegacy.test.js @@ -26,7 +26,7 @@ const { initializeTokenWithProxy, upgradeTo, UpgradedFiatToken, - FiatToken, + FiatTokenV1, getAdmin, } = require("./TokenTestUtils"); @@ -35,7 +35,7 @@ async function run_tests(_newToken, accounts) { let proxy, token; beforeEach(async () => { - const rawToken = await FiatToken.new(); + const rawToken = await FiatTokenV1.new(); const tokenConfig = await initializeTokenWithProxy(rawToken); ({ proxy, token } = tokenConfig); assert.strictEqual(proxy.address, token.address); diff --git a/test/v1/MiscTests.js b/test/v1/MiscTests.js index 35786271f..51da3dfcd 100644 --- a/test/v1/MiscTests.js +++ b/test/v1/MiscTests.js @@ -10,7 +10,7 @@ const { pauserAccount, initializeTokenWithProxy, getInitializedV1, - FiatToken, + FiatTokenV1, } = require("./TokenTestUtils"); const FiatTokenProxy = artifacts.require("FiatTokenProxy"); @@ -717,7 +717,7 @@ async function run_tests(newToken, _accounts) { const newProxy = await FiatTokenProxy.new(rawToken.address, { from: arbitraryAccount, }); - const token = await FiatToken.at(newProxy.address); + const token = await FiatTokenV1.at(newProxy.address); const initialized = await getInitializedV1(token); assert.strictEqual("0x00", initialized); }); diff --git a/test/v1/ProxyNegativeTests.js b/test/v1/ProxyNegativeTests.js index e1f19edbd..129cbb9c6 100644 --- a/test/v1/ProxyNegativeTests.js +++ b/test/v1/ProxyNegativeTests.js @@ -17,7 +17,7 @@ const { proxyOwnerAccount, initializeTokenWithProxy, encodeCall, - FiatToken, + FiatTokenV1, UpgradedFiatToken, UpgradedFiatTokenNewFields, } = require("./TokenTestUtils"); @@ -129,7 +129,7 @@ async function run_tests(newToken, _accounts) { await expectRevert( proxy.upgradeTo(upgradedToken.address, { from: masterMinterAccount }) ); - const finalToken = await FiatToken.at(proxy.address); + const finalToken = await FiatTokenV1.at(proxy.address); const implementation = await proxy.implementation({ from: proxyOwnerAccount, }); @@ -151,7 +151,7 @@ async function run_tests(newToken, _accounts) { from: masterMinterAccount, }) ); - const finalToken = await FiatToken.at(proxy.address); + const finalToken = await FiatTokenV1.at(proxy.address); const implementation = await proxy.implementation({ from: proxyOwnerAccount, }); diff --git a/test/v1/TestWrapper.js b/test/v1/TestWrapper.js index df98a3d3d..ec6100262 100644 --- a/test/v1/TestWrapper.js +++ b/test/v1/TestWrapper.js @@ -1,9 +1,9 @@ -const { UpgradedFiatToken, FiatToken } = require("./TokenTestUtils"); +const { UpgradedFiatToken, FiatTokenV1 } = require("./TokenTestUtils"); // The following helpers make fresh original/upgraded tokens before each test. async function newToken() { - const token = await FiatToken.new(); + const token = await FiatTokenV1.new(); return token; } diff --git a/test/v1/TokenTestUtils.js b/test/v1/TokenTestUtils.js index 6a3782751..02224d005 100644 --- a/test/v1/TokenTestUtils.js +++ b/test/v1/TokenTestUtils.js @@ -4,13 +4,13 @@ const _ = require("lodash"); const BN = require("bn.js"); const Q = require("q"); -const FiatToken = artifacts.require("FiatTokenV1"); -const UpgradedFiatToken = artifacts.require("FiatTokenV2"); +const FiatTokenV1 = artifacts.require("FiatTokenV1"); +const UpgradedFiatToken = artifacts.require("UpgradedFiatToken"); const UpgradedFiatTokenNewFields = artifacts.require( - "FiatTokenV2NewFieldsTest" + "UpgradedFiatTokenNewFieldsTest" ); const UpgradedFiatTokenNewFieldsNewLogic = artifacts.require( - "FiatTokenV2NewFieldsNewLogicTest" + "UpgradedFiatTokenNewFieldsNewLogicTest" ); const FiatTokenProxy = artifacts.require("FiatTokenProxy"); @@ -871,7 +871,7 @@ async function customInitializeTokenWithProxy( const proxy = await FiatTokenProxy.new(rawToken.address, { from: proxyOwnerAccount, }); - const proxiedToken = await FiatToken.at(proxy.address); + const proxiedToken = await FiatTokenV1.at(proxy.address); await proxiedToken.initialize( name, symbol, @@ -897,7 +897,7 @@ async function upgradeTo(proxy, upgradedToken, proxyUpgraderAccount) { proxyUpgraderAccount = proxyOwnerAccount; } await proxy.upgradeTo(upgradedToken.address, { from: proxyUpgraderAccount }); - const proxiedToken = await FiatToken.at(proxy.address); + const proxiedToken = await FiatTokenV1.at(proxy.address); assert.strictEqual(proxiedToken.address, proxy.address); return { proxy, @@ -972,7 +972,7 @@ async function getInitializedV1(token) { } module.exports = { - FiatToken, + FiatTokenV1, FiatTokenProxy, UpgradedFiatToken, UpgradedFiatTokenNewFields, diff --git a/validate/validate.js b/validate/validate.js index ddbd48ead..f00848e91 100644 --- a/validate/validate.js +++ b/validate/validate.js @@ -23,7 +23,7 @@ const TOTALSUPPLY = 0; const PAUSED = false; // Name of current implementation artifact as stored in ./build/contracts/*.json -const FiatToken = artifacts.require("FiatTokenV1"); +const FiatTokenV1 = artifacts.require("FiatTokenV1"); // Name of current proxy artifact as stored in ./build/contracts/*.json artifacts.require("FiatTokenProxy"); @@ -86,9 +86,9 @@ function print(name, actual, expected) { async function Validate() { console.log("Connecting to contract..."); - await FiatToken.at(fiatTokenAddress); + await FiatTokenV1.at(fiatTokenAddress); console.log("Token found."); - const proxiedToken = await FiatToken.at(fiatTokenProxyAddress); + const proxiedToken = await FiatTokenV1.at(fiatTokenProxyAddress); console.log("Proxied token created."); // initialized needs to retrieved manually From 58f79be956e8bf017f37f90621b8554af7cc6c10 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Wed, 13 May 2020 17:14:06 -0700 Subject: [PATCH 15/22] Add storage slot test to ensure slots are retained This test ensures slot positions are retained post-upgrade by manually checking the use of the slots at expected positions. --- test/v2/StorageSlotTest.ts | 245 +++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 test/v2/StorageSlotTest.ts diff --git a/test/v2/StorageSlotTest.ts b/test/v2/StorageSlotTest.ts new file mode 100644 index 000000000..8c2c8cd90 --- /dev/null +++ b/test/v2/StorageSlotTest.ts @@ -0,0 +1,245 @@ +import BN from "bn.js"; +import { + FiatTokenProxyInstance, + FiatTokenV1Instance, + FiatTokenV2Instance, +} from "../../@types/generated"; + +const FiatTokenV1 = artifacts.require("FiatTokenV1"); +const FiatTokenV2 = artifacts.require("FiatTokenV2"); +const FiatTokenProxy = artifacts.require("FiatTokenProxy"); + +contract("StorageSlotTest", (accounts) => { + const [name, symbol, currency, decimals] = ["USD Coin", "USDC", "USD", 6]; + const [mintAllowance, minted, transferred, allowance] = [ + 1000e6, + 100e6, + 30e6, + 10e6, + ]; + const [ + owner, + proxyAdmin, + masterMinter, + pauser, + blacklister, + minter, + alice, + bob, + charlie, + ] = accounts; + + const testWithContract = function < + T extends FiatTokenV1Instance | FiatTokenV2Instance + >(FiatTokenContract: Truffle.Contract): void { + let fiatToken: T; + let proxy: FiatTokenProxyInstance; + let proxyAsFiatToken: T; + + beforeEach(async () => { + fiatToken = await FiatTokenContract.new(); + proxy = await FiatTokenProxy.new(fiatToken.address); + proxyAsFiatToken = await FiatTokenContract.at(proxy.address); + + await proxy.changeAdmin(proxyAdmin); + + await proxyAsFiatToken.initialize( + name, + symbol, + currency, + decimals, + masterMinter, + pauser, + blacklister, + owner + ); + + await proxyAsFiatToken.configureMinter(minter, mintAllowance, { + from: masterMinter, + }); + await proxyAsFiatToken.mint(alice, minted, { from: minter }); + await proxyAsFiatToken.transfer(bob, transferred, { from: alice }); + await proxyAsFiatToken.approve(charlie, allowance, { from: alice }); + await proxyAsFiatToken.blacklist(charlie, { from: blacklister }); + await proxyAsFiatToken.pause({ from: pauser }); + }); + + it("retains original storage slots 0 through 13", async () => { + const slots = new Array(14); + for (let i = 0; i < slots.length; i++) { + slots[i] = await readSlot(proxy.address, i); + } + + // slot 0 - owner + expect(parseAddress(slots[0])).to.equal(owner); // owner + + // slot 1 - pauser, paused + // values are lower-order aligned + expect(parseInt(slots[1].slice(0, 2), 16)).to.equal(1); // paused + expect(parseAddress(slots[1].slice(2))).to.equal(pauser); // pauser + + // slot 2 - blacklister + expect(parseAddress(slots[2])).to.equal(blacklister); // blacklister + + // slot 3 - blacklisted (mapping, slot is unused) + expect(slots[3]).to.equal("0"); + + // slot 4 - name + expect(parseString(slots[4])).to.equal(name); + + // slot 5 - symbol + expect(parseString(slots[5])).to.equal(symbol); + + // slot 6 - decimals + expect(parseUint(slots[6]).toNumber()).to.equal(decimals); + + // slot 7 - currency + expect(parseString(slots[7])).to.equal(currency); + + // slot 8 - masterMinter, initialized + expect(slots[8].slice(0, 2)).to.equal("01"); // initialized + expect(parseAddress(slots[8].slice(2))).to.equal(masterMinter); // masterMinter + + // slot 9 - balances (mapping, slot is unused) + expect(slots[9]).to.equal("0"); + + // slot 10 - allowed (mapping, slot is unused) + expect(slots[10]).to.equal("0"); + + // slot 11 - totalSupply + expect(parseUint(slots[11]).toNumber()).to.equal(minted); + + // slot 12 - minters (mapping, slot is unused) + expect(slots[12]).to.equal("0"); + + // slot 13 - minterAllowed (mapping, slot is unused) + expect(slots[13]).to.equal("0"); + }); + + it("retains original storage slots for blacklisted mapping", async () => { + // blacklisted[alice] + let v = parseInt( + await readSlot(proxy.address, addressMappingSlot(alice, 3)), + 16 + ); + expect(v).to.equal(0); + + // blacklisted[charlie] + v = parseInt( + await readSlot(proxy.address, addressMappingSlot(charlie, 3)), + 16 + ); + expect(v).to.equal(1); + }); + + it("retains original storage slots for balances mapping", async () => { + // balance[alice] + let v = parseInt( + await readSlot(proxy.address, addressMappingSlot(alice, 9)), + 16 + ); + expect(v).to.equal(minted - transferred); + + // balances[bob] + v = parseInt( + await readSlot(proxy.address, addressMappingSlot(bob, 9)), + 16 + ); + expect(v).to.equal(transferred); + }); + + it("retains original storage slots for allowed mapping", async () => { + // allowed[alice][bob] + let v = parseInt( + await readSlot(proxy.address, address2MappingSlot(alice, bob, 10)), + 16 + ); + expect(v).to.equal(0); + // allowed[alice][charlie] + v = parseInt( + await readSlot(proxy.address, address2MappingSlot(alice, charlie, 10)), + 16 + ); + expect(v).to.equal(allowance); + }); + + it("retains original storage slots for minters mapping", async () => { + // minters[minter] + let v = parseInt( + await readSlot(proxy.address, addressMappingSlot(minter, 12)), + 16 + ); + expect(v).to.equal(1); + + // minters[alice] + v = parseInt( + await readSlot(proxy.address, addressMappingSlot(alice, 12)), + 16 + ); + expect(v).to.equal(0); + }); + + it("retains original storage slots for minterAllowed mapping", async () => { + // minterAllowed[minter] + let v = parseInt( + await readSlot(proxy.address, addressMappingSlot(minter, 13)), + 16 + ); + expect(v).to.equal(mintAllowance - minted); + + // minterAllowed[alice] + v = parseInt( + await readSlot(proxy.address, addressMappingSlot(alice, 13)), + 16 + ); + expect(v).to.equal(0); + }); + }; + + context("FiatTokenV1", () => { + testWithContract(FiatTokenV1); + }); + + context("FiatTokenV2", () => { + testWithContract(FiatTokenV2); + }); +}); + +async function readSlot( + address: string, + slot: number | string +): Promise { + const data = await web3.eth.getStorageAt(address, slot); + return data.replace(/^0x/, ""); +} + +function parseAddress(hex: string): string { + return web3.utils.toChecksumAddress(hex.padStart(40, "0")); +} + +function parseString(hex: string): string { + const len = parseInt(hex.slice(-2), 16); + return Buffer.from(hex.slice(0, len), "hex").toString("utf8"); +} + +function parseUint(hex: string): BN { + return new BN(hex, 16); +} + +function encodeUint(value: number | BN): string { + return new BN(value).toString(16).padStart(64, "0"); +} + +function encodeAddress(addr: string): string { + return addr.replace(/^0x/, "").toLowerCase().padStart(64, "0"); +} + +function addressMappingSlot(addr: string, pos: number): string { + return web3.utils.keccak256("0x" + encodeAddress(addr) + encodeUint(pos)); +} + +function address2MappingSlot(addr: string, addr2: string, pos: number): string { + return web3.utils.keccak256( + "0x" + encodeAddress(addr2) + addressMappingSlot(addr, pos).slice(2) + ); +} From 3f1c4cf3422bac67ac5f60abf00a0476e46f799c Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Wed, 13 May 2020 19:28:17 -0700 Subject: [PATCH 16/22] Set up solhint --- .solhint.json | 7 + README.md | 1 + package.json | 5 +- yarn.lock | 387 ++++++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 374 insertions(+), 26 deletions(-) create mode 100644 .solhint.json diff --git a/.solhint.json b/.solhint.json new file mode 100644 index 000000000..23d20eb78 --- /dev/null +++ b/.solhint.json @@ -0,0 +1,7 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": ["error", "^0.6.0"], + "reason-string": ["warn", { "maxLength": 64 }] + } +} diff --git a/README.md b/README.md index a6578f110..d1efc26fe 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ To check code for problems: $ yarn typecheck # Type-check TypeScript code $ yarn lint # Check JavaScript and TypeScript code $ yarn lint --fix # Fix problems where possible +$ yarn solhint # Check Solidity code ``` To auto-format code: diff --git a/package.json b/package.json index ba6d408c6..96aad8cce 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "fmt": "prettier --write './**/*.sol' './**/*.js' './**/*.ts' './**/*.json' './**/*.md'", "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --quiet", "test": "truffle test", - "coverage": "truffle run coverage" + "coverage": "truffle run coverage", + "solhint": "solhint 'contracts/**/*.sol'" }, "repository": { "type": "git", @@ -56,6 +57,8 @@ "prettier": "2.0.5", "prettier-plugin-solidity": "1.0.0-alpha.51", "q": "^1.5.1", + "solc": "0.6.7", + "solhint": "^3.0.0", "solidity-coverage": "^0.7.5", "truffle": "^5.1.24", "ts-node": "^8.10.1", diff --git a/yarn.lock b/yarn.lock index a72666668..f59af5437 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,11 +292,16 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-jsx@^5.2.0: +acorn-jsx@^5.0.0, acorn-jsx@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== +acorn@^6.0.7: + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== + acorn@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe" @@ -334,7 +339,7 @@ ajv@^5.1.1: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5, ajv@^6.6.1, ajv@^6.9.1: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -349,6 +354,11 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" @@ -361,6 +371,11 @@ ansi-regex@^2.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" @@ -391,6 +406,11 @@ ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + any-promise@1.3.0, any-promise@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -485,6 +505,11 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +ast-parents@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha1-UI/Q8F0MSHddnszaLhdEIyYejdM= + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" @@ -1337,6 +1362,25 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1380,7 +1424,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1435,6 +1479,13 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -1504,6 +1555,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + command-line-args@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" @@ -1518,6 +1574,16 @@ commander@2.15.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== +commander@2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -1602,6 +1668,16 @@ cors@^2.8.1: object-assign "^4" vary "^1" +cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + create-ecdh@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" @@ -1641,7 +1717,7 @@ cross-fetch@^2.1.0, cross-fetch@^2.1.1: node-fetch "2.1.2" whatwg-fetch "2.0.4" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -2048,7 +2124,7 @@ errno@~0.1.1: dependencies: prr "~1.0.1" -error-ex@^1.2.0: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== @@ -2217,6 +2293,14 @@ eslint-plugin-standard@^4.0.1: resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4" integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ== +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-scope@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" @@ -2225,6 +2309,13 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + eslint-utils@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" @@ -2232,11 +2323,53 @@ eslint-utils@^2.0.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== +eslint@^5.6.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + eslint@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.0.0.tgz#c35dfd04a4372110bd78c69a8d79864273919a08" @@ -2279,6 +2412,15 @@ eslint@^7.0.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + espree@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/espree/-/espree-7.0.0.tgz#8a7a60f218e69f120a842dc24c5a88aa7748a74e" @@ -2305,7 +2447,7 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.2.0: +esquery@^1.0.1, esquery@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== @@ -2858,6 +3000,13 @@ fetch-ponyfill@^4.0.0: dependencies: node-fetch "~1.7.1" +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -2984,6 +3133,17 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -3193,6 +3353,11 @@ global@~4.3.0: min-document "^2.19.0" process "~0.5.1" +globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + globals@^12.1.0: version "12.4.0" resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" @@ -3298,7 +3463,7 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: +graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -3538,6 +3703,14 @@ immediate@^3.2.3: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + import-fresh@^3.0.0: version "3.2.1" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" @@ -3574,6 +3747,25 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +inquirer@^6.2.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + inquirer@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" @@ -3635,6 +3827,11 @@ is-date-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3774,7 +3971,7 @@ js-sha3@0.5.7, js-sha3@^0.5.7: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= -js-sha3@^0.8.0: +js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== @@ -3789,7 +3986,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.x, js-yaml@^3.13.1: +js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -3824,6 +4021,11 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: version "3.8.0" resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" @@ -3885,6 +4087,13 @@ json5@^0.5.1: resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -3961,6 +4170,13 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + optionalDependencies: + graceful-fs "^4.1.9" + lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -4018,6 +4234,14 @@ levelup@^1.2.1: semver "~5.4.1" xtend "~4.0.0" +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -4026,14 +4250,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" @@ -4065,7 +4281,7 @@ lodash.toarray@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= -lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -4153,6 +4369,11 @@ memdown@^1.0.0: ltgt "~2.2.0" safe-buffer "~5.1.1" +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -4220,6 +4441,11 @@ mime@^2.2.0: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -4342,6 +4568,11 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -4523,6 +4754,13 @@ once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + onetime@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" @@ -4540,7 +4778,7 @@ openzeppelin-solidity@~1.10.0: resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.10.0.tgz#d77eee6653f5958d051318a61ba0b436f92216c0" integrity sha512-igkrumQQ2lrN2zjeQV4Dnb0GpTBj1fzMcd8HPyBUqwI0hhuscX/HzXiqKT6gFQl1j9Wy/ppVVs9fqL/foF7Gmg== -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -4694,6 +4932,14 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -4709,6 +4955,11 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -4857,7 +5108,7 @@ prettier@2.0.5, prettier@^2.0.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== -prettier@^1.14.2: +prettier@^1.14.2, prettier@^1.14.3: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== @@ -5102,6 +5353,11 @@ regexp.prototype.flags@^1.2.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" @@ -5166,11 +5422,21 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -5202,6 +5468,14 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -5229,6 +5503,13 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" +rimraf@^2.2.8: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -5244,7 +5525,7 @@ rlp@^2.0.0, rlp@^2.2.3: dependencies: bn.js "^4.11.1" -run-async@^2.4.0: +run-async@^2.2.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== @@ -5259,7 +5540,7 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@^6.5.3: +rxjs@^6.4.0, rxjs@^6.5.3: version "6.5.5" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== @@ -5379,7 +5660,7 @@ semaphore@>=1.0.1, semaphore@^1.0.3: resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.5.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -5548,6 +5829,42 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" +solc@0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.7.tgz#4cf6bed8c1d3a6728fcab86552c6ac31fe4d14ca" + integrity sha512-a3iocjS1yGzw3Wy7jkqSLX3Vg1lMDCyoKZoVfpOagRGWkh37f11BrcUDO8f73rjdpw2WUBSLJtTQ26i52/0JOg== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solhint@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.0.0.tgz#78e185e84fb7da7d5394ddf1fda7c01cb987519d" + integrity sha512-z6JBNrtWZ51g/tkuZGc0ywQVskRqIGjXppR4g30bjPgOrxSBWJp3qX2pcI9+FbSI3uu1RqqbZ89CeURkZUF+RA== + dependencies: + "@solidity-parser/parser" "^0.6.0" + ajv "^6.6.1" + antlr4 "4.7.1" + ast-parents "0.0.1" + chalk "^2.4.2" + commander "2.18.0" + cosmiconfig "^5.0.7" + eslint "^5.6.0" + fast-diff "^1.1.2" + glob "^7.1.3" + ignore "^4.0.6" + js-yaml "^3.12.0" + lodash "^4.17.11" + semver "^6.3.0" + optionalDependencies: + prettier "^1.14.3" + solidity-coverage@^0.7.5: version "0.7.5" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.5.tgz#29a738b5644b23687e540688520457ce6792ce94" @@ -5668,6 +5985,14 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -5755,6 +6080,13 @@ strip-ansi@^3.0.0: dependencies: ansi-regex "^2.0.0" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -5793,6 +6125,11 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" +strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strip-json-comments@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" @@ -5954,7 +6291,7 @@ timed-out@^4.0.0, timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= -tmp@^0.0.33: +tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== From abfbe606801768b6e4640eb6e5377a96ec4648d1 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Wed, 13 May 2020 19:31:48 -0700 Subject: [PATCH 17/22] Upgrade contracts to solidity v0.6.8 --- .../generated/AdminUpgradeabilityProxy.d.ts | 12 - @types/generated/Blacklistable.d.ts | 30 +- @types/generated/Erc20.d.ts | 217 ----- @types/generated/Erc20Basic.d.ts | 94 -- @types/generated/FiatTokenProxy.d.ts | 112 +-- @types/generated/FiatTokenV1.d.ts | 400 ++++---- @types/generated/FiatTokenV2.d.ts | 850 +++++++++-------- @types/generated/Ierc20.d.ts | 259 ++++++ @types/generated/Ownable.d.ts | 2 - @types/generated/Pausable.d.ts | 38 +- @types/generated/UpgradedFiatToken.d.ts | 850 +++++++++-------- ...pgradedFiatTokenNewFieldsNewLogicTest.d.ts | 868 +++++++++--------- .../UpgradedFiatTokenNewFieldsTest.d.ts | 868 +++++++++--------- @types/generated/index.d.ts | 9 +- contracts/Blacklistable.sol | 19 +- contracts/FiatTokenProxy.sol | 8 +- contracts/FiatTokenV1.sol | 100 +- contracts/FiatTokenV2.sol | 6 +- contracts/Migrations.sol | 4 +- contracts/Ownable.sol | 9 +- contracts/Pausable.sol | 13 +- contracts/test/UpgradedFiatToken.sol | 6 +- ...UpgradedFiatTokenNewFieldsNewLogicTest.sol | 12 +- .../test/UpgradedFiatTokenNewFieldsTest.sol | 12 +- .../AdminUpgradeabilityProxy.sol | 173 ++++ contracts/upgradeability/Proxy.sol | 105 +++ .../upgradeability/UpgradeabilityProxy.sol | 102 ++ package.json | 8 +- test/v1/ProxyNegativeTests.js | 7 - truffle-config.js | 2 +- yarn.lock | 180 +--- 31 files changed, 2750 insertions(+), 2625 deletions(-) delete mode 100644 @types/generated/Erc20.d.ts delete mode 100644 @types/generated/Erc20Basic.d.ts create mode 100644 @types/generated/Ierc20.d.ts create mode 100644 contracts/upgradeability/AdminUpgradeabilityProxy.sol create mode 100644 contracts/upgradeability/Proxy.sol create mode 100644 contracts/upgradeability/UpgradeabilityProxy.sol diff --git a/@types/generated/AdminUpgradeabilityProxy.d.ts b/@types/generated/AdminUpgradeabilityProxy.d.ts index 1d7056a1f..c9ef1881d 100644 --- a/@types/generated/AdminUpgradeabilityProxy.d.ts +++ b/@types/generated/AdminUpgradeabilityProxy.d.ts @@ -34,14 +34,8 @@ type AllEvents = AdminChanged | Upgraded; export interface AdminUpgradeabilityProxyInstance extends Truffle.ContractInstance { - /** - * @returns The address of the proxy admin. - */ admin(txDetails?: Truffle.TransactionDetails): Promise; - /** - * @returns The address of the implementation. - */ implementation(txDetails?: Truffle.TransactionDetails): Promise; /** @@ -118,14 +112,8 @@ export interface AdminUpgradeabilityProxyInstance }; methods: { - /** - * @returns The address of the proxy admin. - */ admin(txDetails?: Truffle.TransactionDetails): Promise; - /** - * @returns The address of the implementation. - */ implementation(txDetails?: Truffle.TransactionDetails): Promise; /** diff --git a/@types/generated/Blacklistable.d.ts b/@types/generated/Blacklistable.d.ts index 50039c309..e41640f46 100644 --- a/@types/generated/Blacklistable.d.ts +++ b/@types/generated/Blacklistable.d.ts @@ -17,14 +17,6 @@ export interface Blacklisted { }; } -export interface UnBlacklisted { - name: "UnBlacklisted"; - args: { - _account: string; - 0: string; - }; -} - export interface BlacklisterChanged { name: "BlacklisterChanged"; args: { @@ -43,21 +35,28 @@ export interface OwnershipTransferred { }; } +export interface UnBlacklisted { + name: "UnBlacklisted"; + args: { + _account: string; + 0: string; + }; +} + type AllEvents = | Blacklisted - | UnBlacklisted | BlacklisterChanged - | OwnershipTransferred; + | OwnershipTransferred + | UnBlacklisted; export interface BlacklistableInstance extends Truffle.ContractInstance { + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** * Tells the address of the owner - * @returns the address of the owner */ owner(txDetails?: Truffle.TransactionDetails): Promise; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - /** * Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. @@ -152,14 +151,13 @@ export interface BlacklistableInstance extends Truffle.ContractInstance { }; methods: { + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** * Tells the address of the owner - * @returns the address of the owner */ owner(txDetails?: Truffle.TransactionDetails): Promise; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - /** * Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. diff --git a/@types/generated/Erc20.d.ts b/@types/generated/Erc20.d.ts deleted file mode 100644 index edfd4f522..000000000 --- a/@types/generated/Erc20.d.ts +++ /dev/null @@ -1,217 +0,0 @@ -/* Generated by ts-generator ver. 0.0.8 */ -/* tslint:disable */ - -import BN from "bn.js"; -import { EventData, PastEventOptions } from "web3-eth-contract"; - -export interface Erc20Contract extends Truffle.Contract { - "new"(meta?: Truffle.TransactionDetails): Promise; -} - -export interface Approval { - name: "Approval"; - args: { - owner: string; - spender: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; -} - -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; -} - -type AllEvents = Approval | Transfer; - -export interface Erc20Instance extends Truffle.ContractInstance { - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; - - balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; - - transfer: { - ( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - transferFrom: { - ( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - approve: { - ( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - methods: { - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; - - balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; - - transfer: { - ( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - transferFrom: { - ( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - from: string, - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - approve: { - ( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - spender: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - }; - - getPastEvents(event: string): Promise; - getPastEvents( - event: string, - options: PastEventOptions, - callback: (error: Error, event: EventData) => void - ): Promise; - getPastEvents(event: string, options: PastEventOptions): Promise; - getPastEvents( - event: string, - callback: (error: Error, event: EventData) => void - ): Promise; -} diff --git a/@types/generated/Erc20Basic.d.ts b/@types/generated/Erc20Basic.d.ts deleted file mode 100644 index 9380a36f9..000000000 --- a/@types/generated/Erc20Basic.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* Generated by ts-generator ver. 0.0.8 */ -/* tslint:disable */ - -import BN from "bn.js"; -import { EventData, PastEventOptions } from "web3-eth-contract"; - -export interface Erc20BasicContract - extends Truffle.Contract { - "new"(meta?: Truffle.TransactionDetails): Promise; -} - -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; -} - -type AllEvents = Transfer; - -export interface Erc20BasicInstance extends Truffle.ContractInstance { - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; - - balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; - - transfer: { - ( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - methods: { - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; - - balanceOf(who: string, txDetails?: Truffle.TransactionDetails): Promise; - - transfer: { - ( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - to: string, - value: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - }; - - getPastEvents(event: string): Promise; - getPastEvents( - event: string, - options: PastEventOptions, - callback: (error: Error, event: EventData) => void - ): Promise; - getPastEvents(event: string, options: PastEventOptions): Promise; - getPastEvents( - event: string, - callback: (error: Error, event: EventData) => void - ): Promise; -} diff --git a/@types/generated/FiatTokenProxy.d.ts b/@types/generated/FiatTokenProxy.d.ts index 81184bb45..e586b7c09 100644 --- a/@types/generated/FiatTokenProxy.d.ts +++ b/@types/generated/FiatTokenProxy.d.ts @@ -33,6 +33,32 @@ export interface Upgraded { type AllEvents = AdminChanged | Upgraded; export interface FiatTokenProxyInstance extends Truffle.ContractInstance { + admin(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Changes the admin of the proxy. Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + changeAdmin: { + (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + implementation(txDetails?: Truffle.TransactionDetails): Promise; + /** * Upgrade the backing implementation of the proxy. Only the admin can call this function. * @param newImplementation Address of the new implementation. @@ -84,39 +110,33 @@ export interface FiatTokenProxyInstance extends Truffle.ContractInstance { ): Promise; }; - /** - * @returns The address of the implementation. - */ - implementation(txDetails?: Truffle.TransactionDetails): Promise; + methods: { + admin(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Changes the admin of the proxy. Only the current admin can call this function. - * @param newAdmin Address to transfer proxy administration to. - */ - changeAdmin: { - (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - newAdmin: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - newAdmin: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - newAdmin: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + /** + * Changes the admin of the proxy. Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + changeAdmin: { + (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + newAdmin: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; - /** - * @returns The address of the proxy admin. - */ - admin(txDetails?: Truffle.TransactionDetails): Promise; + implementation(txDetails?: Truffle.TransactionDetails): Promise; - methods: { /** * Upgrade the backing implementation of the proxy. Only the admin can call this function. * @param newImplementation Address of the new implementation. @@ -167,38 +187,6 @@ export interface FiatTokenProxyInstance extends Truffle.ContractInstance { txDetails?: Truffle.TransactionDetails ): Promise; }; - - /** - * @returns The address of the implementation. - */ - implementation(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Changes the admin of the proxy. Only the current admin can call this function. - * @param newAdmin Address to transfer proxy administration to. - */ - changeAdmin: { - (newAdmin: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - newAdmin: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - newAdmin: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - newAdmin: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * @returns The address of the proxy admin. - */ - admin(txDetails?: Truffle.TransactionDetails): Promise; }; getPastEvents(event: string): Promise; diff --git a/@types/generated/FiatTokenV1.d.ts b/@types/generated/FiatTokenV1.d.ts index 793d411a2..9d42506d8 100644 --- a/@types/generated/FiatTokenV1.d.ts +++ b/@types/generated/FiatTokenV1.d.ts @@ -9,43 +9,41 @@ export interface FiatTokenV1Contract "new"(meta?: Truffle.TransactionDetails): Promise; } -export interface Mint { - name: "Mint"; +export interface Approval { + name: "Approval"; args: { - minter: string; - to: string; - amount: BN; + owner: string; + spender: string; + value: BN; 0: string; 1: string; 2: BN; }; } -export interface Burn { - name: "Burn"; +export interface Blacklisted { + name: "Blacklisted"; args: { - burner: string; - amount: BN; + _account: string; 0: string; - 1: BN; }; } -export interface MinterConfigured { - name: "MinterConfigured"; +export interface BlacklisterChanged { + name: "BlacklisterChanged"; args: { - minter: string; - minterAllowedAmount: BN; + newBlacklister: string; 0: string; - 1: BN; }; } -export interface MinterRemoved { - name: "MinterRemoved"; +export interface Burn { + name: "Burn"; args: { - oldMinter: string; + burner: string; + amount: BN; 0: string; + 1: BN; }; } @@ -57,37 +55,48 @@ export interface MasterMinterChanged { }; } -export interface Blacklisted { - name: "Blacklisted"; +export interface Mint { + name: "Mint"; args: { - _account: string; + minter: string; + to: string; + amount: BN; 0: string; + 1: string; + 2: BN; }; } -export interface UnBlacklisted { - name: "UnBlacklisted"; +export interface MinterConfigured { + name: "MinterConfigured"; args: { - _account: string; + minter: string; + minterAllowedAmount: BN; 0: string; + 1: BN; }; } -export interface BlacklisterChanged { - name: "BlacklisterChanged"; +export interface MinterRemoved { + name: "MinterRemoved"; args: { - newBlacklister: string; + oldMinter: string; 0: string; }; } -export interface Pause { - name: "Pause"; - args: {}; +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; } -export interface Unpause { - name: "Unpause"; +export interface Pause { + name: "Pause"; args: {}; } @@ -99,11 +108,11 @@ export interface PauserChanged { }; } -export interface Approval { - name: "Approval"; +export interface Transfer { + name: "Transfer"; args: { - owner: string; - spender: string; + from: string; + to: string; value: BN; 0: string; 1: string; @@ -111,52 +120,41 @@ export interface Approval { }; } -export interface OwnershipTransferred { - name: "OwnershipTransferred"; +export interface UnBlacklisted { + name: "UnBlacklisted"; args: { - previousOwner: string; - newOwner: string; + _account: string; 0: string; - 1: string; }; } -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; +export interface Unpause { + name: "Unpause"; + args: {}; } type AllEvents = - | Mint + | Approval + | Blacklisted + | BlacklisterChanged | Burn + | MasterMinterChanged + | Mint | MinterConfigured | MinterRemoved - | MasterMinterChanged - | Blacklisted - | UnBlacklisted - | BlacklisterChanged + | OwnershipTransferred | Pause - | Unpause | PauserChanged - | Approval - | OwnershipTransferred - | Transfer; + | Transfer + | UnBlacklisted + | Unpause; export interface FiatTokenV1Instance extends Truffle.ContractInstance { - name(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -174,14 +172,34 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + name(txDetails?: Truffle.TransactionDetails): Promise; + /** - * called by the owner to unpause, returns to normal state + * Tells the address of the owner */ - unpause: { + owner(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { (txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -190,126 +208,107 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + /** - * update the pauser role + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newPauser: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newPauser: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newPauser: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - paused(txDetails?: Truffle.TransactionDetails): Promise; - /** - * called by the owner to pause, triggers stopped state - */ - pause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; - - /** - * Tells the address of the owner - * @returns the address of the owner + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - owner(txDetails?: Truffle.TransactionDetails): Promise; - - symbol(txDetails?: Truffle.TransactionDetails): Promise; - - pauser(txDetails?: Truffle.TransactionDetails): Promise; - - updateBlacklister: { - (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newBlacklister: string, + _account: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newBlacklister: string, + _account: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newBlacklister: string, + _account: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. + * called by the owner to unpause, returns to normal state */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + updateBlacklister: { + (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - newOwner: string, + _newBlacklister: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newBlacklister: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newBlacklister: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - initialize: { ( _name: string, @@ -361,7 +360,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -431,7 +429,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -461,7 +458,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred - * @returns bool success */ transferFrom: { ( @@ -494,7 +490,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -523,7 +518,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * Function to add/update a new minter * @param minter The address of the minter * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. */ configureMinter: { ( @@ -551,7 +545,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { /** * Function to remove a minter * @param minter The address of the minter to remove - * @returns True if the operation was successful. */ removeMinter: { (minter: string, txDetails?: Truffle.TransactionDetails): Promise< @@ -613,13 +606,11 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { }; methods: { - name(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -637,14 +628,34 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + name(txDetails?: Truffle.TransactionDetails): Promise; + /** - * called by the owner to unpause, returns to normal state + * Tells the address of the owner */ - unpause: { + owner(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { (txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -653,127 +664,108 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + /** - * update the pauser role + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newPauser: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newPauser: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newPauser: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - paused(txDetails?: Truffle.TransactionDetails): Promise; - /** - * called by the owner to pause, triggers stopped state + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - pause: { - (txDetails?: Truffle.TransactionDetails): Promise< + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; - - /** - * Tells the address of the owner - * @returns the address of the owner - */ - owner(txDetails?: Truffle.TransactionDetails): Promise; - - symbol(txDetails?: Truffle.TransactionDetails): Promise; - - pauser(txDetails?: Truffle.TransactionDetails): Promise; - - updateBlacklister: { - ( - _newBlacklister: string, - txDetails?: Truffle.TransactionDetails - ): Promise>; call( - _newBlacklister: string, + _account: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newBlacklister: string, + _account: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newBlacklister: string, + _account: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. + * called by the owner to unpause, returns to normal state */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + updateBlacklister: { + ( + _newBlacklister: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - newOwner: string, + _newBlacklister: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newBlacklister: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newBlacklister: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - initialize: { ( _name: string, @@ -825,7 +817,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -895,7 +886,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -925,7 +915,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred - * @returns bool success */ transferFrom: { ( @@ -958,7 +947,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -987,7 +975,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { * Function to add/update a new minter * @param minter The address of the minter * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. */ configureMinter: { ( @@ -1015,7 +1002,6 @@ export interface FiatTokenV1Instance extends Truffle.ContractInstance { /** * Function to remove a minter * @param minter The address of the minter to remove - * @returns True if the operation was successful. */ removeMinter: { (minter: string, txDetails?: Truffle.TransactionDetails): Promise< diff --git a/@types/generated/FiatTokenV2.d.ts b/@types/generated/FiatTokenV2.d.ts index 80bdc433a..1566a22f4 100644 --- a/@types/generated/FiatTokenV2.d.ts +++ b/@types/generated/FiatTokenV2.d.ts @@ -9,43 +9,41 @@ export interface FiatTokenV2Contract "new"(meta?: Truffle.TransactionDetails): Promise; } -export interface Mint { - name: "Mint"; +export interface Approval { + name: "Approval"; args: { - minter: string; - to: string; - amount: BN; + owner: string; + spender: string; + value: BN; 0: string; 1: string; 2: BN; }; } -export interface Burn { - name: "Burn"; +export interface Blacklisted { + name: "Blacklisted"; args: { - burner: string; - amount: BN; + _account: string; 0: string; - 1: BN; }; } -export interface MinterConfigured { - name: "MinterConfigured"; +export interface BlacklisterChanged { + name: "BlacklisterChanged"; args: { - minter: string; - minterAllowedAmount: BN; + newBlacklister: string; 0: string; - 1: BN; }; } -export interface MinterRemoved { - name: "MinterRemoved"; +export interface Burn { + name: "Burn"; args: { - oldMinter: string; + burner: string; + amount: BN; 0: string; + 1: BN; }; } @@ -57,37 +55,48 @@ export interface MasterMinterChanged { }; } -export interface Blacklisted { - name: "Blacklisted"; +export interface Mint { + name: "Mint"; args: { - _account: string; + minter: string; + to: string; + amount: BN; 0: string; + 1: string; + 2: BN; }; } -export interface UnBlacklisted { - name: "UnBlacklisted"; +export interface MinterConfigured { + name: "MinterConfigured"; args: { - _account: string; + minter: string; + minterAllowedAmount: BN; 0: string; + 1: BN; }; } -export interface BlacklisterChanged { - name: "BlacklisterChanged"; +export interface MinterRemoved { + name: "MinterRemoved"; args: { - newBlacklister: string; + oldMinter: string; 0: string; }; } -export interface Pause { - name: "Pause"; - args: {}; +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; } -export interface Unpause { - name: "Unpause"; +export interface Pause { + name: "Pause"; args: {}; } @@ -99,11 +108,11 @@ export interface PauserChanged { }; } -export interface Approval { - name: "Approval"; +export interface Transfer { + name: "Transfer"; args: { - owner: string; - spender: string; + from: string; + to: string; value: BN; 0: string; 1: string; @@ -111,50 +120,49 @@ export interface Approval { }; } -export interface OwnershipTransferred { - name: "OwnershipTransferred"; +export interface UnBlacklisted { + name: "UnBlacklisted"; args: { - previousOwner: string; - newOwner: string; + _account: string; 0: string; - 1: string; }; } -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; +export interface Unpause { + name: "Unpause"; + args: {}; } type AllEvents = - | Mint + | Approval + | Blacklisted + | BlacklisterChanged | Burn + | MasterMinterChanged + | Mint | MinterConfigured | MinterRemoved - | MasterMinterChanged - | Blacklisted - | UnBlacklisted - | BlacklisterChanged + | OwnershipTransferred | Pause - | Unpause | PauserChanged - | Approval - | OwnershipTransferred - | Transfer; + | Transfer + | UnBlacklisted + | Unpause; export interface FiatTokenV2Instance extends Truffle.ContractInstance { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -180,15 +188,19 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { }; /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -206,63 +218,61 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; initialize: { @@ -312,25 +322,30 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -356,88 +371,20 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned + * Get minter allowance for an account + * @param minter The address of the minter */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + name(txDetails?: Truffle.TransactionDetails): Promise; /** - * Function to add/update a new minter - * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. + * Tells the address of the owner */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * update the pauser role - */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - paused(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get token balance of an account - * @param account address The account - */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + owner(txDetails?: Truffle.TransactionDetails): Promise; /** * called by the owner to pause, triggers stopped state @@ -451,30 +398,43 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** - * Tells the address of the owner - * @returns the address of the owner + * Function to remove a minter + * @param minter The address of the minter to remove */ - owner(txDetails?: Truffle.TransactionDetails): Promise; + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; symbol(txDetails?: Truffle.TransactionDetails): Promise; - pauser(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; /** * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -499,32 +459,94 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; - updateMasterMinter: { - (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< @@ -544,80 +566,59 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - methods: { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -643,15 +644,19 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { }; /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -669,63 +674,61 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; initialize: { @@ -775,25 +778,30 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -819,88 +827,20 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned - */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * Function to add/update a new minter + * Get minter allowance for an account * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. - */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * update the pauser role */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; - paused(txDetails?: Truffle.TransactionDetails): Promise; + name(txDetails?: Truffle.TransactionDetails): Promise; /** - * Get token balance of an account - * @param account address The account + * Tells the address of the owner */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + owner(txDetails?: Truffle.TransactionDetails): Promise; /** * called by the owner to pause, triggers stopped state @@ -914,30 +854,43 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** - * Tells the address of the owner - * @returns the address of the owner + * Function to remove a minter + * @param minter The address of the minter to remove */ - owner(txDetails?: Truffle.TransactionDetails): Promise; + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; symbol(txDetails?: Truffle.TransactionDetails): Promise; - pauser(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; /** * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -962,33 +915,94 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; - updateMasterMinter: { + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + transferFrom: { ( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { ( @@ -1009,73 +1023,45 @@ export interface FiatTokenV2Instance extends Truffle.ContractInstance { ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; }; getPastEvents(event: string): Promise; diff --git a/@types/generated/Ierc20.d.ts b/@types/generated/Ierc20.d.ts new file mode 100644 index 000000000..3b0306491 --- /dev/null +++ b/@types/generated/Ierc20.d.ts @@ -0,0 +1,259 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventData, PastEventOptions } from "web3-eth-contract"; + +export interface Ierc20Contract extends Truffle.Contract { + "new"(meta?: Truffle.TransactionDetails): Promise; +} + +export interface Approval { + name: "Approval"; + args: { + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +export interface Transfer { + name: "Transfer"; + args: { + from: string; + to: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }; +} + +type AllEvents = Approval | Transfer; + +export interface Ierc20Instance extends Truffle.ContractInstance { + /** + * Returns the amount of tokens in existence. + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Returns the amount of tokens owned by `account`. + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event. + */ + transfer: { + ( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called. + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event. + */ + approve: { + ( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event. + */ + transferFrom: { + ( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + methods: { + /** + * Returns the amount of tokens in existence. + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Returns the amount of tokens owned by `account`. + */ + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event. + */ + transfer: { + ( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called. + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + /** + * Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event. + */ + approve: { + ( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event. + */ + transferFrom: { + ( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + sender: string, + recipient: string, + amount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + }; + + getPastEvents(event: string): Promise; + getPastEvents( + event: string, + options: PastEventOptions, + callback: (error: Error, event: EventData) => void + ): Promise; + getPastEvents(event: string, options: PastEventOptions): Promise; + getPastEvents( + event: string, + callback: (error: Error, event: EventData) => void + ): Promise; +} diff --git a/@types/generated/Ownable.d.ts b/@types/generated/Ownable.d.ts index 2abb4ebf3..acb69a939 100644 --- a/@types/generated/Ownable.d.ts +++ b/@types/generated/Ownable.d.ts @@ -23,7 +23,6 @@ type AllEvents = OwnershipTransferred; export interface OwnableInstance extends Truffle.ContractInstance { /** * Tells the address of the owner - * @returns the address of the owner */ owner(txDetails?: Truffle.TransactionDetails): Promise; @@ -52,7 +51,6 @@ export interface OwnableInstance extends Truffle.ContractInstance { methods: { /** * Tells the address of the owner - * @returns the address of the owner */ owner(txDetails?: Truffle.TransactionDetails): Promise; diff --git a/@types/generated/Pausable.d.ts b/@types/generated/Pausable.d.ts index 909720915..d0e9176a1 100644 --- a/@types/generated/Pausable.d.ts +++ b/@types/generated/Pausable.d.ts @@ -8,13 +8,18 @@ export interface PausableContract extends Truffle.Contract { "new"(meta?: Truffle.TransactionDetails): Promise; } -export interface Pause { - name: "Pause"; - args: {}; +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; } -export interface Unpause { - name: "Unpause"; +export interface Pause { + name: "Pause"; args: {}; } @@ -26,27 +31,21 @@ export interface PauserChanged { }; } -export interface OwnershipTransferred { - name: "OwnershipTransferred"; - args: { - previousOwner: string; - newOwner: string; - 0: string; - 1: string; - }; +export interface Unpause { + name: "Unpause"; + args: {}; } -type AllEvents = Pause | Unpause | PauserChanged | OwnershipTransferred; +type AllEvents = OwnershipTransferred | Pause | PauserChanged | Unpause; export interface PausableInstance extends Truffle.ContractInstance { - paused(txDetails?: Truffle.TransactionDetails): Promise; - /** * Tells the address of the owner - * @returns the address of the owner */ owner(txDetails?: Truffle.TransactionDetails): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** @@ -117,14 +116,13 @@ export interface PausableInstance extends Truffle.ContractInstance { }; methods: { - paused(txDetails?: Truffle.TransactionDetails): Promise; - /** * Tells the address of the owner - * @returns the address of the owner */ owner(txDetails?: Truffle.TransactionDetails): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** diff --git a/@types/generated/UpgradedFiatToken.d.ts b/@types/generated/UpgradedFiatToken.d.ts index f57efabd8..fb64b3291 100644 --- a/@types/generated/UpgradedFiatToken.d.ts +++ b/@types/generated/UpgradedFiatToken.d.ts @@ -9,43 +9,41 @@ export interface UpgradedFiatTokenContract "new"(meta?: Truffle.TransactionDetails): Promise; } -export interface Mint { - name: "Mint"; +export interface Approval { + name: "Approval"; args: { - minter: string; - to: string; - amount: BN; + owner: string; + spender: string; + value: BN; 0: string; 1: string; 2: BN; }; } -export interface Burn { - name: "Burn"; +export interface Blacklisted { + name: "Blacklisted"; args: { - burner: string; - amount: BN; + _account: string; 0: string; - 1: BN; }; } -export interface MinterConfigured { - name: "MinterConfigured"; +export interface BlacklisterChanged { + name: "BlacklisterChanged"; args: { - minter: string; - minterAllowedAmount: BN; + newBlacklister: string; 0: string; - 1: BN; }; } -export interface MinterRemoved { - name: "MinterRemoved"; +export interface Burn { + name: "Burn"; args: { - oldMinter: string; + burner: string; + amount: BN; 0: string; + 1: BN; }; } @@ -57,37 +55,48 @@ export interface MasterMinterChanged { }; } -export interface Blacklisted { - name: "Blacklisted"; +export interface Mint { + name: "Mint"; args: { - _account: string; + minter: string; + to: string; + amount: BN; 0: string; + 1: string; + 2: BN; }; } -export interface UnBlacklisted { - name: "UnBlacklisted"; +export interface MinterConfigured { + name: "MinterConfigured"; args: { - _account: string; + minter: string; + minterAllowedAmount: BN; 0: string; + 1: BN; }; } -export interface BlacklisterChanged { - name: "BlacklisterChanged"; +export interface MinterRemoved { + name: "MinterRemoved"; args: { - newBlacklister: string; + oldMinter: string; 0: string; }; } -export interface Pause { - name: "Pause"; - args: {}; +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; } -export interface Unpause { - name: "Unpause"; +export interface Pause { + name: "Pause"; args: {}; } @@ -99,11 +108,11 @@ export interface PauserChanged { }; } -export interface Approval { - name: "Approval"; +export interface Transfer { + name: "Transfer"; args: { - owner: string; - spender: string; + from: string; + to: string; value: BN; 0: string; 1: string; @@ -111,50 +120,49 @@ export interface Approval { }; } -export interface OwnershipTransferred { - name: "OwnershipTransferred"; +export interface UnBlacklisted { + name: "UnBlacklisted"; args: { - previousOwner: string; - newOwner: string; + _account: string; 0: string; - 1: string; }; } -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; +export interface Unpause { + name: "Unpause"; + args: {}; } type AllEvents = - | Mint + | Approval + | Blacklisted + | BlacklisterChanged | Burn + | MasterMinterChanged + | Mint | MinterConfigured | MinterRemoved - | MasterMinterChanged - | Blacklisted - | UnBlacklisted - | BlacklisterChanged + | OwnershipTransferred | Pause - | Unpause | PauserChanged - | Approval - | OwnershipTransferred - | Transfer; + | Transfer + | UnBlacklisted + | Unpause; export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -180,15 +188,19 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { }; /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -206,63 +218,61 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; initialize: { @@ -312,25 +322,30 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -356,88 +371,20 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned + * Get minter allowance for an account + * @param minter The address of the minter */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + name(txDetails?: Truffle.TransactionDetails): Promise; /** - * Function to add/update a new minter - * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. + * Tells the address of the owner */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * update the pauser role - */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - paused(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get token balance of an account - * @param account address The account - */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + owner(txDetails?: Truffle.TransactionDetails): Promise; /** * called by the owner to pause, triggers stopped state @@ -451,30 +398,43 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** - * Tells the address of the owner - * @returns the address of the owner + * Function to remove a minter + * @param minter The address of the minter to remove */ - owner(txDetails?: Truffle.TransactionDetails): Promise; + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; symbol(txDetails?: Truffle.TransactionDetails): Promise; - pauser(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; /** * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -499,32 +459,94 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; - updateMasterMinter: { - (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + transferFrom: { + ( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; + call( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< @@ -544,80 +566,59 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - methods: { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -643,15 +644,19 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { }; /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -669,63 +674,61 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; initialize: { @@ -775,25 +778,30 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -819,88 +827,20 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned - */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * Function to add/update a new minter + * Get minter allowance for an account * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. - */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * update the pauser role */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; - paused(txDetails?: Truffle.TransactionDetails): Promise; + name(txDetails?: Truffle.TransactionDetails): Promise; /** - * Get token balance of an account - * @param account address The account + * Tells the address of the owner */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + owner(txDetails?: Truffle.TransactionDetails): Promise; /** * called by the owner to pause, triggers stopped state @@ -914,30 +854,43 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** - * Tells the address of the owner - * @returns the address of the owner + * Function to remove a minter + * @param minter The address of the minter to remove */ - owner(txDetails?: Truffle.TransactionDetails): Promise; + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; symbol(txDetails?: Truffle.TransactionDetails): Promise; - pauser(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; /** * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -962,33 +915,94 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; - updateMasterMinter: { + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + transferFrom: { ( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { ( @@ -1009,73 +1023,45 @@ export interface UpgradedFiatTokenInstance extends Truffle.ContractInstance { ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; }; getPastEvents(event: string): Promise; diff --git a/@types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts b/@types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts index db2a0a478..71a27607f 100644 --- a/@types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts +++ b/@types/generated/UpgradedFiatTokenNewFieldsNewLogicTest.d.ts @@ -11,43 +11,41 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestContract ): Promise; } -export interface Mint { - name: "Mint"; +export interface Approval { + name: "Approval"; args: { - minter: string; - to: string; - amount: BN; + owner: string; + spender: string; + value: BN; 0: string; 1: string; 2: BN; }; } -export interface Burn { - name: "Burn"; +export interface Blacklisted { + name: "Blacklisted"; args: { - burner: string; - amount: BN; + _account: string; 0: string; - 1: BN; }; } -export interface MinterConfigured { - name: "MinterConfigured"; +export interface BlacklisterChanged { + name: "BlacklisterChanged"; args: { - minter: string; - minterAllowedAmount: BN; + newBlacklister: string; 0: string; - 1: BN; }; } -export interface MinterRemoved { - name: "MinterRemoved"; +export interface Burn { + name: "Burn"; args: { - oldMinter: string; + burner: string; + amount: BN; 0: string; + 1: BN; }; } @@ -59,37 +57,48 @@ export interface MasterMinterChanged { }; } -export interface Blacklisted { - name: "Blacklisted"; +export interface Mint { + name: "Mint"; args: { - _account: string; + minter: string; + to: string; + amount: BN; 0: string; + 1: string; + 2: BN; }; } -export interface UnBlacklisted { - name: "UnBlacklisted"; +export interface MinterConfigured { + name: "MinterConfigured"; args: { - _account: string; + minter: string; + minterAllowedAmount: BN; 0: string; + 1: BN; }; } -export interface BlacklisterChanged { - name: "BlacklisterChanged"; +export interface MinterRemoved { + name: "MinterRemoved"; args: { - newBlacklister: string; + oldMinter: string; 0: string; }; } -export interface Pause { - name: "Pause"; - args: {}; +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; } -export interface Unpause { - name: "Unpause"; +export interface Pause { + name: "Pause"; args: {}; } @@ -101,11 +110,11 @@ export interface PauserChanged { }; } -export interface Approval { - name: "Approval"; +export interface Transfer { + name: "Transfer"; args: { - owner: string; - spender: string; + from: string; + to: string; value: BN; 0: string; 1: string; @@ -113,51 +122,50 @@ export interface Approval { }; } -export interface OwnershipTransferred { - name: "OwnershipTransferred"; +export interface UnBlacklisted { + name: "UnBlacklisted"; args: { - previousOwner: string; - newOwner: string; + _account: string; 0: string; - 1: string; }; } -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; +export interface Unpause { + name: "Unpause"; + args: {}; } type AllEvents = - | Mint + | Approval + | Blacklisted + | BlacklisterChanged | Burn + | MasterMinterChanged + | Mint | MinterConfigured | MinterRemoved - | MasterMinterChanged - | Blacklisted - | UnBlacklisted - | BlacklisterChanged + | OwnershipTransferred | Pause - | Unpause | PauserChanged - | Approval - | OwnershipTransferred - | Transfer; + | Transfer + | UnBlacklisted + | Unpause; export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance extends Truffle.ContractInstance { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -182,18 +190,20 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; - newBool(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -211,84 +221,87 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -314,175 +327,188 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned + * Get minter allowance for an account + * @param minter The address of the minter */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + name(txDetails?: Truffle.TransactionDetails): Promise; + + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; /** - * Function to add/update a new minter - * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. + * Tells the address of the owner */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; + owner(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; call( minter: string, - minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, - minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, - minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + symbol(txDetails?: Truffle.TransactionDetails): Promise; + /** - * update the pauser role + * Get totalSupply of token */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - _newPauser: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _newPauser: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newPauser: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; - paused(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get token balance of an account - * @param account address The account - */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - /** - * called by the owner to pause, triggers stopped state - */ - pause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; - - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - /** - * Tells the address of the owner - * @returns the address of the owner - */ - owner(txDetails?: Truffle.TransactionDetails): Promise; - - symbol(txDetails?: Truffle.TransactionDetails): Promise; - - pauser(txDetails?: Truffle.TransactionDetails): Promise; - /** - * transfer token for a specified address - * @param _to The address to transfer to. - * @param _value The amount to be transferred. - * @returns bool success + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred */ - transfer: { + transferFrom: { ( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; - updateMasterMinter: { - (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< @@ -502,78 +528,45 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - newAddress(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - newUint(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - initV2: { ( _newBool: boolean, @@ -620,11 +613,19 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance }; methods: { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -649,18 +650,20 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; - newBool(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -678,84 +681,87 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -781,88 +787,26 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned - */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * Function to add/update a new minter + * Get minter allowance for an account * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; - /** - * update the pauser role - */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + name(txDetails?: Truffle.TransactionDetails): Promise; - paused(txDetails?: Truffle.TransactionDetails): Promise; + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; /** - * Get token balance of an account - * @param account address The account + * Tells the address of the owner */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + owner(txDetails?: Truffle.TransactionDetails): Promise; /** * called by the owner to pause, triggers stopped state @@ -876,30 +820,43 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** - * Tells the address of the owner - * @returns the address of the owner + * Function to remove a minter + * @param minter The address of the minter to remove */ - owner(txDetails?: Truffle.TransactionDetails): Promise; + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; symbol(txDetails?: Truffle.TransactionDetails): Promise; - pauser(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; /** * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -924,33 +881,94 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; - updateMasterMinter: { + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + transferFrom: { ( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { ( @@ -971,78 +989,46 @@ export interface UpgradedFiatTokenNewFieldsNewLogicTestInstance ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - newAddress(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - newUint(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - initV2: { ( _newBool: boolean, diff --git a/@types/generated/UpgradedFiatTokenNewFieldsTest.d.ts b/@types/generated/UpgradedFiatTokenNewFieldsTest.d.ts index a680ed49d..8cd6c36d0 100644 --- a/@types/generated/UpgradedFiatTokenNewFieldsTest.d.ts +++ b/@types/generated/UpgradedFiatTokenNewFieldsTest.d.ts @@ -11,43 +11,41 @@ export interface UpgradedFiatTokenNewFieldsTestContract ): Promise; } -export interface Mint { - name: "Mint"; +export interface Approval { + name: "Approval"; args: { - minter: string; - to: string; - amount: BN; + owner: string; + spender: string; + value: BN; 0: string; 1: string; 2: BN; }; } -export interface Burn { - name: "Burn"; +export interface Blacklisted { + name: "Blacklisted"; args: { - burner: string; - amount: BN; + _account: string; 0: string; - 1: BN; }; } -export interface MinterConfigured { - name: "MinterConfigured"; +export interface BlacklisterChanged { + name: "BlacklisterChanged"; args: { - minter: string; - minterAllowedAmount: BN; + newBlacklister: string; 0: string; - 1: BN; }; } -export interface MinterRemoved { - name: "MinterRemoved"; +export interface Burn { + name: "Burn"; args: { - oldMinter: string; + burner: string; + amount: BN; 0: string; + 1: BN; }; } @@ -59,37 +57,48 @@ export interface MasterMinterChanged { }; } -export interface Blacklisted { - name: "Blacklisted"; +export interface Mint { + name: "Mint"; args: { - _account: string; + minter: string; + to: string; + amount: BN; 0: string; + 1: string; + 2: BN; }; } -export interface UnBlacklisted { - name: "UnBlacklisted"; +export interface MinterConfigured { + name: "MinterConfigured"; args: { - _account: string; + minter: string; + minterAllowedAmount: BN; 0: string; + 1: BN; }; } -export interface BlacklisterChanged { - name: "BlacklisterChanged"; +export interface MinterRemoved { + name: "MinterRemoved"; args: { - newBlacklister: string; + oldMinter: string; 0: string; }; } -export interface Pause { - name: "Pause"; - args: {}; +export interface OwnershipTransferred { + name: "OwnershipTransferred"; + args: { + previousOwner: string; + newOwner: string; + 0: string; + 1: string; + }; } -export interface Unpause { - name: "Unpause"; +export interface Pause { + name: "Pause"; args: {}; } @@ -101,11 +110,11 @@ export interface PauserChanged { }; } -export interface Approval { - name: "Approval"; +export interface Transfer { + name: "Transfer"; args: { - owner: string; - spender: string; + from: string; + to: string; value: BN; 0: string; 1: string; @@ -113,51 +122,50 @@ export interface Approval { }; } -export interface OwnershipTransferred { - name: "OwnershipTransferred"; +export interface UnBlacklisted { + name: "UnBlacklisted"; args: { - previousOwner: string; - newOwner: string; + _account: string; 0: string; - 1: string; }; } -export interface Transfer { - name: "Transfer"; - args: { - from: string; - to: string; - value: BN; - 0: string; - 1: string; - 2: BN; - }; +export interface Unpause { + name: "Unpause"; + args: {}; } type AllEvents = - | Mint + | Approval + | Blacklisted + | BlacklisterChanged | Burn + | MasterMinterChanged + | Mint | MinterConfigured | MinterRemoved - | MasterMinterChanged - | Blacklisted - | UnBlacklisted - | BlacklisterChanged + | OwnershipTransferred | Pause - | Unpause | PauserChanged - | Approval - | OwnershipTransferred - | Transfer; + | Transfer + | UnBlacklisted + | Unpause; export interface UpgradedFiatTokenNewFieldsTestInstance extends Truffle.ContractInstance { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -182,18 +190,20 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; - newBool(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -211,84 +221,87 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -314,175 +327,188 @@ export interface UpgradedFiatTokenNewFieldsTestInstance }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned + * Get minter allowance for an account + * @param minter The address of the minter */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + name(txDetails?: Truffle.TransactionDetails): Promise; + + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; /** - * Function to add/update a new minter - * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. + * Tells the address of the owner */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; + owner(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * called by the owner to pause, triggers stopped state + */ + pause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; + + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * Function to remove a minter + * @param minter The address of the minter to remove + */ + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; call( minter: string, - minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, - minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, - minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + symbol(txDetails?: Truffle.TransactionDetails): Promise; + /** - * update the pauser role + * Get totalSupply of token */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + /** + * transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + */ + transfer: { + ( + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - _newPauser: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _newPauser: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newPauser: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; - paused(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get token balance of an account - * @param account address The account - */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - /** - * called by the owner to pause, triggers stopped state - */ - pause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; - - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - /** - * Tells the address of the owner - * @returns the address of the owner - */ - owner(txDetails?: Truffle.TransactionDetails): Promise; - - symbol(txDetails?: Truffle.TransactionDetails): Promise; - - pauser(txDetails?: Truffle.TransactionDetails): Promise; - /** - * transfer token for a specified address - * @param _to The address to transfer to. - * @param _value The amount to be transferred. - * @returns bool success + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred */ - transfer: { + transferFrom: { ( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( + _from: string, _to: string, _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; - updateMasterMinter: { - (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { (_newBlacklister: string, txDetails?: Truffle.TransactionDetails): Promise< @@ -502,78 +528,45 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - newAddress(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + updateMasterMinter: { + (_newMasterMinter: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - newUint(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - initV2: { ( _newBool: boolean, @@ -602,11 +595,19 @@ export interface UpgradedFiatTokenNewFieldsTestInstance }; methods: { - name(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get allowed amount for an account + * @param owner address The account owner + * @param spender address The account spender + */ + allowance( + owner: string, + spender: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** * Adds blacklisted check to approve - * @returns True if the operation was successful. */ approve: { ( @@ -631,18 +632,20 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; - newBool(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Get totalSupply of token + * Get token balance of an account + * @param account address The account */ - totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + balanceOf( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * Removes account from blacklist - * @param _account The address to remove from the blacklist + * Adds account to blacklist + * @param _account The address to blacklist */ - unBlacklist: { + blacklist: { (_account: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; @@ -660,84 +663,87 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; + blacklister(txDetails?: Truffle.TransactionDetails): Promise; + /** - * Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @returns bool success + * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance + * @param _amount uint256 the amount of tokens to be burned */ - transferFrom: { + burn: { ( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails - ): Promise; + ): Promise; sendTransaction( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _from: string, - _to: string, - _value: number | BN | string, + _amount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Function to remove a minter - * @param minter The address of the minter to remove - * @returns True if the operation was successful. + * Function to add/update a new minter + * @param minter The address of the minter + * @param minterAllowedAmount The minting amount allowed for the minter */ - removeMinter: { - (minter: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + configureMinter: { + ( + minter: string, + minterAllowedAmount: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( minter: string, + minterAllowedAmount: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise; }; + currency(txDetails?: Truffle.TransactionDetails): Promise; + decimals(txDetails?: Truffle.TransactionDetails): Promise; - masterMinter(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Checks if account is blacklisted + * @param _account The address to check + */ + isBlacklisted( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; /** - * called by the owner to unpause, returns to normal state + * Checks if account is a minter + * @param account The address to check */ - unpause: { - (txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call(txDetails?: Truffle.TransactionDetails): Promise; - sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; - estimateGas(txDetails?: Truffle.TransactionDetails): Promise; - }; + isMinter( + account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + + masterMinter(txDetails?: Truffle.TransactionDetails): Promise; /** * Function to mint tokens * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @param _to The address that will receive the minted tokens. - * @returns A boolean that indicates if the operation was successful. */ mint: { ( @@ -763,88 +769,26 @@ export interface UpgradedFiatTokenNewFieldsTestInstance }; /** - * allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned - */ - burn: { - ( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _amount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; - - /** - * Function to add/update a new minter + * Get minter allowance for an account * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @returns True if the operation was successful. */ - configureMinter: { - ( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise>; - call( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - minter: string, - minterAllowedAmount: number | BN | string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + minterAllowance( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; - /** - * update the pauser role - */ - updatePauser: { - (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; - call( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - sendTransaction( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - estimateGas( - _newPauser: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - }; + name(txDetails?: Truffle.TransactionDetails): Promise; - paused(txDetails?: Truffle.TransactionDetails): Promise; + newAddress(txDetails?: Truffle.TransactionDetails): Promise; + + newBool(txDetails?: Truffle.TransactionDetails): Promise; + + newUint(txDetails?: Truffle.TransactionDetails): Promise; /** - * Get token balance of an account - * @param account address The account + * Tells the address of the owner */ - balanceOf( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + owner(txDetails?: Truffle.TransactionDetails): Promise; /** * called by the owner to pause, triggers stopped state @@ -858,30 +802,43 @@ export interface UpgradedFiatTokenNewFieldsTestInstance estimateGas(txDetails?: Truffle.TransactionDetails): Promise; }; - /** - * Get minter allowance for an account - * @param minter The address of the minter - */ - minterAllowance( - minter: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + paused(txDetails?: Truffle.TransactionDetails): Promise; + + pauser(txDetails?: Truffle.TransactionDetails): Promise; /** - * Tells the address of the owner - * @returns the address of the owner + * Function to remove a minter + * @param minter The address of the minter to remove */ - owner(txDetails?: Truffle.TransactionDetails): Promise; + removeMinter: { + (minter: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + minter: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; symbol(txDetails?: Truffle.TransactionDetails): Promise; - pauser(txDetails?: Truffle.TransactionDetails): Promise; + /** + * Get totalSupply of token + */ + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; /** * transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. - * @returns bool success */ transfer: { ( @@ -906,33 +863,94 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; - updateMasterMinter: { + /** + * Transfer tokens from one address to another. + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + transferFrom: { ( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, txDetails?: Truffle.TransactionDetails ): Promise>; call( - _newMasterMinter: string, + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _from: string, + _to: string, + _value: number | BN | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * Allows the current owner to transfer control of the contract to a newOwner. + * @param newOwner The address to transfer ownership to. + */ + transferOwnership: { + (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _newMasterMinter: string, + newOwner: string, txDetails?: Truffle.TransactionDetails ): Promise; }; /** - * Checks if account is a minter - * @param account The address to check + * Removes account from blacklist + * @param _account The address to remove from the blacklist */ - isMinter( - account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; + unBlacklist: { + (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + _account: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + /** + * called by the owner to unpause, returns to normal state + */ + unpause: { + (txDetails?: Truffle.TransactionDetails): Promise< + Truffle.TransactionResponse + >; + call(txDetails?: Truffle.TransactionDetails): Promise; + sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; + estimateGas(txDetails?: Truffle.TransactionDetails): Promise; + }; updateBlacklister: { ( @@ -953,78 +971,46 @@ export interface UpgradedFiatTokenNewFieldsTestInstance ): Promise; }; - blacklister(txDetails?: Truffle.TransactionDetails): Promise; - - newAddress(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - allowance( - owner: string, - spender: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - - currency(txDetails?: Truffle.TransactionDetails): Promise; - - /** - * Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - transferOwnership: { - (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< - Truffle.TransactionResponse - >; + updateMasterMinter: { + ( + _newMasterMinter: string, + txDetails?: Truffle.TransactionDetails + ): Promise>; call( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - newOwner: string, + _newMasterMinter: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - newUint(txDetails?: Truffle.TransactionDetails): Promise; - /** - * Adds account to blacklist - * @param _account The address to blacklist + * update the pauser role */ - blacklist: { - (_account: string, txDetails?: Truffle.TransactionDetails): Promise< + updatePauser: { + (_newPauser: string, txDetails?: Truffle.TransactionDetails): Promise< Truffle.TransactionResponse >; call( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; sendTransaction( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; estimateGas( - _account: string, + _newPauser: string, txDetails?: Truffle.TransactionDetails ): Promise; }; - /** - * Checks if account is blacklisted - * @param _account The address to check - */ - isBlacklisted( - _account: string, - txDetails?: Truffle.TransactionDetails - ): Promise; - initV2: { ( _newBool: boolean, diff --git a/@types/generated/index.d.ts b/@types/generated/index.d.ts index 3ccac9e50..7fe22c72e 100644 --- a/@types/generated/index.d.ts +++ b/@types/generated/index.d.ts @@ -3,11 +3,10 @@ import { AdminUpgradeabilityProxyContract } from "./AdminUpgradeabilityProxy"; import { BlacklistableContract } from "./Blacklistable"; -import { Erc20Contract } from "./Erc20"; -import { Erc20BasicContract } from "./Erc20Basic"; import { FiatTokenProxyContract } from "./FiatTokenProxy"; import { FiatTokenV1Contract } from "./FiatTokenV1"; import { FiatTokenV2Contract } from "./FiatTokenV2"; +import { Ierc20Contract } from "./Ierc20"; import { MigrationsContract } from "./Migrations"; import { OwnableContract } from "./Ownable"; import { PausableContract } from "./Pausable"; @@ -24,11 +23,10 @@ declare global { name: "AdminUpgradeabilityProxy" ): AdminUpgradeabilityProxyContract; require(name: "Blacklistable"): BlacklistableContract; - require(name: "ERC20"): Erc20Contract; - require(name: "ERC20Basic"): Erc20BasicContract; require(name: "FiatTokenProxy"): FiatTokenProxyContract; require(name: "FiatTokenV1"): FiatTokenV1Contract; require(name: "FiatTokenV2"): FiatTokenV2Contract; + require(name: "IERC20"): Ierc20Contract; require(name: "Migrations"): MigrationsContract; require(name: "Ownable"): OwnableContract; require(name: "Pausable"): PausableContract; @@ -50,14 +48,13 @@ export { AdminUpgradeabilityProxyInstance } from "./AdminUpgradeabilityProxy"; export { BlacklistableContract, BlacklistableInstance } from "./Blacklistable"; -export { Erc20Contract, Erc20Instance } from "./Erc20"; -export { Erc20BasicContract, Erc20BasicInstance } from "./Erc20Basic"; export { FiatTokenProxyContract, FiatTokenProxyInstance } from "./FiatTokenProxy"; export { FiatTokenV1Contract, FiatTokenV1Instance } from "./FiatTokenV1"; export { FiatTokenV2Contract, FiatTokenV2Instance } from "./FiatTokenV2"; +export { Ierc20Contract, Ierc20Instance } from "./Ierc20"; export { MigrationsContract, MigrationsInstance } from "./Migrations"; export { OwnableContract, OwnableInstance } from "./Ownable"; export { PausableContract, PausableInstance } from "./Pausable"; diff --git a/contracts/Blacklistable.sol b/contracts/Blacklistable.sol index 0aa0b3d8c..850da3b49 100644 --- a/contracts/Blacklistable.sol +++ b/contracts/Blacklistable.sol @@ -20,9 +20,9 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "./Ownable.sol"; +import { Ownable } from "./Ownable.sol"; /** @@ -41,7 +41,10 @@ contract Blacklistable is Ownable { * @dev Throws if called by any account other than the blacklister */ modifier onlyBlacklister() { - require(msg.sender == blacklister); + require( + msg.sender == blacklister, + "Blacklistable: caller is not the blacklister" + ); _; } @@ -50,7 +53,10 @@ contract Blacklistable is Ownable { * @param _account The address to check */ modifier notBlacklisted(address _account) { - require(blacklisted[_account] == false); + require( + blacklisted[_account] == false, + "Blacklistable: account is blacklisted" + ); _; } @@ -81,7 +87,10 @@ contract Blacklistable is Ownable { } function updateBlacklister(address _newBlacklister) public onlyOwner { - require(_newBlacklister != address(0)); + require( + _newBlacklister != address(0), + "Blacklistable: new blacklister is the zero address" + ); blacklister = _newBlacklister; emit BlacklisterChanged(blacklister); } diff --git a/contracts/FiatTokenProxy.sol b/contracts/FiatTokenProxy.sol index c13113649..26cdb5789 100644 --- a/contracts/FiatTokenProxy.sol +++ b/contracts/FiatTokenProxy.sol @@ -20,11 +20,15 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "zos-lib/contracts/upgradeability/AdminUpgradeabilityProxy.sol"; +import { + AdminUpgradeabilityProxy +} from "./upgradeability/AdminUpgradeabilityProxy.sol"; +// solhint-disable no-empty-blocks + /** * @title FiatTokenProxy * @dev This contract proxies FiatToken calls and enables FiatToken upgrades diff --git a/contracts/FiatTokenV1.sol b/contracts/FiatTokenV1.sol index 3b7f9c50b..4253c87dc 100644 --- a/contracts/FiatTokenV1.sol +++ b/contracts/FiatTokenV1.sol @@ -20,21 +20,20 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; -import "openzeppelin-solidity/contracts/math/SafeMath.sol"; - -import "./Ownable.sol"; -import "./Blacklistable.sol"; -import "./Pausable.sol"; +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; +import { Ownable } from "./Ownable.sol"; +import { Blacklistable } from "./Blacklistable.sol"; +import { Pausable } from "./Pausable.sol"; /** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */ -contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { +contract FiatTokenV1 is Ownable, IERC20, Pausable, Blacklistable { using SafeMath for uint256; string public name; @@ -57,20 +56,32 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { event MasterMinterChanged(address indexed newMasterMinter); function initialize( - string _name, - string _symbol, - string _currency, + string memory _name, + string memory _symbol, + string memory _currency, uint8 _decimals, address _masterMinter, address _pauser, address _blacklister, address _owner ) public { - require(!initialized); - require(_masterMinter != address(0)); - require(_pauser != address(0)); - require(_blacklister != address(0)); - require(_owner != address(0)); + require(!initialized, "FiatToken: contract is already initialized"); + require( + _masterMinter != address(0), + "FiatToken: new masterMinter is the zero address" + ); + require( + _pauser != address(0), + "FiatToken: new pauser is the zero address" + ); + require( + _blacklister != address(0), + "FiatToken: new blacklister is the zero address" + ); + require( + _owner != address(0), + "FiatToken: new owner is the zero address" + ); name = _name; symbol = _symbol; @@ -87,7 +98,10 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @dev Throws if called by any account other than a minter */ modifier onlyMinters() { - require(minters[msg.sender] == true); + require( + minters[msg.sender] == true, + "FiatToken: caller is not a minter" + ); _; } @@ -106,17 +120,20 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { notBlacklisted(_to) returns (bool) { - require(_to != address(0)); - require(_amount > 0); + require(_to != address(0), "FiatToken: mint to the zero address"); + require(_amount > 0, "FiatToken: mint amount not greater than 0"); uint256 mintingAllowedAmount = minterAllowed[msg.sender]; - require(_amount <= mintingAllowedAmount); + require( + _amount <= mintingAllowedAmount, + "FiatToken: mint amount exceeds minterAllowance" + ); totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); minterAllowed[msg.sender] = mintingAllowedAmount.sub(_amount); emit Mint(msg.sender, _to, _amount); - emit Transfer(0x0, _to, _amount); + emit Transfer(address(0), _to, _amount); return true; } @@ -124,7 +141,10 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @dev Throws if called by any account other than the masterMinter */ modifier onlyMasterMinter() { - require(msg.sender == masterMinter); + require( + msg.sender == masterMinter, + "FiatToken: caller is not the masterMinter" + ); _; } @@ -151,6 +171,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { */ function allowance(address owner, address spender) public + override view returns (uint256) { @@ -160,7 +181,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { /** * @dev Get totalSupply of token */ - function totalSupply() public view returns (uint256) { + function totalSupply() public override view returns (uint256) { return totalSupply_; } @@ -168,7 +189,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { * @dev Get token balance of an account * @param account address The account */ - function balanceOf(address account) public view returns (uint256) { + function balanceOf(address account) public override view returns (uint256) { return balances[account]; } @@ -178,6 +199,7 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { */ function approve(address _spender, uint256 _value) public + override whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) @@ -201,15 +223,22 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { uint256 _value ) public + override whenNotPaused notBlacklisted(_to) notBlacklisted(msg.sender) notBlacklisted(_from) returns (bool) { - require(_to != address(0)); - require(_value <= balances[_from]); - require(_value <= allowed[_from][msg.sender]); + require(_to != address(0), "ERC20: transfer to the zero address"); + require( + _value <= balances[_from], + "ERC20: transfer amount exceeds balance" + ); + require( + _value <= allowed[_from][msg.sender], + "ERC20: transfer amount exceeds allowance" + ); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); @@ -226,13 +255,17 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { */ function transfer(address _to, uint256 _value) public + override whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_to) returns (bool) { - require(_to != address(0)); - require(_value <= balances[msg.sender]); + require(_to != address(0), "ERC20: transfer to the zero address"); + require( + _value <= balances[msg.sender], + "ERC20: transfer amount exceeds balance" + ); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); @@ -287,8 +320,8 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { notBlacklisted(msg.sender) { uint256 balance = balances[msg.sender]; - require(_amount > 0); - require(balance >= _amount); + require(_amount > 0, "FiatToken: burn amount not greater than 0"); + require(balance >= _amount, "FiatToken: burn amount exceeds balance"); totalSupply_ = totalSupply_.sub(_amount); balances[msg.sender] = balance.sub(_amount); @@ -297,7 +330,10 @@ contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { } function updateMasterMinter(address _newMasterMinter) public onlyOwner { - require(_newMasterMinter != address(0)); + require( + _newMasterMinter != address(0), + "FiatToken: new masterMinter is the zero address" + ); masterMinter = _newMasterMinter; emit MasterMinterChanged(masterMinter); } diff --git a/contracts/FiatTokenV2.sol b/contracts/FiatTokenV2.sol index 2c362582e..0f7fff6b0 100644 --- a/contracts/FiatTokenV2.sol +++ b/contracts/FiatTokenV2.sol @@ -20,11 +20,13 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "./FiatTokenV1.sol"; +import { FiatTokenV1 } from "./FiatTokenV1.sol"; +// solhint-disable no-empty-blocks + /** * @title FiatTokenV2 * @dev ERC20 Token backed by fiat reserves diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index b4e87cda0..66da282da 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -20,9 +20,11 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; +// solhint-disable var-name-mixedcase + contract Migrations { address public owner; uint256 public last_completed_migration; diff --git a/contracts/Ownable.sol b/contracts/Ownable.sol index edd8b322d..eef5422d7 100755 --- a/contracts/Ownable.sol +++ b/contracts/Ownable.sol @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; /** @@ -67,7 +67,7 @@ contract Ownable { * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { - require(msg.sender == owner()); + require(msg.sender == owner(), "Ownable: caller is not the owner"); _; } @@ -76,7 +76,10 @@ contract Ownable { * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { - require(newOwner != address(0)); + require( + newOwner != address(0), + "Ownable: new owner is the zero address" + ); emit OwnershipTransferred(owner(), newOwner); setOwner(newOwner); } diff --git a/contracts/Pausable.sol b/contracts/Pausable.sol index 34743f611..abd4d4081 100644 --- a/contracts/Pausable.sol +++ b/contracts/Pausable.sol @@ -20,9 +20,9 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "./Ownable.sol"; +import { Ownable } from "./Ownable.sol"; /** @@ -48,7 +48,7 @@ contract Pausable is Ownable { * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { - require(!paused); + require(!paused, "Pausable: paused"); _; } @@ -56,7 +56,7 @@ contract Pausable is Ownable { * @dev throws if called by any account other than the pauser */ modifier onlyPauser() { - require(msg.sender == pauser); + require(msg.sender == pauser, "Pausable: caller is not the pauser"); _; } @@ -80,7 +80,10 @@ contract Pausable is Ownable { * @dev update the pauser role */ function updatePauser(address _newPauser) public onlyOwner { - require(_newPauser != address(0)); + require( + _newPauser != address(0), + "Pausable: new pauser is the zero address" + ); pauser = _newPauser; emit PauserChanged(pauser); } diff --git a/contracts/test/UpgradedFiatToken.sol b/contracts/test/UpgradedFiatToken.sol index d7b8c905e..eb4ba671e 100644 --- a/contracts/test/UpgradedFiatToken.sol +++ b/contracts/test/UpgradedFiatToken.sol @@ -20,11 +20,13 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "../FiatTokenV1.sol"; +import { FiatTokenV1 } from "../FiatTokenV1.sol"; +// solhint-disable no-empty-blocks + /** * @title UpgradedFiatToken * @dev ERC20 Token backed by fiat reserves diff --git a/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol index e8a5ec25a..72488d895 100644 --- a/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol @@ -20,9 +20,9 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "../FiatTokenV1.sol"; +import { FiatTokenV1 } from "../FiatTokenV1.sol"; /** @@ -36,9 +36,9 @@ contract UpgradedFiatTokenNewFieldsNewLogicTest is FiatTokenV1 { bool internal initializedV2; function initialize( - string _name, - string _symbol, - string _currency, + string memory _name, + string memory _symbol, + string memory _currency, uint8 _decimals, address _masterMinter, address _pauser, @@ -66,7 +66,7 @@ contract UpgradedFiatTokenNewFieldsNewLogicTest is FiatTokenV1 { address _newAddress, uint256 _newUint ) public { - require(!initializedV2); + require(!initializedV2, "contract is already initialized"); newBool = _newBool; newAddress = _newAddress; newUint = _newUint; diff --git a/contracts/test/UpgradedFiatTokenNewFieldsTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol index fe9c8ab4c..7c7aba7db 100644 --- a/contracts/test/UpgradedFiatTokenNewFieldsTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol @@ -20,9 +20,9 @@ * SOFTWARE. */ -pragma solidity ^0.4.24; +pragma solidity 0.6.8; -import "../FiatTokenV1.sol"; +import { FiatTokenV1 } from "../FiatTokenV1.sol"; /** @@ -36,9 +36,9 @@ contract UpgradedFiatTokenNewFieldsTest is FiatTokenV1 { bool internal initializedV2; function initialize( - string _name, - string _symbol, - string _currency, + string memory _name, + string memory _symbol, + string memory _currency, uint8 _decimals, address _masterMinter, address _pauser, @@ -66,7 +66,7 @@ contract UpgradedFiatTokenNewFieldsTest is FiatTokenV1 { address _newAddress, uint256 _newUint ) public { - require(!initializedV2); + require(!initializedV2, "contract is already initialized"); newBool = _newBool; newAddress = _newAddress; newUint = _newUint; diff --git a/contracts/upgradeability/AdminUpgradeabilityProxy.sol b/contracts/upgradeability/AdminUpgradeabilityProxy.sol new file mode 100644 index 000000000..4697cfdd0 --- /dev/null +++ b/contracts/upgradeability/AdminUpgradeabilityProxy.sol @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2018 zOS Global Limited. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +pragma solidity 0.6.8; + +import { UpgradeabilityProxy } from "./UpgradeabilityProxy.sol"; + + +/** + * @title AdminUpgradeabilityProxy + * @dev This contract combines an upgradeability proxy with an authorization + * mechanism for administrative tasks. + * All external functions in this contract must be guarded by the + * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity + * feature proposal that would enable this to be done automatically. + */ +contract AdminUpgradeabilityProxy is UpgradeabilityProxy { + /** + * @dev Emitted when the administration has been transferred. + * @param previousAdmin Address of the previous admin. + * @param newAdmin Address of the new admin. + */ + event AdminChanged(address previousAdmin, address newAdmin); + + /** + * @dev Storage slot with the admin of the contract. + * This is the keccak-256 hash of "org.zeppelinos.proxy.admin", and is + * validated in the constructor. + */ + bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b; + + /** + * @dev Modifier to check whether the `msg.sender` is the admin. + * If it is, it will run the function. Otherwise, it will delegate the call + * to the implementation. + */ + modifier ifAdmin() { + if (msg.sender == _admin()) { + _; + } else { + _fallback(); + } + } + + /** + * @dev Contract constructor. + * It sets the `msg.sender` as the proxy administrator. + * @param _implementation address of the initial implementation. + */ + constructor(address _implementation) + public + UpgradeabilityProxy(_implementation) + { + assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin")); + + _setAdmin(msg.sender); + } + + /** + * @return The address of the proxy admin. + */ + function admin() external view returns (address) { + return _admin(); + } + + /** + * @return The address of the implementation. + */ + function implementation() external view returns (address) { + return _implementation(); + } + + /** + * @dev Changes the admin of the proxy. + * Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + function changeAdmin(address newAdmin) external ifAdmin { + require( + newAdmin != address(0), + "Cannot change the admin of a proxy to the zero address" + ); + emit AdminChanged(_admin(), newAdmin); + _setAdmin(newAdmin); + } + + /** + * @dev Upgrade the backing implementation of the proxy. + * Only the admin can call this function. + * @param newImplementation Address of the new implementation. + */ + function upgradeTo(address newImplementation) external ifAdmin { + _upgradeTo(newImplementation); + } + + /** + * @dev Upgrade the backing implementation of the proxy and call a function + * on the new implementation. + * This is useful to initialize the proxied contract. + * @param newImplementation Address of the new implementation. + * @param data Data to send as msg.data in the low level call. + * It should include the signature and the parameters of the function to be + * called, as described in + * https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. + */ + function upgradeToAndCall(address newImplementation, bytes calldata data) + external + payable + ifAdmin + { + _upgradeTo(newImplementation); + // prettier-ignore + // solhint-disable-next-line avoid-low-level-calls + (bool success,) = address(this).call{value: msg.value}(data); + // solhint-disable-next-line reason-string + require(success); + } + + /** + * @return adm The admin slot. + */ + function _admin() internal view returns (address adm) { + bytes32 slot = ADMIN_SLOT; + + // solhint-disable-next-line no-inline-assembly + assembly { + adm := sload(slot) + } + } + + /** + * @dev Sets the address of the proxy admin. + * @param newAdmin Address of the new proxy admin. + */ + function _setAdmin(address newAdmin) internal { + bytes32 slot = ADMIN_SLOT; + + // solhint-disable-next-line no-inline-assembly + assembly { + sstore(slot, newAdmin) + } + } + + /** + * @dev Only fall back when the sender is not the admin. + */ + function _willFallback() internal override { + require( + msg.sender != _admin(), + "Cannot call fallback function from the proxy admin" + ); + super._willFallback(); + } +} diff --git a/contracts/upgradeability/Proxy.sol b/contracts/upgradeability/Proxy.sol new file mode 100644 index 000000000..1da6ee94b --- /dev/null +++ b/contracts/upgradeability/Proxy.sol @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2018 zOS Global Limited. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +pragma solidity 0.6.8; + + +/** + * @title Proxy + * @dev Implements delegation of calls to other contracts, with proper + * forwarding of return values and bubbling of failures. + * It defines a fallback function that delegates all calls to the address + * returned by the abstract _implementation() internal function. + */ +abstract contract Proxy { + /** + * @dev Fallback function. + * Implemented entirely in `_fallback`. + */ + fallback() external payable { + _fallback(); + } + + /** + * @return The Address of the implementation. + */ + function _implementation() internal virtual view returns (address); + + /** + * @dev Delegates execution to an implementation contract. + * This is a low level function that doesn't return to its internal call site. + * It will return to the external caller whatever the implementation returns. + * @param implementation Address to delegate. + */ + function _delegate(address implementation) internal { + // solhint-disable-next-line no-inline-assembly + assembly { + // Copy msg.data. We take full control of memory in this inline assembly + // block because it will not return to Solidity code. We overwrite the + // Solidity scratch pad at memory position 0. + calldatacopy(0, 0, calldatasize()) + + // Call the implementation. + // out and outsize are 0 because we don't know the size yet. + let result := delegatecall( + gas(), + implementation, + 0, + calldatasize(), + 0, + 0 + ) + + // Copy the returned data. + returndatacopy(0, 0, returndatasize()) + + switch result + // delegatecall returns 0 on error. + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) + } + } + } + + // solhint-disable no-empty-blocks + + /** + * @dev Function that is run as the first thing in the fallback function. + * Can be redefined in derived contracts to add functionality. + * Redefinitions must call super._willFallback(). + */ + function _willFallback() internal virtual {} + + // solhint-enable no-empty-blocks + + /** + * @dev fallback implementation. + * Extracted to enable manual triggering. + */ + function _fallback() internal { + _willFallback(); + _delegate(_implementation()); + } +} diff --git a/contracts/upgradeability/UpgradeabilityProxy.sol b/contracts/upgradeability/UpgradeabilityProxy.sol new file mode 100644 index 000000000..1b1e5d321 --- /dev/null +++ b/contracts/upgradeability/UpgradeabilityProxy.sol @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2018 zOS Global Limited. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +pragma solidity 0.6.8; + +import { Proxy } from "./Proxy.sol"; +import { Address } from "@openzeppelin/contracts/utils/Address.sol"; + + +// import "openzeppelin-solidity/contracts/AddressUtils.sol"; + +/** + * @title UpgradeabilityProxy + * @dev This contract implements a proxy that allows to change the + * implementation address to which it will delegate. + * Such a change is called an implementation upgrade. + */ +contract UpgradeabilityProxy is Proxy { + /** + * @dev Emitted when the implementation is upgraded. + * @param implementation Address of the new implementation. + */ + event Upgraded(address implementation); + + /** + * @dev Storage slot with the address of the current implementation. + * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is + * validated in the constructor. + */ + bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3; + + /** + * @dev Contract constructor. + * @param _implementation Address of the initial implementation. + */ + constructor(address _implementation) public { + assert( + IMPLEMENTATION_SLOT == + keccak256("org.zeppelinos.proxy.implementation") + ); + + _setImplementation(_implementation); + } + + /** + * @dev Returns the current implementation. + * @return impl Address of the current implementation + */ + function _implementation() internal override view returns (address impl) { + bytes32 slot = IMPLEMENTATION_SLOT; + // solhint-disable-next-line no-inline-assembly + assembly { + impl := sload(slot) + } + } + + /** + * @dev Upgrades the proxy to a new implementation. + * @param newImplementation Address of the new implementation. + */ + function _upgradeTo(address newImplementation) internal { + _setImplementation(newImplementation); + emit Upgraded(newImplementation); + } + + /** + * @dev Sets the implementation address of the proxy. + * @param newImplementation Address of the new implementation. + */ + function _setImplementation(address newImplementation) private { + require( + Address.isContract(newImplementation), + "Cannot set a proxy implementation to a non-contract address" + ); + + bytes32 slot = IMPLEMENTATION_SLOT; + + // solhint-disable-next-line no-inline-assembly + assembly { + sstore(slot, newImplementation) + } + } +} diff --git a/package.json b/package.json index 96aad8cce..6b1c7df49 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,9 @@ "url": "https://github.com/centrehq/centre-tokens/issues" }, "homepage": "https://github.com/centrehq/centre-tokens#readme", - "dependencies": { - "openzeppelin-solidity": "1.11.0", - "zos-lib": "1.3.0" - }, + "dependencies": {}, "devDependencies": { + "@openzeppelin/contracts": "^3.0.1", "@truffle/hdwallet-provider": "^1.0.35", "@typechain/truffle-v5": "^2.0.1", "@types/chai": "^4.2.11", @@ -57,7 +55,7 @@ "prettier": "2.0.5", "prettier-plugin-solidity": "1.0.0-alpha.51", "q": "^1.5.1", - "solc": "0.6.7", + "solc": "0.6.8", "solhint": "^3.0.0", "solidity-coverage": "^0.7.5", "truffle": "^5.1.24", diff --git a/test/v1/ProxyNegativeTests.js b/test/v1/ProxyNegativeTests.js index 129cbb9c6..22d58f10d 100644 --- a/test/v1/ProxyNegativeTests.js +++ b/test/v1/ProxyNegativeTests.js @@ -96,13 +96,6 @@ async function run_tests(newToken, _accounts) { await checkVariables([token], [customVars]); }); - it("nut007 should fail to call proxy function with non-adminAccount", async () => { - await expectRevert(proxy.admin({ from: masterMinterAccount })); - - const customVars = []; - await checkVariables([token], [customVars]); - }); - it("nut008 shoud fail to update proxy storage if state-changing function called directly in FiatToken", async () => { await rawToken.initialize( name, diff --git a/truffle-config.js b/truffle-config.js index 367fe5b88..7f3cdff4b 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -20,7 +20,7 @@ try { module.exports = { compilers: { solc: { - version: "^0.4.24", + version: "0.6.8", }, }, networks: { diff --git a/yarn.lock b/yarn.lock index f59af5437..a5a8f3708 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,6 +44,11 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@openzeppelin/contracts@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.0.1.tgz#2f327f77d16b43f14674086b2b634bda38cb0838" + integrity sha512-uSrD7hZ0ViuHGqHZbeHawZBi/uy7aBiNramXAt2dFFuSuoU4u9insS3V3zdVfOnYSPreUo636xSOuQIFN4//HA== + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -329,16 +334,6 @@ agent-base@6: dependencies: debug "4" -ajv@^5.1.1: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5, ajv@^6.6.1, ajv@^6.9.1: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" @@ -1104,7 +1099,7 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bignumber.js@^7.0.0, bignumber.js@^7.2.0: +bignumber.js@^7.0.0: version "7.2.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== @@ -1114,14 +1109,6 @@ bignumber.js@^9.0.0: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== -"bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": - version "2.0.7" - resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" - -"bignumber.js@git+https://github.com/frozeman/bignumber.js-nolookahead.git": - version "2.0.7" - resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" - bindings@^1.2.1, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1519,11 +1506,6 @@ clone@^2.0.0: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -1754,11 +1736,6 @@ crypto-browserify@3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" -crypto-js@^3.1.4, crypto-js@^3.1.9-1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" - integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== - d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -1800,13 +1777,6 @@ debug@4, debug@^4.0.1, debug@^4.1.1: dependencies: ms "^2.1.1" -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -2620,15 +2590,7 @@ ethereum-protocol@^1.0.1: resolved "https://registry.yarnpkg.com/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz#b7d68142f4105e0ae7b5e178cf42f8d4dc4b93cf" integrity sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg== -ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": +ethereumjs-abi@^0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.8" resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b" dependencies: @@ -2789,15 +2751,6 @@ ethers@^4.0.32: uuid "2.0.1" xmlhttprequest "1.8.0" -ethjs-abi@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.1.8.tgz#cd288583ed628cdfadaf8adefa3ba1dbcbca6c18" - integrity sha1-zSiFg+1ijN+tr4re+juh28vKbBg= - dependencies: - bn.js "4.11.6" - js-sha3 "0.5.5" - number-to-bn "1.7.0" - ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -2937,11 +2890,6 @@ fake-merkle-patricia-tree@^1.0.1: dependencies: checkpoint-store "^1.1.0" -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -3961,11 +3909,6 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" -js-sha3@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" - integrity sha1-uvDA6MVK1ZA0R9+Wreekobynmko= - js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" @@ -4050,11 +3993,6 @@ json-rpc-random-id@^1.0.0: resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -4768,16 +4706,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -openzeppelin-solidity@1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.11.0.tgz#f57a5e340aa45efd4a052f4bb514a7a619b0bbd0" - integrity sha512-s4hFpQ9nMvFQBUuY0OJ7PfvSEprPcUph/YGvlgqJYQc6rNjsreRSj9Iq6ftTFI2anlECvWg/wWnNdPq4Tih1FA== - -openzeppelin-solidity@~1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.10.0.tgz#d77eee6653f5958d051318a61ba0b436f92216c0" - integrity sha512-igkrumQQ2lrN2zjeQV4Dnb0GpTBj1fzMcd8HPyBUqwI0hhuscX/HzXiqKT6gFQl1j9Wy/ppVVs9fqL/foF7Gmg== - optionator@^0.8.1, optionator@^0.8.2: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -5829,10 +5757,10 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -solc@0.6.7: - version "0.6.7" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.7.tgz#4cf6bed8c1d3a6728fcab86552c6ac31fe4d14ca" - integrity sha512-a3iocjS1yGzw3Wy7jkqSLX3Vg1lMDCyoKZoVfpOagRGWkh37f11BrcUDO8f73rjdpw2WUBSLJtTQ26i52/0JOg== +solc@0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.8.tgz#accf03634554938e166ba9b9853d17ca5c728131" + integrity sha512-7URBAisWVjO7dwWNpEkQ5dpRSpSF4Wm0aD5EB82D5BQKh+q7jhOxhgkG4K5gax/geM0kPZUAxnaLcgl2ZXBgMQ== dependencies: command-exists "^1.2.8" commander "3.0.2" @@ -6338,41 +6266,6 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -truffle-blockchain-utils@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz#a4e5c064dadd69f782a137f3d276d21095da7a47" - integrity sha1-pOXAZNrdafeCoTfz0nbSEJXaekc= - -truffle-contract-schema@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/truffle-contract-schema/-/truffle-contract-schema-2.0.3.tgz#0af8e19a39c630730bc19dd41b48f5b4137a6977" - integrity sha512-eI5cFifbB3zpcO4RsXSnjN9JMSlJ4M50GQPdrfbrIXRTXHsyQ433SkgFjIATUwfq++TXWkCRfKMjN8eA7YQ3+Q== - dependencies: - ajv "^5.1.1" - crypto-js "^3.1.9-1" - debug "^3.1.0" - -truffle-contract@^3.0.6: - version "3.0.8" - resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-3.0.8.tgz#6588b1b816060f6ac6876d77948934b929574067" - integrity sha512-uhXb/G4dORU4RjFlwZZbFT0n5BS8akify+MaRsnWWs4SA/bo6x4/bQs1xtdO3b5Cl9nXiOX88wdQzRj3xtPVUg== - dependencies: - ethjs-abi "0.1.8" - truffle-blockchain-utils "^0.0.5" - truffle-contract-schema "^2.0.3" - truffle-error "^0.0.3" - web3 "0.20.6" - -truffle-error@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.3.tgz#4bf55242e14deee1c7194932709182deff2c97ca" - integrity sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o= - -truffle-provisioner@^0.1.1: - version "0.1.5" - resolved "https://registry.yarnpkg.com/truffle-provisioner/-/truffle-provisioner-0.1.5.tgz#f940b2e0aa3a26d5227dfc4ebe8d29ebc68a9e03" - integrity sha512-XSzD4Tj1T16E8qwoIHnQ9sOuvoemP1yqxX9Jg0VvvoLTdl8X17uau6dN08JgNR09hJroTrXPbkAi5Y8IfKhVMw== - truffle@^5.1.24: version "5.1.25" resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.25.tgz#553e6fdb9f6d95d9d4725355356c4739c233ff27" @@ -6605,11 +6498,6 @@ utf8@3.0.0, utf8@^3.0.0: resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== -utf8@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" - integrity sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY= - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -7356,9 +7244,9 @@ web3-net@1.2.7: web3-core-method "1.2.7" web3-utils "1.2.7" -"web3-provider-engine@git+https://github.com/trufflesuite/provider-engine.git#web3-one": +"web3-provider-engine@https://github.com/trufflesuite/provider-engine#web3-one": version "14.0.6" - resolved "git+https://github.com/trufflesuite/provider-engine.git#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" + resolved "https://github.com/trufflesuite/provider-engine#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" dependencies: async "^2.5.0" backoff "^2.5.0" @@ -7581,17 +7469,6 @@ web3-utils@1.2.7: underscore "1.9.1" utf8 "3.0.0" -web3@0.20.6: - version "0.20.6" - resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.6.tgz#3e97306ae024fb24e10a3d75c884302562215120" - integrity sha1-PpcwauAk+yThCj11yIQwJWIhUSA= - dependencies: - bignumber.js "git+https://github.com/frozeman/bignumber.js-nolookahead.git" - crypto-js "^3.1.4" - utf8 "^2.1.1" - xhr2 "*" - xmlhttprequest "*" - web3@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" @@ -7633,17 +7510,6 @@ web3@1.2.6: web3-shh "1.2.6" web3-utils "1.2.6" -web3@^0.18.4: - version "0.18.4" - resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d" - integrity sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0= - dependencies: - bignumber.js "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" - crypto-js "^3.1.4" - utf8 "^2.1.1" - xhr2 "*" - xmlhttprequest "*" - web3@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.7.tgz#fcb83571036c1c6f475bc984785982a444e8d78e" @@ -7765,11 +7631,6 @@ xhr2-cookies@1.1.0: dependencies: cookiejar "^2.1.1" -xhr2@*: - version "0.2.0" - resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.2.0.tgz#eddeff782f3b7551061b8d75645085269396e521" - integrity sha512-BDtiD0i2iKPK/S8OAZfpk6tyzEDnKKSjxWHcMBVmh+LuqJ8A32qXTyOx+TVOg2dKvq6zGBq2sgKPkEeRs1qTRA== - xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: version "2.5.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" @@ -7780,7 +7641,7 @@ xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" -xmlhttprequest@*, xmlhttprequest@1.8.0: +xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= @@ -7849,16 +7710,3 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -zos-lib@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/zos-lib/-/zos-lib-1.3.0.tgz#72a54227db97775041e581868c00ea047b91afbb" - integrity sha512-qa5bD5Ms4mgCxlVfrGVZoiC8+lxFR2JLXXLMvp/CAKTAFM/lIcup2z68FllZgdUcgeVQraifY/PEuXFag91bAg== - dependencies: - bignumber.js "^7.2.0" - chalk "^2.4.1" - ethereumjs-abi "^0.6.5" - openzeppelin-solidity "~1.10.0" - truffle-contract "^3.0.6" - truffle-provisioner "^0.1.1" - web3 "^0.18.4" From 6b53b468272aed62c723fe2f954d586072e71d31 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Thu, 14 May 2020 13:46:22 -0700 Subject: [PATCH 18/22] Add pre-commit hook --- .githooks/pre-commit | 15 +++++++++++++++ .prettierignore | 4 +++- @types/generated/AdminUpgradeabilityProxy.d.ts | 8 ++++++++ @types/generated/FiatTokenProxy.d.ts | 8 ++++++++ README.md | 1 + package.json | 4 +++- 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100755 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 000000000..f906c3977 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +root_dir=$(git rev-parse --git-dir) +root_dir=$(cd $root_dir > /dev/null && cd .. > /dev/null && pwd -P) + +cd $root_dir + +yarn precommit diff --git a/.prettierignore b/.prettierignore index 2f9bd06a4..630e8ee49 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,5 @@ .DS_Store node_modules/ -coverage/ \ No newline at end of file +coverage/ +@types/generated/ + diff --git a/@types/generated/AdminUpgradeabilityProxy.d.ts b/@types/generated/AdminUpgradeabilityProxy.d.ts index c9ef1881d..a568b458c 100644 --- a/@types/generated/AdminUpgradeabilityProxy.d.ts +++ b/@types/generated/AdminUpgradeabilityProxy.d.ts @@ -34,8 +34,12 @@ type AllEvents = AdminChanged | Upgraded; export interface AdminUpgradeabilityProxyInstance extends Truffle.ContractInstance { + /** + */ admin(txDetails?: Truffle.TransactionDetails): Promise; + /** + */ implementation(txDetails?: Truffle.TransactionDetails): Promise; /** @@ -112,8 +116,12 @@ export interface AdminUpgradeabilityProxyInstance }; methods: { + /** + */ admin(txDetails?: Truffle.TransactionDetails): Promise; + /** + */ implementation(txDetails?: Truffle.TransactionDetails): Promise; /** diff --git a/@types/generated/FiatTokenProxy.d.ts b/@types/generated/FiatTokenProxy.d.ts index e586b7c09..332404160 100644 --- a/@types/generated/FiatTokenProxy.d.ts +++ b/@types/generated/FiatTokenProxy.d.ts @@ -33,6 +33,8 @@ export interface Upgraded { type AllEvents = AdminChanged | Upgraded; export interface FiatTokenProxyInstance extends Truffle.ContractInstance { + /** + */ admin(txDetails?: Truffle.TransactionDetails): Promise; /** @@ -57,6 +59,8 @@ export interface FiatTokenProxyInstance extends Truffle.ContractInstance { ): Promise; }; + /** + */ implementation(txDetails?: Truffle.TransactionDetails): Promise; /** @@ -111,6 +115,8 @@ export interface FiatTokenProxyInstance extends Truffle.ContractInstance { }; methods: { + /** + */ admin(txDetails?: Truffle.TransactionDetails): Promise; /** @@ -135,6 +141,8 @@ export interface FiatTokenProxyInstance extends Truffle.ContractInstance { ): Promise; }; + /** + */ implementation(txDetails?: Truffle.TransactionDetails): Promise; /** diff --git a/README.md b/README.md index d1efc26fe..6997688ec 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ $ git clone git@github.com:centrehq/centre-tokens.git $ cd centre-tokens $ npm i -g yarn # Install yarn if you don't already have it $ yarn install # Install dependencies +$ yarn setup # Setup Git hooks ``` ## Linting and Formatting diff --git a/package.json b/package.json index 6b1c7df49..cffe22207 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "test": "test" }, "scripts": { + "setup": "git config core.hooksPath .githooks", "compile": "rm -rf './build' && truffle compile", "typechain": "yarn compile && rm -rf './@types/generated' && typechain --target=truffle-v5 --outDir './@types/generated' 'build/contracts/**/*.json'", "typecheck": "tsc -p . --noEmit", @@ -15,7 +16,8 @@ "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --quiet", "test": "truffle test", "coverage": "truffle run coverage", - "solhint": "solhint 'contracts/**/*.sol'" + "solhint": "solhint 'contracts/**/*.sol'", + "precommit": "yarn typechain && yarn fmt && yarn typecheck && yarn lint && yarn solhint" }, "repository": { "type": "git", From 4c42934a9e30da94fba65eb1da7082c4857450ed Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Thu, 14 May 2020 21:00:02 -0700 Subject: [PATCH 19/22] Reorganize test files --- .eslintrc.js | 5 +- test/v1/Pausable.test.js | 8 +- .../{ABITests.test.js => abiHacking.test.js} | 14 +- test/v1/{EventsTests.js => events.test.js} | 12 +- ...itiveTests.js => extendedPositive.test.js} | 12 +- test/v1/{ABIUtils.js => helpers/abi.js} | 0 test/v1/helpers/tokenTest.js | 1041 +++++++++++++++++ .../{TestWrapper.js => helpers/wrapTests.js} | 16 +- ...FiatTokenLegacy.test.js => legacy.test.js} | 24 +- test/v1/{MiscTests.js => misc.test.js} | 15 +- .../v1/{NegativeTests.js => negative.test.js} | 12 +- .../v1/{PositiveTests.js => positive.test.js} | 13 +- ...NegativeTests.js => proxyNegative.test.js} | 12 +- ...PositiveTests.js => proxyPositive.test.js} | 14 +- ...torageSlotTest.ts => storageSlots.test.ts} | 7 +- truffle-config.js | 1 + 16 files changed, 1105 insertions(+), 101 deletions(-) rename test/v1/{ABITests.test.js => abiHacking.test.js} (97%) rename test/v1/{EventsTests.js => events.test.js} (96%) rename test/v1/{ExtendedPositiveTests.js => extendedPositive.test.js} (98%) rename test/v1/{ABIUtils.js => helpers/abi.js} (100%) create mode 100644 test/v1/helpers/tokenTest.js rename test/v1/{TestWrapper.js => helpers/wrapTests.js} (51%) rename test/v1/{FiatTokenLegacy.test.js => legacy.test.js} (98%) rename test/v1/{MiscTests.js => misc.test.js} (99%) rename test/v1/{NegativeTests.js => negative.test.js} (99%) rename test/v1/{PositiveTests.js => positive.test.js} (98%) rename test/v1/{ProxyNegativeTests.js => proxyNegative.test.js} (96%) rename test/v1/{ProxyPositiveTests.js => proxyPositive.test.js} (98%) rename test/v2/{StorageSlotTest.ts => storageSlots.test.ts} (97%) diff --git a/.eslintrc.js b/.eslintrc.js index ab196933c..f81ad0c70 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -42,10 +42,7 @@ module.exports = { "plugin:prettier/recommended", ], rules: { - camelcase: [ - "error", - { properties: "never", allow: ["run_tests", "test_suite_name"] }, - ], + camelcase: "error", "no-unused-vars": ["error", { argsIgnorePattern: "^_" }], "prettier/prettier": "warn", "no-var": "error", diff --git a/test/v1/Pausable.test.js b/test/v1/Pausable.test.js index 8e46be189..ffd55650e 100644 --- a/test/v1/Pausable.test.js +++ b/test/v1/Pausable.test.js @@ -3,16 +3,16 @@ const { deployerAccount, arbitraryAccount, pauserAccount, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const Pausable = artifacts.require("Pausable"); -contract("PausableTests", (_accounts) => { +contract("Pausable", (_accounts) => { let pausable; beforeEach(async () => { - pausable = await Pausable.new(); - await pausable.updatePauser(pauserAccount); + pausable = await Pausable.new({ from: deployerAccount }); + await pausable.updatePauser(pauserAccount, { from: deployerAccount }); }); it("constructor owner", async () => { diff --git a/test/v1/ABITests.test.js b/test/v1/abiHacking.test.js similarity index 97% rename from test/v1/ABITests.test.js rename to test/v1/abiHacking.test.js index 1ab512074..14f02e8ad 100644 --- a/test/v1/ABITests.test.js +++ b/test/v1/abiHacking.test.js @@ -1,4 +1,5 @@ const { Transaction } = require("ethereumjs-tx"); +const wrapTests = require("./helpers/wrapTests"); const { expectRevert, checkVariables, @@ -9,7 +10,7 @@ const { arbitraryAccountPrivateKey, tokenOwnerPrivateKey, pauserAccountPrivateKey, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const { makeRawTransaction, sendRawTransaction, @@ -17,7 +18,7 @@ const { encodeAddress, encodeUint, msgData, -} = require("./ABIUtils"); +} = require("./helpers/abi"); // Encodes methodName, 32 byte string of 0, and address. function mockStringAddressEncode(methodName, address) { @@ -25,7 +26,7 @@ function mockStringAddressEncode(methodName, address) { return functionSignature(methodName) + version + encodeAddress(address); } -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let proxy, token; beforeEach(async () => { @@ -280,9 +281,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_ABIHackingTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken ABI hacking", runTests); diff --git a/test/v1/EventsTests.js b/test/v1/events.test.js similarity index 96% rename from test/v1/EventsTests.js rename to test/v1/events.test.js index 5d5e1fbb2..4926d3690 100644 --- a/test/v1/EventsTests.js +++ b/test/v1/events.test.js @@ -1,3 +1,4 @@ +const wrapTests = require("./helpers/wrapTests"); const { FiatTokenV1, minterAccount, @@ -27,11 +28,11 @@ const { UpgradedFiatTokenNewFields, checkPauseEvent, checkTransferEvents, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const amount = 100; -async function run_tests(_newToken, _accounts) { +function runTests(_newToken, _accounts) { let proxy, token; beforeEach(async () => { @@ -197,9 +198,4 @@ async function run_tests(_newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_EventTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken events", runTests); diff --git a/test/v1/ExtendedPositiveTests.js b/test/v1/extendedPositive.test.js similarity index 98% rename from test/v1/ExtendedPositiveTests.js rename to test/v1/extendedPositive.test.js index c304115ee..8603290f0 100644 --- a/test/v1/ExtendedPositiveTests.js +++ b/test/v1/extendedPositive.test.js @@ -1,4 +1,5 @@ const BN = require("bn.js"); +const wrapTests = require("./helpers/wrapTests"); const { checkVariables, arbitraryAccount, @@ -11,11 +12,11 @@ const { initializeTokenWithProxy, UpgradedFiatToken, upgradeTo, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const amount = 100; -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let proxy, token; beforeEach(async () => { @@ -495,9 +496,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_ExtendedPositiveTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken extended positive", runTests); diff --git a/test/v1/ABIUtils.js b/test/v1/helpers/abi.js similarity index 100% rename from test/v1/ABIUtils.js rename to test/v1/helpers/abi.js diff --git a/test/v1/helpers/tokenTest.js b/test/v1/helpers/tokenTest.js new file mode 100644 index 000000000..b38aa9e37 --- /dev/null +++ b/test/v1/helpers/tokenTest.js @@ -0,0 +1,1041 @@ +const util = require("util"); +const abi = require("ethereumjs-abi"); +const _ = require("lodash"); +const BN = require("bn.js"); +const Q = require("q"); + +const FiatTokenV1 = artifacts.require("FiatTokenV1"); +const UpgradedFiatToken = artifacts.require("UpgradedFiatToken"); +const UpgradedFiatTokenNewFields = artifacts.require( + "UpgradedFiatTokenNewFieldsTest" +); +const UpgradedFiatTokenNewFieldsNewLogic = artifacts.require( + "UpgradedFiatTokenNewFieldsNewLogicTest" +); +const FiatTokenProxy = artifacts.require("FiatTokenProxy"); + +const name = "Sample Fiat Token"; +const symbol = "C-USD"; +const currency = "USD"; +const decimals = 2; +const trueInStorageFormat = "0x01"; +const bigZero = new BN(0); +const bigHundred = new BN(100); + +const nullAccount = "0x0000000000000000000000000000000000000000"; +const deployerAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; // accounts[0] +const arbitraryAccount = "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0"; // accounts[1] +const tokenOwnerAccount = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; // accounts[3] +const blacklisterAccount = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; // accounts[4] +const arbitraryAccount2 = "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC"; // accounts[5] +const masterMinterAccount = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; // accounts[6] +const minterAccount = "0x28a8746e75304c0780E011BEd21C72cD78cd535E"; // accounts[7] +const pauserAccount = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; // accounts[8] + +const proxyOwnerAccount = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; // accounts[14] +const upgraderAccount = proxyOwnerAccount; + +const deployerAccountPrivateKey = + "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; // accounts[0] +const arbitraryAccountPrivateKey = + "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1]; +const tokenOwnerPrivateKey = + "646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a7913"; // accounts[3] +const blacklisterAccountPrivateKey = + "add53f9a7e588d003326d1cbf9e4a43c061aadd9bc938c843a79e7b4fd2ad743"; // accounts[4] +const arbitraryAccount2PrivateKey = + "395df67f0c2d2d9fe1ad08d1bc8b6627011959b79c53d7dd6a3536a33ab8a4fd"; // accounts[5] +const masterMinterAccountPrivateKey = + "e485d098507f54e7733a205420dfddbe58db035fa577fc294ebd14db90767a52"; // accounts[6] +const minterAccountPrivateKey = + "a453611d9419d0e56f499079478fd72c37b251a94bfde4d19872c44cf65386e3"; // accounts[7] +const pauserAccountPrivateKey = + "829e924fdf021ba3dbbc4225edfece9aca04b929d6e75613329ca6f1d31c0bb4"; // accounts[9] +const proxyOwnerAccountPrivateKey = + "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46"; // accounts[14] +const upgraderAccountPrivateKey = proxyOwnerAccountPrivateKey; + +const adminSlot = + "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; +const implSlot = + "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; + +// set to true to enable verbose logging in the tests +const debugLogging = false; + +function calculateFeeAmount(amount, fee, feeBase) { + return Math.floor((fee / feeBase) * amount); +} + +function checkMinterConfiguredEvent( + configureMinterEvent, + minter, + minterAllowedAmount +) { + assert.strictEqual(configureMinterEvent.logs[0].event, "MinterConfigured"); + assert.strictEqual(configureMinterEvent.logs[0].args.minter, minter); + assert.isTrue( + configureMinterEvent.logs[0].args.minterAllowedAmount.eq( + new BN(minterAllowedAmount) + ) + ); +} + +function checkMinterRemovedEvent(minterRemovedEvent, minter) { + assert.strictEqual(minterRemovedEvent.logs[0].event, "MinterRemoved"); + assert.strictEqual(minterRemovedEvent.logs[0].args.oldMinter, minter); +} + +function checkTransferEvents(transferEvent, from, to, value) { + assert.strictEqual(transferEvent.logs[0].event, "Transfer"); + assert.strictEqual(transferEvent.logs[0].args.from, from); + assert.strictEqual(transferEvent.logs[0].args.to, to); + assert.isTrue(transferEvent.logs[0].args.value.eq(new BN(value))); +} + +function checkApprovalEvent(approvalEvent, approver, spender, value) { + assert.strictEqual(approvalEvent.logs[0].event, "Approval"); + assert.strictEqual(approvalEvent.logs[0].args.owner, approver); + assert.strictEqual(approvalEvent.logs[0].args.spender, spender); + assert.isTrue(approvalEvent.logs[0].args.value.eq(new BN(value))); +} + +function checkBurnEvent(burnEvent, burner, amount) { + assert.strictEqual(burnEvent.logs[0].event, "Burn"); + assert.strictEqual(burnEvent.logs[0].args.burner, burner); + assert.isTrue(burnEvent.logs[0].args.amount.eq(new BN(amount))); +} + +function checkBlacklistEvent(blacklistEvent, account) { + assert.strictEqual(blacklistEvent.logs[0].event, "Blacklisted"); + assert.strictEqual(blacklistEvent.logs[0].args._account, account); +} + +function checkUnblacklistEvent(unblacklistEvent, account) { + assert.strictEqual(unblacklistEvent.logs[0].event, "UnBlacklisted"); + assert.strictEqual(unblacklistEvent.logs[0].args._account, account); +} + +function checkBlacklisterChangedEvent(blacklisterChangedEvent, blacklister) { + assert.strictEqual( + blacklisterChangedEvent.logs[0].event, + "BlacklisterChanged" + ); + assert.strictEqual( + blacklisterChangedEvent.logs[0].args.newBlacklister, + blacklister + ); +} + +function checkPauserChangedEvent(pauserChangedEvent, pauser) { + assert.strictEqual(pauserChangedEvent.logs[0].event, "PauserChanged"); + assert.strictEqual(pauserChangedEvent.logs[0].args.newAddress, pauser); +} + +function checkTransferOwnershipEvent( + transferOwnershipEvent, + previousOwner, + newOwner +) { + assert.strictEqual( + transferOwnershipEvent.logs[0].event, + "OwnershipTransferred" + ); + assert.strictEqual( + transferOwnershipEvent.logs[0].args.previousOwner, + previousOwner + ); + assert.strictEqual(transferOwnershipEvent.logs[0].args.newOwner, newOwner); +} + +function checkUpdateMasterMinterEvent(updateMasterMinter, newMasterMinter) { + assert.strictEqual(updateMasterMinter.logs[0].event, "MasterMinterChanged"); + assert.strictEqual( + updateMasterMinter.logs[0].args.newMasterMinter, + newMasterMinter + ); +} + +function checkAdminChangedEvent(adminChangedEvent, previousAdmin, newAdmin) { + assert.strictEqual(adminChangedEvent.logs[0].event, "AdminChanged"); + assert.strictEqual( + adminChangedEvent.logs[0].args.previousAdmin, + previousAdmin + ); + assert.strictEqual(adminChangedEvent.logs[0].args.newAdmin, newAdmin); +} + +function checkUpgradeEvent(upgradeEvent, implementation) { + assert.strictEqual(upgradeEvent.logs[0].event, "Upgraded"); + assert.strictEqual(upgradeEvent.logs[0].args.implementation, implementation); +} + +function checkPauseEvent(pause) { + assert.strictEqual(pause.logs[0].event, "Pause"); +} + +function checkUnpauseEvent(unpause) { + assert.strictEqual(unpause.logs[0].event, "Unpause"); +} + +function checkMintEvent(minting, to, amount, minter) { + // Mint Event + assert.strictEqual(minting.logs[0].event, "Mint"); + assert.strictEqual(minting.logs[0].args.minter, minter); + assert.strictEqual(minting.logs[0].args.to, to); + assert.isTrue(minting.logs[0].args.amount.eq(new BN(amount))); + + // Transfer from 0 Event + assert.strictEqual(minting.logs[1].event, "Transfer"); + assert.strictEqual(minting.logs[1].args.from, nullAccount); + assert.strictEqual(minting.logs[1].args.to, to); + assert.isTrue(minting.logs[1].args.value.eq(new BN(amount))); +} + +function checkBurnEvents(burning, amount, burner) { + // Burn Event + assert.strictEqual(burning.logs[0].event, "Burn"); + assert.strictEqual(burning.logs[0].args.burner, burner); + assert.isTrue(burning.logs[0].args.amount.eq(new BN(amount))); + + // Transfer to 0 Event + assert.strictEqual(burning.logs[1].event, "Transfer"); + assert.strictEqual(burning.logs[1].args.from, burner); + assert.strictEqual(burning.logs[1].args.to, nullAccount); + assert.isTrue(burning.logs[1].args.value.eq(new BN(amount))); +} + +// Creates a state object, with default values replaced by +// customVars where appropriate. +function buildExpectedState(token, customVars) { + // set each variable's default value + const expectedState = { + name, + symbol, + currency, + decimals: new BN(decimals), + masterMinter: masterMinterAccount, + pauser: pauserAccount, + blacklister: blacklisterAccount, + tokenOwner: tokenOwnerAccount, + proxiedTokenAddress: token.proxiedTokenAddress, + initializedV1: trueInStorageFormat, + upgrader: proxyOwnerAccount, + balances: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + allowance: { + arbitraryAccount: { + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + arbitraryAccount: bigZero, + upgraderAccount: bigZero, + }, + masterMinterAccount: { + arbitraryAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + masterMinterAccount: bigZero, + upgraderAccount: bigZero, + }, + minterAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + minterAccount: bigZero, + upgraderAccount: bigZero, + }, + pauserAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + pauserAccount: bigZero, + upgraderAccount: bigZero, + }, + blacklisterAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + tokenOwnerAccount: bigZero, + blacklisterAccount: bigZero, + upgraderAccount: bigZero, + }, + tokenOwnerAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + upgraderAccount: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + }, + totalSupply: bigZero, + isAccountBlacklisted: { + arbitraryAccount: false, + masterMinterAccount: false, + minterAccount: false, + pauserAccount: false, + blacklisterAccount: false, + tokenOwnerAccount: false, + upgraderAccount: false, + }, + isAccountMinter: { + arbitraryAccount: false, + masterMinterAccount: false, + minterAccount: false, + pauserAccount: false, + blacklisterAccount: false, + tokenOwnerAccount: false, + upgraderAccount: false, + }, + minterAllowance: { + arbitraryAccount: bigZero, + masterMinterAccount: bigZero, + minterAccount: bigZero, + pauserAccount: bigZero, + blacklisterAccount: bigZero, + tokenOwnerAccount: bigZero, + upgraderAccount: bigZero, + }, + paused: false, + }; + + // for each item in customVars, set the item in expectedState + let i; + for (i = 0; i < customVars.length; ++i) { + if (_.has(expectedState, customVars[i].variable)) { + if ( + expectedState[customVars[i].variable] === customVars[i].expectedValue + ) { + throw new Error( + "variable " + + customVars[i].variable + + " to test has same default state as expected state" + ); + } else { + _.set( + expectedState, + customVars[i].variable, + customVars[i].expectedValue + ); + } + } else { + throw new Error( + "variable " + customVars[i].variable + " not found in expectedState" + ); + } + } + return expectedState; +} + +// BN-aware deep comparison +function checkState(actual, expected, prefix) { + for (const k in actual) { + if (Object.prototype.hasOwnProperty.call(actual, k)) { + const path = prefix ? prefix + "." + k : k; + const actualV = actual[k]; + const expectedV = expected[k]; + if (typeof actualV === "object" && !BN.isBN(actualV)) { + checkState(actualV, expectedV, path); + } else { + const msg = `expected ${path} to equal ${expectedV}, got ${actualV}`; + if (BN.isBN(actualV)) { + assert.isTrue(actualV.eq(expectedV), msg); + } else { + assert.strictEqual(actualV, expectedV, msg); + } + } + } + } +} + +// For testing variance of specific variables from their default values. +// customVars is an array of objects of the form, +// {'variable': , 'expectedValue': } +// to reference nested variables, name variable using dot syntax, e.g. 'allowance.arbitraryAccount.minterAccount' +async function checkVariables(_tokens, _customVars) { + // Iterate over array of tokens. + const numTokens = _tokens.length; + assert.strictEqual(numTokens, _customVars.length); + let n; + for (n = 0; n < numTokens; n++) { + const token = _tokens[n]; + const customVars = _customVars[n]; + const expectedState = buildExpectedState(token, customVars); + if (debugLogging) { + console.log( + util.inspect(expectedState, { showHidden: false, depth: null }) + ); + } + + const actualState = await getActualState(token); + checkState(actualState, expectedState); + + // Check that sum of individual balances equals totalSupply + const accounts = [ + arbitraryAccount, + masterMinterAccount, + minterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + upgraderAccount, + ]; + let balanceSum = bigZero; + for (let i = 0; i < accounts.length; i++) { + balanceSum = balanceSum.add(await token.balanceOf(accounts[i])); + } + const totalSupply = await token.totalSupply(); + assert.isTrue(balanceSum.eq(totalSupply)); + } +} + +function hexToAddress(hex) { + return web3.utils.toChecksumAddress( + "0x" + hex.replace(/^0x/, "").padStart(40, "0") + ); +} + +// build up actualState object to compare to expectedState object +async function getActualState(token) { + return Q.all([ + await token.name.call(), + await token.symbol.call(), + await token.currency.call(), + await token.decimals.call(), + await token.masterMinter.call(), + await token.pauser.call(), + await token.blacklister.call(), + await token.owner.call(), + await getImplementation(token), + await getAdmin(token), + await getInitializedV1(token), + await token.balanceOf(arbitraryAccount), + await token.balanceOf(masterMinterAccount), + await token.balanceOf(minterAccount), + await token.balanceOf(pauserAccount), + await token.balanceOf(blacklisterAccount), + await token.balanceOf(tokenOwnerAccount), + await token.balanceOf(upgraderAccount), + await token.allowance(arbitraryAccount, masterMinterAccount), + await token.allowance(arbitraryAccount, minterAccount), + await token.allowance(arbitraryAccount, pauserAccount), + await token.allowance(arbitraryAccount, blacklisterAccount), + await token.allowance(arbitraryAccount, tokenOwnerAccount), + await token.allowance(arbitraryAccount, arbitraryAccount), + await token.allowance(arbitraryAccount, upgraderAccount), + await token.allowance(masterMinterAccount, arbitraryAccount), + await token.allowance(masterMinterAccount, minterAccount), + await token.allowance(masterMinterAccount, pauserAccount), + await token.allowance(masterMinterAccount, blacklisterAccount), + await token.allowance(masterMinterAccount, tokenOwnerAccount), + await token.allowance(masterMinterAccount, masterMinterAccount), + await token.allowance(masterMinterAccount, upgraderAccount), + await token.allowance(minterAccount, arbitraryAccount), + await token.allowance(minterAccount, masterMinterAccount), + await token.allowance(minterAccount, pauserAccount), + await token.allowance(minterAccount, blacklisterAccount), + await token.allowance(minterAccount, tokenOwnerAccount), + await token.allowance(minterAccount, minterAccount), + await token.allowance(minterAccount, upgraderAccount), + await token.allowance(pauserAccount, arbitraryAccount), + await token.allowance(pauserAccount, masterMinterAccount), + await token.allowance(pauserAccount, minterAccount), + await token.allowance(pauserAccount, blacklisterAccount), + await token.allowance(pauserAccount, tokenOwnerAccount), + await token.allowance(pauserAccount, pauserAccount), + await token.allowance(pauserAccount, upgraderAccount), + await token.allowance(blacklisterAccount, arbitraryAccount), + await token.allowance(blacklisterAccount, masterMinterAccount), + await token.allowance(blacklisterAccount, minterAccount), + await token.allowance(blacklisterAccount, pauserAccount), + await token.allowance(blacklisterAccount, tokenOwnerAccount), + await token.allowance(blacklisterAccount, blacklisterAccount), + await token.allowance(blacklisterAccount, upgraderAccount), + await token.allowance(tokenOwnerAccount, arbitraryAccount), + await token.allowance(tokenOwnerAccount, masterMinterAccount), + await token.allowance(tokenOwnerAccount, minterAccount), + await token.allowance(tokenOwnerAccount, pauserAccount), + await token.allowance(tokenOwnerAccount, blacklisterAccount), + await token.allowance(tokenOwnerAccount, tokenOwnerAccount), + await token.allowance(tokenOwnerAccount, upgraderAccount), + await token.allowance(upgraderAccount, arbitraryAccount), + await token.allowance(upgraderAccount, masterMinterAccount), + await token.allowance(upgraderAccount, minterAccount), + await token.allowance(upgraderAccount, pauserAccount), + await token.allowance(upgraderAccount, blacklisterAccount), + await token.allowance(upgraderAccount, tokenOwnerAccount), + await token.allowance(upgraderAccount, upgraderAccount), + await token.totalSupply(), + await token.isBlacklisted(arbitraryAccount), + await token.isBlacklisted(masterMinterAccount), + await token.isBlacklisted(minterAccount), + await token.isBlacklisted(pauserAccount), + await token.isBlacklisted(blacklisterAccount), + await token.isBlacklisted(tokenOwnerAccount), + await token.isBlacklisted(upgraderAccount), + await token.isMinter(arbitraryAccount), + await token.isMinter(masterMinterAccount), + await token.isMinter(minterAccount), + await token.isMinter(pauserAccount), + await token.isMinter(blacklisterAccount), + await token.isMinter(tokenOwnerAccount), + await token.isMinter(upgraderAccount), + await token.minterAllowance(arbitraryAccount), + await token.minterAllowance(masterMinterAccount), + await token.minterAllowance(minterAccount), + await token.minterAllowance(pauserAccount), + await token.minterAllowance(blacklisterAccount), + await token.minterAllowance(tokenOwnerAccount), + await token.minterAllowance(upgraderAccount), + await token.paused(), + ]).spread( + ( + name, + symbol, + currency, + decimals, + masterMinter, + pauser, + blacklister, + tokenOwner, + proxiedTokenAddress, + upgrader, + initializedV1, + balancesA, + balancesMM, + balancesM, + balancesP, + balancesB, + balancesRAC, + balancesU, + allowanceAtoMM, + allowanceAtoM, + allowanceAtoP, + allowanceAtoB, + allowanceAtoRAC, + allowanceAtoA, + allowanceAtoU, + allowanceMMtoA, + allowanceMMtoM, + allowanceMMtoP, + allowanceMMtoB, + allowanceMMtoRAC, + allowanceMMtoMM, + allowanceMMtoU, + allowanceMtoA, + allowanceMtoMM, + allowanceMtoP, + allowanceMtoB, + allowanceMtoRAC, + allowanceMtoM, + allowanceMtoU, + allowancePtoA, + allowancePtoMM, + allowancePtoM, + allowancePtoB, + allowancePtoRAC, + allowancePtoP, + allowancePtoU, + allowanceBtoA, + allowanceBtoMM, + allowanceBtoM, + allowanceBtoP, + allowanceBtoRAC, + allowanceBtoB, + allowanceBtoU, + allowanceRACtoA, + allowanceRACtoMM, + allowanceRACtoM, + allowanceRACtoP, + allowanceRACtoB, + allowanceRACtoRAC, + allowanceRACtoU, + allowanceUtoA, + allowanceUtoMM, + allowanceUtoM, + allowanceUtoP, + allowanceUtoB, + allowanceUtoRAC, + allowanceUtoU, + totalSupply, + isAccountBlacklistedA, + isAccountBlacklistedMM, + isAccountBlacklistedM, + isAccountBlacklistedP, + isAccountBlacklistedB, + isAccountBlacklistedRAC, + isAccountBlacklistedU, + isAccountMinterA, + isAccountMinterMM, + isAccountMinterM, + isAccountMinterP, + isAccountMinterB, + isAccountMinterRAC, + isAccountMinterU, + minterAllowanceA, + minterAllowanceMM, + minterAllowanceM, + minterAllowanceP, + minterAllowanceB, + minterAllowanceRAC, + minterAllowanceU, + paused + ) => { + const actualState = { + name, + symbol, + currency, + decimals, + masterMinter: hexToAddress(masterMinter), + pauser: hexToAddress(pauser), + blacklister: hexToAddress(blacklister), + tokenOwner: hexToAddress(tokenOwner), + proxiedTokenAddress: hexToAddress(proxiedTokenAddress), + upgrader: hexToAddress(upgrader), + initializedV1, + balances: { + arbitraryAccount: balancesA, + masterMinterAccount: balancesMM, + minterAccount: balancesM, + pauserAccount: balancesP, + blacklisterAccount: balancesB, + tokenOwnerAccount: balancesRAC, + upgraderAccount: balancesU, + }, + allowance: { + arbitraryAccount: { + masterMinterAccount: allowanceAtoMM, + minterAccount: allowanceAtoM, + pauserAccount: allowanceAtoP, + blacklisterAccount: allowanceAtoB, + tokenOwnerAccount: allowanceAtoRAC, + arbitraryAccount: allowanceAtoA, + upgraderAccount: allowanceAtoU, + }, + masterMinterAccount: { + arbitraryAccount: allowanceMMtoA, + minterAccount: allowanceMMtoM, + pauserAccount: allowanceMMtoP, + blacklisterAccount: allowanceMMtoB, + tokenOwnerAccount: allowanceMMtoRAC, + masterMinterAccount: allowanceMMtoMM, + upgraderAccount: allowanceMMtoU, + }, + minterAccount: { + arbitraryAccount: allowanceMtoA, + masterMinterAccount: allowanceMtoMM, + pauserAccount: allowanceMtoP, + blacklisterAccount: allowanceMtoB, + tokenOwnerAccount: allowanceMtoRAC, + minterAccount: allowanceMtoM, + upgraderAccount: allowanceMtoU, + }, + pauserAccount: { + arbitraryAccount: allowancePtoA, + masterMinterAccount: allowancePtoMM, + minterAccount: allowancePtoM, + blacklisterAccount: allowancePtoB, + tokenOwnerAccount: allowancePtoRAC, + pauserAccount: allowancePtoP, + upgraderAccount: allowancePtoU, + }, + blacklisterAccount: { + arbitraryAccount: allowanceBtoA, + masterMinterAccount: allowanceBtoMM, + minterAccount: allowanceBtoM, + pauserAccount: allowanceBtoP, + tokenOwnerAccount: allowanceBtoRAC, + blacklisterAccount: allowanceBtoB, + upgraderAccount: allowanceBtoU, + }, + tokenOwnerAccount: { + arbitraryAccount: allowanceRACtoA, + masterMinterAccount: allowanceRACtoMM, + minterAccount: allowanceRACtoM, + pauserAccount: allowanceRACtoP, + blacklisterAccount: allowanceRACtoB, + tokenOwnerAccount: allowanceRACtoRAC, + upgraderAccount: allowanceRACtoU, + }, + upgraderAccount: { + arbitraryAccount: allowanceUtoA, + masterMinterAccount: allowanceUtoMM, + minterAccount: allowanceUtoM, + pauserAccount: allowanceUtoP, + blacklisterAccount: allowanceUtoB, + tokenOwnerAccount: allowanceUtoRAC, + upgraderAccount: allowanceUtoU, + }, + }, + totalSupply, + isAccountBlacklisted: { + arbitraryAccount: isAccountBlacklistedA, + masterMinterAccount: isAccountBlacklistedMM, + minterAccount: isAccountBlacklistedM, + pauserAccount: isAccountBlacklistedP, + blacklisterAccount: isAccountBlacklistedB, + tokenOwnerAccount: isAccountBlacklistedRAC, + upgraderAccount: isAccountBlacklistedU, + }, + isAccountMinter: { + arbitraryAccount: isAccountMinterA, + masterMinterAccount: isAccountMinterMM, + minterAccount: isAccountMinterM, + pauserAccount: isAccountMinterP, + blacklisterAccount: isAccountMinterB, + tokenOwnerAccount: isAccountMinterRAC, + upgraderAccount: isAccountMinterU, + }, + minterAllowance: { + arbitraryAccount: minterAllowanceA, + masterMinterAccount: minterAllowanceMM, + minterAccount: minterAllowanceM, + pauserAccount: minterAllowanceP, + blacklisterAccount: minterAllowanceB, + tokenOwnerAccount: minterAllowanceRAC, + upgraderAccount: minterAllowanceU, + }, + paused, + }; + return actualState; + } + ); +} + +async function setMinter(token, minter, amount) { + const update = await token.configureMinter(minter, amount, { + from: masterMinterAccount, + }); + assert.strictEqual(update.logs[0].event, "MinterConfigured"); + assert.strictEqual(update.logs[0].args.minter, minter); + assert.isTrue(update.logs[0].args.minterAllowedAmount.eq(new BN(amount))); + const minterAllowance = await token.minterAllowance(minter); + + assert.isTrue(minterAllowance.eq(new BN(amount))); +} + +async function burn(token, amount, burner) { + const burning = await token.burn(amount, { from: burner }); + checkBurnEvents(burning, amount, burner); +} + +async function mint(token, to, amount, minter) { + await setMinter(token, minter, amount); + await mintRaw(token, to, amount, minter); +} + +async function mintRaw(token, to, amount, minter) { + const initialTotalSupply = await token.totalSupply(); + const initialMinterAllowance = await token.minterAllowance(minter); + const minting = await token.mint(to, amount, { from: minter }); + checkMintEvent(minting, to, amount, minter); + + const totalSupply = await token.totalSupply(); + assert.isTrue(totalSupply.eq(initialTotalSupply.add(new BN(amount)))); + const minterAllowance = await token.minterAllowance(minter); + assert.isTrue(initialMinterAllowance.sub(new BN(amount)).eq(minterAllowance)); +} + +async function blacklist(token, account) { + const blacklist = await token.blacklist(account, { + from: blacklisterAccount, + }); + checkBlacklistEvent(blacklist, account); +} + +async function unBlacklist(token, account) { + const unblacklist = await token.unBlacklist(account, { + from: blacklisterAccount, + }); + checkUnblacklistEvent(unblacklist, account); +} + +async function sampleTransfer(token, ownerAccount, arbitraryAccount, minter) { + let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BN(allowed).eqn(0)); + await mint(token, ownerAccount, 1900, minter); + + await token.approve(arbitraryAccount, 1500, { from: ownerAccount }); + allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BN(allowed).eqn(1500)); + + const transfer = await token.transfer(arbitraryAccount, 1000, { + from: ownerAccount, + }); + + checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 1000); + + const balance0 = await token.balanceOf(ownerAccount); + assert.isTrue(balance0.eqn(1900 - 1000)); + const balance3 = await token.balanceOf(arbitraryAccount); + assert.isTrue(balance3.eqn(1000)); +} + +async function sampleTransferFrom( + token, + ownerAccount, + arbitraryAccount, + minter +) { + let allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BN(allowed).eqn(0)); + await mint(token, ownerAccount, 900, minter); + await token.approve(arbitraryAccount, 634, { from: ownerAccount }); + allowed = await token.allowance.call(ownerAccount, arbitraryAccount); + assert.isTrue(new BN(allowed).eqn(634)); + + const transfer = await token.transferFrom( + ownerAccount, + arbitraryAccount, + 534, + { from: arbitraryAccount } + ); + + checkTransferEvents(transfer, ownerAccount, arbitraryAccount, 534); + + const balance0 = await token.balanceOf(ownerAccount); + assert.isTrue(new BN(balance0).eqn(900 - 534)); + const balance3 = await token.balanceOf(arbitraryAccount); + assert.isTrue(new BN(balance3).eqn(534)); +} + +async function approve(token, to, amount, from) { + await token.approve(to, amount, { from }); +} + +async function redeem(token, account, amount) { + const redeemResult = await token.redeem(amount, { from: account }); + assert.strictEqual(redeemResult.logs[0].event, "Redeem"); + assert.strictEqual(redeemResult.logs[0].args.redeemedAddress, account); + assert.isTrue(redeemResult.logs[0].args.amount.eq(new BN(amount))); +} + +function validateTransferEvent(transferEvent, from, to, value) { + const eventResult = transferEvent.logs[0]; + assert.strictEqual(eventResult.event, "Transfer"); + assert.strictEqual(eventResult.args.from, from); + assert.strictEqual(eventResult.args.to, to); + assert.isTrue(eventResult.args.value.eq(new BN(value))); +} + +async function initializeTokenWithProxy(rawToken) { + return customInitializeTokenWithProxy( + rawToken, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ); +} + +async function customInitializeTokenWithProxy( + rawToken, + _masterMinter, + _pauser, + _blacklister, + _owner +) { + const proxy = await FiatTokenProxy.new(rawToken.address, { + from: proxyOwnerAccount, + }); + const proxiedToken = await FiatTokenV1.at(proxy.address); + await proxiedToken.initialize( + name, + symbol, + currency, + decimals, + _masterMinter, + _pauser, + _blacklister, + _owner + ); + proxiedToken.proxiedTokenAddress = rawToken.address; + assert.strictEqual(proxiedToken.address, proxy.address); + assert.notEqual(proxiedToken.address, rawToken.address); + const tokenConfig = { + proxy, + token: proxiedToken, + }; + return tokenConfig; +} + +async function upgradeTo(proxy, upgradedToken, proxyUpgraderAccount) { + if (proxyUpgraderAccount == null) { + proxyUpgraderAccount = proxyOwnerAccount; + } + await proxy.upgradeTo(upgradedToken.address, { from: proxyUpgraderAccount }); + const proxiedToken = await FiatTokenV1.at(proxy.address); + assert.strictEqual(proxiedToken.address, proxy.address); + return { + proxy, + token: proxiedToken, + }; +} + +async function expectRevert(contractPromise) { + try { + await contractPromise; + } catch (error) { + assert.isTrue( + error.message.includes("revert"), + "Expected error of type revert, got '" + error + "' instead" + ); + return; + } + assert.fail("Expected error of type revert, but no error was received"); +} + +async function expectJump(contractPromise) { + try { + await contractPromise; + assert.fail("Expected invalid opcode not received"); + } catch (error) { + assert.isTrue( + error.message.includes("invalid opcode"), + `Expected "invalid opcode", got ${error} instead` + ); + } +} + +function encodeCall(name, args, values) { + const methodId = abi.methodID(name, args).toString("hex"); + const params = abi.rawEncode(args, values).toString("hex"); + return "0x" + methodId + params; +} + +async function getAdmin(proxy) { + const adm = await web3.eth.getStorageAt(proxy.address, adminSlot); + return web3.utils.toChecksumAddress("0x" + adm.slice(2).padStart(40, "0")); +} + +async function getImplementation(proxy) { + const impl = await web3.eth.getStorageAt(proxy.address, implSlot); + return web3.utils.toChecksumAddress("0x" + impl.slice(2).padStart(40, "0")); +} + +async function getInitializedV1(token) { + const slot8Data = await web3.eth.getStorageAt(token.address, 8); + let initialized; + + if (slot8Data === "0x0") { + // validate proxy not yet initialized + for (let i = 0; i <= 20; i++) { + assert.strictEqual("0x0", await web3.eth.getStorageAt(token.address, i)); + } + initialized = "0x00"; + } else { + const slot8DataPadded = slot8Data.slice(2).padStart(42, "0"); + if (slot8DataPadded.length !== 42) { + assert.fail("slot8Data unexpected size"); + } + const masterMinterAddress = await token.masterMinter.call(); + assert.isTrue( + slot8DataPadded.indexOf(masterMinterAddress.slice(2).toLowerCase()) === 2 + ); + + initialized = "0x" + slot8DataPadded.slice(0, 2); + } + return initialized; +} + +module.exports = { + FiatTokenV1, + FiatTokenProxy, + UpgradedFiatToken, + UpgradedFiatTokenNewFields, + UpgradedFiatTokenNewFieldsNewLogic, + name, + symbol, + currency, + decimals, + bigZero, + bigHundred, + debugLogging, + calculateFeeAmount, + checkTransferEvents, + checkMinterConfiguredEvent, + checkMintEvent, + checkApprovalEvent, + checkBurnEvents, + checkBurnEvent, + checkMinterRemovedEvent, + checkBlacklistEvent, + checkUnblacklistEvent, + checkPauseEvent, + checkUnpauseEvent, + checkPauserChangedEvent, + checkTransferOwnershipEvent, + checkUpdateMasterMinterEvent, + checkBlacklisterChangedEvent, + checkUpgradeEvent, + checkAdminChangedEvent, + buildExpectedState, + checkVariables, + setMinter, + mint, + burn, + mintRaw, + blacklist, + unBlacklist, + sampleTransfer, + sampleTransferFrom, + approve, + redeem, + validateTransferEvent, + initializeTokenWithProxy, + customInitializeTokenWithProxy, + upgradeTo, + expectRevert, + expectJump, + encodeCall, + getInitializedV1, + nullAccount, + deployerAccount, + arbitraryAccount, + tokenOwnerAccount, + arbitraryAccount2, + masterMinterAccount, + minterAccount, + pauserAccount, + blacklisterAccount, + proxyOwnerAccount, + proxyOwnerAccountPrivateKey, + upgraderAccount, + getAdmin, + arbitraryAccountPrivateKey, + upgraderAccountPrivateKey, + tokenOwnerPrivateKey, + blacklisterAccountPrivateKey, + arbitraryAccount2PrivateKey, + masterMinterAccountPrivateKey, + minterAccountPrivateKey, + pauserAccountPrivateKey, + deployerAccountPrivateKey, +}; diff --git a/test/v1/TestWrapper.js b/test/v1/helpers/wrapTests.js similarity index 51% rename from test/v1/TestWrapper.js rename to test/v1/helpers/wrapTests.js index ec6100262..0b20209a2 100644 --- a/test/v1/TestWrapper.js +++ b/test/v1/helpers/wrapTests.js @@ -1,4 +1,4 @@ -const { UpgradedFiatToken, FiatTokenV1 } = require("./TokenTestUtils"); +const { UpgradedFiatToken, FiatTokenV1 } = require("./tokenTest"); // The following helpers make fresh original/upgraded tokens before each test. @@ -14,16 +14,14 @@ async function newUpgradedToken() { // Executes the run_tests_function using an original and // an upgraded token. The test_suite_name is printed standard output. -function execute(test_suite_name, run_tests_function) { - contract(test_suite_name, async (accounts) => { - await run_tests_function(newToken, accounts); +function wrapTests(testSuiteName, runTestsFunction) { + contract(testSuiteName, (accounts) => { + runTestsFunction(newToken, accounts); }); - contract(test_suite_name + " Upgraded", async (accounts) => { - await run_tests_function(newUpgradedToken, accounts); + contract(testSuiteName + " (upgraded)", (accounts) => { + runTestsFunction(newUpgradedToken, accounts); }); } -module.exports = { - execute, -}; +module.exports = wrapTests; diff --git a/test/v1/FiatTokenLegacy.test.js b/test/v1/legacy.test.js similarity index 98% rename from test/v1/FiatTokenLegacy.test.js rename to test/v1/legacy.test.js index 3e24747c8..a4373a93a 100644 --- a/test/v1/FiatTokenLegacy.test.js +++ b/test/v1/legacy.test.js @@ -1,4 +1,5 @@ const BN = require("bn.js"); +const wrapTests = require("./helpers/wrapTests"); const { name, symbol, @@ -28,10 +29,10 @@ const { UpgradedFiatToken, FiatTokenV1, getAdmin, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); // these tests are for reference and do not track side effects on all variables -async function run_tests(_newToken, accounts) { +function runTests(_newToken, accounts) { let proxy, token; beforeEach(async () => { @@ -153,7 +154,7 @@ async function run_tests(_newToken, accounts) { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[0], 500, minterAccount); - await token.approve(accounts[3], 100); + await token.approve(accounts[3], 100, { from: accounts[0] }); allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(100)); @@ -173,7 +174,7 @@ async function run_tests(_newToken, accounts) { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[0], 500, minterAccount); - await token.approve(accounts[3], 100); + await token.approve(accounts[3], 100, { from: accounts[0] }); allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(100)); @@ -191,7 +192,7 @@ async function run_tests(_newToken, accounts) { let allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(0)); await mint(token, accounts[0], 500, minterAccount); - await token.approve(accounts[3], 100); + await token.approve(accounts[3], 100, { from: accounts[0] }); allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(100)); @@ -207,7 +208,7 @@ async function run_tests(_newToken, accounts) { it("should fail on invalid transfer recipient (zero-account) and not change balances", async () => { await mint(token, accounts[0], 500, minterAccount); - await token.approve(accounts[3], 100); + await token.approve(accounts[3], 100, { from: accounts[0] }); const allowed = await token.allowance.call(accounts[0], accounts[3]); assert.isTrue(new BN(allowed).eqn(100)); @@ -226,7 +227,9 @@ async function run_tests(_newToken, accounts) { const totalAmount = transferAmount; await mint(token, accounts[0], totalAmount, minterAccount); - let transfer = await token.transfer(accounts[3], transferAmount); + let transfer = await token.transfer(accounts[3], transferAmount, { + from: accounts[0], + }); checkTransferEvents(transfer, accounts[0], accounts[3], transferAmount); const balance0 = await token.balanceOf(accounts[0]); @@ -742,9 +745,4 @@ async function run_tests(_newToken, accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_LegacyTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("legacy", runTests); diff --git a/test/v1/MiscTests.js b/test/v1/misc.test.js similarity index 99% rename from test/v1/MiscTests.js rename to test/v1/misc.test.js index 51da3dfcd..db9f82ab1 100644 --- a/test/v1/MiscTests.js +++ b/test/v1/misc.test.js @@ -1,4 +1,5 @@ const BN = require("bn.js"); +const wrapTests = require("./helpers/wrapTests"); const { checkVariables, expectRevert, @@ -11,16 +12,15 @@ const { initializeTokenWithProxy, getInitializedV1, FiatTokenV1, -} = require("./TokenTestUtils"); - -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); + FiatTokenProxy, +} = require("./helpers/tokenTest"); const maxAmount = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; const maxAmountBN = new BN(maxAmount.slice(2), 16); const amount = 100; -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let proxy, token; beforeEach(async () => { @@ -880,9 +880,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_MiscTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken misc", runTests); diff --git a/test/v1/NegativeTests.js b/test/v1/negative.test.js similarity index 99% rename from test/v1/NegativeTests.js rename to test/v1/negative.test.js index 65425ab03..d443791a2 100644 --- a/test/v1/NegativeTests.js +++ b/test/v1/negative.test.js @@ -1,3 +1,4 @@ +const wrapTests = require("./helpers/wrapTests"); const BN = require("bn.js"); const { checkVariables, @@ -14,11 +15,11 @@ const { customInitializeTokenWithProxy, upgradeTo, UpgradedFiatToken, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const amount = 100; -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let proxy, token; beforeEach(async () => { @@ -1026,9 +1027,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_NegativeTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken negative", runTests); diff --git a/test/v1/PositiveTests.js b/test/v1/positive.test.js similarity index 98% rename from test/v1/PositiveTests.js rename to test/v1/positive.test.js index 339047de8..6e239b6ca 100644 --- a/test/v1/PositiveTests.js +++ b/test/v1/positive.test.js @@ -1,5 +1,5 @@ const BN = require("bn.js"); - +const wrapTests = require("./helpers/wrapTests"); const { bigZero, checkVariables, @@ -10,11 +10,11 @@ const { minterAccount, pauserAccount, initializeTokenWithProxy, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const amount = 100; -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let proxy, token; beforeEach(async () => { @@ -350,9 +350,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_PositiveTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken positive", runTests); diff --git a/test/v1/ProxyNegativeTests.js b/test/v1/proxyNegative.test.js similarity index 96% rename from test/v1/ProxyNegativeTests.js rename to test/v1/proxyNegative.test.js index 22d58f10d..65363b76b 100644 --- a/test/v1/ProxyNegativeTests.js +++ b/test/v1/proxyNegative.test.js @@ -1,4 +1,5 @@ const BN = require("bn.js"); +const wrapTests = require("./helpers/wrapTests"); const { bigZero, expectRevert, @@ -20,11 +21,11 @@ const { FiatTokenV1, UpgradedFiatToken, UpgradedFiatTokenNewFields, -} = require("./TokenTestUtils"); +} = require("./helpers/tokenTest"); const amount = 100; -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let rawToken, proxy, token; beforeEach(async () => { @@ -216,9 +217,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_ProxyNegativeTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken proxy negative", runTests); diff --git a/test/v1/ProxyPositiveTests.js b/test/v1/proxyPositive.test.js similarity index 98% rename from test/v1/ProxyPositiveTests.js rename to test/v1/proxyPositive.test.js index 37378a3a7..9b128bb73 100644 --- a/test/v1/ProxyPositiveTests.js +++ b/test/v1/proxyPositive.test.js @@ -1,3 +1,4 @@ +const wrapTests = require("./helpers/wrapTests"); const BN = require("bn.js"); const { bigZero, @@ -24,12 +25,12 @@ const { UpgradedFiatTokenNewFields, UpgradedFiatTokenNewFieldsNewLogic, getAdmin, -} = require("./TokenTestUtils"); -const { makeRawTransaction, sendRawTransaction } = require("./ABIUtils"); +} = require("./helpers/tokenTest"); +const { makeRawTransaction, sendRawTransaction } = require("./helpers/abi"); const amount = 100; -async function run_tests(newToken, _accounts) { +function runTests(newToken, _accounts) { let rawToken, proxy, token; beforeEach(async () => { @@ -460,9 +461,4 @@ async function run_tests(newToken, _accounts) { }); } -const testWrapper = require("./TestWrapper"); -testWrapper.execute("FiatToken_ProxyPositiveTests", run_tests); - -module.exports = { - run_tests, -}; +wrapTests("FiatToken proxy positive", runTests); diff --git a/test/v2/StorageSlotTest.ts b/test/v2/storageSlots.test.ts similarity index 97% rename from test/v2/StorageSlotTest.ts rename to test/v2/storageSlots.test.ts index 8c2c8cd90..7d6c55eb9 100644 --- a/test/v2/StorageSlotTest.ts +++ b/test/v2/storageSlots.test.ts @@ -9,7 +9,7 @@ const FiatTokenV1 = artifacts.require("FiatTokenV1"); const FiatTokenV2 = artifacts.require("FiatTokenV2"); const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -contract("StorageSlotTest", (accounts) => { +contract("Storage slots", (accounts) => { const [name, symbol, currency, decimals] = ["USD Coin", "USDC", "USD", 6]; const [mintAllowance, minted, transferred, allowance] = [ 1000e6, @@ -209,7 +209,10 @@ async function readSlot( address: string, slot: number | string ): Promise { - const data = await web3.eth.getStorageAt(address, slot); + const data = await web3.eth.getStorageAt( + address, + slot as number // does support string, but type definition file is wrong + ); return data.replace(/^0x/, ""); } diff --git a/truffle-config.js b/truffle-config.js index 7f3cdff4b..49b2efe5d 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -46,6 +46,7 @@ module.exports = { }, }, mocha: { + timeout: 10000, // prevents tests from failing when pc is under heavy load /* * To disable the spreadsheet verification tool ensure that * the reporter is set to 'Spec' by commenting/uncommenting the lines below. From 23a0a2d04dc5527ca7d1c77eb705b7463f7a6a93 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Fri, 15 May 2020 18:07:09 -0700 Subject: [PATCH 20/22] Add SPDX license identifier --- LICENSE | 2 +- contracts/Blacklistable.sol | 4 +++- contracts/FiatTokenProxy.sol | 4 +++- contracts/FiatTokenV1.sol | 4 +++- contracts/FiatTokenV2.sol | 4 +++- contracts/Migrations.sol | 4 +++- contracts/Ownable.sol | 4 +++- contracts/Pausable.sol | 4 +++- contracts/test/UpgradedFiatToken.sol | 4 +++- contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol | 4 +++- contracts/test/UpgradedFiatTokenNewFieldsTest.sol | 4 +++- contracts/upgradeability/AdminUpgradeabilityProxy.sol | 2 ++ contracts/upgradeability/Proxy.sol | 2 ++ contracts/upgradeability/UpgradeabilityProxy.sol | 2 ++ 14 files changed, 37 insertions(+), 11 deletions(-) diff --git a/LICENSE b/LICENSE index 01e197211..fabbb05ea 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright CENTRE SECZ 2018-2020 +Copyright (c) CENTRE SECZ 2018-2020 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/Blacklistable.sol b/contracts/Blacklistable.sol index 850da3b49..ed44b4169 100644 --- a/contracts/Blacklistable.sol +++ b/contracts/Blacklistable.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/FiatTokenProxy.sol b/contracts/FiatTokenProxy.sol index 26cdb5789..190212a1a 100644 --- a/contracts/FiatTokenProxy.sol +++ b/contracts/FiatTokenProxy.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/FiatTokenV1.sol b/contracts/FiatTokenV1.sol index 4253c87dc..15ee9d50e 100644 --- a/contracts/FiatTokenV1.sol +++ b/contracts/FiatTokenV1.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/FiatTokenV2.sol b/contracts/FiatTokenV2.sol index 0f7fff6b0..e027818f5 100644 --- a/contracts/FiatTokenV2.sol +++ b/contracts/FiatTokenV2.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index 66da282da..ce1c26abe 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/Ownable.sol b/contracts/Ownable.sol index eef5422d7..802bbb6ad 100755 --- a/contracts/Ownable.sol +++ b/contracts/Ownable.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/Pausable.sol b/contracts/Pausable.sol index abd4d4081..d66d18b9d 100644 --- a/contracts/Pausable.sol +++ b/contracts/Pausable.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) CENTRE SECZ 2018-20200 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/test/UpgradedFiatToken.sol b/contracts/test/UpgradedFiatToken.sol index eb4ba671e..a9559a38e 100644 --- a/contracts/test/UpgradedFiatToken.sol +++ b/contracts/test/UpgradedFiatToken.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2018 zOS Global Limited. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol index 72488d895..87c6fce7a 100644 --- a/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2018 zOS Global Limited. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/test/UpgradedFiatTokenNewFieldsTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol index 7c7aba7db..90821a402 100644 --- a/contracts/test/UpgradedFiatTokenNewFieldsTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol @@ -1,5 +1,7 @@ /** - * Copyright CENTRE SECZ 2018-2020 + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2018 zOS Global Limited. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/contracts/upgradeability/AdminUpgradeabilityProxy.sol b/contracts/upgradeability/AdminUpgradeabilityProxy.sol index 4697cfdd0..921028365 100644 --- a/contracts/upgradeability/AdminUpgradeabilityProxy.sol +++ b/contracts/upgradeability/AdminUpgradeabilityProxy.sol @@ -1,4 +1,6 @@ /** + * SPDX-License-Identifier: MIT + * * Copyright (c) 2018 zOS Global Limited. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/contracts/upgradeability/Proxy.sol b/contracts/upgradeability/Proxy.sol index 1da6ee94b..746427f5c 100644 --- a/contracts/upgradeability/Proxy.sol +++ b/contracts/upgradeability/Proxy.sol @@ -1,4 +1,6 @@ /** + * SPDX-License-Identifier: MIT + * * Copyright (c) 2018 zOS Global Limited. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/contracts/upgradeability/UpgradeabilityProxy.sol b/contracts/upgradeability/UpgradeabilityProxy.sol index 1b1e5d321..bf63ae0fd 100644 --- a/contracts/upgradeability/UpgradeabilityProxy.sol +++ b/contracts/upgradeability/UpgradeabilityProxy.sol @@ -1,4 +1,6 @@ /** + * SPDX-License-Identifier: MIT + * * Copyright (c) 2018 zOS Global Limited. * * Permission is hereby granted, free of charge, to any person obtaining a copy From fdafe06ecb4082577426e6f821726fdada954170 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Fri, 15 May 2020 18:07:11 -0700 Subject: [PATCH 21/22] Ensure locally installed prettier is used to format Solidity code --- .vscode/settings.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 780880947..6720ec14e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,9 @@ }, "solidity.packageDefaultDependenciesContractsDirectory": "", "solidity.packageDefaultDependenciesDirectory": "node_modules", + "solidity.formatter": "none", "files.trimTrailingWhitespace": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.insertSpaces": true, "editor.tabSize": 2, "[javascript]": { From 283eca99bec3642b56c01d1f33b73fc5472e1a14 Mon Sep 17 00:00:00 2001 From: Peter Jihoon Kim Date: Tue, 19 May 2020 17:40:19 +0000 Subject: [PATCH 22/22] Update notes in forked contracts --- contracts/Ownable.sol | 13 +++++++------ contracts/Pausable.sol | 18 ++++++++++-------- .../AdminUpgradeabilityProxy.sol | 10 +++++----- contracts/upgradeability/Proxy.sol | 6 ++++-- .../upgradeability/UpgradeabilityProxy.sol | 9 +++++---- 5 files changed, 31 insertions(+), 25 deletions(-) mode change 100755 => 100644 contracts/Ownable.sol diff --git a/contracts/Ownable.sol b/contracts/Ownable.sol old mode 100755 new mode 100644 index 802bbb6ad..4fe638e00 --- a/contracts/Ownable.sol +++ b/contracts/Ownable.sol @@ -1,6 +1,7 @@ /** * SPDX-License-Identifier: MIT * + * Copyright (c) 2018 zOS Global Limited. * Copyright (c) CENTRE SECZ 2018-2020 * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -25,12 +26,12 @@ pragma solidity 0.6.8; /** - * @title Ownable - * @dev The Ownable contract from https://github.com/zeppelinos/labs/blob/master/upgradeability_ownership/contracts/ownership/Ownable.sol - * branch: master commit: 3887ab77b8adafba4a26ace002f3a684c1a3388b modified to: - * 1) Add emit prefix to OwnershipTransferred event (7/13/18) - * 2) Replace constructor with constructor syntax (7/13/18) - * 3) consolidate OwnableStorage into this contract + * @notice The Ownable contract has an owner address, and provides basic + * authorization control functions + * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-labs/blob/3887ab77b8adafba4a26ace002f3a684c1a3388b/upgradeability_ownership/contracts/ownership/Ownable.sol + * Modifications: + * 1. Consolidate OwnableStorage into this contract (7/13/18) + * 2. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20) */ contract Ownable { // Owner of the contract diff --git a/contracts/Pausable.sol b/contracts/Pausable.sol index d66d18b9d..1b585bf2f 100644 --- a/contracts/Pausable.sol +++ b/contracts/Pausable.sol @@ -1,6 +1,7 @@ /** * SPDX-License-Identifier: MIT * + * Copyright (c) 2016 Smart Contract Solutions, Inc. * Copyright (c) CENTRE SECZ 2018-20200 * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -28,15 +29,16 @@ import { Ownable } from "./Ownable.sol"; /** - * @title Pausable - * @dev Base contract which allows children to implement an emergency stop mechanism. - * Based on openzeppelin tag v1.10.0 commit: feb665136c0dae9912e08397c1a21c4af3651ef3 + * @notice Base contract which allows children to implement an emergency stop + * mechanism + * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/feb665136c0dae9912e08397c1a21c4af3651ef3/contracts/lifecycle/Pausable.sol * Modifications: - * 1) Added pauser role, switched pause/unpause to be onlyPauser (6/14/2018) - * 2) Removed whenNotPause/whenPaused from pause/unpause (6/14/2018) - * 3) Removed whenPaused (6/14/2018) - * 4) Switches ownable library to use zeppelinos (7/12/18) - * 5) Remove constructor (7/13/18) + * 1. Added pauser role, switched pause/unpause to be onlyPauser (6/14/2018) + * 2. Removed whenNotPause/whenPaused from pause/unpause (6/14/2018) + * 3. Removed whenPaused (6/14/2018) + * 4. Switches ownable library to use ZeppelinOS (7/12/18) + * 5. Remove constructor (7/13/18) + * 6. Reformat, conform to Solidity 0.6 syntax and add error messages (5/13/20) */ contract Pausable is Ownable { event Pause(); diff --git a/contracts/upgradeability/AdminUpgradeabilityProxy.sol b/contracts/upgradeability/AdminUpgradeabilityProxy.sol index 921028365..79468ad4c 100644 --- a/contracts/upgradeability/AdminUpgradeabilityProxy.sol +++ b/contracts/upgradeability/AdminUpgradeabilityProxy.sol @@ -28,12 +28,12 @@ import { UpgradeabilityProxy } from "./UpgradeabilityProxy.sol"; /** - * @title AdminUpgradeabilityProxy - * @dev This contract combines an upgradeability proxy with an authorization + * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. - * All external functions in this contract must be guarded by the - * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity - * feature proposal that would enable this to be done automatically. + * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol + * Modifications: + * 1. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20) + * 2. Remove ifAdmin modifier from admin() and implementation() (5/13/20) */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** diff --git a/contracts/upgradeability/Proxy.sol b/contracts/upgradeability/Proxy.sol index 746427f5c..2da697284 100644 --- a/contracts/upgradeability/Proxy.sol +++ b/contracts/upgradeability/Proxy.sol @@ -26,11 +26,13 @@ pragma solidity 0.6.8; /** - * @title Proxy - * @dev Implements delegation of calls to other contracts, with proper + * @notice Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. + * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/Proxy.sol + * Modifications: + * 1. Reformat and conform to Solidity 0.6 syntax (5/13/20) */ abstract contract Proxy { /** diff --git a/contracts/upgradeability/UpgradeabilityProxy.sol b/contracts/upgradeability/UpgradeabilityProxy.sol index bf63ae0fd..286781206 100644 --- a/contracts/upgradeability/UpgradeabilityProxy.sol +++ b/contracts/upgradeability/UpgradeabilityProxy.sol @@ -28,13 +28,14 @@ import { Proxy } from "./Proxy.sol"; import { Address } from "@openzeppelin/contracts/utils/Address.sol"; -// import "openzeppelin-solidity/contracts/AddressUtils.sol"; - /** - * @title UpgradeabilityProxy - * @dev This contract implements a proxy that allows to change the + * @notice This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. + * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/UpgradeabilityProxy.sol + * Modifications: + * 1. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20) + * 2. Use Address utility library from the latest OpenZeppelin (5/13/20) */ contract UpgradeabilityProxy is Proxy { /**