diff --git a/.env.example b/.env.example index 4e995c9..a04ccc5 100644 --- a/.env.example +++ b/.env.example @@ -3,9 +3,6 @@ OPTIMISM_RPC= POLYGON_RPC= GOERLI_RPC= -# Address of the old factory for a new factory deployment to chain to -OLD_FACTORY= - ETHERSCAN_API_KEY= DEPLOYER_PRIVATE_KEY= \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 5e3e3ed..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* defi-wonderland/default-codeowner \ No newline at end of file diff --git a/.solhint.json b/.solhint.json index 4592084..fa6bc7a 100644 --- a/.solhint.json +++ b/.solhint.json @@ -1,28 +1,66 @@ { "extends": "solhint:recommended", - "plugins": ["defi-wonderland"], + "plugins": [ + "defi-wonderland" + ], "rules": { - "compiler-version": ["off"], + "compiler-version": [ + "off" + ], "constructor-syntax": "warn", - "quotes": ["error", "single"], - "func-visibility": ["warn", { "ignoreConstructors": true }], + "quotes": [ + "error", + "single" + ], + "func-visibility": [ + "warn", + { + "ignoreConstructors": true + } + ], "not-rely-on-time": "off", "func-name-mixedcase": "off", "var-name-mixedcase": "off", "const-name-snakecase": "off", "no-inline-assembly": "off", "no-empty-blocks": "off", - "private-vars-leading-underscore": ["warn", { "strict": false }], - "defi-wonderland/non-state-vars-leading-underscore": ["warn"], - "defi-wonderland/contract-data-order": ["warn"], - "defi-wonderland/enum-name-camelcase": ["warn"], - "defi-wonderland/immutable-name-snakecase": ["warn"], - "defi-wonderland/import-statement-format": ["warn"], - "defi-wonderland/interface-member-order": ["warn"], - "defi-wonderland/interface-starts-with-i": ["warn"], - "defi-wonderland/named-return-values": ["warn"], - "defi-wonderland/struct-name-camelcase": ["warn"], - "defi-wonderland/wonder-var-name-mixedcase": ["warn"], - "avoid-low-level-calls": "off" + "private-vars-leading-underscore": [ + "warn", + { + "strict": false + } + ], + "defi-wonderland/non-state-vars-leading-underscore": [ + "warn" + ], + "defi-wonderland/contract-data-order": [ + "warn" + ], + "defi-wonderland/enum-name-camelcase": [ + "warn" + ], + "defi-wonderland/immutable-name-snakecase": [ + "warn" + ], + "defi-wonderland/import-statement-format": [ + "warn" + ], + "defi-wonderland/interface-member-order": [ + "warn" + ], + "defi-wonderland/interface-starts-with-i": [ + "warn" + ], + "defi-wonderland/named-return-values": [ + "warn" + ], + "defi-wonderland/struct-name-camelcase": [ + "warn" + ], + "defi-wonderland/wonder-var-name-mixedcase": [ + "warn" + ], + "avoid-low-level-calls": "off", + "func-named-parameters": "off" } -} +} \ No newline at end of file diff --git a/.solhint.tests.json b/.solhint.tests.json new file mode 100644 index 0000000..2025cbc --- /dev/null +++ b/.solhint.tests.json @@ -0,0 +1,23 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": ["off"], + "constructor-syntax": "warn", + "quotes": ["error", "single"], + "func-visibility": ["warn", { "ignoreConstructors": true }], + "not-rely-on-time": "off", + "func-name-mixedcase": "off", + "const-name-snakecase": "off", + "no-inline-assembly": "off", + "no-empty-blocks": "off", + "state-visibility": "off", + "private-vars-leading-underscore": ["off"], + "reentrancy": "off", + "max-states-count": "off", + "no-global-import": ["off"], + "func-named-parameters": "off", + "no-console": "off", + "event-name-camelcase": "off" + } + } + \ No newline at end of file diff --git a/.solhintignore b/.solhintignore new file mode 100644 index 0000000..84a103e --- /dev/null +++ b/.solhintignore @@ -0,0 +1,4 @@ +node_modules +cache +out +solidity/scripts \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 5a5dba6..2a7f0d9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,7 +9,7 @@ multiline_func_header = 'params_first' fs_permissions = [{ access = "read-write", path = "./"}] [profile.default] -solc = '0.8.17' +solc = '0.8.18' src = 'solidity' test = 'solidity/test' out = 'out' diff --git a/package.json b/package.json index be62e3d..1f42a25 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "postinstall": "forge install", "lint:check": "yarn lint:sol-tests && yarn lint:sol-logic && forge fmt check", "lint:fix": "sort-package-json && forge fmt && yarn lint:sol-tests --fix && yarn lint:sol-logic --fix", - "lint:sol-logic": "cross-env solhint -c .solhint.json 'solidity/contracts/**/*.sol' 'solidity/interfaces/**/*.sol'", - "lint:sol-tests": "cross-env solhint 'solidity/test/**/*.sol'", + "lint:sol-logic": "solhint 'solidity/contracts/**/*.sol' 'solidity/interfaces/**/*.sol'", + "lint:sol-tests": "solhint -c .solhint.tests.json 'solidity/test/**/*.sol'", "prepare": "husky install", "script:DeployFactory": "forge script solidity/scripts/MultichainDeploy.sol:MultichainDeploy --legacy", "script:DeployFactory:broadcast": "forge script solidity/scripts/MultichainDeploy.sol:MultichainDeploy --legacy --broadcast --verify --slow", @@ -38,7 +38,7 @@ }, "lint-staged": { "*.{js,css,md,ts,sol}": "forge fmt", - "*.sol": "cross-env solhint --fix 'solidity/**/*.sol", + "*.sol": "solhint --fix 'solidity/**/*.sol'", "package.json": "sort-package-json" }, "devDependencies": { @@ -46,9 +46,9 @@ "@commitlint/config-conventional": "17.0.3", "cross-env": "7.0.3", "husky": ">=8", - "lint-staged": ">=10", - "solhint": "3.3.6", + "lint-staged": "13.2.2", + "solhint": "3.5.1", "solhint-plugin-defi-wonderland": "1.1.0", "sort-package-json": "1.53.1" } -} +} \ No newline at end of file diff --git a/solidity/contracts/XERC20Factory.sol b/solidity/contracts/XERC20Factory.sol index dd7fd1c..c989181 100644 --- a/solidity/contracts/XERC20Factory.sol +++ b/solidity/contracts/XERC20Factory.sol @@ -10,17 +10,6 @@ import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet contract XERC20Factory is IXERC20Factory { using EnumerableSet for EnumerableSet.AddressSet; - /** - * @notice The version of the factory - * @dev Will revert if version is V0 - */ - string public constant VERSION = 'V1'; - - /** - * @notice The address of the old factory - */ - XERC20Factory public immutable OLD_FACTORY; - /** * @notice Address of the xerc20 maps to the address of its lockbox if it has one */ @@ -36,10 +25,6 @@ contract XERC20Factory is IXERC20Factory { */ EnumerableSet.AddressSet internal _xerc20RegistryArray; - constructor(address _oldFactory) { - OLD_FACTORY = XERC20Factory(_oldFactory); - } - /** * @notice Deploys an XERC20 contract using CREATE3 * @dev _limits and _minters must be the same length @@ -78,148 +63,13 @@ contract XERC20Factory is IXERC20Factory { if (_baseToken == address(0) && !_isNative) revert IXERC20Factory_BadTokenAddress(); if (XERC20(_xerc20).owner() != msg.sender) revert IXERC20Factory_NotOwner(); - if (_getLockboxForXERC20(_xerc20) != address(0)) revert IXERC20Factory_LockboxAlreadyDeployed(); + if (_lockboxRegistry[_xerc20] != address(0)) revert IXERC20Factory_LockboxAlreadyDeployed(); _lockbox = _deployLockbox(_xerc20, _baseToken, _isNative); emit LockboxDeployed(_lockbox); } - /** - * @notice Loops through the xerc20RegistryArray - * - * @param _start The start of the loop - * @param _amount The end of the loop - * @return _lockboxes The array of xerc20s from the start to start + amount - */ - - function getRegisteredLockboxes(uint256 _start, uint256 _amount) public view returns (address[] memory _lockboxes) { - _lockboxes = _getRegisteredSet(_start, _amount, _lockboxRegistryArray); - } - - /** - * @notice Loops through the xerc20RegistryArray - * - * @param _start The start of the loop - * @param _amount The amount of xerc20s to loop through - * @return _xerc20s The array of xerc20s from the start to start + amount - */ - - function getRegisteredXERC20(uint256 _start, uint256 _amount) public view returns (address[] memory _xerc20s) { - _xerc20s = _getRegisteredSet(_start, _amount, _xerc20RegistryArray); - } - - /** - * @notice Returns if an XERC20 is registered - * - * @param _xerc20 The address of the XERC20 - * @return _result If the XERC20 is registered - */ - - function isRegisteredXERC20(address _xerc20) external view returns (bool _result) { - _result = _isRegisteredXERC20(_xerc20); - } - - /** - * @notice Returns if a lockbox is registered - * - * @param _lockbox The address of the lockbox - * @return _result If the lockbox is registered - */ - - function isRegisteredLockbox(address _lockbox) external view returns (bool _result) { - _result = _isRegisteredLockbox(_lockbox); - } - - /** - * @notice Gets the lockbox that is registered to an XERC20 - * - * @param _xerc20 The address of the XERC20 - * @return _lockbox The address of the lockbox - */ - - function lockboxRegistry(address _xerc20) external view returns (address _lockbox) { - _lockbox = _getLockboxForXERC20(_xerc20); - } - - /** - * @notice Gets the lockbox that is registered to an XERC20 - * - * @param _xerc20 The address of the XERC20 - * @return _lockbox The address of the lockbox - */ - - function _getLockboxForXERC20(address _xerc20) internal view returns (address _lockbox) { - _lockbox = _lockboxRegistry[_xerc20]; - if (_lockbox == address(0) && address(OLD_FACTORY) != address(0)) { - _lockbox = OLD_FACTORY.lockboxRegistry(_xerc20); - } - } - - /** - * @notice Returns if an XERC20 is in a registry - * - * @param _xerc20 The address of the XERC20 - * @return _result If the XERC20 is in the registry - */ - - function _isRegisteredXERC20(address _xerc20) internal view returns (bool _result) { - _result = EnumerableSet.contains(_xerc20RegistryArray, _xerc20) - || (address(OLD_FACTORY) != address(0) && OLD_FACTORY.isRegisteredXERC20(_xerc20)); - } - - /** - * @notice Returns if an lockbox is in a registry - * - * @param _lockbox The address of the lockbox - * @return _result If the lockbox is in the registry - */ - - function _isRegisteredLockbox(address _lockbox) internal view returns (bool _result) { - if (EnumerableSet.contains(_lockboxRegistryArray, _lockbox)) { - _result = true; - } else if (address(OLD_FACTORY) != address(0)) { - try OLD_FACTORY.isRegisteredLockbox(_lockbox) returns (bool _isRegistered) { - _result = _isRegistered; - } catch { - // If the function fails then we are going to the first factory where the function does not exist - // Get the xerc20 of the lockbox and check in the old factory if there is a lockbox registered to it - address _xerc20 = address(XERC20Lockbox(payable(_lockbox)).XERC20()); - - _result = OLD_FACTORY.lockboxRegistry(_xerc20) == _lockbox; - } - } - } - - /** - * @notice Loops through an EnumerableSet - * - * @param _start The start of the loop - * @param _amount The amount of indexes to loop through - * @return _result All the values from start to start + amount - */ - - function _getRegisteredSet( - uint256 _start, - uint256 _amount, - EnumerableSet.AddressSet storage _set - ) internal view returns (address[] memory _result) { - uint256 _length = EnumerableSet.length(_set); - if (_amount > _length - _start) { - _amount = _length - _start; - } - - _result = new address[](_amount); - uint256 _index; - while (_index < _amount) { - _result[_index] = EnumerableSet.at(_set, _start + _index); - - unchecked { - ++_index; - } - } - } - /** * @notice Deploys an XERC20 contract using CREATE3 * @dev _limits and _minters must be the same length diff --git a/solidity/contracts/XERC20Registry.sol b/solidity/contracts/XERC20Registry.sol new file mode 100644 index 0000000..a01122b --- /dev/null +++ b/solidity/contracts/XERC20Registry.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.18 <0.9.0; + +import {IXERC20Registry} from '../interfaces/IXERC20Registry.sol'; +import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; + +contract XERC20Registry is IXERC20Registry, Ownable { + /** + * @notice Address of the xerc20 maps to its data + */ + mapping(address _xerc20 => XERC20Data _data) public xerc20Data; + + /** + * @notice Address of the erc20 maps to its corresponding xerc20 + */ + mapping(address _erc20 => address _xerc20) public erc20ToXERC20; + + /** + * @notice Adds an XERC20 contract to the registry + * + * @dev This function reverts if the xerc20 is already added + * @param _xerc20 The address of the xerc20 that you want to add + * @param _erc20 The address of the erc20 that the xerc20 is connected to + * @param _lockbox The address of the lockbox for that xerc20 + * @param _version The version of the xerc20 + */ + function addXERC20(address _xerc20, address _erc20, address _lockbox, string memory _version) external onlyOwner { + xerc20Data[_xerc20] = XERC20Data(_erc20, _lockbox, _version, true); + if (_erc20 != address(0)) erc20ToXERC20[_erc20] = _xerc20; + emit XERC20Registry_XERC20Added(_xerc20, _erc20, _lockbox, _version); + } + + /** + * @notice Removes an XERC20 from the registry + * + * @param _xerc20 The address of the xerc20 to remove + */ + function removeXERC20(address _xerc20) external onlyOwner { + if (!xerc20Data[_xerc20].exists) revert XERC20Registry_InvalidAddress(); + address _erc20 = xerc20Data[_xerc20].erc20; + + delete xerc20Data[_xerc20]; + emit XERC20Registry_XERC20Removed(_xerc20); + + if (_erc20 != address(0)) { + delete erc20ToXERC20[_erc20]; + emit XERC20Registry_ERC20MappingUpdated(address(0), _erc20); + } + } + + /** + * @notice Updates the XERC20 connected to the ERC20 + * + * @dev Removes the XERC20 that was connected to the ERC20 + * @param _xerc20 The address of the XERC20 + * @param _erc20 The address of the ERC20 + */ + function updateXERC20forERC20(address _xerc20, address _erc20) external onlyOwner { + if (_erc20 == address(0) || xerc20Data[_xerc20].erc20 != _erc20) revert XERC20Registry_InvalidAddress(); + + address _oldXERC20 = erc20ToXERC20[_erc20]; + if (_oldXERC20 != address(0)) { + delete xerc20Data[_oldXERC20]; + emit XERC20Registry_XERC20Removed(_oldXERC20); + } + + erc20ToXERC20[_erc20] = _xerc20; + emit XERC20Registry_ERC20MappingUpdated(_xerc20, _erc20); + } +} diff --git a/solidity/interfaces/IXERC20Factory.sol b/solidity/interfaces/IXERC20Factory.sol index 4c6b025..bf026d2 100644 --- a/solidity/interfaces/IXERC20Factory.sol +++ b/solidity/interfaces/IXERC20Factory.sol @@ -67,58 +67,4 @@ interface IXERC20Factory { address _baseToken, bool _isNative ) external returns (address payable _lockbox); - - /** - * @notice Loops through the xerc20RegistryArray - * - * @param _start The start of the loop - * @param _amount The end of the loop - * @return _lockboxes The array of xerc20s from the start to start + amount - */ - - function getRegisteredLockboxes(uint256 _start, uint256 _amount) external view returns (address[] memory _lockboxes); - - /** - * @notice Loops through the xerc20RegistryArray - * - * @param _start The start of the loop - * @param _amount The amount of xerc20s to loop through - * @return _xerc20s The array of xerc20s from the start to start + amount - */ - - function getRegisteredXERC20(uint256 _start, uint256 _amount) external view returns (address[] memory _xerc20s); - - /** - * @notice Returns if an XERC20 is registered - * - * @param _xerc20 The address of the XERC20 - * @return _result If the XERC20 is registered - */ - - function isRegisteredXERC20(address _xerc20) external view returns (bool _result); - - /** - * @notice Returns if a lockbox is registered - * - * @param _lockbox The address of the lockbox - * @return _result If the lockbox is registered - */ - - function isRegisteredLockbox(address _lockbox) external view returns (bool _result); - - /** - * @notice Returns the address of the lockbox for a given XERC20 - * - * @param _xerc20 The address of the XERC20 - * @return _lockbox The address of the lockbox - */ - - function lockboxRegistry(address _xerc20) external view returns (address _lockbox); - - /** - * @notice The version of the factory - * @dev Will revert if version is V0 - */ - - function VERSION() external view returns (string memory _version); } diff --git a/solidity/interfaces/IXERC20Registry.sol b/solidity/interfaces/IXERC20Registry.sol new file mode 100644 index 0000000..10e5f61 --- /dev/null +++ b/solidity/interfaces/IXERC20Registry.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.4 <0.9.0; + +interface IXERC20Registry { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + /** + * @notice Emitted when a new XERC20 is added + * + * @param _xerc20 The address of the xerc20 that was added + * @param _erc20 The address of the erc20 that the xerc20 is connected to + * @param _lockbox The address of the lockbox for that xerc20 + * @param _version The version of the xerc20 + */ + // solhint-disable-next-line + event XERC20Registry_XERC20Added(address _xerc20, address _erc20, address _lockbox, string _version); + + /** + * @notice Emitted when a XERC20 is removed + * + * @param _xerc20 The address of the xerc20 that was removed + */ + // solhint-disable-next-line + event XERC20Registry_XERC20Removed(address _xerc20); + + /** + * @notice Emitted when the XERC20 connected to an ERC20 is updated + * + * @param _xerc20 The address of the xerc20 that was updated + * @param _erc20 The address of the erc20 that the xerc20 is connected to + */ + // solhint-disable-next-line + event XERC20Registry_ERC20MappingUpdated(address _xerc20, address _erc20); + + /*/////////////////////////////////////////////////////////////// + ERRORS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Emitted when the address provided is invalid + */ + error XERC20Registry_InvalidAddress(); + + /*/////////////////////////////////////////////////////////////// + STRUCTS + //////////////////////////////////////////////////////////////*/ + /** + * @notice Data for a registered XERC20 + * + * @param erc20 The address of the erc20 that the xerc20 is connected to + * @param lockbox The address of the lockbox for that xerc20 + * @param version The version of the xerc20 + * @param exists Whether or not the xerc20 exists + */ + struct XERC20Data { + address erc20; + address lockbox; + string version; + bool exists; + } + + /*/////////////////////////////////////////////////////////////// + FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Returns the data for an XERC20 + * + * @param _erc20 The address of the _ that the xerc20 is connected to + * @param _lockbox The address of the lockbox for that xerc20 + * @param _version The version of the xerc20 + * @param _exists Whether or not the xerc20 exists + */ + function xerc20Data(address _xerc20) + external + view + returns (address _erc20, address _lockbox, string memory _version, bool _exists); + + /** + * @notice Returns the address of the XERC20 connected to the ERC20 + * + * @param _erc20 The address of the erc20 + */ + function erc20ToXERC20(address _erc20) external view returns (address _xerc20); + + /** + * @notice Adds an XERC20 contract to the registry + * + * @param _xerc20 The address of the xerc20 to add + * @param _erc20 The address of the erc20 that the xerc20 is connected to + * @param _lockbox The address of the lockbox for that xerc20 + * @param _version The version of the xerc20 + */ + + function addXERC20(address _xerc20, address _erc20, address _lockbox, string memory _version) external; + + /** + * @notice Removes an XERC20 from the registry + * + * @param _xerc20 The address of the xerc20 to remove + */ + function removeXERC20(address _xerc20) external; + + /** + * @notice Updates the XERC20 connected to the ERC20 + * + * @param _xerc20 The address of the XERC20 + * @param _erc20 The address of the ERC20 + */ + function updateXERC20forERC20(address _xerc20, address _erc20) external; +} diff --git a/solidity/scripts/MultichainDeploy.sol b/solidity/scripts/MultichainDeploy.sol index 0836b4d..056ce36 100644 --- a/solidity/scripts/MultichainDeploy.sol +++ b/solidity/scripts/MultichainDeploy.sol @@ -1,9 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.4 <0.9.0; +// solhint-disable-next-line no-console import {console} from 'forge-std/console.sol'; import {Test} from 'forge-std/Test.sol'; import {XERC20Factory, IXERC20Factory} from '../contracts/XERC20Factory.sol'; +import {XERC20Registry, IXERC20Registry} from '../contracts/XERC20Registry.sol'; import {Script} from 'forge-std/Script.sol'; import {ScriptingLibrary} from './ScriptingLibrary/ScriptingLibrary.sol'; @@ -15,29 +17,35 @@ contract MultichainDeploy is Script, ScriptingLibrary { function run() public { //TODO: Change salt from this test to prod before release bytes32 _salt = keccak256(abi.encodePacked('xxxsdsdd23ewXERewewCewew20Factoewewry', msg.sender)); - address _oldFactory = vm.envAddress('OLD_FACTORY'); - address[] memory factories = new address[](chains.length); + address[] memory _factories = new address[](chains.length); - for (uint256 i; i < chains.length; i++) { - vm.createSelectFork(vm.rpcUrl(vm.envString(chains[i]))); - bytes memory _bytecode = abi.encodePacked(type(XERC20Factory).creationCode, abi.encode(_oldFactory)); + for (uint256 _i; _i < chains.length; _i++) { + vm.createSelectFork(vm.rpcUrl(vm.envString(chains[_i]))); + bytes memory _bytecodeFactory = abi.encodePacked(type(XERC20Factory).creationCode); + bytes memory _bytecodeRegistry = abi.encodePacked(type(XERC20Registry).creationCode); vm.startBroadcast(deployer); - address _deployedFactory = getAddress(_bytecode, _salt, CREATE2); - XERC20Factory fact = new XERC20Factory{salt: _salt}(_oldFactory); + address _deployedFactory = getAddress(_bytecodeFactory, _salt, CREATE2); + XERC20Factory _fact = new XERC20Factory{salt: _salt}(); + require(address(_fact) == _deployedFactory, 'Factory address does not match'); - require(address(fact) == _deployedFactory, 'Factory address does not match'); + address _deployedRegistry = getAddress(_bytecodeRegistry, _salt, CREATE2); + XERC20Registry _registry = new XERC20Registry{salt: _salt}(); + require(address(_registry) == _deployedRegistry, 'Registry address does not match'); vm.stopBroadcast(); - console.log(chains[i], 'factory deployed to:', address(_deployedFactory)); - factories[i] = _deployedFactory; + // solhint-disable-next-line no-console + console.log(chains[_i], 'factory deployed to:', address(_deployedFactory)); + // solhint-disable-next-line no-console + console.log(chains[_i], 'registry deployed to:', address(_deployedRegistry)); + _factories[_i] = _deployedFactory; } if (chains.length > 1) { - for (uint256 i = 1; i < chains.length; i++) { - vm.assume(factories[i - 1] == factories[i]); - vm.assume(keccak256(factories[i - 1].code) == keccak256(factories[i].code)); + for (uint256 _i = 1; _i < chains.length; _i++) { + vm.assume(_factories[_i - 1] == _factories[_i]); + vm.assume(keccak256(_factories[_i - 1].code) == keccak256(_factories[_i].code)); } } } diff --git a/solidity/scripts/ScriptingLibrary/ScriptingLibrary.sol b/solidity/scripts/ScriptingLibrary/ScriptingLibrary.sol index c531df7..35263be 100644 --- a/solidity/scripts/ScriptingLibrary/ScriptingLibrary.sol +++ b/solidity/scripts/ScriptingLibrary/ScriptingLibrary.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.4 <0.9.0; -import {console} from 'forge-std/console.sol'; import {Test} from 'forge-std/Test.sol'; import {XERC20Factory, IXERC20Factory} from '../../contracts/XERC20Factory.sol'; import {Script} from 'forge-std/Script.sol'; diff --git a/solidity/test/e2e/Common.sol b/solidity/test/e2e/Common.sol index 4e0be90..be94d7c 100644 --- a/solidity/test/e2e/Common.sol +++ b/solidity/test/e2e/Common.sol @@ -1,14 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.4 <0.9.0; -import {DSTestFull} from '../../test/utils/DSTestFull.sol'; -import {console} from 'forge-std/console.sol'; import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol'; import {Test} from 'forge-std/Test.sol'; import {XERC20} from '../../contracts/XERC20.sol'; import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol'; -import {XERC20Factory, IXERC20Factory} from '../../contracts/XERC20Factory.sol'; +import {XERC20Factory} from '../../contracts/XERC20Factory.sol'; contract CommonE2EBase is Test { uint256 internal constant _FORK_BLOCK = 18_213_198; @@ -21,7 +19,6 @@ contract CommonE2EBase is Test { IERC20 internal _dai = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); XERC20 internal _xerc20; XERC20Lockbox internal _lockbox; - IXERC20Factory internal _oldFactory = IXERC20Factory(0xF5FF5024F7E783D91D4A4D54334a96bF48C897ca); XERC20Factory internal _xerc20Factory; function setUp() public virtual { @@ -35,7 +32,7 @@ contract CommonE2EBase is Test { _burnerLimits[0] = 50 ether; vm.startPrank(_owner); - _xerc20Factory = new XERC20Factory(address(_oldFactory)); + _xerc20Factory = new XERC20Factory(); address _token = _xerc20Factory.deployXERC20(_dai.name(), _dai.symbol(), _minterLimits, _burnerLimits, _bridges); address payable _lock = _xerc20Factory.deployLockbox(_token, address(_dai), false); diff --git a/solidity/test/e2e/XERC20.t.sol b/solidity/test/e2e/XERC20.t.sol index 102a89c..265f89c 100644 --- a/solidity/test/e2e/XERC20.t.sol +++ b/solidity/test/e2e/XERC20.t.sol @@ -2,8 +2,6 @@ pragma solidity >=0.8.4 <0.9.0; import {CommonE2EBase} from './Common.sol'; -import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol'; -import {XERC20, IXERC20} from '../../contracts/XERC20.sol'; contract E2EMintAndBurn is CommonE2EBase { function testMint() public { diff --git a/solidity/test/e2e/XERC20Factory.t.sol b/solidity/test/e2e/XERC20Factory.t.sol index 1003bf5..d238053 100644 --- a/solidity/test/e2e/XERC20Factory.t.sol +++ b/solidity/test/e2e/XERC20Factory.t.sol @@ -3,8 +3,6 @@ pragma solidity >=0.8.4 <0.9.0; import {CommonE2EBase} from './Common.sol'; import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol'; -import {XERC20} from '../../contracts/XERC20.sol'; -import {XERC20Factory, IXERC20Factory} from '../../contracts/XERC20Factory.sol'; contract E2EDeployment is CommonE2EBase { function testDeploy() public { @@ -28,21 +26,4 @@ contract E2EDeployment is CommonE2EBase { assertEq(address(XERC20Lockbox(payable(_lock)).XERC20()), address(_token)); assertEq(address(XERC20Lockbox(payable(_lock)).ERC20()), address(_dai)); } - - function testFactoryChaining() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - - address _token = _oldFactory.deployXERC20('Test', 'TST', _limits, _limits, _minters); - _oldFactory.deployLockbox(_token, address(_token), false); - - address[] memory _registeredTokens = _oldFactory.getRegisteredXERC20(0, 1); - address[] memory _registeredLockboxes = _oldFactory.getRegisteredLockboxes(0, 1); - - assertEq(_registeredTokens.length, 1); - assertEq(_registeredLockboxes.length, 1); - assertEq(_xerc20Factory.isRegisteredXERC20(_registeredTokens[0]), true); - assertEq(_xerc20Factory.isRegisteredLockbox(_registeredLockboxes[0]), true); - assertEq(_xerc20Factory.lockboxRegistry(_registeredTokens[0]), _registeredLockboxes[0]); - } } diff --git a/solidity/test/e2e/XERC20Lockbox.sol b/solidity/test/e2e/XERC20Lockbox.sol index 2d8d469..cdc2633 100644 --- a/solidity/test/e2e/XERC20Lockbox.sol +++ b/solidity/test/e2e/XERC20Lockbox.sol @@ -2,9 +2,7 @@ pragma solidity >=0.8.4 <0.9.0; import {CommonE2EBase} from './Common.sol'; -import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol'; import {XERC20} from '../../contracts/XERC20.sol'; -import {console} from 'forge-std/console.sol'; contract E2ELockbox is CommonE2EBase { function testLockbox() public { diff --git a/solidity/test/unit/XERC20.t.sol b/solidity/test/unit/XERC20.t.sol index 2b8534e..1a01340 100644 --- a/solidity/test/unit/XERC20.t.sol +++ b/solidity/test/unit/XERC20.t.sol @@ -2,10 +2,7 @@ pragma solidity >=0.8.4 <0.9.0; import {Test} from 'forge-std/Test.sol'; -import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {DSTestFull} from '../../test/utils/DSTestFull.sol'; import {XERC20} from '../../contracts/XERC20.sol'; -import {IXERC20Factory} from '../../interfaces/IXERC20Factory.sol'; import {IXERC20} from '../../interfaces/IXERC20.sol'; abstract contract Base is Test { diff --git a/solidity/test/unit/XERC20Factory.t.sol b/solidity/test/unit/XERC20Factory.t.sol index 5ce053e..5de1a8e 100644 --- a/solidity/test/unit/XERC20Factory.t.sol +++ b/solidity/test/unit/XERC20Factory.t.sol @@ -1,19 +1,14 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.4 <0.9.0; -import {Test} from 'forge-std/Test.sol'; -import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {DSTestFull} from '../../test/utils/DSTestFull.sol'; import {XERC20} from '../../contracts/XERC20.sol'; import {XERC20Factory} from '../../contracts/XERC20Factory.sol'; import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol'; -import {IXERC20} from '../../interfaces/IXERC20.sol'; import {IXERC20Factory} from '../../interfaces/IXERC20Factory.sol'; import {CREATE3} from 'isolmate/utils/CREATE3.sol'; contract XERC20FactoryForTest is XERC20Factory { - constructor(address _oldFactory) XERC20Factory(_oldFactory) {} - function getDeployed(bytes32 _salt) public view returns (address _precomputedAddress) { _precomputedAddress = CREATE3.getDeployed(_salt); } @@ -25,14 +20,12 @@ abstract contract Base is DSTestFull { address internal _erc20 = vm.addr(3); XERC20FactoryForTest internal _xerc20Factory; - XERC20FactoryForTest internal _newXerc20Factory; event XERC20Deployed(address _xerc20); event LockboxDeployed(address payable _lockbox); function setUp() public virtual { - _xerc20Factory = new XERC20FactoryForTest(address(0)); - _newXerc20Factory = new XERC20FactoryForTest(address(_xerc20Factory)); + _xerc20Factory = new XERC20FactoryForTest(); } } @@ -86,18 +79,6 @@ contract UnitDeploy is Base { assertEq(_predictedAddress, _lockbox); } - function testLockboxStorageWorks() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - - vm.startPrank(_owner); - address _xerc20 = _xerc20Factory.deployXERC20('Test', 'TST', _limits, _limits, _minters); - _xerc20Factory.deployLockbox(_xerc20, _erc20, false); - bytes32 _salt = keccak256(abi.encodePacked(_xerc20, _erc20, _owner)); - - assertEq(_xerc20Factory.lockboxRegistry(_xerc20), _xerc20Factory.getDeployed(_salt)); - } - function testLockboxSingleDeployment() public { uint256[] memory _limits = new uint256[](0); address[] memory _minters = new address[](0); @@ -158,80 +139,6 @@ contract UnitDeploy is Base { _xerc20Factory.deployXERC20('Test', 'TST', _empty, _burnerLimits, _minters); } - function testRegisteredXerc20ArraysAreStored() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - - address _xerc1 = _xerc20Factory.deployXERC20('_xerc1', '_xerc1', _limits, _limits, _minters); - address _xerc2 = _xerc20Factory.deployXERC20('_xerc2', '_xerc2', _limits, _limits, _minters); - address _xerc3 = _xerc20Factory.deployXERC20('_xerc3', '_xerc3', _limits, _limits, _minters); - - address[] memory _xercs = _xerc20Factory.getRegisteredXERC20(0, 5); - - assertEq(_xercs.length, 3); - - assertEq(_xercs[0], _xerc1); - assertEq(_xercs[1], _xerc2); - assertEq(_xercs[2], _xerc3); - } - - function testRegisteredLockboxArraysAreStored() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - - address _xerc1 = _xerc20Factory.deployXERC20('_xerc1', '_xerc1', _limits, _limits, _minters); - address _xerc2 = _xerc20Factory.deployXERC20('_xerc2', '_xerc1', _limits, _limits, _minters); - address _xerc3 = _xerc20Factory.deployXERC20('_xerc3', '_xerc1', _limits, _limits, _minters); - - address payable _lockbox1 = _xerc20Factory.deployLockbox(_xerc1, _erc20, false); - address payable _lockbox2 = _xerc20Factory.deployLockbox(_xerc2, _erc20, false); - address payable _lockbox3 = _xerc20Factory.deployLockbox(_xerc3, _erc20, false); - - address[] memory _lockboxes = _xerc20Factory.getRegisteredLockboxes(0, 5); - - assertEq(_lockboxes.length, 3); - - assertEq(_lockboxes[0], _lockbox1); - assertEq(_lockboxes[1], _lockbox2); - assertEq(_lockboxes[2], _lockbox3); - } - - function testGetMiddleOfRegisteredLockboxArrays() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - - address _xerc1 = _xerc20Factory.deployXERC20('_xerc1', '_xerc1', _limits, _limits, _minters); - address _xerc2 = _xerc20Factory.deployXERC20('_xerc2', '_xerc1', _limits, _limits, _minters); - address _xerc3 = _xerc20Factory.deployXERC20('_xerc3', '_xerc1', _limits, _limits, _minters); - - _xerc20Factory.deployLockbox(_xerc1, _erc20, false); - address payable _lockbox2 = _xerc20Factory.deployLockbox(_xerc2, _erc20, false); - address payable _lockbox3 = _xerc20Factory.deployLockbox(_xerc3, _erc20, false); - - address[] memory _lockboxes = _xerc20Factory.getRegisteredLockboxes(1, 2); - - assertEq(_lockboxes.length, 2); - - assertEq(_lockboxes[0], _lockbox2); - assertEq(_lockboxes[1], _lockbox3); - } - - function testGetMiddleOfRegisteredXERC20s() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - - _xerc20Factory.deployXERC20('_xerc1', '_xerc1', _limits, _limits, _minters); - address _xerc2 = _xerc20Factory.deployXERC20('_xerc2', '_xerc2', _limits, _limits, _minters); - address _xerc3 = _xerc20Factory.deployXERC20('_xerc3', '_xerc3', _limits, _limits, _minters); - - address[] memory _xercs = _xerc20Factory.getRegisteredXERC20(1, 2); - - assertEq(_xercs.length, 2); - - assertEq(_xercs[0], _xerc2); - assertEq(_xercs[1], _xerc3); - } - function testDeployEmitsEvent() public { uint256[] memory _limits = new uint256[](0); address[] memory _minters = new address[](0); @@ -255,37 +162,4 @@ contract UnitDeploy is Base { vm.prank(_owner); _xerc20Factory.deployLockbox(_token, _erc20, false); } - - function testIsRegisteredXERC20() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - vm.prank(_owner); - address _xerc20 = _xerc20Factory.deployXERC20('Test', 'TST', _limits, _limits, _minters); - - assertEq(_xerc20Factory.isRegisteredXERC20(_xerc20), true); - } - - function testIsRegisteredLockbox() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - vm.startPrank(_owner); - address _xerc20 = _xerc20Factory.deployXERC20('Test', 'TST', _limits, _limits, _minters); - address payable _lockbox = payable(_xerc20Factory.deployLockbox(_xerc20, _erc20, false)); - vm.stopPrank(); - - assertEq(_xerc20Factory.isRegisteredLockbox(_lockbox), true); - } - - function testChainingFactoryRegistries() public { - uint256[] memory _limits = new uint256[](0); - address[] memory _minters = new address[](0); - vm.startPrank(_owner); - address _xerc20 = _xerc20Factory.deployXERC20('Test', 'TST', _limits, _limits, _minters); - address payable _lockbox = payable(_xerc20Factory.deployLockbox(_xerc20, _erc20, false)); - vm.stopPrank(); - - assertEq(_newXerc20Factory.isRegisteredXERC20(_xerc20), true); - assertEq(_newXerc20Factory.isRegisteredLockbox(_lockbox), true); - assertEq(_newXerc20Factory.lockboxRegistry(_xerc20), _lockbox); - } } diff --git a/solidity/test/unit/XERC20Lockbox.t.sol b/solidity/test/unit/XERC20Lockbox.t.sol index fa39f5f..bf57e91 100644 --- a/solidity/test/unit/XERC20Lockbox.t.sol +++ b/solidity/test/unit/XERC20Lockbox.t.sol @@ -4,7 +4,6 @@ pragma solidity >=0.8.4 <0.9.0; import {Test} from 'forge-std/Test.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; -import {DSTestFull} from '../../test/utils/DSTestFull.sol'; import {XERC20} from '../../contracts/XERC20.sol'; import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol'; import {IXERC20Lockbox} from '../../interfaces/IXERC20Lockbox.sol'; diff --git a/solidity/test/unit/XERC20Registry.t.sol b/solidity/test/unit/XERC20Registry.t.sol new file mode 100644 index 0000000..0bad455 --- /dev/null +++ b/solidity/test/unit/XERC20Registry.t.sol @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.4 <0.9.0; + +import {DSTestFull} from '../../test/utils/DSTestFull.sol'; +import {XERC20Registry, IXERC20Registry} from '../../contracts/XERC20Registry.sol'; + +abstract contract Base is DSTestFull { + address internal _owner = vm.addr(101); + address internal _user = vm.addr(102); + + XERC20Registry internal _xerc20Registry; + + event XERC20Registry_XERC20Added(address _xerc20, address _erc20, address _lockbox, string _version); + event XERC20Registry_XERC20Removed(address _xerc20); + event XERC20Registry_ERC20MappingUpdated(address _xerc20, address _erc20); + + function setUp() public virtual { + vm.prank(_owner); + _xerc20Registry = new XERC20Registry(); + } +} + +contract UnitXERC20AddXERC20 is Base { + function testAddXERC20(address _xerc20, address _erc20, address _lockbox, string memory _version) public { + vm.assume(_xerc20 > address(102)); + vm.assume(_erc20 > address(102)); + vm.assume(_lockbox > address(102)); + + vm.prank(_owner); + _xerc20Registry.addXERC20(_xerc20, _erc20, _lockbox, _version); + (address _erc20Saved, address _lockboxSaved, string memory _versionSaved, bool _existsSaved) = + _xerc20Registry.xerc20Data(_xerc20); + assertEq(_erc20Saved, _erc20); + assertEq(_lockboxSaved, _lockbox); + assertEq(_versionSaved, _version); + assertTrue(_existsSaved); + + assertEq(_xerc20Registry.erc20ToXERC20(_erc20), _xerc20); + } + + function testAddXERC20ZeroERC20(address _xerc20, address _lockbox, string memory _version) public { + vm.assume(_xerc20 > address(102)); + vm.assume(_lockbox > address(102)); + + address _erc20 = address(0); + + vm.prank(_owner); + _xerc20Registry.addXERC20(_xerc20, _erc20, _lockbox, _version); + (address _erc20Saved, address _lockboxSaved, string memory _versionSaved, bool _existsSaved) = + _xerc20Registry.xerc20Data(_xerc20); + assertEq(_erc20Saved, _erc20); + assertEq(_lockboxSaved, _lockbox); + assertEq(_versionSaved, _version); + assertTrue(_existsSaved); + + assertEq(_xerc20Registry.erc20ToXERC20(_erc20), address(0)); + } + + function testAddXERC20EmitsEvent(address _xerc20, address _erc20, address _lockbox, string memory _version) public { + vm.assume(_xerc20 > address(102)); + vm.assume(_erc20 > address(102)); + vm.assume(_lockbox > address(102)); + + vm.expectEmit(true, true, true, true); + emit XERC20Registry_XERC20Added(_xerc20, _erc20, _lockbox, _version); + + vm.prank(_owner); + _xerc20Registry.addXERC20(_xerc20, _erc20, _lockbox, _version); + } + + function testAddXERC20Overrides(address _xerc20, address _erc20, address _lockbox, string memory _version) public { + string memory _versionNew = 'new version'; + + vm.assume(_xerc20 > address(102)); + vm.assume(_erc20 > address(102)); + vm.assume(_lockbox > address(102)); + vm.assume(keccak256(bytes(_version)) != keccak256(bytes(_versionNew))); + + vm.prank(_owner); + _xerc20Registry.addXERC20(_xerc20, _erc20, _lockbox, _version); + + address _erc20New = vm.addr(200); + address _lockboxNew = vm.addr(201); + + vm.prank(_owner); + _xerc20Registry.addXERC20(_xerc20, _erc20New, _lockboxNew, _versionNew); + (address _erc20Saved, address _lockboxSaved, string memory _versionSaved, bool _existsSaved) = + _xerc20Registry.xerc20Data(_xerc20); + assertEq(_erc20Saved, _erc20New); + assertEq(_lockboxSaved, _lockboxNew); + assertEq(_versionSaved, _versionNew); + assertTrue(_existsSaved); + + assertEq(_xerc20Registry.erc20ToXERC20(_erc20New), _xerc20); + } +} + +contract UnitXERC20RemoveXERC20 is Base { + address public xerc20 = vm.addr(200); + address public erc20 = vm.addr(201); + address public lockbox = vm.addr(202); + string public version = '1'; + + function setUp() public override { + super.setUp(); + vm.prank(_owner); + _xerc20Registry.addXERC20(xerc20, erc20, lockbox, version); + } + + function testRemoveXERC20() public { + vm.prank(_owner); + _xerc20Registry.removeXERC20(xerc20); + (address _erc20Saved, address _lockboxSaved, string memory _versionSaved, bool _existsSaved) = + _xerc20Registry.xerc20Data(xerc20); + assertEq(_erc20Saved, address(0)); + assertEq(_lockboxSaved, address(0)); + assertEq(_versionSaved, ''); + assertFalse(_existsSaved); + + assertEq(_xerc20Registry.erc20ToXERC20(erc20), address(0)); + } + + function testRemoveXERC20EmitsEvents() public { + vm.expectEmit(true, true, true, true); + emit XERC20Registry_XERC20Removed(xerc20); + emit XERC20Registry_ERC20MappingUpdated(address(0), erc20); + + vm.prank(_owner); + _xerc20Registry.removeXERC20(xerc20); + } + + function testRemoveXERC20RevertsIfXERC20DoesNotExist() public { + vm.expectRevert(IXERC20Registry.XERC20Registry_InvalidAddress.selector); + vm.prank(_owner); + _xerc20Registry.removeXERC20(vm.addr(300)); + } +} + +contract UnitXERC20UpdateXERC20ForERC20 is Base { + address public xerc20 = vm.addr(200); + address public erc20 = vm.addr(201); + address public lockbox = vm.addr(202); + string public version = '1'; + + address public xerc20New = vm.addr(300); + + function setUp() public override { + super.setUp(); + vm.prank(_owner); + _xerc20Registry.addXERC20(xerc20, erc20, lockbox, version); + + vm.prank(_owner); + _xerc20Registry.addXERC20(xerc20New, erc20, lockbox, version); + } + + function testUpdateXERC20ForERC20() public { + vm.prank(_owner); + _xerc20Registry.updateXERC20forERC20(xerc20, erc20); + assertEq(_xerc20Registry.erc20ToXERC20(erc20), xerc20); + } + + function testUpdateXERC20ForERC20ZeroERC20() public { + vm.expectRevert(IXERC20Registry.XERC20Registry_InvalidAddress.selector); + vm.prank(_owner); + _xerc20Registry.updateXERC20forERC20(xerc20New, address(0)); + } + + function testUpdateXERC20ForERC20ERC20DoesNotMatch() public { + address _xerc20New = vm.addr(500); + vm.prank(_owner); + _xerc20Registry.addXERC20(_xerc20New, vm.addr(400), lockbox, version); + + vm.expectRevert(IXERC20Registry.XERC20Registry_InvalidAddress.selector); + vm.prank(_owner); + _xerc20Registry.updateXERC20forERC20(_xerc20New, erc20); + } + + function testUpdateXERC20ForERC20EmitsEvent() public { + vm.expectEmit(true, true, true, true); + emit XERC20Registry_ERC20MappingUpdated(xerc20, erc20); + + vm.prank(_owner); + _xerc20Registry.updateXERC20forERC20(xerc20, erc20); + } + + function testUpdateXERC20ForERC20RemovesOldXERC20() public { + vm.prank(_owner); + _xerc20Registry.updateXERC20forERC20(xerc20, erc20); + (address _erc20Saved, address _lockboxSaved, string memory _versionSaved, bool _existsSaved) = + _xerc20Registry.xerc20Data(xerc20New); + assertEq(_erc20Saved, address(0)); + assertEq(_lockboxSaved, address(0)); + assertEq(_versionSaved, ''); + assertFalse(_existsSaved); + } + + function testUpdateXERC20ForERC20RemovesOldXERC20EmitsEvent() public { + vm.expectEmit(true, true, true, true); + emit XERC20Registry_XERC20Removed(xerc20New); + + vm.prank(_owner); + _xerc20Registry.updateXERC20forERC20(xerc20, erc20); + } +} diff --git a/solidity/test/utils/DSTestFull.sol b/solidity/test/utils/DSTestFull.sol index e4cae6e..08368a8 100644 --- a/solidity/test/utils/DSTestFull.sol +++ b/solidity/test/utils/DSTestFull.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.4 <0.9.0; -import {console} from 'forge-std/console.sol'; import {PRBTest} from 'prb/test/PRBTest.sol'; contract DSTestFull is PRBTest { diff --git a/yarn.lock b/yarn.lock index 5e83f6c..075c5c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -222,13 +222,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@solidity-parser/parser@^0.13.2": - version "0.13.2" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.13.2.tgz#b6c71d8ca0b382d90a7bbed241f9bc110af65cbe" - integrity sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw== - dependencies: - antlr4ts "^0.5.0-alpha.4" - "@solidity-parser/parser@^0.14.1": version "0.14.5" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" @@ -236,6 +229,13 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.16.0": + version "0.16.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.1.tgz#f7c8a686974e1536da0105466c4db6727311253c" + integrity sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw== + dependencies: + antlr4ts "^0.5.0-alpha.4" + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -330,7 +330,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.2, ajv@^6.6.1, ajv@^6.9.1: +ajv@^6.10.2, ajv@^6.12.6, ajv@^6.6.1, ajv@^6.9.1: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -340,6 +340,16 @@ ajv@^6.10.2, ajv@^6.6.1, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ajv@^8.11.0: version "8.11.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" @@ -406,6 +416,11 @@ antlr4@4.7.1: resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== +antlr4@^4.11.0: + version "4.13.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1.tgz#1e0a1830a08faeb86217cb2e6c34716004e4253d" + integrity sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA== + antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" @@ -423,6 +438,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -438,7 +458,7 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== -ast-parents@0.0.1: +ast-parents@0.0.1, ast-parents@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== @@ -466,6 +486,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -511,6 +538,11 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +chalk@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" + integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -520,7 +552,7 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.1.0: +chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -606,20 +638,20 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.16, colorette@^2.0.17: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== +colorette@^2.0.19: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== 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@^9.3.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" - integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== +commander@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== compare-func@^2.0.0: version "2.0.0" @@ -692,6 +724,16 @@ cosmiconfig@^7, cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cosmiconfig@^8.0.0: + version "8.3.6" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== + dependencies: + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + path-type "^4.0.0" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -947,14 +989,14 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" - integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== +execa@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" + integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.1" - human-signals "^3.0.1" + human-signals "^4.3.0" is-stream "^3.0.0" merge-stream "^2.0.0" npm-run-path "^5.1.0" @@ -981,6 +1023,11 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-diff@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + fast-glob@^3.0.3: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -1129,6 +1176,17 @@ glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -1199,10 +1257,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" - integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== husky@>=8: version "8.0.1" @@ -1221,7 +1279,7 @@ ignore@^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: +ignore@^5.1.1, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -1234,7 +1292,7 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -1388,6 +1446,13 @@ js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + 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" @@ -1440,46 +1505,46 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lilconfig@2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" - integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== +lilconfig@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" + integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -lint-staged@>=10: - version "13.0.3" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.0.3.tgz#d7cdf03a3830b327a2b63c6aec953d71d9dc48c6" - integrity sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug== +lint-staged@13.2.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.2.2.tgz#5e711d3139c234f73402177be2f8dd312e6508ca" + integrity sha512-71gSwXKy649VrSU09s10uAT0rWCcY3aewhMaHyl2N84oBk4Xs9HgxvUp3AYu+bNsK4NrOYYxvSgg7FyGJ+jGcA== dependencies: + chalk "5.2.0" cli-truncate "^3.1.0" - colorette "^2.0.17" - commander "^9.3.0" + commander "^10.0.0" debug "^4.3.4" - execa "^6.1.0" - lilconfig "2.0.5" - listr2 "^4.0.5" + execa "^7.0.0" + lilconfig "2.1.0" + listr2 "^5.0.7" micromatch "^4.0.5" normalize-path "^3.0.0" - object-inspect "^1.12.2" + object-inspect "^1.12.3" pidtree "^0.6.0" string-argv "^0.3.1" - yaml "^2.1.1" + yaml "^2.2.2" -listr2@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" - integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== +listr2@^5.0.7: + version "5.0.8" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.8.tgz#a9379ffeb4bd83a68931a65fb223a11510d6ba23" + integrity sha512-mC73LitKHj9w6v30nLNGPetZIlfpUniNSsxxrbaPcWOjDb92SHPzJPi/t+v1YC/lxKz/AJ9egOjww0qUuFxBpA== dependencies: cli-truncate "^2.1.0" - colorette "^2.0.16" + colorette "^2.0.19" log-update "^4.0.0" p-map "^4.0.0" rfdc "^1.3.0" - rxjs "^7.5.5" + rxjs "^7.8.0" through "^2.3.8" wrap-ansi "^7.0.0" @@ -1497,7 +1562,12 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -1596,6 +1666,13 @@ minimatch@^3.0.4, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -1676,10 +1753,10 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" -object-inspect@^1.12.2: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== +object-inspect@^1.12.3: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== once@^1.3.0: version "1.4.0" @@ -1781,7 +1858,7 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-json@^5.0.0: +parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -1841,6 +1918,11 @@ pidtree@^0.6.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -1851,6 +1933,11 @@ prettier@^1.14.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@^2.8.3: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -2010,10 +2097,10 @@ rxjs@^6.4.0: dependencies: tslib "^1.9.0" -rxjs@^7.5.5: - version "7.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" - integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== +rxjs@^7.8.0: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" @@ -2044,6 +2131,13 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.5.2: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -2120,28 +2214,6 @@ solhint-plugin-defi-wonderland@1.1.0: dependencies: solhint "3.3.7" -solhint@3.3.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.6.tgz#abe9af185a9a7defefba480047b3e42cbe9a1210" - integrity sha512-HWUxTAv2h7hx3s3hAab3ifnlwb02ZWhwFU/wSudUHqteMS3ll9c+m1FlGn9V8ztE2rf3Z82fQZA005Wv7KpcFA== - dependencies: - "@solidity-parser/parser" "^0.13.2" - 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" - solhint@3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.7.tgz#b5da4fedf7a0fee954cb613b6c55a5a2b0063aa7" @@ -2164,6 +2236,31 @@ solhint@3.3.7: optionalDependencies: prettier "^1.14.3" +solhint@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.5.1.tgz#3cf47c173f1a223770c3bef719122d6d2d157371" + integrity sha512-29+vUIwUmsasKuIzCYOqiKlu4We7+BVYNuoKmDMWsmjfPDoJQpM65eBzYuqEr18lwvXpQAbjTGdzvm4iZIO9Uw== + dependencies: + "@solidity-parser/parser" "^0.16.0" + ajv "^6.12.6" + antlr4 "^4.11.0" + ast-parents "^0.0.1" + chalk "^4.1.2" + commander "^10.0.0" + cosmiconfig "^8.0.0" + fast-diff "^1.2.0" + glob "^8.0.3" + ignore "^5.2.4" + js-yaml "^4.1.0" + lodash "^4.17.21" + pluralize "^8.0.0" + semver "^7.5.2" + strip-ansi "^6.0.1" + table "^6.8.1" + text-table "^0.2.0" + optionalDependencies: + prettier "^2.8.3" + sort-object-keys@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" @@ -2345,6 +2442,17 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" +table@^6.8.1: + version "6.8.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" @@ -2541,10 +2649,10 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec" - integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw== +yaml@^2.2.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.2.tgz#f522db4313c671a0ca963a75670f1c12ea909144" + integrity sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg== yargs-parser@^20.2.3: version "20.2.9"