From 01e5c008a71b85e5f3e45a597f0212b97c070aba Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 21 Aug 2024 12:20:56 +0100 Subject: [PATCH 01/19] refactor!: remove `ERC725XCore` and share logic across Standard and Init version. --- implementations/contracts/ERC725X.sol | 341 ++++++++++++++++- implementations/contracts/ERC725XCore.sol | 346 ------------------ implementations/contracts/ERC725XInit.sol | 2 + .../contracts/ERC725XInitAbstract.sol | 344 ++++++++++++++++- 4 files changed, 677 insertions(+), 356 deletions(-) delete mode 100644 implementations/contracts/ERC725XCore.sol diff --git a/implementations/contracts/ERC725X.sol b/implementations/contracts/ERC725X.sol index 47c223ba..de74847b 100644 --- a/implementations/contracts/ERC725X.sol +++ b/implementations/contracts/ERC725X.sol @@ -1,22 +1,53 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.5; +// interfaces +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC725X} from "./interfaces/IERC725X.sol"; + +// libraries +import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; + // modules import {OwnableUnset} from "./custom/OwnableUnset.sol"; -import {ERC725XCore} from "./ERC725XCore.sol"; +import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; + +// constants +import { + _INTERFACEID_ERC725X, + OPERATION_0_CALL, + OPERATION_1_CREATE, + OPERATION_2_CREATE2, + OPERATION_3_STATICCALL, + OPERATION_4_DELEGATECALL +} from "./constants.sol"; // errors -import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; +import { + OwnableCannotSetZeroAddressAsOwner, + ERC725X_InsufficientBalance, + ERC725X_UnknownOperationType, + ERC725X_MsgValueDisallowedInStaticCall, + ERC725X_MsgValueDisallowedInDelegateCall, + ERC725X_CreateOperationsRequireEmptyRecipientAddress, + ERC725X_ContractDeploymentFailed, + ERC725X_NoContractBytecodeProvided, + ERC725X_ExecuteParametersLengthMismatch, + ERC725X_ExecuteParametersEmptyArray +} from "./errors.sol"; + /** - * @title Deployable implementation with `constructor` of ERC725X, a generic executor. - * @author Fabian Vogelsteller + * @title Deployable implementation with `constructor` of ERC725X sub-standard, a generic executor. + * @author Fabian Vogelsteller and , , , * @dev ERC725X provides the ability to call arbitrary functions on any other smart contract (including itself). * It allows to use different type of message calls to interact with addresses such as `call`, `staticcall` and `delegatecall`. * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -contract ERC725X is ERC725XCore { +contract ERC725X is OwnableUnset, ERC165, IERC725X { /** * @notice Deploying an ERC725X smart contract and setting address `initialOwner` as the contract owner. * @dev Deploy a new ERC725X contract with the provided `initialOwner` as the contract {owner}. @@ -30,5 +61,305 @@ contract ERC725X is ERC725XCore { revert OwnableCannotSetZeroAddressAsOwner(); } OwnableUnset._setOwner(initialOwner); + } + + /** + * @inheritdoc ERC165 + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(IERC165, ERC165) returns (bool) { + return + interfaceId == _INTERFACEID_ERC725X || + super.supportsInterface(interfaceId); + } + + /** + * @inheritdoc IERC725X + * @custom:requirements + * - SHOULD only be callable by the {owner} of the contract. + * - if a `value` is provided, the contract MUST have at least this amount to transfer to `target` from its balance and execute successfully. + * - if the operation type is `STATICCALL` (`3`) or `DELEGATECALL` (`4`), `value` transfer is disallowed and SHOULD be 0. + * - `target` SHOULD be `address(0)` when deploying a new contract via `operationType` `CREATE` (`1`), or `CREATE2` (`2`). + * + * @custom:events + * - {Executed} event when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL). + * - {ContractCreated} event when deploying a new contract with `operationType` 1 (CREATE) or 2 (CREATE2). + */ + function execute( + uint256 operationType, + address target, + uint256 value, + bytes memory data + ) public payable virtual override onlyOwner returns (bytes memory) { + return _execute(operationType, target, value, data); + } + + /** + * @inheritdoc IERC725X + * @custom:requirements + * - All the array parameters provided MUST be equal and have the same length. + * - SHOULD only be callable by the {owner} of the contract. + * - The contract MUST have in its balance **at least the sum of all the `values`** to transfer and execute successfully each calldata payloads. + * + * @custom:warning + * - The `msg.value` should not be trusted for any method called with `operationType`: `DELEGATECALL` (4). + * + * @custom:events + * - {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) + * - {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2) + */ + function executeBatch( + uint256[] memory operationsType, + address[] memory targets, + uint256[] memory values, + bytes[] memory datas + ) public payable virtual override onlyOwner returns (bytes[] memory) { + return _executeBatch(operationsType, targets, values, datas); + } + + /** + * @dev check the `operationType` provided and perform the associated low-level opcode after checking for requirements (see {execute}). + */ + function _execute( + uint256 operationType, + address target, + uint256 value, + bytes memory data + ) internal virtual returns (bytes memory) { + // CALL + if (operationType == OPERATION_0_CALL) { + return _executeCall(target, value, data); + } + + // Deploy with CREATE + if (operationType == OPERATION_1_CREATE) { + if (target != address(0)) { + revert ERC725X_CreateOperationsRequireEmptyRecipientAddress(); + } + return _deployCreate(value, data); + } + + // Deploy with CREATE2 + if (operationType == OPERATION_2_CREATE2) { + if (target != address(0)) { + revert ERC725X_CreateOperationsRequireEmptyRecipientAddress(); + } + return _deployCreate2(value, data); + } + + // STATICCALL + if (operationType == OPERATION_3_STATICCALL) { + if (value != 0) { + revert ERC725X_MsgValueDisallowedInStaticCall(); + } + return _executeStaticCall(target, data); + } + + // DELEGATECALL + // + // WARNING! delegatecall is a dangerous operation type! use with EXTRA CAUTION + // + // delegate allows to call another deployed contract and use its functions + // to update the state of the current calling contract. + // + // this can lead to unexpected behaviour on the contract storage, such as: + // - updating any state variables (even if these are protected) + // - update the contract owner + // - run selfdestruct in the context of this contract + // + if (operationType == OPERATION_4_DELEGATECALL) { + if (value != 0) { + revert ERC725X_MsgValueDisallowedInDelegateCall(); + } + return _executeDelegateCall(target, data); + } + + revert ERC725X_UnknownOperationType(operationType); + } + + /** + * @dev check each `operationType` provided in the batch and perform the associated low-level opcode after checking for requirements (see {executeBatch}). + */ + function _executeBatch( + uint256[] memory operationsType, + address[] memory targets, + uint256[] memory values, + bytes[] memory datas + ) internal virtual returns (bytes[] memory) { + if ( + operationsType.length != targets.length || + (targets.length != values.length || values.length != datas.length) + ) { + revert ERC725X_ExecuteParametersLengthMismatch(); + } + + if (operationsType.length == 0) { + revert ERC725X_ExecuteParametersEmptyArray(); + } + + bytes[] memory result = new bytes[](operationsType.length); + + for (uint256 i = 0; i < operationsType.length; ) { + result[i] = _execute( + operationsType[i], + targets[i], + values[i], + datas[i] + ); + + // Increment the iterator in unchecked block to save gas + unchecked { + ++i; + } + } + + return result; + } + + /** + * @dev Perform low-level call (operation type = 0) + * @param target The address on which call is executed + * @param value The value to be sent with the call + * @param data The data to be sent with the call + * @return result The data from the call + */ + function _executeCall( + address target, + uint256 value, + bytes memory data + ) internal virtual returns (bytes memory result) { + if (address(this).balance < value) { + revert ERC725X_InsufficientBalance(address(this).balance, value); + } + + emit Executed(OPERATION_0_CALL, target, value, bytes4(data)); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returnData) = target.call{value: value}( + data + ); + return + Address.verifyCallResult( + success, + returnData, + "ERC725X: Unknown Error" + ); + } + + /** + * @dev Perform low-level staticcall (operation type = 3) + * @param target The address on which staticcall is executed + * @param data The data to be sent with the staticcall + * @return result The data returned from the staticcall + */ + function _executeStaticCall( + address target, + bytes memory data + ) internal virtual returns (bytes memory result) { + emit Executed(OPERATION_3_STATICCALL, target, 0, bytes4(data)); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returnData) = target.staticcall(data); + return + Address.verifyCallResult( + success, + returnData, + "ERC725X: Unknown Error" + ); + } + + /** + * @dev Perform low-level delegatecall (operation type = 4) + * @param target The address on which delegatecall is executed + * @param data The data to be sent with the delegatecall + * @return result The data returned from the delegatecall + * + * @custom:warning The `msg.value` should not be trusted for any method called with `operationType`: `DELEGATECALL` (4). + */ + function _executeDelegateCall( + address target, + bytes memory data + ) internal virtual returns (bytes memory result) { + emit Executed(OPERATION_4_DELEGATECALL, target, 0, bytes4(data)); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returnData) = target.delegatecall(data); + return + Address.verifyCallResult( + success, + returnData, + "ERC725X: Unknown Error" + ); + } + + /** + * @dev Deploy a contract using the `CREATE` opcode (operation type = 1) + * @param value The value to be sent to the contract created + * @param creationCode The contract creation bytecode to deploy appended with the constructor argument(s) + * @return newContract The address of the contract created as bytes + */ + function _deployCreate( + uint256 value, + bytes memory creationCode + ) internal virtual returns (bytes memory newContract) { + if (address(this).balance < value) { + revert ERC725X_InsufficientBalance(address(this).balance, value); + } + + if (creationCode.length == 0) { + revert ERC725X_NoContractBytecodeProvided(); + } + + address contractAddress; + // solhint-disable-next-line no-inline-assembly + assembly { + contractAddress := create( + value, + add(creationCode, 0x20), + mload(creationCode) + ) + } + + if (contractAddress == address(0)) { + revert ERC725X_ContractDeploymentFailed(); + } + + emit ContractCreated( + OPERATION_1_CREATE, + contractAddress, + value, + bytes32(0) + ); + return abi.encodePacked(contractAddress); + } + + /** + * @dev Deploy a contract using the `CREATE2` opcode (operation type = 2) + * @param value The value to be sent to the contract created + * @param creationCode The contract creation bytecode to deploy appended with the constructor argument(s) and a bytes32 salt + * @return newContract The address of the contract created as bytes + */ + function _deployCreate2( + uint256 value, + bytes memory creationCode + ) internal virtual returns (bytes memory newContract) { + if (creationCode.length == 0) { + revert ERC725X_NoContractBytecodeProvided(); + } + + bytes32 salt = BytesLib.toBytes32( + creationCode, + creationCode.length - 32 + ); + bytes memory bytecode = BytesLib.slice( + creationCode, + 0, + creationCode.length - 32 + ); + address contractAddress = Create2.deploy(value, salt, bytecode); + + emit ContractCreated(OPERATION_2_CREATE2, contractAddress, value, salt); + return abi.encodePacked(contractAddress); } } diff --git a/implementations/contracts/ERC725XCore.sol b/implementations/contracts/ERC725XCore.sol deleted file mode 100644 index 5012b7ea..00000000 --- a/implementations/contracts/ERC725XCore.sol +++ /dev/null @@ -1,346 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.8.5; - -// interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; -import {IERC725X} from "./interfaces/IERC725X.sol"; - -// libraries -import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; -import {Address} from "@openzeppelin/contracts/utils/Address.sol"; -import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; - -// modules -import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; -import {OwnableUnset} from "./custom/OwnableUnset.sol"; - -// constants -import { - _INTERFACEID_ERC725X, - OPERATION_0_CALL, - OPERATION_1_CREATE, - OPERATION_2_CREATE2, - OPERATION_3_STATICCALL, - OPERATION_4_DELEGATECALL -} from "./constants.sol"; - -import { - ERC725X_InsufficientBalance, - ERC725X_UnknownOperationType, - ERC725X_MsgValueDisallowedInStaticCall, - ERC725X_MsgValueDisallowedInDelegateCall, - ERC725X_CreateOperationsRequireEmptyRecipientAddress, - ERC725X_ContractDeploymentFailed, - ERC725X_NoContractBytecodeProvided, - ERC725X_ExecuteParametersLengthMismatch, - ERC725X_ExecuteParametersEmptyArray -} from "./errors.sol"; - -/** - * @title Core implementation of ERC725X sub-standard, a generic executor. - * @author Fabian Vogelsteller - * It allows to use different type of message calls to interact with addresses such as `call`, `staticcall` and `delegatecall`. - * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. - * This is the basis for a smart contract based account system, but could also be used as a proxy account system. - */ -abstract contract ERC725XCore is OwnableUnset, ERC165, IERC725X { - /** - * @inheritdoc IERC725X - * @custom:requirements - * - SHOULD only be callable by the {owner} of the contract. - * - if a `value` is provided, the contract MUST have at least this amount to transfer to `target` from its balance and execute successfully. - * - if the operation type is `STATICCALL` (`3`) or `DELEGATECALL` (`4`), `value` transfer is disallowed and SHOULD be 0. - * - `target` SHOULD be `address(0)` when deploying a new contract via `operationType` `CREATE` (`1`), or `CREATE2` (`2`). - * - * @custom:events - * - {Executed} event when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL). - * - {ContractCreated} event when deploying a new contract with `operationType` 1 (CREATE) or 2 (CREATE2). - */ - function execute( - uint256 operationType, - address target, - uint256 value, - bytes memory data - ) public payable virtual override onlyOwner returns (bytes memory) { - return _execute(operationType, target, value, data); - } - - /** - * @inheritdoc IERC725X - * @custom:requirements - * - All the array parameters provided MUST be equal and have the same length. - * - SHOULD only be callable by the {owner} of the contract. - * - The contract MUST have in its balance **at least the sum of all the `values`** to transfer and execute successfully each calldata payloads. - * - * @custom:warning - * - The `msg.value` should not be trusted for any method called with `operationType`: `DELEGATECALL` (4). - * - * @custom:events - * - {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) - * - {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2) - */ - function executeBatch( - uint256[] memory operationsType, - address[] memory targets, - uint256[] memory values, - bytes[] memory datas - ) public payable virtual override onlyOwner returns (bytes[] memory) { - return _executeBatch(operationsType, targets, values, datas); - } - - /** - * @inheritdoc ERC165 - */ - function supportsInterface( - bytes4 interfaceId - ) public view virtual override(IERC165, ERC165) returns (bool) { - return - interfaceId == _INTERFACEID_ERC725X || - super.supportsInterface(interfaceId); - } - - /** - * @dev check the `operationType` provided and perform the associated low-level opcode after checking for requirements (see {execute}). - */ - function _execute( - uint256 operationType, - address target, - uint256 value, - bytes memory data - ) internal virtual returns (bytes memory) { - // CALL - if (operationType == OPERATION_0_CALL) { - return _executeCall(target, value, data); - } - - // Deploy with CREATE - if (operationType == OPERATION_1_CREATE) { - if (target != address(0)) { - revert ERC725X_CreateOperationsRequireEmptyRecipientAddress(); - } - return _deployCreate(value, data); - } - - // Deploy with CREATE2 - if (operationType == OPERATION_2_CREATE2) { - if (target != address(0)) { - revert ERC725X_CreateOperationsRequireEmptyRecipientAddress(); - } - return _deployCreate2(value, data); - } - - // STATICCALL - if (operationType == OPERATION_3_STATICCALL) { - if (value != 0) { - revert ERC725X_MsgValueDisallowedInStaticCall(); - } - return _executeStaticCall(target, data); - } - - // DELEGATECALL - // - // WARNING! delegatecall is a dangerous operation type! use with EXTRA CAUTION - // - // delegate allows to call another deployed contract and use its functions - // to update the state of the current calling contract. - // - // this can lead to unexpected behaviour on the contract storage, such as: - // - updating any state variables (even if these are protected) - // - update the contract owner - // - run selfdestruct in the context of this contract - // - if (operationType == OPERATION_4_DELEGATECALL) { - if (value != 0) { - revert ERC725X_MsgValueDisallowedInDelegateCall(); - } - return _executeDelegateCall(target, data); - } - - revert ERC725X_UnknownOperationType(operationType); - } - - /** - * @dev check each `operationType` provided in the batch and perform the associated low-level opcode after checking for requirements (see {executeBatch}). - */ - function _executeBatch( - uint256[] memory operationsType, - address[] memory targets, - uint256[] memory values, - bytes[] memory datas - ) internal virtual returns (bytes[] memory) { - if ( - operationsType.length != targets.length || - (targets.length != values.length || values.length != datas.length) - ) { - revert ERC725X_ExecuteParametersLengthMismatch(); - } - - if (operationsType.length == 0) { - revert ERC725X_ExecuteParametersEmptyArray(); - } - - bytes[] memory result = new bytes[](operationsType.length); - - for (uint256 i = 0; i < operationsType.length; ) { - result[i] = _execute( - operationsType[i], - targets[i], - values[i], - datas[i] - ); - - // Increment the iterator in unchecked block to save gas - unchecked { - ++i; - } - } - - return result; - } - - /** - * @dev Perform low-level call (operation type = 0) - * @param target The address on which call is executed - * @param value The value to be sent with the call - * @param data The data to be sent with the call - * @return result The data from the call - */ - function _executeCall( - address target, - uint256 value, - bytes memory data - ) internal virtual returns (bytes memory result) { - if (address(this).balance < value) { - revert ERC725X_InsufficientBalance(address(this).balance, value); - } - - emit Executed(OPERATION_0_CALL, target, value, bytes4(data)); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returnData) = target.call{value: value}( - data - ); - return - Address.verifyCallResult( - success, - returnData, - "ERC725X: Unknown Error" - ); - } - - /** - * @dev Perform low-level staticcall (operation type = 3) - * @param target The address on which staticcall is executed - * @param data The data to be sent with the staticcall - * @return result The data returned from the staticcall - */ - function _executeStaticCall( - address target, - bytes memory data - ) internal virtual returns (bytes memory result) { - emit Executed(OPERATION_3_STATICCALL, target, 0, bytes4(data)); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returnData) = target.staticcall(data); - return - Address.verifyCallResult( - success, - returnData, - "ERC725X: Unknown Error" - ); - } - - /** - * @dev Perform low-level delegatecall (operation type = 4) - * @param target The address on which delegatecall is executed - * @param data The data to be sent with the delegatecall - * @return result The data returned from the delegatecall - * - * @custom:warning The `msg.value` should not be trusted for any method called with `operationType`: `DELEGATECALL` (4). - */ - function _executeDelegateCall( - address target, - bytes memory data - ) internal virtual returns (bytes memory result) { - emit Executed(OPERATION_4_DELEGATECALL, target, 0, bytes4(data)); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returnData) = target.delegatecall(data); - return - Address.verifyCallResult( - success, - returnData, - "ERC725X: Unknown Error" - ); - } - - /** - * @dev Deploy a contract using the `CREATE` opcode (operation type = 1) - * @param value The value to be sent to the contract created - * @param creationCode The contract creation bytecode to deploy appended with the constructor argument(s) - * @return newContract The address of the contract created as bytes - */ - function _deployCreate( - uint256 value, - bytes memory creationCode - ) internal virtual returns (bytes memory newContract) { - if (address(this).balance < value) { - revert ERC725X_InsufficientBalance(address(this).balance, value); - } - - if (creationCode.length == 0) { - revert ERC725X_NoContractBytecodeProvided(); - } - - address contractAddress; - // solhint-disable-next-line no-inline-assembly - assembly { - contractAddress := create( - value, - add(creationCode, 0x20), - mload(creationCode) - ) - } - - if (contractAddress == address(0)) { - revert ERC725X_ContractDeploymentFailed(); - } - - emit ContractCreated( - OPERATION_1_CREATE, - contractAddress, - value, - bytes32(0) - ); - return abi.encodePacked(contractAddress); - } - - /** - * @dev Deploy a contract using the `CREATE2` opcode (operation type = 2) - * @param value The value to be sent to the contract created - * @param creationCode The contract creation bytecode to deploy appended with the constructor argument(s) and a bytes32 salt - * @return newContract The address of the contract created as bytes - */ - function _deployCreate2( - uint256 value, - bytes memory creationCode - ) internal virtual returns (bytes memory newContract) { - if (creationCode.length == 0) { - revert ERC725X_NoContractBytecodeProvided(); - } - - bytes32 salt = BytesLib.toBytes32( - creationCode, - creationCode.length - 32 - ); - bytes memory bytecode = BytesLib.slice( - creationCode, - 0, - creationCode.length - 32 - ); - address contractAddress = Create2.deploy(value, salt, bytecode); - - emit ContractCreated(OPERATION_2_CREATE2, contractAddress, value, salt); - return abi.encodePacked(contractAddress); - } -} diff --git a/implementations/contracts/ERC725XInit.sol b/implementations/contracts/ERC725XInit.sol index be72f55b..f9020f22 100644 --- a/implementations/contracts/ERC725XInit.sol +++ b/implementations/contracts/ERC725XInit.sol @@ -36,4 +36,6 @@ contract ERC725XInit is ERC725XInitAbstract { ) public payable virtual initializer { ERC725XInitAbstract._initialize(initialOwner); } + + } diff --git a/implementations/contracts/ERC725XInitAbstract.sol b/implementations/contracts/ERC725XInitAbstract.sol index 7a54213b..2a90657d 100644 --- a/implementations/contracts/ERC725XInitAbstract.sol +++ b/implementations/contracts/ERC725XInitAbstract.sol @@ -1,25 +1,59 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.5; +// interfaces +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC725X} from "./interfaces/IERC725X.sol"; + +// libraries +import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; + // modules import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +// TODO: is there an Upgradable version? Is it needed? Double check in OZ package +import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {OwnableUnset} from "./custom/OwnableUnset.sol"; -import {ERC725XCore} from "./ERC725XCore.sol"; + +// constants +import { + _INTERFACEID_ERC725X, + OPERATION_0_CALL, + OPERATION_1_CREATE, + OPERATION_2_CREATE2, + OPERATION_3_STATICCALL, + OPERATION_4_DELEGATECALL +} from "./constants.sol"; // errors -import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; +import { + OwnableCannotSetZeroAddressAsOwner, + ERC725X_InsufficientBalance, + ERC725X_UnknownOperationType, + ERC725X_MsgValueDisallowedInStaticCall, + ERC725X_MsgValueDisallowedInDelegateCall, + ERC725X_CreateOperationsRequireEmptyRecipientAddress, + ERC725X_ContractDeploymentFailed, + ERC725X_NoContractBytecodeProvided, + ERC725X_ExecuteParametersLengthMismatch, + ERC725X_ExecuteParametersEmptyArray +} from "./errors.sol"; + + + /** - * @title Inheritable Proxy Implementation of ERC725X, a generic executor. - * @author Fabian Vogelsteller + * @title Inheritable Proxy Implementation of ERC725X sub-standard, a generic executor. + * @author Fabian Vogelsteller and , , , * @dev ERC725X provides the ability to call arbitrary functions on any other smart contract (including itself). * It allows to use different type of message calls to interact with addresses such as `call`, `staticcall` and `delegatecall`. * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -abstract contract ERC725XInitAbstract is Initializable, ERC725XCore { +abstract contract ERC725XInitAbstract is Initializable, OwnableUnset, ERC165, IERC725X { /** * @dev Internal function to initialize the contract with the provided `initialOwner` as the contract {owner}. * @param initialOwner the owner of the contract. @@ -35,4 +69,304 @@ abstract contract ERC725XInitAbstract is Initializable, ERC725XCore { } OwnableUnset._setOwner(initialOwner); } + + /** + * @inheritdoc ERC165 + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(IERC165, ERC165) returns (bool) { + return + interfaceId == _INTERFACEID_ERC725X || + super.supportsInterface(interfaceId); + } + + /** + * @inheritdoc IERC725X + * @custom:requirements + * - SHOULD only be callable by the {owner} of the contract. + * - if a `value` is provided, the contract MUST have at least this amount to transfer to `target` from its balance and execute successfully. + * - if the operation type is `STATICCALL` (`3`) or `DELEGATECALL` (`4`), `value` transfer is disallowed and SHOULD be 0. + * - `target` SHOULD be `address(0)` when deploying a new contract via `operationType` `CREATE` (`1`), or `CREATE2` (`2`). + * + * @custom:events + * - {Executed} event when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL). + * - {ContractCreated} event when deploying a new contract with `operationType` 1 (CREATE) or 2 (CREATE2). + */ + function execute( + uint256 operationType, + address target, + uint256 value, + bytes memory data + ) public payable virtual override onlyOwner returns (bytes memory) { + return _execute(operationType, target, value, data); + } + + /** + * @inheritdoc IERC725X + * @custom:requirements + * - All the array parameters provided MUST be equal and have the same length. + * - SHOULD only be callable by the {owner} of the contract. + * - The contract MUST have in its balance **at least the sum of all the `values`** to transfer and execute successfully each calldata payloads. + * + * @custom:warning + * - The `msg.value` should not be trusted for any method called with `operationType`: `DELEGATECALL` (4). + * + * @custom:events + * - {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) + * - {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2) + */ + function executeBatch( + uint256[] memory operationsType, + address[] memory targets, + uint256[] memory values, + bytes[] memory datas + ) public payable virtual override onlyOwner returns (bytes[] memory) { + return _executeBatch(operationsType, targets, values, datas); + } + + /** + * @dev check the `operationType` provided and perform the associated low-level opcode after checking for requirements (see {execute}). + */ + function _execute( + uint256 operationType, + address target, + uint256 value, + bytes memory data + ) internal virtual returns (bytes memory) { + // CALL + if (operationType == OPERATION_0_CALL) { + return _executeCall(target, value, data); + } + + // Deploy with CREATE + if (operationType == OPERATION_1_CREATE) { + if (target != address(0)) { + revert ERC725X_CreateOperationsRequireEmptyRecipientAddress(); + } + return _deployCreate(value, data); + } + + // Deploy with CREATE2 + if (operationType == OPERATION_2_CREATE2) { + if (target != address(0)) { + revert ERC725X_CreateOperationsRequireEmptyRecipientAddress(); + } + return _deployCreate2(value, data); + } + + // STATICCALL + if (operationType == OPERATION_3_STATICCALL) { + if (value != 0) { + revert ERC725X_MsgValueDisallowedInStaticCall(); + } + return _executeStaticCall(target, data); + } + + // DELEGATECALL + // + // WARNING! delegatecall is a dangerous operation type! use with EXTRA CAUTION + // + // delegate allows to call another deployed contract and use its functions + // to update the state of the current calling contract. + // + // this can lead to unexpected behaviour on the contract storage, such as: + // - updating any state variables (even if these are protected) + // - update the contract owner + // - run selfdestruct in the context of this contract + // + if (operationType == OPERATION_4_DELEGATECALL) { + if (value != 0) { + revert ERC725X_MsgValueDisallowedInDelegateCall(); + } + return _executeDelegateCall(target, data); + } + + revert ERC725X_UnknownOperationType(operationType); + } + + /** + * @dev check each `operationType` provided in the batch and perform the associated low-level opcode after checking for requirements (see {executeBatch}). + */ + function _executeBatch( + uint256[] memory operationsType, + address[] memory targets, + uint256[] memory values, + bytes[] memory datas + ) internal virtual returns (bytes[] memory) { + if ( + operationsType.length != targets.length || + (targets.length != values.length || values.length != datas.length) + ) { + revert ERC725X_ExecuteParametersLengthMismatch(); + } + + if (operationsType.length == 0) { + revert ERC725X_ExecuteParametersEmptyArray(); + } + + bytes[] memory result = new bytes[](operationsType.length); + + for (uint256 i = 0; i < operationsType.length; ) { + result[i] = _execute( + operationsType[i], + targets[i], + values[i], + datas[i] + ); + + // Increment the iterator in unchecked block to save gas + unchecked { + ++i; + } + } + + return result; + } + + /** + * @dev Perform low-level call (operation type = 0) + * @param target The address on which call is executed + * @param value The value to be sent with the call + * @param data The data to be sent with the call + * @return result The data from the call + */ + function _executeCall( + address target, + uint256 value, + bytes memory data + ) internal virtual returns (bytes memory result) { + if (address(this).balance < value) { + revert ERC725X_InsufficientBalance(address(this).balance, value); + } + + emit Executed(OPERATION_0_CALL, target, value, bytes4(data)); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returnData) = target.call{value: value}( + data + ); + return + Address.verifyCallResult( + success, + returnData, + "ERC725X: Unknown Error" + ); + } + + /** + * @dev Perform low-level staticcall (operation type = 3) + * @param target The address on which staticcall is executed + * @param data The data to be sent with the staticcall + * @return result The data returned from the staticcall + */ + function _executeStaticCall( + address target, + bytes memory data + ) internal virtual returns (bytes memory result) { + emit Executed(OPERATION_3_STATICCALL, target, 0, bytes4(data)); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returnData) = target.staticcall(data); + return + Address.verifyCallResult( + success, + returnData, + "ERC725X: Unknown Error" + ); + } + + /** + * @dev Perform low-level delegatecall (operation type = 4) + * @param target The address on which delegatecall is executed + * @param data The data to be sent with the delegatecall + * @return result The data returned from the delegatecall + * + * @custom:warning The `msg.value` should not be trusted for any method called with `operationType`: `DELEGATECALL` (4). + */ + function _executeDelegateCall( + address target, + bytes memory data + ) internal virtual returns (bytes memory result) { + emit Executed(OPERATION_4_DELEGATECALL, target, 0, bytes4(data)); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returnData) = target.delegatecall(data); + return + Address.verifyCallResult( + success, + returnData, + "ERC725X: Unknown Error" + ); + } + + /** + * @dev Deploy a contract using the `CREATE` opcode (operation type = 1) + * @param value The value to be sent to the contract created + * @param creationCode The contract creation bytecode to deploy appended with the constructor argument(s) + * @return newContract The address of the contract created as bytes + */ + function _deployCreate( + uint256 value, + bytes memory creationCode + ) internal virtual returns (bytes memory newContract) { + if (address(this).balance < value) { + revert ERC725X_InsufficientBalance(address(this).balance, value); + } + + if (creationCode.length == 0) { + revert ERC725X_NoContractBytecodeProvided(); + } + + address contractAddress; + // solhint-disable-next-line no-inline-assembly + assembly { + contractAddress := create( + value, + add(creationCode, 0x20), + mload(creationCode) + ) + } + + if (contractAddress == address(0)) { + revert ERC725X_ContractDeploymentFailed(); + } + + emit ContractCreated( + OPERATION_1_CREATE, + contractAddress, + value, + bytes32(0) + ); + return abi.encodePacked(contractAddress); + } + + /** + * @dev Deploy a contract using the `CREATE2` opcode (operation type = 2) + * @param value The value to be sent to the contract created + * @param creationCode The contract creation bytecode to deploy appended with the constructor argument(s) and a bytes32 salt + * @return newContract The address of the contract created as bytes + */ + function _deployCreate2( + uint256 value, + bytes memory creationCode + ) internal virtual returns (bytes memory newContract) { + if (creationCode.length == 0) { + revert ERC725X_NoContractBytecodeProvided(); + } + + bytes32 salt = BytesLib.toBytes32( + creationCode, + creationCode.length - 32 + ); + bytes memory bytecode = BytesLib.slice( + creationCode, + 0, + creationCode.length - 32 + ); + address contractAddress = Create2.deploy(value, salt, bytecode); + + emit ContractCreated(OPERATION_2_CREATE2, contractAddress, value, salt); + return abi.encodePacked(contractAddress); + } } From c60aedb6a859c12ae4aaebdc51c5815af908599e Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 21 Aug 2024 12:47:06 +0100 Subject: [PATCH 02/19] refactor!: remove `ERC725YCore` and duplicate logic across Standard and Init version --- implementations/contracts/ERC725Y.sol | 181 ++++++++++++++++- implementations/contracts/ERC725YCore.sol | 186 ------------------ implementations/contracts/ERC725YInit.sol | 2 +- .../contracts/ERC725YInitAbstract.sol | 181 ++++++++++++++++- implementations/test/ERC725Y.behaviour.ts | 17 +- 5 files changed, 363 insertions(+), 204 deletions(-) delete mode 100644 implementations/contracts/ERC725YCore.sol diff --git a/implementations/contracts/ERC725Y.sol b/implementations/contracts/ERC725Y.sol index ca4e7877..9fab664a 100644 --- a/implementations/contracts/ERC725Y.sol +++ b/implementations/contracts/ERC725Y.sol @@ -1,20 +1,37 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.4; +// interfaces +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC725Y} from "./interfaces/IERC725Y.sol"; + // modules +import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {OwnableUnset} from "./custom/OwnableUnset.sol"; -import {ERC725YCore} from "./ERC725YCore.sol"; + +// constants +import {_INTERFACEID_ERC725Y} from "./constants.sol"; // errors -import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; +import { + OwnableCannotSetZeroAddressAsOwner, + ERC725Y_MsgValueDisallowed, + ERC725Y_DataKeysValuesLengthMismatch, + ERC725Y_DataKeysValuesEmptyArray +} from "./errors.sol"; /** - * @title Deployable implementation with `constructor` of ERC725Y, a generic data key/value store. - * @author Fabian Vogelsteller + * @title Deployable implementation with `constructor` of ERC725Y sub-standard, a generic data key/value store. + * @author Fabian Vogelsteller and , , , * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ -contract ERC725Y is ERC725YCore { +contract ERC725Y is OwnableUnset, ERC165, IERC725Y { + /** + * @dev Map `bytes32` data keys to their `bytes` data values. + */ + mapping(bytes32 => bytes) internal _store; + /** * @notice Deploying an ERC725Y smart contract and setting address `initialOwner` as the contract owner. * @dev Deploy a new ERC725Y contract with the provided `initialOwner` as the contract {owner}. @@ -29,4 +46,158 @@ contract ERC725Y is ERC725YCore { } OwnableUnset._setOwner(initialOwner); } + + /** + * @inheritdoc IERC725Y + */ + function getData( + bytes32 dataKey + ) public view virtual override returns (bytes memory dataValue) { + return _getData(dataKey); + } + + /** + * @inheritdoc IERC725Y + */ + function getDataBatch( + bytes32[] memory dataKeys + ) public view virtual override returns (bytes[] memory dataValues) { + dataValues = new bytes[](dataKeys.length); + + for (uint256 i = 0; i < dataKeys.length; ) { + dataValues[i] = _getData(dataKeys[i]); + + // Increment the iterator in unchecked block to save gas + unchecked { + ++i; + } + } + + return dataValues; + } + + /** + * @inheritdoc IERC725Y + * @custom:requirements + * - SHOULD only be callable by the {owner}. + * + * @custom:warning + * **Note for developers:** despite the fact that this function is set as `payable`, the function is not intended to receive value + * (= native tokens). **An additional check has been implemented to ensure that `msg.value` sent was equal to 0**. + * If you want to allow this function to receive value in your inheriting contract, this function can be overriden to remove this check. + * + * @custom:events {DataChanged} event. + */ + function setData( + bytes32 dataKey, + bytes memory dataValue + ) public payable virtual override onlyOwner { + if (msg.value != 0) revert ERC725Y_MsgValueDisallowed(); + _setData(dataKey, dataValue); + } + + /** + * @inheritdoc IERC725Y + * @custom:requirements + * - SHOULD only be callable by the {owner} of the contract. + * + * @custom:warning + * **Note for developers:** despite the fact that this function is set as `payable`, the function is not intended to receive value + * (= native tokens). **An additional check has been implemented to ensure that `msg.value` sent was equal to 0**. + * If you want to allow this function to receive value in your inheriting contract, this function can be overriden to remove this check. + * + * @custom:events {DataChanged} event **for each data key/value pair set**. + */ + function setDataBatch( + bytes32[] memory dataKeys, + bytes[] memory dataValues + ) public payable virtual override onlyOwner { + /// @dev do not allow to send value by default when setting data in ERC725Y + if (msg.value != 0) revert ERC725Y_MsgValueDisallowed(); + _setDataBatch(dataKeys, dataValues); + } + + /** + * @dev Read the value stored under a specific `dataKey` inside the underlying ERC725Y storage, + * represented as a mapping of `bytes32` data keys mapped to their `bytes` data values. + * + * ```solidity + * mapping(bytes32 => bytes) _store + * ``` + * + * @param dataKey A bytes32 data key to read the associated `bytes` value from the store. + * @return dataValue The `bytes` value associated with the given `dataKey` in the ERC725Y storage. + */ + function _getData( + bytes32 dataKey + ) internal view virtual returns (bytes memory dataValue) { + return _store[dataKey]; + } + + /** + * @dev Write a `dataValue` to the underlying ERC725Y storage, represented as a mapping of + * `bytes32` data keys mapped to their `bytes` data values. + * + * ```solidity + * mapping(bytes32 => bytes) _store + * ``` + * + * @param dataKey A bytes32 data key to write the associated `bytes` value to the store. + * @param dataValue The `bytes` value to associate with the given `dataKey` in the ERC725Y storage. + * + * @custom:events {DataChanged} event emitted after a successful `setData` call. + */ + function _setData( + bytes32 dataKey, + bytes memory dataValue + ) internal virtual { + _store[dataKey] = dataValue; + emit DataChanged(dataKey, dataValue); + } + + /** + * @dev Write a set of `dataValues` to the underlying ERC725Y storage for each associated `dataKeys`. The ERC725Y storage is + * represented as a mapping of `bytes32` data keys mapped to their `bytes` data values. + * + * ```solidity + * mapping(bytes32 => bytes) _store + * ``` + * + * @param dataKeys A bytes32 array of data keys to write the associated `bytes` value to the store. + * @param dataValues The `bytes` values to associate with each given `dataKeys` in the ERC725Y storage. + * + * @custom:events {DataChanged} event emitted for each successful data key-value pairs set. + */ + function _setDataBatch( + bytes32[] memory dataKeys, + bytes[] memory dataValues + ) internal virtual { + if (dataKeys.length != dataValues.length) { + revert ERC725Y_DataKeysValuesLengthMismatch(); + } + + if (dataKeys.length == 0) { + revert ERC725Y_DataKeysValuesEmptyArray(); + } + + for (uint256 i = 0; i < dataKeys.length; ) { + _setData(dataKeys[i], dataValues[i]); + + // Increment the iterator in unchecked block to save gas + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc ERC165 + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(IERC165, ERC165) returns (bool) { + return + interfaceId == _INTERFACEID_ERC725Y || + super.supportsInterface(interfaceId); + } } diff --git a/implementations/contracts/ERC725YCore.sol b/implementations/contracts/ERC725YCore.sol deleted file mode 100644 index d2909a74..00000000 --- a/implementations/contracts/ERC725YCore.sol +++ /dev/null @@ -1,186 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.8.4; - -// interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; -import {IERC725Y} from "./interfaces/IERC725Y.sol"; - -// modules -import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; -import {OwnableUnset} from "./custom/OwnableUnset.sol"; - -// constants -import {_INTERFACEID_ERC725Y} from "./constants.sol"; - -import { - ERC725Y_MsgValueDisallowed, - ERC725Y_DataKeysValuesLengthMismatch, - ERC725Y_DataKeysValuesEmptyArray -} from "./errors.sol"; - -/** - * @title Core implementation of ERC725Y sub-standard, a general data key/value store. - * @author Fabian Vogelsteller - * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. - * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. - */ -abstract contract ERC725YCore is OwnableUnset, ERC165, IERC725Y { - /** - * @dev Map `bytes32` data keys to their `bytes` data values. - */ - mapping(bytes32 => bytes) internal _store; - - /** - * @inheritdoc IERC725Y - */ - function getData( - bytes32 dataKey - ) public view virtual override returns (bytes memory dataValue) { - return _getData(dataKey); - } - - /** - * @inheritdoc IERC725Y - */ - function getDataBatch( - bytes32[] memory dataKeys - ) public view virtual override returns (bytes[] memory dataValues) { - dataValues = new bytes[](dataKeys.length); - - for (uint256 i = 0; i < dataKeys.length; ) { - dataValues[i] = _getData(dataKeys[i]); - - // Increment the iterator in unchecked block to save gas - unchecked { - ++i; - } - } - - return dataValues; - } - - /** - * @inheritdoc IERC725Y - * @custom:requirements - * - SHOULD only be callable by the {owner}. - * - * @custom:warning - * **Note for developers:** despite the fact that this function is set as `payable`, the function is not intended to receive value - * (= native tokens). **An additional check has been implemented to ensure that `msg.value` sent was equal to 0**. - * If you want to allow this function to receive value in your inheriting contract, this function can be overriden to remove this check. - * - * @custom:events {DataChanged} event. - */ - function setData( - bytes32 dataKey, - bytes memory dataValue - ) public payable virtual override onlyOwner { - if (msg.value != 0) revert ERC725Y_MsgValueDisallowed(); - _setData(dataKey, dataValue); - } - - /** - * @inheritdoc IERC725Y - * @custom:requirements - * - SHOULD only be callable by the {owner} of the contract. - * - * @custom:warning - * **Note for developers:** despite the fact that this function is set as `payable`, the function is not intended to receive value - * (= native tokens). **An additional check has been implemented to ensure that `msg.value` sent was equal to 0**. - * If you want to allow this function to receive value in your inheriting contract, this function can be overriden to remove this check. - * - * @custom:events {DataChanged} event **for each data key/value pair set**. - */ - function setDataBatch( - bytes32[] memory dataKeys, - bytes[] memory dataValues - ) public payable virtual override onlyOwner { - /// @dev do not allow to send value by default when setting data in ERC725Y - if (msg.value != 0) revert ERC725Y_MsgValueDisallowed(); - _setDataBatch(dataKeys, dataValues); - } - - /** - * @dev Read the value stored under a specific `dataKey` inside the underlying ERC725Y storage, - * represented as a mapping of `bytes32` data keys mapped to their `bytes` data values. - * - * ```solidity - * mapping(bytes32 => bytes) _store - * ``` - * - * @param dataKey A bytes32 data key to read the associated `bytes` value from the store. - * @return dataValue The `bytes` value associated with the given `dataKey` in the ERC725Y storage. - */ - function _getData( - bytes32 dataKey - ) internal view virtual returns (bytes memory dataValue) { - return _store[dataKey]; - } - - /** - * @dev Write a `dataValue` to the underlying ERC725Y storage, represented as a mapping of - * `bytes32` data keys mapped to their `bytes` data values. - * - * ```solidity - * mapping(bytes32 => bytes) _store - * ``` - * - * @param dataKey A bytes32 data key to write the associated `bytes` value to the store. - * @param dataValue The `bytes` value to associate with the given `dataKey` in the ERC725Y storage. - * - * @custom:events {DataChanged} event emitted after a successful `setData` call. - */ - function _setData( - bytes32 dataKey, - bytes memory dataValue - ) internal virtual { - _store[dataKey] = dataValue; - emit DataChanged(dataKey, dataValue); - } - - /** - * @dev Write a set of `dataValues` to the underlying ERC725Y storage for each associated `dataKeys`. The ERC725Y storage is - * represented as a mapping of `bytes32` data keys mapped to their `bytes` data values. - * - * ```solidity - * mapping(bytes32 => bytes) _store - * ``` - * - * @param dataKeys A bytes32 array of data keys to write the associated `bytes` value to the store. - * @param dataValues The `bytes` values to associate with each given `dataKeys` in the ERC725Y storage. - * - * @custom:events {DataChanged} event emitted for each successful data key-value pairs set. - */ - function _setDataBatch( - bytes32[] memory dataKeys, - bytes[] memory dataValues - ) internal virtual { - if (dataKeys.length != dataValues.length) { - revert ERC725Y_DataKeysValuesLengthMismatch(); - } - - if (dataKeys.length == 0) { - revert ERC725Y_DataKeysValuesEmptyArray(); - } - - for (uint256 i = 0; i < dataKeys.length; ) { - _setData(dataKeys[i], dataValues[i]); - - // Increment the iterator in unchecked block to save gas - unchecked { - ++i; - } - } - } - - /** - * @inheritdoc ERC165 - */ - function supportsInterface( - bytes4 interfaceId - ) public view virtual override(IERC165, ERC165) returns (bool) { - return - interfaceId == _INTERFACEID_ERC725Y || - super.supportsInterface(interfaceId); - } -} diff --git a/implementations/contracts/ERC725YInit.sol b/implementations/contracts/ERC725YInit.sol index 34f5075f..b0d02f75 100644 --- a/implementations/contracts/ERC725YInit.sol +++ b/implementations/contracts/ERC725YInit.sol @@ -6,7 +6,7 @@ import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; /** * @title Deployable Proxy Implementation of ERC725Y, a generic data key/value store. - * @author Fabian Vogelsteller + * @author Fabian Vogelsteller and , , , * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ diff --git a/implementations/contracts/ERC725YInitAbstract.sol b/implementations/contracts/ERC725YInitAbstract.sol index ff21652b..c8f3628f 100644 --- a/implementations/contracts/ERC725YInitAbstract.sol +++ b/implementations/contracts/ERC725YInitAbstract.sol @@ -1,23 +1,40 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.4; +// interfaces +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC725Y} from "./interfaces/IERC725Y.sol"; + // modules import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {OwnableUnset} from "./custom/OwnableUnset.sol"; -import {ERC725YCore} from "./ERC725YCore.sol"; + +// constants +import {_INTERFACEID_ERC725Y} from "./constants.sol"; // errors -import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; +import { + OwnableCannotSetZeroAddressAsOwner, + ERC725Y_MsgValueDisallowed, + ERC725Y_DataKeysValuesLengthMismatch, + ERC725Y_DataKeysValuesEmptyArray +} from "./errors.sol"; /** - * @title Inheritable Proxy Implementation of ERC725Y, a generic data key/value store - * @author Fabian Vogelsteller + * @title Inheritable Proxy Implementation of ERC725Y sub-standard, a generic data key/value store + * @author Fabian Vogelsteller and , , , * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ -abstract contract ERC725YInitAbstract is Initializable, ERC725YCore { +abstract contract ERC725YInitAbstract is Initializable, OwnableUnset, ERC165, IERC725Y { + /** + * @dev Map `bytes32` data keys to their `bytes` data values. + */ + mapping(bytes32 => bytes) internal _store; + /** * @dev Internal function to initialize the contract with the provided `initialOwner` as the contract {owner}. * @param initialOwner the owner of the contract. @@ -33,4 +50,158 @@ abstract contract ERC725YInitAbstract is Initializable, ERC725YCore { } OwnableUnset._setOwner(initialOwner); } + + /** + * @inheritdoc IERC725Y + */ + function getData( + bytes32 dataKey + ) public view virtual override returns (bytes memory dataValue) { + return _getData(dataKey); + } + + /** + * @inheritdoc IERC725Y + */ + function getDataBatch( + bytes32[] memory dataKeys + ) public view virtual override returns (bytes[] memory dataValues) { + dataValues = new bytes[](dataKeys.length); + + for (uint256 i = 0; i < dataKeys.length; ) { + dataValues[i] = _getData(dataKeys[i]); + + // Increment the iterator in unchecked block to save gas + unchecked { + ++i; + } + } + + return dataValues; + } + + /** + * @inheritdoc IERC725Y + * @custom:requirements + * - SHOULD only be callable by the {owner}. + * + * @custom:warning + * **Note for developers:** despite the fact that this function is set as `payable`, the function is not intended to receive value + * (= native tokens). **An additional check has been implemented to ensure that `msg.value` sent was equal to 0**. + * If you want to allow this function to receive value in your inheriting contract, this function can be overriden to remove this check. + * + * @custom:events {DataChanged} event. + */ + function setData( + bytes32 dataKey, + bytes memory dataValue + ) public payable virtual override onlyOwner { + if (msg.value != 0) revert ERC725Y_MsgValueDisallowed(); + _setData(dataKey, dataValue); + } + + /** + * @inheritdoc IERC725Y + * @custom:requirements + * - SHOULD only be callable by the {owner} of the contract. + * + * @custom:warning + * **Note for developers:** despite the fact that this function is set as `payable`, the function is not intended to receive value + * (= native tokens). **An additional check has been implemented to ensure that `msg.value` sent was equal to 0**. + * If you want to allow this function to receive value in your inheriting contract, this function can be overriden to remove this check. + * + * @custom:events {DataChanged} event **for each data key/value pair set**. + */ + function setDataBatch( + bytes32[] memory dataKeys, + bytes[] memory dataValues + ) public payable virtual override onlyOwner { + /// @dev do not allow to send value by default when setting data in ERC725Y + if (msg.value != 0) revert ERC725Y_MsgValueDisallowed(); + _setDataBatch(dataKeys, dataValues); + } + + /** + * @dev Read the value stored under a specific `dataKey` inside the underlying ERC725Y storage, + * represented as a mapping of `bytes32` data keys mapped to their `bytes` data values. + * + * ```solidity + * mapping(bytes32 => bytes) _store + * ``` + * + * @param dataKey A bytes32 data key to read the associated `bytes` value from the store. + * @return dataValue The `bytes` value associated with the given `dataKey` in the ERC725Y storage. + */ + function _getData( + bytes32 dataKey + ) internal view virtual returns (bytes memory dataValue) { + return _store[dataKey]; + } + + /** + * @dev Write a `dataValue` to the underlying ERC725Y storage, represented as a mapping of + * `bytes32` data keys mapped to their `bytes` data values. + * + * ```solidity + * mapping(bytes32 => bytes) _store + * ``` + * + * @param dataKey A bytes32 data key to write the associated `bytes` value to the store. + * @param dataValue The `bytes` value to associate with the given `dataKey` in the ERC725Y storage. + * + * @custom:events {DataChanged} event emitted after a successful `setData` call. + */ + function _setData( + bytes32 dataKey, + bytes memory dataValue + ) internal virtual { + _store[dataKey] = dataValue; + emit DataChanged(dataKey, dataValue); + } + + /** + * @dev Write a set of `dataValues` to the underlying ERC725Y storage for each associated `dataKeys`. The ERC725Y storage is + * represented as a mapping of `bytes32` data keys mapped to their `bytes` data values. + * + * ```solidity + * mapping(bytes32 => bytes) _store + * ``` + * + * @param dataKeys A bytes32 array of data keys to write the associated `bytes` value to the store. + * @param dataValues The `bytes` values to associate with each given `dataKeys` in the ERC725Y storage. + * + * @custom:events {DataChanged} event emitted for each successful data key-value pairs set. + */ + function _setDataBatch( + bytes32[] memory dataKeys, + bytes[] memory dataValues + ) internal virtual { + if (dataKeys.length != dataValues.length) { + revert ERC725Y_DataKeysValuesLengthMismatch(); + } + + if (dataKeys.length == 0) { + revert ERC725Y_DataKeysValuesEmptyArray(); + } + + for (uint256 i = 0; i < dataKeys.length; ) { + _setData(dataKeys[i], dataValues[i]); + + // Increment the iterator in unchecked block to save gas + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc ERC165 + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(IERC165, ERC165) returns (bool) { + return + interfaceId == _INTERFACEID_ERC725Y || + super.supportsInterface(interfaceId); + } } diff --git a/implementations/test/ERC725Y.behaviour.ts b/implementations/test/ERC725Y.behaviour.ts index c2cd0495..aebdd708 100644 --- a/implementations/test/ERC725Y.behaviour.ts +++ b/implementations/test/ERC725Y.behaviour.ts @@ -7,9 +7,12 @@ import { AddressZero } from '@ethersproject/constants'; import type { TransactionResponse } from '@ethersproject/abstract-provider'; // types -import { ERC725Y, ERC725YWriter__factory, ERC725YReader__factory } from '../types'; - -import { bytecode as ERC725Bytecode } from '../artifacts/contracts/ERC725.sol/ERC725.json'; +import { + ERC725Y, + ERC725Y__factory, + ERC725YWriter__factory, + ERC725YReader__factory, +} from '../types'; // constants import { INTERFACE_ID } from '../constants'; @@ -312,7 +315,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise { const txParams = { dataKey: ethers.utils.solidityKeccak256(['string'], ['BytecodeOfMyFavoriteContract']), - dataValue: ERC725Bytecode, + dataValue: ERC725Y__factory.bytecode, }; await expect( @@ -522,7 +525,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise { const txParams = { dataKey: ethers.utils.solidityKeccak256(['string'], ['BytecodeOfMyFavoriteContract']), - dataValue: ERC725Bytecode, + dataValue: ERC725Y__factory.bytecode, }; await expect( @@ -651,7 +654,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise { txParams = { dataKey: ethers.utils.solidityKeccak256(['string'], ['FirstDataKey']), - dataValue: ERC725Bytecode, + dataValue: ERC725Y__factory.bytecode, }; await context.erc725Y @@ -759,7 +762,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise { txParams = { dataKey: ethers.utils.solidityKeccak256(['string'], ['FirstDataKey']), - dataValue: ERC725Bytecode, + dataValue: ERC725Y__factory.bytecode, }; await context.erc725Y From c1c5e2f614620593df05d5d7efc99b5854038f4f Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 21 Aug 2024 15:55:45 +0100 Subject: [PATCH 03/19] refactor!: inheritance of `ERC725` of standard and init version --- implementations/contracts/ERC725.sol | 19 +++++------ .../contracts/ERC725InitAbstract.sol | 33 ++++++++++++------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/implementations/contracts/ERC725.sol b/implementations/contracts/ERC725.sol index 9cfe4a7a..5237ca60 100644 --- a/implementations/contracts/ERC725.sol +++ b/implementations/contracts/ERC725.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.5; // modules import {OwnableUnset} from "./custom/OwnableUnset.sol"; -import {ERC725XCore} from "./ERC725XCore.sol"; -import {ERC725YCore} from "./ERC725YCore.sol"; +import {ERC725X} from "./ERC725X.sol"; +import {ERC725Y} from "./ERC725Y.sol"; // constants import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "./constants.sol"; @@ -19,7 +19,7 @@ import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; * * @custom:warning This implementation does not have by default a `receive()` or `fallback()` function. */ -contract ERC725 is ERC725XCore, ERC725YCore { +contract ERC725 is ERC725X, ERC725Y { /** * @notice Deploying an ERC725 smart contract and setting address `initialOwner` as the contract owner. * @dev Deploy a new ERC725 contract with the provided `initialOwner` as the contract {owner}. @@ -28,7 +28,9 @@ contract ERC725 is ERC725XCore, ERC725YCore { * @custom:requirements * - `initialOwner` CANNOT be the zero address. */ - constructor(address initialOwner) payable { + constructor( + address initialOwner + ) payable ERC725X(initialOwner) ERC725Y(initialOwner) { if (initialOwner == address(0)) { revert OwnableCannotSetZeroAddressAsOwner(); } @@ -36,14 +38,11 @@ contract ERC725 is ERC725XCore, ERC725YCore { } /** - * @inheritdoc ERC725XCore + * @inheritdoc ERC725X */ function supportsInterface( bytes4 interfaceId - ) public view virtual override(ERC725XCore, ERC725YCore) returns (bool) { - return - interfaceId == _INTERFACEID_ERC725X || - interfaceId == _INTERFACEID_ERC725Y || - super.supportsInterface(interfaceId); + ) public view virtual override(ERC725X, ERC725Y) returns (bool) { + return super.supportsInterface(interfaceId); } } diff --git a/implementations/contracts/ERC725InitAbstract.sol b/implementations/contracts/ERC725InitAbstract.sol index 114309b6..487d1155 100644 --- a/implementations/contracts/ERC725InitAbstract.sol +++ b/implementations/contracts/ERC725InitAbstract.sol @@ -6,8 +6,8 @@ import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {OwnableUnset} from "./custom/OwnableUnset.sol"; -import {ERC725XCore} from "./ERC725XCore.sol"; -import {ERC725YCore} from "./ERC725YCore.sol"; +import {ERC725XInitAbstract} from "./ERC725XInitAbstract.sol"; +import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; // constants import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "./constants.sol"; @@ -24,19 +24,27 @@ import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; */ abstract contract ERC725InitAbstract is Initializable, - ERC725XCore, - ERC725YCore + ERC725XInitAbstract, + ERC725YInitAbstract { /** * @dev Internal function to initialize the contract with the provided `initialOwner` as the contract {owner}. * @param initialOwner the owner of the contract. * + * NOTE: we can safely override this function and not call the parent `_initialize(...)` functions from `ERC725XInitAbstract` and `ERC725YInitAbstract` + * as the code logic from this `_initialize(...)` is the exactly the same. + * * @custom:requirements * - `initialOwner` CANNOT be the zero address. */ function _initialize( address initialOwner - ) internal virtual onlyInitializing { + ) + internal + virtual + override(ERC725XInitAbstract, ERC725YInitAbstract) + onlyInitializing + { if (initialOwner == address(0)) { revert OwnableCannotSetZeroAddressAsOwner(); } @@ -44,14 +52,17 @@ abstract contract ERC725InitAbstract is } /** - * @inheritdoc ERC725XCore + * @inheritdoc ERC725XInitAbstract */ function supportsInterface( bytes4 interfaceId - ) public view virtual override(ERC725XCore, ERC725YCore) returns (bool) { - return - interfaceId == _INTERFACEID_ERC725X || - interfaceId == _INTERFACEID_ERC725Y || - super.supportsInterface(interfaceId); + ) + public + view + virtual + override(ERC725XInitAbstract, ERC725YInitAbstract) + returns (bool) + { + return super.supportsInterface(interfaceId); } } From fc8377baada07e2956a30c9257b1ef94ada7f800 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Thu, 22 Aug 2024 10:36:47 +0100 Subject: [PATCH 04/19] refactor!: remove and deprecate `OwnableUnset` in favour of OZ --- implementations/contracts/ERC725.sol | 12 +-- .../contracts/ERC725InitAbstract.sol | 19 ++--- implementations/contracts/ERC725X.sol | 18 ++--- .../contracts/ERC725XInitAbstract.sol | 22 +++-- implementations/contracts/ERC725Y.sol | 16 ++-- .../contracts/ERC725YInitAbstract.sol | 21 +++-- .../contracts/custom/OwnableUnset.sol | 81 ------------------- implementations/contracts/errors.sol | 12 --- implementations/test/ERC725.test.ts | 7 +- implementations/test/ERC725X.behaviour.ts | 10 +-- implementations/test/ERC725X.test.ts | 7 +- implementations/test/ERC725Y.behaviour.ts | 10 +-- implementations/test/ERC725Y.test.ts | 7 +- 13 files changed, 65 insertions(+), 177 deletions(-) delete mode 100644 implementations/contracts/custom/OwnableUnset.sol diff --git a/implementations/contracts/ERC725.sol b/implementations/contracts/ERC725.sol index 5237ca60..26b39430 100644 --- a/implementations/contracts/ERC725.sol +++ b/implementations/contracts/ERC725.sol @@ -2,16 +2,13 @@ pragma solidity ^0.8.5; // modules -import {OwnableUnset} from "./custom/OwnableUnset.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC725X} from "./ERC725X.sol"; import {ERC725Y} from "./ERC725Y.sol"; // constants import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "./constants.sol"; -// errors -import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; - /** * @title ERC725 bundle. * @author Fabian Vogelsteller @@ -30,12 +27,7 @@ contract ERC725 is ERC725X, ERC725Y { */ constructor( address initialOwner - ) payable ERC725X(initialOwner) ERC725Y(initialOwner) { - if (initialOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - OwnableUnset._setOwner(initialOwner); - } + ) payable ERC725X(initialOwner) ERC725Y(initialOwner) {} /** * @inheritdoc ERC725X diff --git a/implementations/contracts/ERC725InitAbstract.sol b/implementations/contracts/ERC725InitAbstract.sol index 487d1155..d5d744b0 100644 --- a/implementations/contracts/ERC725InitAbstract.sol +++ b/implementations/contracts/ERC725InitAbstract.sol @@ -3,18 +3,14 @@ pragma solidity ^0.8.5; // modules import { - Initializable -} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import {OwnableUnset} from "./custom/OwnableUnset.sol"; + OwnableUpgradeable +} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {ERC725XInitAbstract} from "./ERC725XInitAbstract.sol"; import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; // constants import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "./constants.sol"; -// errors -import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; - /** * @title Inheritable Proxy Implementation of ERC725 bundle * @author Fabian Vogelsteller @@ -23,7 +19,7 @@ import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; * @custom:warning This implementation does not have by default a `receive()` or `fallback()` function. */ abstract contract ERC725InitAbstract is - Initializable, + OwnableUpgradeable, ERC725XInitAbstract, ERC725YInitAbstract { @@ -45,10 +41,11 @@ abstract contract ERC725InitAbstract is override(ERC725XInitAbstract, ERC725YInitAbstract) onlyInitializing { - if (initialOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - OwnableUnset._setOwner(initialOwner); + require( + initialOwner != address(0), + "Ownable: new owner is the zero address" + ); + OwnableUpgradeable._transferOwnership(initialOwner); } /** diff --git a/implementations/contracts/ERC725X.sol b/implementations/contracts/ERC725X.sol index de74847b..b63d5d9c 100644 --- a/implementations/contracts/ERC725X.sol +++ b/implementations/contracts/ERC725X.sol @@ -11,7 +11,7 @@ import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; // modules -import {OwnableUnset} from "./custom/OwnableUnset.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; // constants @@ -26,7 +26,6 @@ import { // errors import { - OwnableCannotSetZeroAddressAsOwner, ERC725X_InsufficientBalance, ERC725X_UnknownOperationType, ERC725X_MsgValueDisallowedInStaticCall, @@ -38,7 +37,6 @@ import { ERC725X_ExecuteParametersEmptyArray } from "./errors.sol"; - /** * @title Deployable implementation with `constructor` of ERC725X sub-standard, a generic executor. * @author Fabian Vogelsteller and , , , @@ -47,7 +45,8 @@ import { * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -contract ERC725X is OwnableUnset, ERC165, IERC725X { +// TODO: replace by Ownable from OpenZeppelin +contract ERC725X is Ownable, ERC165, IERC725X { /** * @notice Deploying an ERC725X smart contract and setting address `initialOwner` as the contract owner. * @dev Deploy a new ERC725X contract with the provided `initialOwner` as the contract {owner}. @@ -57,11 +56,12 @@ contract ERC725X is OwnableUnset, ERC165, IERC725X { * - `initialOwner` CANNOT be the zero address. */ constructor(address initialOwner) payable { - if (initialOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - OwnableUnset._setOwner(initialOwner); - } + require( + initialOwner != address(0), + "Ownable: new owner is the zero address" + ); + Ownable._transferOwnership(initialOwner); + } /** * @inheritdoc ERC165 diff --git a/implementations/contracts/ERC725XInitAbstract.sol b/implementations/contracts/ERC725XInitAbstract.sol index 2a90657d..f2f49a2e 100644 --- a/implementations/contracts/ERC725XInitAbstract.sol +++ b/implementations/contracts/ERC725XInitAbstract.sol @@ -11,12 +11,11 @@ import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; // modules -import { - Initializable -} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; // TODO: is there an Upgradable version? Is it needed? Double check in OZ package import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; -import {OwnableUnset} from "./custom/OwnableUnset.sol"; +import { + OwnableUpgradeable +} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; // constants import { @@ -30,7 +29,6 @@ import { // errors import { - OwnableCannotSetZeroAddressAsOwner, ERC725X_InsufficientBalance, ERC725X_UnknownOperationType, ERC725X_MsgValueDisallowedInStaticCall, @@ -42,9 +40,6 @@ import { ERC725X_ExecuteParametersEmptyArray } from "./errors.sol"; - - - /** * @title Inheritable Proxy Implementation of ERC725X sub-standard, a generic executor. * @author Fabian Vogelsteller and , , , @@ -53,7 +48,7 @@ import { * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -abstract contract ERC725XInitAbstract is Initializable, OwnableUnset, ERC165, IERC725X { +abstract contract ERC725XInitAbstract is OwnableUpgradeable, ERC165, IERC725X { /** * @dev Internal function to initialize the contract with the provided `initialOwner` as the contract {owner}. * @param initialOwner the owner of the contract. @@ -64,10 +59,11 @@ abstract contract ERC725XInitAbstract is Initializable, OwnableUnset, ERC165, IE function _initialize( address initialOwner ) internal virtual onlyInitializing { - if (initialOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - OwnableUnset._setOwner(initialOwner); + require( + initialOwner != address(0), + "Ownable: new owner is the zero address" + ); + OwnableUpgradeable._transferOwnership(initialOwner); } /** diff --git a/implementations/contracts/ERC725Y.sol b/implementations/contracts/ERC725Y.sol index 9fab664a..bf1edafe 100644 --- a/implementations/contracts/ERC725Y.sol +++ b/implementations/contracts/ERC725Y.sol @@ -7,14 +7,13 @@ import {IERC725Y} from "./interfaces/IERC725Y.sol"; // modules import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; -import {OwnableUnset} from "./custom/OwnableUnset.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; // constants import {_INTERFACEID_ERC725Y} from "./constants.sol"; // errors import { - OwnableCannotSetZeroAddressAsOwner, ERC725Y_MsgValueDisallowed, ERC725Y_DataKeysValuesLengthMismatch, ERC725Y_DataKeysValuesEmptyArray @@ -26,8 +25,8 @@ import { * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ -contract ERC725Y is OwnableUnset, ERC165, IERC725Y { - /** +contract ERC725Y is Ownable, ERC165, IERC725Y { + /** * @dev Map `bytes32` data keys to their `bytes` data values. */ mapping(bytes32 => bytes) internal _store; @@ -41,10 +40,11 @@ contract ERC725Y is OwnableUnset, ERC165, IERC725Y { * - `initialOwner` CANNOT be the zero address. */ constructor(address initialOwner) payable { - if (initialOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - OwnableUnset._setOwner(initialOwner); + require( + initialOwner != address(0), + "Ownable: new owner is the zero address" + ); + Ownable._transferOwnership(initialOwner); } /** diff --git a/implementations/contracts/ERC725YInitAbstract.sol b/implementations/contracts/ERC725YInitAbstract.sol index c8f3628f..444ddfce 100644 --- a/implementations/contracts/ERC725YInitAbstract.sol +++ b/implementations/contracts/ERC725YInitAbstract.sol @@ -6,18 +6,16 @@ import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IERC725Y} from "./interfaces/IERC725Y.sol"; // modules -import { - Initializable -} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; -import {OwnableUnset} from "./custom/OwnableUnset.sol"; +import { + OwnableUpgradeable +} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; // constants import {_INTERFACEID_ERC725Y} from "./constants.sol"; // errors import { - OwnableCannotSetZeroAddressAsOwner, ERC725Y_MsgValueDisallowed, ERC725Y_DataKeysValuesLengthMismatch, ERC725Y_DataKeysValuesEmptyArray @@ -29,8 +27,8 @@ import { * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ -abstract contract ERC725YInitAbstract is Initializable, OwnableUnset, ERC165, IERC725Y { - /** +abstract contract ERC725YInitAbstract is OwnableUpgradeable, ERC165, IERC725Y { + /** * @dev Map `bytes32` data keys to their `bytes` data values. */ mapping(bytes32 => bytes) internal _store; @@ -45,10 +43,11 @@ abstract contract ERC725YInitAbstract is Initializable, OwnableUnset, ERC165, IE function _initialize( address initialOwner ) internal virtual onlyInitializing { - if (initialOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - OwnableUnset._setOwner(initialOwner); + require( + initialOwner != address(0), + "Ownable: new owner is the zero address" + ); + OwnableUpgradeable._transferOwnership(initialOwner); } /** diff --git a/implementations/contracts/custom/OwnableUnset.sol b/implementations/contracts/custom/OwnableUnset.sol deleted file mode 100644 index 4c8ee3f3..00000000 --- a/implementations/contracts/custom/OwnableUnset.sol +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; - -// errors -import { - OwnableCannotSetZeroAddressAsOwner, - OwnableCallerNotTheOwner -} from "../errors.sol"; - -/** - * @title OwnableUnset - * @dev modified version of OpenZeppelin implementation, where: - * - _setOwner(address) function is internal, so this function can be used in constructor - * of contracts implementation (instead of using transferOwnership(address) - * - the contract does not inherit from Context contract - */ -abstract contract OwnableUnset { - address private _owner; - - event OwnershipTransferred( - address indexed previousOwner, - address indexed newOwner - ); - - /** - * @dev Returns the address of the current owner. - */ - function owner() public view virtual returns (address) { - return _owner; - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - _checkOwner(); - _; - } - - /** - * @dev Leaves the contract without owner. It will not be possible to call - * `onlyOwner` functions anymore. Can only be called by the current owner. - * - * NOTE: Renouncing ownership will leave the contract without an owner, - * thereby removing any functionality that is only available to the owner. - */ - function renounceOwnership() public virtual onlyOwner { - _setOwner(address(0)); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Can only be called by the current owner. - */ - function transferOwnership(address newOwner) public virtual onlyOwner { - if (newOwner == address(0)) { - revert OwnableCannotSetZeroAddressAsOwner(); - } - _setOwner(newOwner); - } - - /** - * @dev Throws if the sender is not the owner. - */ - function _checkOwner() internal view virtual { - if (owner() != msg.sender) { - revert OwnableCallerNotTheOwner(msg.sender); - } - } - - /** - * @dev Changes the owner if `newOwner` and oldOwner are different - * This pattern is useful in inheritance. - */ - function _setOwner(address newOwner) internal virtual { - if (newOwner != owner()) { - emit OwnershipTransferred(_owner, newOwner); - _owner = newOwner; - } - } -} diff --git a/implementations/contracts/errors.sol b/implementations/contracts/errors.sol index f641525e..ce599ea5 100644 --- a/implementations/contracts/errors.sol +++ b/implementations/contracts/errors.sol @@ -1,18 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.4; -/** - * @dev Reverts when trying to set `address(0)` as the contract owner when deploying the contract, - * initializing it or transferring ownership of the contract. - */ -error OwnableCannotSetZeroAddressAsOwner(); - -/** - * @dev Reverts when only the owner is allowed to call the function. - * @param callerAddress The address that tried to make the call. - */ -error OwnableCallerNotTheOwner(address callerAddress); - /** * @dev Reverts when trying to send more native tokens `value` than available in current `balance`. * @param balance The balance of native tokens of the ERC725X smart contract. diff --git a/implementations/test/ERC725.test.ts b/implementations/test/ERC725.test.ts index 70a12f66..3860b5e8 100644 --- a/implementations/test/ERC725.test.ts +++ b/implementations/test/ERC725.test.ts @@ -32,9 +32,8 @@ describe('ERC725', () => { const contractToDeploy = new ERC725__factory(accounts[0]); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( - contractToDeploy, - 'OwnableCannotSetZeroAddressAsOwner', + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWith( + 'Ownable: new owner is the zero address', ); }); @@ -111,7 +110,7 @@ describe('ERC725', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( context.erc725['initialize(address)'](ethers.constants.AddressZero), - ).to.be.revertedWithCustomError(context.erc725, 'OwnableCannotSetZeroAddressAsOwner'); + ).to.be.revertedWith('Ownable: new owner is the zero address'); }); it("should initialize the contract with the owner's address", async () => { diff --git a/implementations/test/ERC725X.behaviour.ts b/implementations/test/ERC725X.behaviour.ts index cc25c947..1027c302 100644 --- a/implementations/test/ERC725X.behaviour.ts +++ b/implementations/test/ERC725X.behaviour.ts @@ -124,7 +124,7 @@ export const shouldBehaveLikeERC725X = (buildContext: () => Promise Promise Promise { await expect( context.erc725X.connect(context.accounts.anyone).renounceOwnership(), - ).to.be.revertedWithCustomError(context.erc725X, 'OwnableCallerNotTheOwner'); + ).to.be.revertedWith("Ownable: caller is not the owner"); }); }); }); @@ -204,7 +204,7 @@ export const shouldBehaveLikeERC725X = (buildContext: () => Promise Promise { const contractToDeploy = new ERC725X__factory(accounts.owner); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( - contractToDeploy, - 'OwnableCannotSetZeroAddressAsOwner', + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWith( + 'Ownable: new owner is the zero address', ); }); @@ -126,7 +125,7 @@ describe('ERC725X', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( context.erc725X['initialize(address)'](ethers.constants.AddressZero), - ).to.be.revertedWithCustomError(context.erc725X, 'OwnableCannotSetZeroAddressAsOwner'); + ).to.be.revertedWith('Ownable: new owner is the zero address'); }); describe('when initializing the contract', () => { diff --git a/implementations/test/ERC725Y.behaviour.ts b/implementations/test/ERC725Y.behaviour.ts index aebdd708..28e0dd4c 100644 --- a/implementations/test/ERC725Y.behaviour.ts +++ b/implementations/test/ERC725Y.behaviour.ts @@ -73,7 +73,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise Promise Promise { await expect( context.erc725Y.connect(context.accounts.anyone).renounceOwnership(), - ).to.be.revertedWithCustomError(context.erc725Y, 'OwnableCallerNotTheOwner'); + ).to.be.revertedWith("Ownable: caller is not the owner"); }); }); }); @@ -176,7 +176,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise Promise { const contractToDeploy = new ERC725Y__factory(accounts.owner); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( - contractToDeploy, - 'OwnableCannotSetZeroAddressAsOwner', + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWith( + 'Ownable: new owner is the zero address', ); }); @@ -114,7 +113,7 @@ describe('ERC725Y', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( context.erc725Y['initialize(address)'](ethers.constants.AddressZero), - ).to.be.revertedWithCustomError(context.erc725Y, 'OwnableCannotSetZeroAddressAsOwner'); + ).to.be.revertedWith('Ownable: new owner is the zero address'); }); describe('when initializing the contract', () => { From f77f9a2c3beec7aa15d27dff69252e0a5901918b Mon Sep 17 00:00:00 2001 From: CJ42 Date: Thu, 22 Aug 2024 10:51:53 +0100 Subject: [PATCH 05/19] refactor!: use `ERC165Upgradeable` for the Init version --- implementations/contracts/ERC725.sol | 4 ---- implementations/contracts/ERC725InitAbstract.sol | 3 --- implementations/contracts/ERC725X.sol | 4 +--- implementations/contracts/ERC725XInit.sol | 2 -- .../contracts/ERC725XInitAbstract.sol | 16 ++++++++++------ implementations/contracts/ERC725Y.sol | 3 +-- .../contracts/ERC725YInitAbstract.sol | 15 ++++++++++----- .../contracts/interfaces/IERC725X.sol | 5 +---- .../contracts/interfaces/IERC725Y.sol | 5 +---- implementations/test/ERC725X.behaviour.ts | 8 ++++---- implementations/test/ERC725Y.behaviour.ts | 8 ++++---- 11 files changed, 32 insertions(+), 41 deletions(-) diff --git a/implementations/contracts/ERC725.sol b/implementations/contracts/ERC725.sol index 26b39430..7e1ed219 100644 --- a/implementations/contracts/ERC725.sol +++ b/implementations/contracts/ERC725.sol @@ -2,13 +2,9 @@ pragma solidity ^0.8.5; // modules -import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC725X} from "./ERC725X.sol"; import {ERC725Y} from "./ERC725Y.sol"; -// constants -import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "./constants.sol"; - /** * @title ERC725 bundle. * @author Fabian Vogelsteller diff --git a/implementations/contracts/ERC725InitAbstract.sol b/implementations/contracts/ERC725InitAbstract.sol index d5d744b0..a02fdcdd 100644 --- a/implementations/contracts/ERC725InitAbstract.sol +++ b/implementations/contracts/ERC725InitAbstract.sol @@ -8,9 +8,6 @@ import { import {ERC725XInitAbstract} from "./ERC725XInitAbstract.sol"; import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; -// constants -import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "./constants.sol"; - /** * @title Inheritable Proxy Implementation of ERC725 bundle * @author Fabian Vogelsteller diff --git a/implementations/contracts/ERC725X.sol b/implementations/contracts/ERC725X.sol index b63d5d9c..0846639f 100644 --- a/implementations/contracts/ERC725X.sol +++ b/implementations/contracts/ERC725X.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.5; // interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IERC725X} from "./interfaces/IERC725X.sol"; // libraries @@ -45,7 +44,6 @@ import { * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -// TODO: replace by Ownable from OpenZeppelin contract ERC725X is Ownable, ERC165, IERC725X { /** * @notice Deploying an ERC725X smart contract and setting address `initialOwner` as the contract owner. @@ -68,7 +66,7 @@ contract ERC725X is Ownable, ERC165, IERC725X { */ function supportsInterface( bytes4 interfaceId - ) public view virtual override(IERC165, ERC165) returns (bool) { + ) public view virtual override returns (bool) { return interfaceId == _INTERFACEID_ERC725X || super.supportsInterface(interfaceId); diff --git a/implementations/contracts/ERC725XInit.sol b/implementations/contracts/ERC725XInit.sol index f9020f22..be72f55b 100644 --- a/implementations/contracts/ERC725XInit.sol +++ b/implementations/contracts/ERC725XInit.sol @@ -36,6 +36,4 @@ contract ERC725XInit is ERC725XInitAbstract { ) public payable virtual initializer { ERC725XInitAbstract._initialize(initialOwner); } - - } diff --git a/implementations/contracts/ERC725XInitAbstract.sol b/implementations/contracts/ERC725XInitAbstract.sol index f2f49a2e..ecbd4043 100644 --- a/implementations/contracts/ERC725XInitAbstract.sol +++ b/implementations/contracts/ERC725XInitAbstract.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.5; // interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IERC725X} from "./interfaces/IERC725X.sol"; // libraries @@ -11,8 +10,9 @@ import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; // modules -// TODO: is there an Upgradable version? Is it needed? Double check in OZ package -import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { + ERC165Upgradeable +} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; @@ -48,7 +48,11 @@ import { * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -abstract contract ERC725XInitAbstract is OwnableUpgradeable, ERC165, IERC725X { +abstract contract ERC725XInitAbstract is + OwnableUpgradeable, + ERC165Upgradeable, + IERC725X +{ /** * @dev Internal function to initialize the contract with the provided `initialOwner` as the contract {owner}. * @param initialOwner the owner of the contract. @@ -67,11 +71,11 @@ abstract contract ERC725XInitAbstract is OwnableUpgradeable, ERC165, IERC725X { } /** - * @inheritdoc ERC165 + * @inheritdoc ERC165Upgradeable */ function supportsInterface( bytes4 interfaceId - ) public view virtual override(IERC165, ERC165) returns (bool) { + ) public view virtual override returns (bool) { return interfaceId == _INTERFACEID_ERC725X || super.supportsInterface(interfaceId); diff --git a/implementations/contracts/ERC725Y.sol b/implementations/contracts/ERC725Y.sol index bf1edafe..e8f90eef 100644 --- a/implementations/contracts/ERC725Y.sol +++ b/implementations/contracts/ERC725Y.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.4; // interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IERC725Y} from "./interfaces/IERC725Y.sol"; // modules @@ -195,7 +194,7 @@ contract ERC725Y is Ownable, ERC165, IERC725Y { */ function supportsInterface( bytes4 interfaceId - ) public view virtual override(IERC165, ERC165) returns (bool) { + ) public view virtual override returns (bool) { return interfaceId == _INTERFACEID_ERC725Y || super.supportsInterface(interfaceId); diff --git a/implementations/contracts/ERC725YInitAbstract.sol b/implementations/contracts/ERC725YInitAbstract.sol index 444ddfce..80ed1424 100644 --- a/implementations/contracts/ERC725YInitAbstract.sol +++ b/implementations/contracts/ERC725YInitAbstract.sol @@ -2,11 +2,12 @@ pragma solidity ^0.8.4; // interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IERC725Y} from "./interfaces/IERC725Y.sol"; // modules -import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { + ERC165Upgradeable +} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; @@ -27,7 +28,11 @@ import { * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ -abstract contract ERC725YInitAbstract is OwnableUpgradeable, ERC165, IERC725Y { +abstract contract ERC725YInitAbstract is + OwnableUpgradeable, + ERC165Upgradeable, + IERC725Y +{ /** * @dev Map `bytes32` data keys to their `bytes` data values. */ @@ -194,11 +199,11 @@ abstract contract ERC725YInitAbstract is OwnableUpgradeable, ERC165, IERC725Y { } /** - * @inheritdoc ERC165 + * @inheritdoc ERC165Upgradeable */ function supportsInterface( bytes4 interfaceId - ) public view virtual override(IERC165, ERC165) returns (bool) { + ) public view virtual override returns (bool) { return interfaceId == _INTERFACEID_ERC725Y || super.supportsInterface(interfaceId); diff --git a/implementations/contracts/interfaces/IERC725X.sol b/implementations/contracts/interfaces/IERC725X.sol index e21b27c8..4197710d 100644 --- a/implementations/contracts/interfaces/IERC725X.sol +++ b/implementations/contracts/interfaces/IERC725X.sol @@ -1,9 +1,6 @@ // SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; -// interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; - /** * @title The interface for the ERC725X sub-standard, a generic executor. * @dev ERC725X provides the ability to call arbitrary functions on any other smart contract (including itself). @@ -11,7 +8,7 @@ import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; * It also allows to deploy and create new contracts via both the `create` and `create2` opcodes. * This is the basis for a smart contract based account system, but could also be used as a proxy account system. */ -interface IERC725X is IERC165 { +interface IERC725X { /** * @notice Deployed new contract at address `contractAddress` and funded with `value` wei (deployed using opcode: `operationType`). * @dev Emitted when a new contract was created and deployed. diff --git a/implementations/contracts/interfaces/IERC725Y.sol b/implementations/contracts/interfaces/IERC725Y.sol index 53815fae..6ebbc25d 100644 --- a/implementations/contracts/interfaces/IERC725Y.sol +++ b/implementations/contracts/interfaces/IERC725Y.sol @@ -1,15 +1,12 @@ // SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; -// interfaces -import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; - /** * @title The interface for ERC725Y sub-standard, a generic data key/value store. * @dev ERC725Y provides the ability to set arbitrary data key/value pairs that can be changed over time. * It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage. */ -interface IERC725Y is IERC165 { +interface IERC725Y { /** * @notice The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`. * @dev Emitted when data at a specific `dataKey` was changed to a new value `dataValue`. diff --git a/implementations/test/ERC725X.behaviour.ts b/implementations/test/ERC725X.behaviour.ts index 1027c302..1f145546 100644 --- a/implementations/test/ERC725X.behaviour.ts +++ b/implementations/test/ERC725X.behaviour.ts @@ -134,7 +134,7 @@ export const shouldBehaveLikeERC725X = (buildContext: () => Promise Promise { await expect( context.erc725X.connect(context.accounts.anyone).renounceOwnership(), - ).to.be.revertedWith("Ownable: caller is not the owner"); + ).to.be.revertedWith('Ownable: caller is not the owner'); }); }); }); @@ -204,7 +204,7 @@ export const shouldBehaveLikeERC725X = (buildContext: () => Promise Promise Promise Promise { await expect( context.erc725Y.connect(context.accounts.anyone).renounceOwnership(), - ).to.be.revertedWith("Ownable: caller is not the owner"); + ).to.be.revertedWith('Ownable: caller is not the owner'); }); }); }); @@ -176,7 +176,7 @@ export const shouldBehaveLikeERC725Y = (buildContext: () => Promise Promise Date: Tue, 3 Sep 2024 01:50:54 +0900 Subject: [PATCH 06/19] refactor: remove unecessary `OwnableUpgradeable` in ERC725InitAbstract inheritance --- implementations/contracts/ERC725InitAbstract.sol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/implementations/contracts/ERC725InitAbstract.sol b/implementations/contracts/ERC725InitAbstract.sol index a02fdcdd..e05b0e25 100644 --- a/implementations/contracts/ERC725InitAbstract.sol +++ b/implementations/contracts/ERC725InitAbstract.sol @@ -2,9 +2,6 @@ pragma solidity ^0.8.5; // modules -import { - OwnableUpgradeable -} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {ERC725XInitAbstract} from "./ERC725XInitAbstract.sol"; import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; @@ -16,7 +13,6 @@ import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; * @custom:warning This implementation does not have by default a `receive()` or `fallback()` function. */ abstract contract ERC725InitAbstract is - OwnableUpgradeable, ERC725XInitAbstract, ERC725YInitAbstract { @@ -42,7 +38,7 @@ abstract contract ERC725InitAbstract is initialOwner != address(0), "Ownable: new owner is the zero address" ); - OwnableUpgradeable._transferOwnership(initialOwner); + _transferOwnership(initialOwner); } /** From f53e7ee0e64574a3c479090ae5bbab96ef5069cd Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 3 Sep 2024 01:52:54 +0900 Subject: [PATCH 07/19] build: upgrade OZ dependency to latest patch version --- implementations/package-lock.json | 28 ++++++++++++++-------------- implementations/package.json | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index e9da63bd..95428feb 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -9,8 +9,8 @@ "version": "7.0.0", "license": "Apache-2.0", "dependencies": { - "@openzeppelin/contracts": "^4.9.3", - "@openzeppelin/contracts-upgradeable": "^4.9.3", + "@openzeppelin/contracts": "^4.9.6", + "@openzeppelin/contracts-upgradeable": "^4.9.6", "solidity-bytes-utils": "0.8.0" }, "devDependencies": { @@ -2158,14 +2158,14 @@ } }, "node_modules/@openzeppelin/contracts": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", - "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==" + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.6.tgz", + "integrity": "sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==" }, "node_modules/@openzeppelin/contracts-upgradeable": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.3.tgz", - "integrity": "sha512-jjaHAVRMrE4UuZNfDwjlLGDxTHWIOwTJS2ldnc278a0gevfXfPr8hxKEVBGFBE96kl2G3VHDZhUimw/+G3TG2A==" + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz", + "integrity": "sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==" }, "node_modules/@scure/base": { "version": "1.1.1", @@ -14876,14 +14876,14 @@ } }, "@openzeppelin/contracts": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", - "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==" + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.6.tgz", + "integrity": "sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==" }, "@openzeppelin/contracts-upgradeable": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.3.tgz", - "integrity": "sha512-jjaHAVRMrE4UuZNfDwjlLGDxTHWIOwTJS2ldnc278a0gevfXfPr8hxKEVBGFBE96kl2G3VHDZhUimw/+G3TG2A==" + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz", + "integrity": "sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==" }, "@scure/base": { "version": "1.1.1", diff --git a/implementations/package.json b/implementations/package.json index 5f58a3f2..f4c0978a 100644 --- a/implementations/package.json +++ b/implementations/package.json @@ -34,8 +34,8 @@ "author": "Fabian Vogelsteller ", "license": "Apache-2.0", "dependencies": { - "@openzeppelin/contracts": "^4.9.3", - "@openzeppelin/contracts-upgradeable": "^4.9.3", + "@openzeppelin/contracts": "^4.9.6", + "@openzeppelin/contracts-upgradeable": "^4.9.6", "solidity-bytes-utils": "0.8.0" }, "devDependencies": { From 5b8c2a18013c0336755b17f9af1742246eef193e Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 3 Sep 2024 02:30:55 +0900 Subject: [PATCH 08/19] refactor: re-add custom errors for setting zero address as owner on deployment / initialization --- implementations/contracts/ERC725InitAbstract.sol | 10 ++++++---- implementations/contracts/ERC725X.sol | 10 +++++----- implementations/contracts/ERC725XInitAbstract.sol | 10 +++++----- implementations/contracts/ERC725Y.sol | 10 +++++----- implementations/contracts/ERC725YInitAbstract.sol | 10 +++++----- implementations/contracts/errors.sol | 5 +++++ implementations/test/ERC725.test.ts | 6 +++--- implementations/test/ERC725X.test.ts | 6 ++---- implementations/test/ERC725Y.test.ts | 6 +++--- 9 files changed, 39 insertions(+), 34 deletions(-) diff --git a/implementations/contracts/ERC725InitAbstract.sol b/implementations/contracts/ERC725InitAbstract.sol index e05b0e25..718670f8 100644 --- a/implementations/contracts/ERC725InitAbstract.sol +++ b/implementations/contracts/ERC725InitAbstract.sol @@ -5,6 +5,9 @@ pragma solidity ^0.8.5; import {ERC725XInitAbstract} from "./ERC725XInitAbstract.sol"; import {ERC725YInitAbstract} from "./ERC725YInitAbstract.sol"; +// errors +import {OwnableCannotSetZeroAddressAsOwner} from "./errors.sol"; + /** * @title Inheritable Proxy Implementation of ERC725 bundle * @author Fabian Vogelsteller @@ -34,10 +37,9 @@ abstract contract ERC725InitAbstract is override(ERC725XInitAbstract, ERC725YInitAbstract) onlyInitializing { - require( - initialOwner != address(0), - "Ownable: new owner is the zero address" - ); + if (initialOwner == address(0)) { + revert OwnableCannotSetZeroAddressAsOwner(); + } _transferOwnership(initialOwner); } diff --git a/implementations/contracts/ERC725X.sol b/implementations/contracts/ERC725X.sol index 0846639f..928a23ec 100644 --- a/implementations/contracts/ERC725X.sol +++ b/implementations/contracts/ERC725X.sol @@ -33,7 +33,8 @@ import { ERC725X_ContractDeploymentFailed, ERC725X_NoContractBytecodeProvided, ERC725X_ExecuteParametersLengthMismatch, - ERC725X_ExecuteParametersEmptyArray + ERC725X_ExecuteParametersEmptyArray, + OwnableCannotSetZeroAddressAsOwner } from "./errors.sol"; /** @@ -54,10 +55,9 @@ contract ERC725X is Ownable, ERC165, IERC725X { * - `initialOwner` CANNOT be the zero address. */ constructor(address initialOwner) payable { - require( - initialOwner != address(0), - "Ownable: new owner is the zero address" - ); + if (initialOwner == address(0)) { + revert OwnableCannotSetZeroAddressAsOwner(); + } Ownable._transferOwnership(initialOwner); } diff --git a/implementations/contracts/ERC725XInitAbstract.sol b/implementations/contracts/ERC725XInitAbstract.sol index ecbd4043..a109ee68 100644 --- a/implementations/contracts/ERC725XInitAbstract.sol +++ b/implementations/contracts/ERC725XInitAbstract.sol @@ -37,7 +37,8 @@ import { ERC725X_ContractDeploymentFailed, ERC725X_NoContractBytecodeProvided, ERC725X_ExecuteParametersLengthMismatch, - ERC725X_ExecuteParametersEmptyArray + ERC725X_ExecuteParametersEmptyArray, + OwnableCannotSetZeroAddressAsOwner } from "./errors.sol"; /** @@ -63,10 +64,9 @@ abstract contract ERC725XInitAbstract is function _initialize( address initialOwner ) internal virtual onlyInitializing { - require( - initialOwner != address(0), - "Ownable: new owner is the zero address" - ); + if (initialOwner == address(0)) { + revert OwnableCannotSetZeroAddressAsOwner(); + } OwnableUpgradeable._transferOwnership(initialOwner); } diff --git a/implementations/contracts/ERC725Y.sol b/implementations/contracts/ERC725Y.sol index e8f90eef..eefdb36c 100644 --- a/implementations/contracts/ERC725Y.sol +++ b/implementations/contracts/ERC725Y.sol @@ -15,7 +15,8 @@ import {_INTERFACEID_ERC725Y} from "./constants.sol"; import { ERC725Y_MsgValueDisallowed, ERC725Y_DataKeysValuesLengthMismatch, - ERC725Y_DataKeysValuesEmptyArray + ERC725Y_DataKeysValuesEmptyArray, + OwnableCannotSetZeroAddressAsOwner } from "./errors.sol"; /** @@ -39,10 +40,9 @@ contract ERC725Y is Ownable, ERC165, IERC725Y { * - `initialOwner` CANNOT be the zero address. */ constructor(address initialOwner) payable { - require( - initialOwner != address(0), - "Ownable: new owner is the zero address" - ); + if (initialOwner == address(0)) { + revert OwnableCannotSetZeroAddressAsOwner(); + } Ownable._transferOwnership(initialOwner); } diff --git a/implementations/contracts/ERC725YInitAbstract.sol b/implementations/contracts/ERC725YInitAbstract.sol index 80ed1424..5cf30959 100644 --- a/implementations/contracts/ERC725YInitAbstract.sol +++ b/implementations/contracts/ERC725YInitAbstract.sol @@ -19,7 +19,8 @@ import {_INTERFACEID_ERC725Y} from "./constants.sol"; import { ERC725Y_MsgValueDisallowed, ERC725Y_DataKeysValuesLengthMismatch, - ERC725Y_DataKeysValuesEmptyArray + ERC725Y_DataKeysValuesEmptyArray, + OwnableCannotSetZeroAddressAsOwner } from "./errors.sol"; /** @@ -48,10 +49,9 @@ abstract contract ERC725YInitAbstract is function _initialize( address initialOwner ) internal virtual onlyInitializing { - require( - initialOwner != address(0), - "Ownable: new owner is the zero address" - ); + if (initialOwner == address(0)) { + revert OwnableCannotSetZeroAddressAsOwner(); + } OwnableUpgradeable._transferOwnership(initialOwner); } diff --git a/implementations/contracts/errors.sol b/implementations/contracts/errors.sol index ce599ea5..275be4a4 100644 --- a/implementations/contracts/errors.sol +++ b/implementations/contracts/errors.sol @@ -71,3 +71,8 @@ error ERC725Y_DataKeysValuesEmptyArray(); * @dev Reverts when sending value to the {setData} or {setDataBatch} function. */ error ERC725Y_MsgValueDisallowed(); + +/** + * @dev Reverts when trying to set `address(0)` as the contract owner when deploying the contract or initializing it. + */ +error OwnableCannotSetZeroAddressAsOwner(); diff --git a/implementations/test/ERC725.test.ts b/implementations/test/ERC725.test.ts index 3860b5e8..23d7ec1f 100644 --- a/implementations/test/ERC725.test.ts +++ b/implementations/test/ERC725.test.ts @@ -32,8 +32,8 @@ describe('ERC725', () => { const contractToDeploy = new ERC725__factory(accounts[0]); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWith( - 'Ownable: new owner is the zero address', + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( + contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner', ); }); @@ -110,7 +110,7 @@ describe('ERC725', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( context.erc725['initialize(address)'](ethers.constants.AddressZero), - ).to.be.revertedWith('Ownable: new owner is the zero address'); + ).to.be.revertedWithCustomError(context.erc725, 'OwnableCannotSetZeroAddressAsOwner'); }); it("should initialize the contract with the owner's address", async () => { diff --git a/implementations/test/ERC725X.test.ts b/implementations/test/ERC725X.test.ts index ada0fbb9..34378a72 100644 --- a/implementations/test/ERC725X.test.ts +++ b/implementations/test/ERC725X.test.ts @@ -35,9 +35,7 @@ describe('ERC725X', () => { const contractToDeploy = new ERC725X__factory(accounts.owner); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWith( - 'Ownable: new owner is the zero address', - ); + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError(contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner'); }); it('should deploy and fund the contract with `msg.value`', async () => { @@ -125,7 +123,7 @@ describe('ERC725X', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( context.erc725X['initialize(address)'](ethers.constants.AddressZero), - ).to.be.revertedWith('Ownable: new owner is the zero address'); + ).to.be.revertedWithCustomError(context.erc725X, 'OwnableCannotSetZeroAddressAsOwner'); }); describe('when initializing the contract', () => { diff --git a/implementations/test/ERC725Y.test.ts b/implementations/test/ERC725Y.test.ts index 9083ac83..e66e47b7 100644 --- a/implementations/test/ERC725Y.test.ts +++ b/implementations/test/ERC725Y.test.ts @@ -44,8 +44,8 @@ describe('ERC725Y', () => { const contractToDeploy = new ERC725Y__factory(accounts.owner); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWith( - 'Ownable: new owner is the zero address', + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( + contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner', ); }); @@ -113,7 +113,7 @@ describe('ERC725Y', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( context.erc725Y['initialize(address)'](ethers.constants.AddressZero), - ).to.be.revertedWith('Ownable: new owner is the zero address'); + ).to.be.revertedWithCustomError(context.erc725Y, 'OwnableCannotSetZeroAddressAsOwner'); }); describe('when initializing the contract', () => { From bfa19d2adfaa9f8aa48eef66d6428e3c71b37ec8 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 3 Sep 2024 02:47:15 +0900 Subject: [PATCH 09/19] chore: upgrade linter dependencies --- .../contracts/helpers/ConstantsChecker.sol | 4 +- .../contracts/helpers/CustomRevertTest.sol | 4 +- implementations/package-lock.json | 1016 ++++++++++++++--- implementations/package.json | 10 +- implementations/test/ERC725.test.ts | 3 +- implementations/test/ERC725X.test.ts | 5 +- implementations/test/ERC725Y.test.ts | 3 +- 7 files changed, 891 insertions(+), 154 deletions(-) diff --git a/implementations/contracts/helpers/ConstantsChecker.sol b/implementations/contracts/helpers/ConstantsChecker.sol index e38769bc..9c9e9652 100644 --- a/implementations/contracts/helpers/ConstantsChecker.sol +++ b/implementations/contracts/helpers/ConstantsChecker.sol @@ -13,7 +13,7 @@ import {_INTERFACEID_ERC725X, _INTERFACEID_ERC725Y} from "../constants.sol"; */ contract ConstantsChecker { function getERC725XInterfaceID() public pure returns (bytes4) { - // solhint-disable-next-line custom-errors + // solhint-disable-next-line gas-custom-errors require( _INTERFACEID_ERC725X == type(IERC725X).interfaceId, "hardcoded _INTERFACEID_ERC725X in `constants.sol` does not match `type(IERC725X).interfaceId`" @@ -22,7 +22,7 @@ contract ConstantsChecker { } function getERC725YInterfaceID() public pure returns (bytes4) { - // solhint-disable-next-line custom-errors + // solhint-disable-next-line gas-custom-errors require( _INTERFACEID_ERC725Y == type(IERC725Y).interfaceId, "hardcoded _INTERFACEID_ERC725Y in `constants.sol` does not match `type(IERC725Y).interfaceId`" diff --git a/implementations/contracts/helpers/CustomRevertTest.sol b/implementations/contracts/helpers/CustomRevertTest.sol index 01f46afd..dc8c4e02 100644 --- a/implementations/contracts/helpers/CustomRevertTest.sol +++ b/implementations/contracts/helpers/CustomRevertTest.sol @@ -13,12 +13,12 @@ contract RevertTester { } function revertMeWithStringView() public pure { - // solhint-disable-next-line custom-errors + // solhint-disable-next-line gas-custom-errors revert("I reverted"); } function revertMeWithStringErrorNotView() public pure { - // solhint-disable-next-line custom-errors + // solhint-disable-next-line gas-custom-errors revert("I reverted"); } diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 95428feb..71b97a0a 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -19,15 +19,15 @@ "@typescript-eslint/eslint-plugin": "^5.59.11", "chai": "^4.2.0", "coveralls": "^3.1.1", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", "eth-create2-calculator": "^1.1.5", "hardhat": "^2.13.1", "hardhat-packager": "^1.4.2", "npm-run-all": "^4.1.5", - "prettier": "^2.8.8", - "prettier-plugin-solidity": "^1.1.3", - "solhint": "^3.6.2", + "prettier": "^3.3.3", + "prettier-plugin-solidity": "^1.4.1", + "solhint": "^5.0.3", "standard-version": "^9.3.1", "ts-node": "^10.9.1" } @@ -2167,6 +2167,53 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz", "integrity": "sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==" }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "dev": true, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "dev": true, + "dependencies": { + "graceful-fs": "4.2.10" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "dev": true, + "dependencies": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@scure/base": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", @@ -2311,6 +2358,18 @@ "node": ">=6" } }, + "node_modules/@sindresorhus/is": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", + "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@solidity-parser/parser": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.3.tgz", @@ -2321,6 +2380,18 @@ "antlr4ts": "^0.5.0-alpha.4" } }, + "node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, "node_modules/@truffle/hdwallet-provider": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-2.0.13.tgz", @@ -2488,6 +2559,12 @@ "@types/node": "*" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", @@ -3098,7 +3175,8 @@ "version": "0.5.0-alpha.4", "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/anymatch": { "version": "3.1.2", @@ -3629,6 +3707,33 @@ "node": ">= 0.8" } }, + "node_modules/cacheable-lookup": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", + "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "dev": true, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/cacheable-request": { + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "dev": true, + "dependencies": { + "@types/http-cache-semantics": "^4.0.2", + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.1", + "keyv": "^4.5.3", + "mimic-response": "^4.0.0", + "normalize-url": "^8.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -4079,6 +4184,16 @@ "typedarray": "^0.0.6" } }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "node_modules/conventional-changelog": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.25.tgz", @@ -4640,6 +4755,33 @@ "node": ">=0.10.0" } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/deep-eql": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.0.tgz", @@ -4669,6 +4811,15 @@ "dev": true, "peer": true }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/define-properties": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", @@ -5203,9 +5354,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -5215,21 +5366,30 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", "dev": true, "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" }, "engines": { - "node": ">=12.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } @@ -7164,6 +7324,15 @@ "node": ">= 0.12" } }, + "node_modules/form-data-encoder": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", + "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "dev": true, + "engines": { + "node": ">= 14.17" + } + }, "node_modules/fp-ts": { "version": "1.19.3", "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", @@ -7358,6 +7527,18 @@ "node": ">=4" } }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -7560,6 +7741,31 @@ "node": ">=8" } }, + "node_modules/got": { + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", + "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -8064,6 +8270,12 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -8111,6 +8323,31 @@ "npm": ">=1.3.7" } }, + "node_modules/http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/http2-wrapper/node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -8673,6 +8910,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -8832,6 +9075,15 @@ "node": ">=10.0.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -8850,6 +9102,21 @@ "graceful-fs": "^4.1.9" } }, + "node_modules/latest-version": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", + "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", + "dev": true, + "dependencies": { + "package-json": "^8.1.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", @@ -9094,6 +9361,18 @@ "get-func-name": "^2.0.0" } }, + "node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -9433,6 +9712,18 @@ "node": ">= 0.6" } }, + "node_modules/mimic-response": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", @@ -9909,6 +10200,18 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", + "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/npm-run-all": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", @@ -10041,6 +10344,15 @@ "node": ">=0.10.0" } }, + "node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true, + "engines": { + "node": ">=12.20" + } + }, "node_modules/p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -10089,6 +10401,36 @@ "node": ">=4" } }, + "node_modules/package-json": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", + "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==", + "dev": true, + "dependencies": { + "got": "^12.1.0", + "registry-auth-token": "^5.0.1", + "registry-url": "^6.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -10272,15 +10614,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -10299,51 +10641,32 @@ } }, "node_modules/prettier-plugin-solidity": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", - "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.1.tgz", + "integrity": "sha512-Mq8EtfacVZ/0+uDKTtHZGW3Aa7vEbX/BNx63hmVg6YTiTXSiuKP0amj0G6pGwjmLaOfymWh3QgXEZkjQbU8QRg==", "dev": true, "dependencies": { - "@solidity-parser/parser": "^0.16.0", - "semver": "^7.3.8", - "solidity-comments-extractor": "^0.0.7" + "@solidity-parser/parser": "^0.18.0", + "semver": "^7.5.4" }, "engines": { - "node": ">=12" + "node": ">=16" }, "peerDependencies": { - "prettier": ">=2.3.0 || >=3.0.0-alpha.0" + "prettier": ">=2.3.0" } }, "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", - "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "node_modules/prettier-plugin-solidity/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", + "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==", + "dev": true }, "node_modules/prettier-plugin-solidity/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -10351,12 +10674,6 @@ "node": ">=10" } }, - "node_modules/prettier-plugin-solidity/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -10392,6 +10709,12 @@ "node": ">=0.10.0" } }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -10494,6 +10817,30 @@ "node": ">= 0.8" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -10664,6 +11011,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/registry-auth-token": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", + "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==", + "dev": true, + "dependencies": { + "@pnpm/npm-conf": "^2.1.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/registry-url": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", + "dev": true, + "dependencies": { + "rc": "1.2.8" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/req-cwd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", @@ -10758,6 +11132,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "node_modules/resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", @@ -10765,7 +11145,22 @@ "dev": true, "peer": true, "engines": { - "node": ">=4" + "node": ">=4" + } + }, + "node_modules/responselike": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", + "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "dev": true, + "dependencies": { + "lowercase-keys": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/reusify": { @@ -11205,14 +11600,14 @@ } }, "node_modules/solhint": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", - "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-5.0.3.tgz", + "integrity": "sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ==", "dev": true, "dependencies": { - "@solidity-parser/parser": "^0.16.0", + "@solidity-parser/parser": "^0.18.0", "ajv": "^6.12.6", - "antlr4": "^4.11.0", + "antlr4": "^4.13.1-patch-1", "ast-parents": "^0.0.1", "chalk": "^4.1.2", "commander": "^10.0.0", @@ -11221,6 +11616,7 @@ "glob": "^8.0.3", "ignore": "^5.2.4", "js-yaml": "^4.1.0", + "latest-version": "^7.0.0", "lodash": "^4.17.21", "pluralize": "^8.0.0", "semver": "^7.5.2", @@ -11236,13 +11632,10 @@ } }, "node_modules/solhint/node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - } + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", + "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==", + "dev": true }, "node_modules/solhint/node_modules/ansi-regex": { "version": "5.0.1", @@ -11381,6 +11774,22 @@ "node": ">=10" } }, + "node_modules/solhint/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/solhint/node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -11434,12 +11843,6 @@ "@truffle/hdwallet-provider": "latest" } }, - "node_modules/solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, "node_modules/solidity-coverage": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", @@ -12015,6 +12418,28 @@ "get-port": "^3.1.0" } }, + "node_modules/synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/synckit/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true + }, "node_modules/table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", @@ -12651,6 +13076,21 @@ "node": ">=10" } }, + "node_modules/typechain/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -14885,6 +15325,38 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz", "integrity": "sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==" }, + "@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true + }, + "@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "dev": true + }, + "@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "dev": true, + "requires": { + "graceful-fs": "4.2.10" + } + }, + "@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "dev": true, + "requires": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + } + }, "@scure/base": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", @@ -14990,6 +15462,12 @@ "tslib": "^1.9.3" } }, + "@sindresorhus/is": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", + "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", + "dev": true + }, "@solidity-parser/parser": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.3.tgz", @@ -15000,6 +15478,15 @@ "antlr4ts": "^0.5.0-alpha.4" } }, + "@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "requires": { + "defer-to-connect": "^2.0.1" + } + }, "@truffle/hdwallet-provider": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-2.0.13.tgz", @@ -15145,6 +15632,12 @@ "@types/node": "*" } }, + "@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true + }, "@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", @@ -15587,7 +16080,8 @@ "version": "0.5.0-alpha.4", "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true + "dev": true, + "peer": true }, "anymatch": { "version": "3.1.2", @@ -16009,6 +16503,27 @@ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, + "cacheable-lookup": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", + "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "dev": true + }, + "cacheable-request": { + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "dev": true, + "requires": { + "@types/http-cache-semantics": "^4.0.2", + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.1", + "keyv": "^4.5.3", + "mimic-response": "^4.0.0", + "normalize-url": "^8.0.0", + "responselike": "^3.0.0" + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -16354,6 +16869,16 @@ "typedarray": "^0.0.6" } }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "conventional-changelog": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.25.tgz", @@ -16785,6 +17310,23 @@ } } }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "requires": { + "mimic-response": "^3.1.0" + }, + "dependencies": { + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + } + } + }, "deep-eql": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.0.tgz", @@ -16808,6 +17350,12 @@ "dev": true, "peer": true }, + "defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true + }, "define-properties": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", @@ -17495,19 +18043,20 @@ } }, "eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "requires": {} }, "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", "dev": true, "requires": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" } }, "eslint-scope": { @@ -18937,6 +19486,12 @@ "mime-types": "^2.1.12" } }, + "form-data-encoder": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", + "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "dev": true + }, "fp-ts": { "version": "1.19.3", "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", @@ -19093,6 +19648,12 @@ "dev": true, "peer": true }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, "get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -19249,6 +19810,25 @@ "slash": "^3.0.0" } }, + "got": { + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", + "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", + "dev": true, + "requires": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -19655,6 +20235,12 @@ } } }, + "http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, "http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -19697,6 +20283,24 @@ "sshpk": "^1.7.0" } }, + "http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dev": true, + "requires": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "dependencies": { + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true + } + } + }, "https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -20084,6 +20688,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "peer": true }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -20214,6 +20824,15 @@ "readable-stream": "^3.6.0" } }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -20229,6 +20848,15 @@ "graceful-fs": "^4.1.9" } }, + "latest-version": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", + "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", + "dev": true, + "requires": { + "package-json": "^8.1.0" + } + }, "lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", @@ -20419,6 +21047,12 @@ "get-func-name": "^2.0.0" } }, + "lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true + }, "lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -20677,6 +21311,12 @@ "mime-db": "1.52.0" } }, + "mimic-response": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", + "dev": true + }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", @@ -21034,6 +21674,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-url": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", + "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "dev": true + }, "npm-run-all": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", @@ -21138,6 +21784,12 @@ "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, + "p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -21171,6 +21823,26 @@ "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true }, + "package-json": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", + "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==", + "dev": true, + "requires": { + "got": "^12.1.0", + "registry-auth-token": "^5.0.1", + "registry-url": "^6.0.0", + "semver": "^7.3.7" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -21305,9 +21977,9 @@ "peer": true }, "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true }, "prettier-linter-helpers": { @@ -21320,47 +21992,25 @@ } }, "prettier-plugin-solidity": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", - "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.1.tgz", + "integrity": "sha512-Mq8EtfacVZ/0+uDKTtHZGW3Aa7vEbX/BNx63hmVg6YTiTXSiuKP0amj0G6pGwjmLaOfymWh3QgXEZkjQbU8QRg==", "dev": true, "requires": { - "@solidity-parser/parser": "^0.16.0", - "semver": "^7.3.8", - "solidity-comments-extractor": "^0.0.7" + "@solidity-parser/parser": "^0.18.0", + "semver": "^7.5.4" }, "dependencies": { "@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", + "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==", + "dev": true }, "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true } } @@ -21394,6 +22044,12 @@ "set-immediate-shim": "^1.0.1" } }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -21463,6 +22119,26 @@ "unpipe": "1.0.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true + } + } + }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -21596,6 +22272,24 @@ "functions-have-names": "^1.2.2" } }, + "registry-auth-token": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", + "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==", + "dev": true, + "requires": { + "@pnpm/npm-conf": "^2.1.0" + } + }, + "registry-url": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", + "dev": true, + "requires": { + "rc": "1.2.8" + } + }, "req-cwd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", @@ -21669,6 +22363,12 @@ "path-parse": "^1.0.6" } }, + "resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", @@ -21676,6 +22376,15 @@ "dev": true, "peer": true }, + "responselike": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", + "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "dev": true, + "requires": { + "lowercase-keys": "^3.0.0" + } + }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -21990,14 +22699,14 @@ } }, "solhint": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", - "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-5.0.3.tgz", + "integrity": "sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ==", "dev": true, "requires": { - "@solidity-parser/parser": "^0.16.0", + "@solidity-parser/parser": "^0.18.0", "ajv": "^6.12.6", - "antlr4": "^4.11.0", + "antlr4": "^4.13.1-patch-1", "ast-parents": "^0.0.1", "chalk": "^4.1.2", "commander": "^10.0.0", @@ -22006,6 +22715,7 @@ "glob": "^8.0.3", "ignore": "^5.2.4", "js-yaml": "^4.1.0", + "latest-version": "^7.0.0", "lodash": "^4.17.21", "pluralize": "^8.0.0", "prettier": "^2.8.3", @@ -22016,13 +22726,10 @@ }, "dependencies": { "@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", + "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==", + "dev": true }, "ansi-regex": { "version": "5.0.1", @@ -22125,6 +22832,13 @@ "brace-expansion": "^2.0.1" } }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true + }, "semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -22168,12 +22882,6 @@ "@truffle/hdwallet-provider": "latest" } }, - "solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, "solidity-coverage": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", @@ -22624,6 +23332,24 @@ "get-port": "^3.1.0" } }, + "synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, + "requires": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "dependencies": { + "tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true + } + } + }, "table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", @@ -23102,6 +23828,12 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true + }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true } } }, diff --git a/implementations/package.json b/implementations/package.json index f4c0978a..0aa05c48 100644 --- a/implementations/package.json +++ b/implementations/package.json @@ -44,15 +44,15 @@ "@typescript-eslint/eslint-plugin": "^5.59.11", "chai": "^4.2.0", "coveralls": "^3.1.1", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", "eth-create2-calculator": "^1.1.5", "hardhat": "^2.13.1", "hardhat-packager": "^1.4.2", "npm-run-all": "^4.1.5", - "prettier": "^2.8.8", - "prettier-plugin-solidity": "^1.1.3", - "solhint": "^3.6.2", + "prettier": "^3.3.3", + "prettier-plugin-solidity": "^1.4.1", + "solhint": "^5.0.3", "standard-version": "^9.3.1", "ts-node": "^10.9.1" } diff --git a/implementations/test/ERC725.test.ts b/implementations/test/ERC725.test.ts index 23d7ec1f..70a12f66 100644 --- a/implementations/test/ERC725.test.ts +++ b/implementations/test/ERC725.test.ts @@ -33,7 +33,8 @@ describe('ERC725', () => { const contractToDeploy = new ERC725__factory(accounts[0]); await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( - contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner', + contractToDeploy, + 'OwnableCannotSetZeroAddressAsOwner', ); }); diff --git a/implementations/test/ERC725X.test.ts b/implementations/test/ERC725X.test.ts index 34378a72..a6d8922b 100644 --- a/implementations/test/ERC725X.test.ts +++ b/implementations/test/ERC725X.test.ts @@ -35,7 +35,10 @@ describe('ERC725X', () => { const contractToDeploy = new ERC725X__factory(accounts.owner); - await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError(contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner'); + await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( + contractToDeploy, + 'OwnableCannotSetZeroAddressAsOwner', + ); }); it('should deploy and fund the contract with `msg.value`', async () => { diff --git a/implementations/test/ERC725Y.test.ts b/implementations/test/ERC725Y.test.ts index e66e47b7..49b3bfbc 100644 --- a/implementations/test/ERC725Y.test.ts +++ b/implementations/test/ERC725Y.test.ts @@ -45,7 +45,8 @@ describe('ERC725Y', () => { const contractToDeploy = new ERC725Y__factory(accounts.owner); await expect(contractToDeploy.deploy(deployParams.newOwner)).to.be.revertedWithCustomError( - contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner', + contractToDeploy, + 'OwnableCannotSetZeroAddressAsOwner', ); }); From 749f1c54be2a932cc9972a63872c5b71845b859b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:36:15 +0000 Subject: [PATCH 10/19] chore(deps-dev): bump undici from 5.21.0 to 5.26.3 in /implementations Bumps [undici](https://github.com/nodejs/undici) from 5.21.0 to 5.26.3. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.21.0...v5.26.3) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 69 +++++++++++-------------------- 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 71b97a0a..36a3574d 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -1256,6 +1256,15 @@ "@ethersproject/strings": "^5.7.0" } }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -3686,18 +3695,6 @@ "node": ">=6.14.2" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -12236,15 +12233,6 @@ "node": ">= 0.8" } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -13149,15 +13137,15 @@ } }, "node_modules/undici": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", - "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", + "version": "5.26.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", + "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", "dev": true, "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { - "node": ">=12.18" + "node": ">=14.0" } }, "node_modules/unique-string": { @@ -14598,6 +14586,12 @@ "@ethersproject/strings": "^5.7.0" } }, + "@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "dev": true + }, "@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -16488,15 +16482,6 @@ "node-gyp-build": "^4.3.0" } }, - "busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "requires": { - "streamsearch": "^1.1.0" - } - }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -23193,12 +23178,6 @@ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true }, - "streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true - }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -23876,12 +23855,12 @@ } }, "undici": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", - "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", + "version": "5.26.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", + "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", "dev": true, "requires": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" } }, "unique-string": { From 8a5244be3b1847cd698b1ac31e7927628a410ea3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 00:53:16 +0000 Subject: [PATCH 11/19] chore(deps): bump @babel/traverse in /implementations Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.18.10 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 264 ++++++++++++++++-------------- 1 file changed, 144 insertions(+), 120 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 36a3574d..059856cb 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -46,11 +46,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -95,13 +96,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.10.tgz", - "integrity": "sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "peer": true, "dependencies": { - "@babel/types": "^7.18.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -122,6 +124,16 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@babel/helper-compilation-targets": { "version": "7.18.9", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", @@ -156,34 +168,34 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "peer": true, "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "peer": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -240,29 +252,29 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "peer": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } @@ -290,12 +302,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -303,9 +315,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.10.tgz", - "integrity": "sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "peer": true, "bin": { "parser": "bin/babel-parser.js" @@ -345,33 +357,33 @@ } }, "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "peer": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.10.tgz", - "integrity": "sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "peer": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -380,12 +392,12 @@ } }, "node_modules/@babel/types": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", - "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -13799,11 +13811,12 @@ } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/compat-data": { @@ -13835,13 +13848,14 @@ } }, "@babel/generator": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.10.tgz", - "integrity": "sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "peer": true, "requires": { - "@babel/types": "^7.18.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "dependencies": { @@ -13855,6 +13869,16 @@ "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" } + }, + "@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "peer": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } } } }, @@ -13883,28 +13907,28 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "peer": true }, "@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "peer": true, "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "peer": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { @@ -13946,23 +13970,23 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "peer": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==" + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" }, "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" }, "@babel/helper-validator-option": { "version": "7.18.6", @@ -13981,19 +14005,19 @@ } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.10.tgz", - "integrity": "sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "peer": true }, "@babel/plugin-transform-runtime": { @@ -14018,41 +14042,41 @@ } }, "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "peer": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.10.tgz", - "integrity": "sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "peer": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", - "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, From f616d6c12287b26642d769420556fb7eedf22928 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:07:06 +0000 Subject: [PATCH 12/19] chore(deps-dev): bump axios from 1.5.1 to 1.6.1 in /implementations Bumps [axios](https://github.com/axios/axios) from 1.5.1 to 1.6.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.5.1...v1.6.1) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 059856cb..064b2631 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -3379,9 +3379,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dev": true, "peer": true, "dependencies": { @@ -16253,9 +16253,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dev": true, "peer": true, "requires": { From 57d60f9eac38a1c239cded863e0c68d45dbbde98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 02:59:57 +0000 Subject: [PATCH 13/19] chore(deps-dev): bump follow-redirects in /implementations Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.1 to 1.15.4. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.1...v1.15.4) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 064b2631..38eb3e40 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -7293,9 +7293,9 @@ "peer": true }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "dev": true, "funding": [ { @@ -19475,9 +19475,9 @@ "peer": true }, "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "dev": true }, "forever-agent": { From eca4edc81c2d598eed0527de7625562528f0c331 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:07:48 +0000 Subject: [PATCH 14/19] chore(deps): bump undici from 5.26.3 to 5.28.4 in /implementations Bumps [undici](https://github.com/nodejs/undici) from 5.26.3 to 5.28.4. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.26.3...v5.28.4) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 38eb3e40..98c20d3d 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -13149,9 +13149,9 @@ } }, "node_modules/undici": { - "version": "5.26.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", - "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" @@ -23879,9 +23879,9 @@ } }, "undici": { - "version": "5.26.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", - "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, "requires": { "@fastify/busboy": "^2.0.0" From a22fe9b074acc7d49a435f6eb6aa8a5ff53ad534 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:07:48 +0000 Subject: [PATCH 15/19] chore(deps): bump follow-redirects in /implementations Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.1 to 1.15.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.1...v1.15.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 98c20d3d..e0689b16 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -7293,9 +7293,9 @@ "peer": true }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.8.tgz", + "integrity": "sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==", "dev": true, "funding": [ { @@ -19475,9 +19475,9 @@ "peer": true }, "follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.8.tgz", + "integrity": "sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==", "dev": true }, "forever-agent": { From 6a8d4deed208ce0c2b234f4f96776b555bc8f753 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:07:53 +0000 Subject: [PATCH 16/19] chore(deps): bump braces from 3.0.2 to 3.0.3 in /implementations Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index e0689b16..8d90d60c 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -3554,12 +3554,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -7211,9 +7211,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -16394,12 +16394,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "brorand": { @@ -19412,9 +19412,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" From 0b185bf86d45145f0b62c6cac8d506fa8ffe456f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:57:31 +0000 Subject: [PATCH 17/19] chore(deps-dev): bump axios from 1.6.1 to 1.7.7 in /implementations Bumps [axios](https://github.com/axios/axios) from 1.6.1 to 1.7.7. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.6.1...v1.7.7) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] --- implementations/package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 8d90d60c..d0a57c15 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -3379,13 +3379,13 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, "peer": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -16253,13 +16253,13 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, "peer": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" }, From 072261d78070a3bb979d5accaa76688d2705f498 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Sun, 8 Sep 2024 23:03:58 +0700 Subject: [PATCH 18/19] test: add more tests for `ERC725` to ensure it supports both X and Y interfaces --- implementations/test/ERC725.test.ts | 22 +++++++++++++++++++++- implementations/test/ERC725X.behaviour.ts | 2 +- implementations/test/ERC725Y.behaviour.ts | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/implementations/test/ERC725.test.ts b/implementations/test/ERC725.test.ts index 70a12f66..6e92537a 100644 --- a/implementations/test/ERC725.test.ts +++ b/implementations/test/ERC725.test.ts @@ -64,6 +64,22 @@ describe('ERC725', () => { expect(await ethers.provider.getBalance(contract.address)).to.equal(deployParams.funding); }); + + it('should have registered the ERC725X & ERC725Y interfaces', async () => { + const accounts = await ethers.getSigners(); + + const deployParams = { + newOwner: accounts[0].address, + funding: ethers.utils.parseEther('10'), + }; + + const contract = await new ERC725__factory(accounts[0]).deploy(deployParams.newOwner, { + value: deployParams.funding, + }); + + expect(await contract.supportsInterface(INTERFACE_ID.ERC725X)).to.be.true; + expect(await contract.supportsInterface(INTERFACE_ID.ERC725X)).to.be.true; + }); }); }); @@ -105,7 +121,11 @@ describe('ERC725', () => { }); it('should have registered the ERC725X interface', async () => { - expect(await context.erc725.supportsInterface(INTERFACE_ID.ERC725X)); + expect(await context.erc725.supportsInterface(INTERFACE_ID.ERC725X)).to.be.true; + }); + + it('should have registered the ERC725Y interface', async () => { + expect(await context.erc725.supportsInterface(INTERFACE_ID.ERC725Y)).to.be.true; }); it('should revert when initializing with address(0) as owner', async () => { diff --git a/implementations/test/ERC725X.behaviour.ts b/implementations/test/ERC725X.behaviour.ts index 1f145546..a217b24b 100644 --- a/implementations/test/ERC725X.behaviour.ts +++ b/implementations/test/ERC725X.behaviour.ts @@ -2185,7 +2185,7 @@ export const shouldInitializeLikeERC725X = ( }); it('should have registered the ERC725X interface', async () => { - expect(await context.erc725X.supportsInterface(INTERFACE_ID.ERC725X)); + expect(await context.erc725X.supportsInterface(INTERFACE_ID.ERC725X)).to.be.true; }); it('should have set the correct owner', async () => { diff --git a/implementations/test/ERC725Y.behaviour.ts b/implementations/test/ERC725Y.behaviour.ts index baa4f441..c97abe34 100644 --- a/implementations/test/ERC725Y.behaviour.ts +++ b/implementations/test/ERC725Y.behaviour.ts @@ -840,7 +840,7 @@ export const shouldInitializeLikeERC725Y = ( }); it('should have registered the ERC725Y interface', async () => { - expect(await context.erc725Y.supportsInterface(INTERFACE_ID.ERC725Y)); + expect(await context.erc725Y.supportsInterface(INTERFACE_ID.ERC725Y)).to.be.true; }); }); }; From 1047659828f8dd38d7811f72752a163dc687ba18 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Mon, 7 Oct 2024 16:05:16 +0100 Subject: [PATCH 19/19] docs: add extra comment for calling overriden `_initialize` function in child contract. --- implementations/contracts/ERC725InitAbstract.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/implementations/contracts/ERC725InitAbstract.sol b/implementations/contracts/ERC725InitAbstract.sol index 718670f8..788d3dda 100644 --- a/implementations/contracts/ERC725InitAbstract.sol +++ b/implementations/contracts/ERC725InitAbstract.sol @@ -26,6 +26,9 @@ abstract contract ERC725InitAbstract is * NOTE: we can safely override this function and not call the parent `_initialize(...)` functions from `ERC725XInitAbstract` and `ERC725YInitAbstract` * as the code logic from this `_initialize(...)` is the exactly the same. * + * @custom:warning If a child contract that inherits `ERC725InitAbstract` needs to override the logic of the `_initialize` function, make sure it calls + * also this function inside this logic via `super._initialize(initialOwner)` or `ERC725InitAbstract._initialize(initialOwner)`. + * * @custom:requirements * - `initialOwner` CANNOT be the zero address. */