From b48a5cd72ff8035949f6912a606171c9f0aec5cd Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:09:04 +0400 Subject: [PATCH 01/20] feat: update `prophet-core` --- package.json | 2 +- yarn.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index da32a2c..19ac6a4 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "package.json": "sort-package-json" }, "dependencies": { - "@defi-wonderland/prophet-core": "0.0.0-96d1084b", + "@defi-wonderland/prophet-core": "0.0.0-3afab791", "@defi-wonderland/prophet-modules": "0.0.0-b72dcda6" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index e1288e9..a160294 100644 --- a/yarn.lock +++ b/yarn.lock @@ -190,16 +190,16 @@ solc-typed-ast "18.1.2" yargs "17.7.2" +"@defi-wonderland/prophet-core@0.0.0-3afab791": + version "0.0.0-3afab791" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-3afab791.tgz#e9e40fabf2ae50b1edbfca806d4159b29b64daec" + integrity sha512-0zvdUCehT2yMDzRPG60XUlMIwSESxeVqaWwVswnDlr3G4ISYhFl1kZvg4fShJTbB9pu9G9tfj19/zFXt0BFaHw== + "@defi-wonderland/prophet-core@0.0.0-4d28a0ec": version "0.0.0-4d28a0ec" resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-4d28a0ec.tgz#228896bb7b9b239c6c25b4deefa8b204d87d7118" integrity sha512-BF+gSf+nZWNByr9V2/eUvdt7zHlScP0hF47L+grlllMHRadm8T7Eboo6jpIHOgMpLkfNAEVsOyg2vfvgABzACQ== -"@defi-wonderland/prophet-core@0.0.0-96d1084b": - version "0.0.0-96d1084b" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-96d1084b.tgz#7145443dae3bbbac87d5803b8561e4b2d356e28e" - integrity sha512-nmcTgUueEpZOJMnC9B12+x6pYswWZHnpqbob4dXneR68WHgmNIJqTEEd2uuiXsUcJw4V7LTxkIuvaR/4kNCqhg== - "@defi-wonderland/prophet-modules@0.0.0-b72dcda6": version "0.0.0-b72dcda6" resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-b72dcda6.tgz#37c77f72c68b5d4d1019460e665446f76206d04f" @@ -1732,9 +1732,9 @@ solhint-community@4.0.0: optionalDependencies: prettier "^2.8.3" -"solmate@git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": +"solmate@https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": version "6.1.0" - resolved "git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" + resolved "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" sort-object-keys@^1.1.3: version "1.1.3" From 24bf5bc002d55566c5b1baa2f6831d5370e2a704 Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:18:59 +0400 Subject: [PATCH 02/20] feat: add access control to Request and Finality module --- src/contracts/AccessControllerModule.sol | 32 +++++++++++++++++++ src/contracts/CouncilArbitrator.sol | 10 ++++-- src/contracts/EBOFinalityModule.sol | 9 ++++-- src/contracts/EBORequestCreator.sol | 7 ++-- src/contracts/EBORequestModule.sol | 9 ++++-- src/interfaces/IEBORequestCreator.sol | 2 ++ test/integration/arbitrum/CreateRequest.t.sol | 2 +- .../arbitrum/IntegrationBase.t.sol | 17 ++++++---- test/unit/CouncilArbitrator.t.sol | 18 +++++++++-- test/utils/Helpers.sol | 1 + 10 files changed, 88 insertions(+), 19 deletions(-) create mode 100644 src/contracts/AccessControllerModule.sol diff --git a/src/contracts/AccessControllerModule.sol b/src/contracts/AccessControllerModule.sol new file mode 100644 index 0000000..02cb826 --- /dev/null +++ b/src/contracts/AccessControllerModule.sol @@ -0,0 +1,32 @@ +// TODO: Delete this file and use the contract imported from prophet-modules once a package containing it is published +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {AccessController} from '@defi-wonderland/prophet-core/solidity/contracts/AccessController.sol'; +import {Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; +import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; + +abstract contract AccessControllerModule is AccessController, Module { + constructor(IOracle _oracle) Module(_oracle) {} + + /** + * @notice Returns an access control object using the contract address as user and the given data + * @dev should only be used by modules as the self-access-control object + * @param _data Arbitrary data + * @return _accessControl The self access control for this contract. + */ + function _defaultAccessControl(bytes memory _data) internal view returns (AccessControl memory _accessControl) { + _accessControl = AccessControl({user: address(this), data: _data}); + } + + /** + * // todo: update name to _selfAccessControl + * @notice Returns an access control object using the contract address as user, and empty data + * + * @dev should only be used by modules as the self-access-control object + * @return _accessControl The self access control for this contract. + */ + function _defaultAccessControl() internal view returns (AccessControl memory _accessControl) { + _accessControl = _defaultAccessControl(bytes('')); + } +} diff --git a/src/contracts/CouncilArbitrator.sol b/src/contracts/CouncilArbitrator.sol index 51bec98..191ef51 100644 --- a/src/contracts/CouncilArbitrator.sol +++ b/src/contracts/CouncilArbitrator.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/ValidatorLib.sol'; import {IArbitrator} from '@defi-wonderland/prophet-modules/solidity/interfaces/IArbitrator.sol'; @@ -68,8 +69,13 @@ contract CouncilArbitrator is ICouncilArbitrator { if (getAnswer[_disputeId] != IOracle.DisputeStatus.None) revert CouncilArbitrator_DisputeAlreadyArbitrated(); getAnswer[_disputeId] = _award; + // TODO: Make sure the access control is correct + IAccessController.AccessControl memory _accessControl = + IAccessController.AccessControl({user: msg.sender, data: bytes('')}); - ORACLE.resolveDispute(_resolutionParams.request, _resolutionParams.response, _resolutionParams.dispute); + ORACLE.resolveDispute( + _resolutionParams.request, _resolutionParams.response, _resolutionParams.dispute, _accessControl + ); // If the request was not finalized, finalize it if (ORACLE.finalizedAt(_resolutionParams.dispute.requestId) == 0) { @@ -77,7 +83,7 @@ contract CouncilArbitrator is ICouncilArbitrator { if (_award != IOracle.DisputeStatus.Lost) { _resolutionParams.response.requestId = 0; } - ORACLE.finalize(_resolutionParams.request, _resolutionParams.response); + ORACLE.finalize(_resolutionParams.request, _resolutionParams.response, _accessControl); } emit DisputeArbitrated(_disputeId, _award); diff --git a/src/contracts/EBOFinalityModule.sol b/src/contracts/EBOFinalityModule.sol index e6495a1..524337d 100644 --- a/src/contracts/EBOFinalityModule.sol +++ b/src/contracts/EBOFinalityModule.sol @@ -5,6 +5,7 @@ import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/ import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; +import {AccessControllerModule} from './AccessControllerModule.sol'; import { IArbitrable, IEBOFinalityModule, @@ -18,7 +19,7 @@ import { * @notice Module allowing users to index data into the subgraph * as a result of a request being finalized */ -contract EBOFinalityModule is Module, IEBOFinalityModule { +contract EBOFinalityModule is AccessControllerModule, IEBOFinalityModule { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IEBOFinalityModule @@ -35,7 +36,11 @@ contract EBOFinalityModule is Module, IEBOFinalityModule { * @param _eboRequestCreator The address of the EBORequestCreator * @param _arbitrable The address of the Arbitrable contract */ - constructor(IOracle _oracle, IEBORequestCreator _eboRequestCreator, IArbitrable _arbitrable) Module(_oracle) { + constructor( + IOracle _oracle, + IEBORequestCreator _eboRequestCreator, + IArbitrable _arbitrable + ) AccessControllerModule(_oracle) { _addEBORequestCreator(_eboRequestCreator); ARBITRABLE = _arbitrable; } diff --git a/src/contracts/EBORequestCreator.sol b/src/contracts/EBORequestCreator.sol index c755139..3a7231a 100644 --- a/src/contracts/EBORequestCreator.sol +++ b/src/contracts/EBORequestCreator.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import { @@ -81,10 +82,12 @@ contract EBORequestCreator is IEBORequestCreator { ) revert EBORequestCreator_RequestAlreadyCreated(); _requestModuleData.chainId = _chainId; - _requestData.requestModuleData = abi.encode(_requestModuleData); - _requestId = ORACLE.createRequest(_requestData, bytes32(0)); + // TODO: Make sure the access control is correct + IAccessController.AccessControl memory _accessControl = + IAccessController.AccessControl({user: address(this), data: bytes('')}); + _requestId = ORACLE.createRequest(_requestData, bytes32(0), _accessControl); requestIdPerChainAndEpoch[_chainId][_epoch] = _requestId; diff --git a/src/contracts/EBORequestModule.sol b/src/contracts/EBORequestModule.sol index b0e5bc4..9076f73 100644 --- a/src/contracts/EBORequestModule.sol +++ b/src/contracts/EBORequestModule.sol @@ -5,13 +5,14 @@ import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/ import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; +import {AccessControllerModule} from './AccessControllerModule.sol'; import {IArbitrable, IEBORequestCreator, IEBORequestModule, IOracle} from 'interfaces/IEBORequestModule.sol'; /** * @title EBORequestModule * @notice Module allowing users to create a request for RPC data for a specific epoch */ -contract EBORequestModule is Module, IEBORequestModule { +contract EBORequestModule is AccessControllerModule, IEBORequestModule { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IEBORequestModule @@ -28,7 +29,11 @@ contract EBORequestModule is Module, IEBORequestModule { * @param _eboRequestCreator The address of the EBORequestCreator * @param _arbitrable The address of the Arbitrable contract */ - constructor(IOracle _oracle, IEBORequestCreator _eboRequestCreator, IArbitrable _arbitrable) Module(_oracle) { + constructor( + IOracle _oracle, + IEBORequestCreator _eboRequestCreator, + IArbitrable _arbitrable + ) AccessControllerModule(_oracle) { _addEBORequestCreator(_eboRequestCreator); ARBITRABLE = _arbitrable; } diff --git a/src/interfaces/IEBORequestCreator.sol b/src/interfaces/IEBORequestCreator.sol index b8ec137..ce8ead1 100644 --- a/src/interfaces/IEBORequestCreator.sol +++ b/src/interfaces/IEBORequestCreator.sol @@ -153,6 +153,7 @@ interface IEBORequestCreator { * @return _disputeModule The dispute module address * @return _resolutionModule The resolution module address * @return _finalityModule The finality module address + * @return _accessControlModule The address of the access control module * @return _requestModuleData The request module data * @return _responseModuleData The response module data * @return _disputeModuleData The dispute module data @@ -170,6 +171,7 @@ interface IEBORequestCreator { address _disputeModule, address _resolutionModule, address _finalityModule, + address _accessControlModule, bytes memory _requestModuleData, bytes memory _responseModuleData, bytes memory _disputeModuleData, diff --git a/test/integration/arbitrum/CreateRequest.t.sol b/test/integration/arbitrum/CreateRequest.t.sol index badc35f..cb253d4 100644 --- a/test/integration/arbitrum/CreateRequest.t.sol +++ b/test/integration/arbitrum/CreateRequest.t.sol @@ -21,7 +21,7 @@ contract IntegrationCreateRequest is IntegrationBase { vm.expectRevert(IEBORequestModule.EBORequestModule_InvalidRequester.selector); vm.prank(_requester); _requestData.requester = _requester; - oracle.createRequest(_requestData, ''); + oracle.createRequest(_requestData, '', _accessControl); // Should revert if the epoch is invalid vm.expectRevert(IEBORequestCreator.EBORequestCreator_InvalidEpoch.selector); diff --git a/test/integration/arbitrum/IntegrationBase.t.sol b/test/integration/arbitrum/IntegrationBase.t.sol index 5181f39..4797f41 100644 --- a/test/integration/arbitrum/IntegrationBase.t.sol +++ b/test/integration/arbitrum/IntegrationBase.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/ValidatorLib.sol'; import {_ARBITRUM_SEPOLIA_GOVERNOR} from 'script/Constants.sol'; -import 'script/Deploy.s.sol'; - import 'forge-std/Test.sol'; +import 'script/Deploy.s.sol'; contract IntegrationBase is Deploy, Test { using ValidatorLib for IOracle.Request; @@ -36,6 +36,9 @@ contract IntegrationBase is Deploy, Test { uint256 internal _currentEpoch; uint256 internal _blockNumber; + IAccessController.AccessControl internal _accessControl = + IAccessController.AccessControl({user: address(0), data: bytes('')}); + function setUp() public virtual override { vm.createSelectFork(vm.rpcUrl('arbitrum'), _ARBITRUM_SEPOLIA_FORK_BLOCK); @@ -90,7 +93,7 @@ contract IntegrationBase is Deploy, Test { IOracle.Response memory _responseData = _instantiateResponseData(_requestId); vm.prank(_proposer); - oracle.proposeResponse(_requestData, _responseData); + oracle.proposeResponse(_requestData, _responseData, _accessControl); _responseId = _responseData._getId(); _responses[_responseId] = _responseData; @@ -103,7 +106,7 @@ contract IntegrationBase is Deploy, Test { IOracle.Dispute memory _disputeData = _instantiateDisputeData(_requestId, _responseId); vm.prank(_disputer); - oracle.disputeResponse(_requestData, _responseData, _disputeData); + oracle.disputeResponse(_requestData, _responseData, _disputeData, _accessControl); _disputeId = _disputeData._getId(); _disputes[_disputeId] = _disputeData; @@ -140,7 +143,7 @@ contract IntegrationBase is Deploy, Test { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _disputes[_disputeId]; - oracle.escalateDispute(_requestData, _responseData, _disputeData); + oracle.escalateDispute(_requestData, _responseData, _disputeData, _accessControl); } function _resolveDispute(bytes32 _requestId, bytes32 _responseId, bytes32 _disputeId) internal { @@ -148,7 +151,7 @@ contract IntegrationBase is Deploy, Test { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _disputes[_disputeId]; - oracle.resolveDispute(_requestData, _responseData, _disputeData); + oracle.resolveDispute(_requestData, _responseData, _disputeData, _accessControl); } function _arbitrateDispute(bytes32 _disputeId, IOracle.DisputeStatus _award) internal { @@ -160,7 +163,7 @@ contract IntegrationBase is Deploy, Test { IOracle.Request memory _requestData = _requests[_requestId]; IOracle.Response memory _responseData = _responses[_responseId]; - oracle.finalize(_requestData, _responseData); + oracle.finalize(_requestData, _responseData, _accessControl); } function _releaseUnfinalizableResponseBond(bytes32 _requestId, bytes32 _responseId) internal { diff --git a/test/unit/CouncilArbitrator.t.sol b/test/unit/CouncilArbitrator.t.sol index 679d3df..c141bc1 100644 --- a/test/unit/CouncilArbitrator.t.sol +++ b/test/unit/CouncilArbitrator.t.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {IValidator} from '@defi-wonderland/prophet-core/solidity/interfaces/IValidator.sol'; import {Helpers} from 'test/utils/Helpers.sol'; @@ -42,6 +43,8 @@ contract CouncilArbitrator_Unit_BaseTest is Test, Helpers { IOracle public oracle; IArbitratorModule public arbitratorModule; IArbitrable public arbitrable; + IAccessController.AccessControl internal _accessControl = + IAccessController.AccessControl({user: address(0), data: bytes('')}); event ResolutionStarted( bytes32 indexed _disputeId, IOracle.Request _request, IOracle.Response _response, IOracle.Dispute _dispute @@ -207,7 +210,12 @@ contract CouncilArbitrator_Unit_ArbitrateDispute is CouncilArbitrator_Unit_BaseT address(oracle), abi.encodeCall( IOracle.resolveDispute, - (_params.resolutionParams.request, _params.resolutionParams.response, _params.resolutionParams.dispute) + ( + _params.resolutionParams.request, + _params.resolutionParams.response, + _params.resolutionParams.dispute, + _accessControl + ) ) ); councilArbitrator.arbitrateDispute(_params.disputeId, IOracle.DisputeStatus(_params.award)); @@ -222,7 +230,9 @@ contract CouncilArbitrator_Unit_ArbitrateDispute is CouncilArbitrator_Unit_BaseT vm.expectCall( address(oracle), - abi.encodeCall(IOracle.finalize, (_params.resolutionParams.request, _params.resolutionParams.response)) + abi.encodeCall( + IOracle.finalize, (_params.resolutionParams.request, _params.resolutionParams.response, _accessControl) + ) ); councilArbitrator.arbitrateDispute(_params.disputeId, IOracle.DisputeStatus(_params.award)); } @@ -237,7 +247,9 @@ contract CouncilArbitrator_Unit_ArbitrateDispute is CouncilArbitrator_Unit_BaseT vm.expectCall( address(oracle), - abi.encodeCall(IOracle.finalize, (_params.resolutionParams.request, _params.resolutionParams.response)) + abi.encodeCall( + IOracle.finalize, (_params.resolutionParams.request, _params.resolutionParams.response, _accessControl) + ) ); councilArbitrator.arbitrateDispute(_params.disputeId, IOracle.DisputeStatus(_params.award)); } diff --git a/test/utils/Helpers.sol b/test/utils/Helpers.sol index adbacca..54fbbd9 100644 --- a/test/utils/Helpers.sol +++ b/test/utils/Helpers.sol @@ -17,6 +17,7 @@ contract Helpers is Test { disputeModule: address(0), resolutionModule: address(0), finalityModule: address(0), + accessControlModule: address(0), requestModuleData: bytes(''), responseModuleData: bytes(''), disputeModuleData: bytes(''), From b482cd9c6da037e38c3d0bec45670a2d867fa157 Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:19:22 +0400 Subject: [PATCH 03/20] fix: compiler warnings --- test/integration/arbitrum/FinalizeRequest.t.sol | 16 ---------------- test/unit/Arbitrable.t.sol | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/test/integration/arbitrum/FinalizeRequest.t.sol b/test/integration/arbitrum/FinalizeRequest.t.sol index 1b0b5a6..9dfcbd4 100644 --- a/test/integration/arbitrum/FinalizeRequest.t.sol +++ b/test/integration/arbitrum/FinalizeRequest.t.sol @@ -105,8 +105,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request is finalized without response when a response without dispute exists vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); @@ -156,8 +154,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request is finalized without response when a response without dispute exists vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); @@ -210,8 +206,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request is finalized without response when a response without dispute exists vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); @@ -305,8 +299,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request is finalized without response when a response without dispute exists vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); @@ -350,8 +342,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request has not been finalized vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); @@ -404,8 +394,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request has not been finalized vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); @@ -457,8 +445,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request has not been finalized vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); @@ -570,8 +556,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { // Propose the response bytes32 _responseId = _proposeResponse(_requestId); - uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Revert if the request has not been finalized vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); diff --git a/test/unit/Arbitrable.t.sol b/test/unit/Arbitrable.t.sol index f8c271b..9de1a63 100644 --- a/test/unit/Arbitrable.t.sol +++ b/test/unit/Arbitrable.t.sol @@ -206,7 +206,7 @@ contract Arbitrable_Unit_ValidateArbitrator is Arbitrable_Unit_BaseTest { arbitrable.validateArbitrator(_caller); } - function test_validateArbitrator() public { + function test_validateArbitrator() public view { arbitrable.validateArbitrator(arbitrator); } } From 330e236828a6f30e98a1d45e23fd174e43902949 Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:30:32 +0400 Subject: [PATCH 04/20] feat: update prophet-modules --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 19ac6a4..9c25561 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "dependencies": { "@defi-wonderland/prophet-core": "0.0.0-3afab791", - "@defi-wonderland/prophet-modules": "0.0.0-b72dcda6" + "@defi-wonderland/prophet-modules": "0.0.0-43e8be69" }, "devDependencies": { "@commitlint/cli": "19.3.0", diff --git a/yarn.lock b/yarn.lock index a160294..64edfed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -200,10 +200,10 @@ resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-4d28a0ec.tgz#228896bb7b9b239c6c25b4deefa8b204d87d7118" integrity sha512-BF+gSf+nZWNByr9V2/eUvdt7zHlScP0hF47L+grlllMHRadm8T7Eboo6jpIHOgMpLkfNAEVsOyg2vfvgABzACQ== -"@defi-wonderland/prophet-modules@0.0.0-b72dcda6": - version "0.0.0-b72dcda6" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-b72dcda6.tgz#37c77f72c68b5d4d1019460e665446f76206d04f" - integrity sha512-tpBmXL85F9ml4qN1LnB5SGKPJRg5VgrAYezo+yGJTybJyqiA6o9S8o1GU8m4j3h6uw0KAsPATRTwrxmvGiYjjg== +"@defi-wonderland/prophet-modules@0.0.0-43e8be69": + version "0.0.0-43e8be69" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-43e8be69.tgz#64646bb83acb41767a0685df188a3b8597f99486" + integrity sha512-4DLkKph2RrDnv2Tq7YrD8W63Jddre8ZnoLnBIhzkbLtn2GZC0S8tZUTfBrNT2OWW2WO5OgJsGJOt08i50mHpjg== dependencies: "@defi-wonderland/prophet-core" "0.0.0-4d28a0ec" "@openzeppelin/contracts" "4.9.5" @@ -1732,9 +1732,9 @@ solhint-community@4.0.0: optionalDependencies: prettier "^2.8.3" -"solmate@https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": +"solmate@git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": version "6.1.0" - resolved "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" + resolved "git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" sort-object-keys@^1.1.3: version "1.1.3" From e7ea21f454870874f26836f820994925afc3a72e Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:14:40 +0400 Subject: [PATCH 05/20] fix: access control in unit and integration tests --- src/contracts/CouncilArbitrator.sol | 2 +- .../arbitrum/IntegrationBase.t.sol | 23 +++++++++++++++---- test/unit/CouncilArbitrator.t.sol | 4 ++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/contracts/CouncilArbitrator.sol b/src/contracts/CouncilArbitrator.sol index 191ef51..23021d5 100644 --- a/src/contracts/CouncilArbitrator.sol +++ b/src/contracts/CouncilArbitrator.sol @@ -71,7 +71,7 @@ contract CouncilArbitrator is ICouncilArbitrator { getAnswer[_disputeId] = _award; // TODO: Make sure the access control is correct IAccessController.AccessControl memory _accessControl = - IAccessController.AccessControl({user: msg.sender, data: bytes('')}); + IAccessController.AccessControl({user: address(this), data: bytes('')}); ORACLE.resolveDispute( _resolutionParams.request, _resolutionParams.response, _resolutionParams.dispute, _accessControl diff --git a/test/integration/arbitrum/IntegrationBase.t.sol b/test/integration/arbitrum/IntegrationBase.t.sol index 4797f41..85230cb 100644 --- a/test/integration/arbitrum/IntegrationBase.t.sol +++ b/test/integration/arbitrum/IntegrationBase.t.sol @@ -36,8 +36,7 @@ contract IntegrationBase is Deploy, Test { uint256 internal _currentEpoch; uint256 internal _blockNumber; - IAccessController.AccessControl internal _accessControl = - IAccessController.AccessControl({user: address(0), data: bytes('')}); + IAccessController.AccessControl internal _accessControl; function setUp() public virtual override { vm.createSelectFork(vm.rpcUrl('arbitrum'), _ARBITRUM_SEPOLIA_FORK_BLOCK); @@ -65,6 +64,9 @@ contract IntegrationBase is Deploy, Test { // Set block number _blockNumber = block.number; + + // Configure the access control + _accessControl = IAccessController.AccessControl({user: address(0), data: bytes('')}); } function _createRequest() internal returns (bytes32 _requestId) { @@ -89,9 +91,11 @@ contract IntegrationBase is Deploy, Test { function _proposeResponse(bytes32 _requestId) internal returns (bytes32 _responseId) { IOracle.Request memory _requestData = _requests[_requestId]; - IOracle.Response memory _responseData = _instantiateResponseData(_requestId); + // Set the caller + _accessControl.user = _proposer; + vm.prank(_proposer); oracle.proposeResponse(_requestData, _responseData, _accessControl); @@ -102,9 +106,11 @@ contract IntegrationBase is Deploy, Test { function _disputeResponse(bytes32 _requestId, bytes32 _responseId) internal returns (bytes32 _disputeId) { IOracle.Request memory _requestData = _requests[_requestId]; IOracle.Response memory _responseData = _responses[_responseId]; - IOracle.Dispute memory _disputeData = _instantiateDisputeData(_requestId, _responseId); + // Set the caller + _accessControl.user = _disputer; + vm.prank(_disputer); oracle.disputeResponse(_requestData, _responseData, _disputeData, _accessControl); @@ -143,6 +149,9 @@ contract IntegrationBase is Deploy, Test { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _disputes[_disputeId]; + // Set the caller + _accessControl.user = address(this); + oracle.escalateDispute(_requestData, _responseData, _disputeData, _accessControl); } @@ -151,6 +160,9 @@ contract IntegrationBase is Deploy, Test { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _disputes[_disputeId]; + // Set the caller + _accessControl.user = address(this); + oracle.resolveDispute(_requestData, _responseData, _disputeData, _accessControl); } @@ -163,6 +175,9 @@ contract IntegrationBase is Deploy, Test { IOracle.Request memory _requestData = _requests[_requestId]; IOracle.Response memory _responseData = _responses[_responseId]; + // Set the caller + _accessControl.user = address(this); + oracle.finalize(_requestData, _responseData, _accessControl); } diff --git a/test/unit/CouncilArbitrator.t.sol b/test/unit/CouncilArbitrator.t.sol index c141bc1..df8d99d 100644 --- a/test/unit/CouncilArbitrator.t.sol +++ b/test/unit/CouncilArbitrator.t.sol @@ -43,8 +43,7 @@ contract CouncilArbitrator_Unit_BaseTest is Test, Helpers { IOracle public oracle; IArbitratorModule public arbitratorModule; IArbitrable public arbitrable; - IAccessController.AccessControl internal _accessControl = - IAccessController.AccessControl({user: address(0), data: bytes('')}); + IAccessController.AccessControl internal _accessControl; event ResolutionStarted( bytes32 indexed _disputeId, IOracle.Request _request, IOracle.Response _response, IOracle.Dispute _dispute @@ -61,6 +60,7 @@ contract CouncilArbitrator_Unit_BaseTest is Test, Helpers { vm.mockCall(address(arbitratorModule), abi.encodeCall(IValidator.ORACLE, ()), abi.encode(oracle)); councilArbitrator = new MockCouncilArbitrator(arbitratorModule, arbitrable); + _accessControl = IAccessController.AccessControl({user: address(councilArbitrator), data: bytes('')}); } function _mockGetAnswer(bytes32 _disputeId, IOracle.DisputeStatus _status) internal { From 718688e7f59ef255bfbd4cc5ba0b41d45b4e79d3 Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:06:59 +0400 Subject: [PATCH 06/20] test: access control in `EBORequestCreator` integration tests --- test/integration/arbitrum/CreateRequest.t.sol | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/integration/arbitrum/CreateRequest.t.sol b/test/integration/arbitrum/CreateRequest.t.sol index cb253d4..46a85d0 100644 --- a/test/integration/arbitrum/CreateRequest.t.sol +++ b/test/integration/arbitrum/CreateRequest.t.sol @@ -19,8 +19,10 @@ contract IntegrationCreateRequest is IntegrationBase { // Should revert if the requester is not the EBORequestCreator vm.expectRevert(IEBORequestModule.EBORequestModule_InvalidRequester.selector); - vm.prank(_requester); _requestData.requester = _requester; + _accessControl.user = _requester; + + vm.prank(_requester); oracle.createRequest(_requestData, '', _accessControl); // Should revert if the epoch is invalid @@ -42,9 +44,12 @@ contract IntegrationCreateRequest is IntegrationBase { _requestParams.chainId = _chainId; _requestData.requestModuleData = abi.encode(_requestParams); _requestData.requester = address(eboRequestCreator); + _accessControl.user = address(eboRequestCreator); // Expect the oracle to create the request - vm.expectCall(address(oracle), abi.encodeWithSelector(IOracle.createRequest.selector, _requestData, bytes32(0))); + vm.expectCall( + address(oracle), abi.encodeWithSelector(IOracle.createRequest.selector, _requestData, bytes32(0), _accessControl) + ); vm.prank(_requester); eboRequestCreator.createRequest(_currentEpoch, _chainId); From 4410a6f4681491800e175b148770d1d16bd5282b Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 11 Nov 2024 09:32:10 -0500 Subject: [PATCH 07/20] chore: remove placeholder contract --- src/contracts/AccessControllerModule.sol | 32 ------------------------ 1 file changed, 32 deletions(-) delete mode 100644 src/contracts/AccessControllerModule.sol diff --git a/src/contracts/AccessControllerModule.sol b/src/contracts/AccessControllerModule.sol deleted file mode 100644 index 02cb826..0000000 --- a/src/contracts/AccessControllerModule.sol +++ /dev/null @@ -1,32 +0,0 @@ -// TODO: Delete this file and use the contract imported from prophet-modules once a package containing it is published -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import {AccessController} from '@defi-wonderland/prophet-core/solidity/contracts/AccessController.sol'; -import {Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; -import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; - -abstract contract AccessControllerModule is AccessController, Module { - constructor(IOracle _oracle) Module(_oracle) {} - - /** - * @notice Returns an access control object using the contract address as user and the given data - * @dev should only be used by modules as the self-access-control object - * @param _data Arbitrary data - * @return _accessControl The self access control for this contract. - */ - function _defaultAccessControl(bytes memory _data) internal view returns (AccessControl memory _accessControl) { - _accessControl = AccessControl({user: address(this), data: _data}); - } - - /** - * // todo: update name to _selfAccessControl - * @notice Returns an access control object using the contract address as user, and empty data - * - * @dev should only be used by modules as the self-access-control object - * @return _accessControl The self access control for this contract. - */ - function _defaultAccessControl() internal view returns (AccessControl memory _accessControl) { - _accessControl = _defaultAccessControl(bytes('')); - } -} From 6f15ac924e83269dfcebc55e7b915117b60a6353 Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 11 Nov 2024 09:33:05 -0500 Subject: [PATCH 08/20] feat: use ModuleAccessController in EBO's modules --- src/contracts/CouncilArbitrator.sol | 3 ++- src/contracts/EBOFinalityModule.sol | 7 ++++--- src/contracts/EBORequestModule.sol | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/contracts/CouncilArbitrator.sol b/src/contracts/CouncilArbitrator.sol index 23021d5..72ba49f 100644 --- a/src/contracts/CouncilArbitrator.sol +++ b/src/contracts/CouncilArbitrator.sol @@ -49,7 +49,8 @@ contract CouncilArbitrator is ICouncilArbitrator { function resolve( IOracle.Request calldata _request, IOracle.Response calldata _response, - IOracle.Dispute calldata _dispute + IOracle.Dispute calldata _dispute, + IAccessController.AccessControl calldata _accessControl ) external onlyArbitratorModule returns (bytes memory /* _data */ ) { bytes32 _disputeId = _dispute._getId(); diff --git a/src/contracts/EBOFinalityModule.sol b/src/contracts/EBOFinalityModule.sol index 524337d..7f6ee62 100644 --- a/src/contracts/EBOFinalityModule.sol +++ b/src/contracts/EBOFinalityModule.sol @@ -2,10 +2,11 @@ pragma solidity 0.8.26; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; +import {ModuleAccessController} from + '@defi-wonderland/prophet-modules/solidity/contracts/modules/access/ModuleAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; -import {AccessControllerModule} from './AccessControllerModule.sol'; import { IArbitrable, IEBOFinalityModule, @@ -19,7 +20,7 @@ import { * @notice Module allowing users to index data into the subgraph * as a result of a request being finalized */ -contract EBOFinalityModule is AccessControllerModule, IEBOFinalityModule { +contract EBOFinalityModule is ModuleAccessController, IEBOFinalityModule { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IEBOFinalityModule @@ -40,7 +41,7 @@ contract EBOFinalityModule is AccessControllerModule, IEBOFinalityModule { IOracle _oracle, IEBORequestCreator _eboRequestCreator, IArbitrable _arbitrable - ) AccessControllerModule(_oracle) { + ) ModuleAccessController(_oracle) { _addEBORequestCreator(_eboRequestCreator); ARBITRABLE = _arbitrable; } diff --git a/src/contracts/EBORequestModule.sol b/src/contracts/EBORequestModule.sol index 9076f73..edccefe 100644 --- a/src/contracts/EBORequestModule.sol +++ b/src/contracts/EBORequestModule.sol @@ -2,17 +2,17 @@ pragma solidity 0.8.26; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; - +import {ModuleAccessController} from + '@defi-wonderland/prophet-modules/solidity/contracts/modules/access/ModuleAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; -import {AccessControllerModule} from './AccessControllerModule.sol'; import {IArbitrable, IEBORequestCreator, IEBORequestModule, IOracle} from 'interfaces/IEBORequestModule.sol'; /** * @title EBORequestModule * @notice Module allowing users to create a request for RPC data for a specific epoch */ -contract EBORequestModule is AccessControllerModule, IEBORequestModule { +contract EBORequestModule is ModuleAccessController, IEBORequestModule { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IEBORequestModule @@ -33,7 +33,7 @@ contract EBORequestModule is AccessControllerModule, IEBORequestModule { IOracle _oracle, IEBORequestCreator _eboRequestCreator, IArbitrable _arbitrable - ) AccessControllerModule(_oracle) { + ) ModuleAccessController(_oracle) { _addEBORequestCreator(_eboRequestCreator); ARBITRABLE = _arbitrable; } From a59af695c31ccb8923a7eb51a3767c02bc2533d7 Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 11 Nov 2024 09:35:06 -0500 Subject: [PATCH 09/20] test: pass access control in tests --- test/integration/arbitrum/IntegrationBase.t.sol | 8 +++++--- test/unit/CouncilArbitrator.t.sol | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/integration/arbitrum/IntegrationBase.t.sol b/test/integration/arbitrum/IntegrationBase.t.sol index 85230cb..6babbb9 100644 --- a/test/integration/arbitrum/IntegrationBase.t.sol +++ b/test/integration/arbitrum/IntegrationBase.t.sol @@ -9,7 +9,9 @@ import {_ARBITRUM_SEPOLIA_GOVERNOR} from 'script/Constants.sol'; import 'forge-std/Test.sol'; import 'script/Deploy.s.sol'; -contract IntegrationBase is Deploy, Test { +import '../../utils/Helpers.sol'; + +contract IntegrationBase is Deploy, Test, Helpers { using ValidatorLib for IOracle.Request; using ValidatorLib for IOracle.Response; using ValidatorLib for IOracle.Dispute; @@ -124,7 +126,7 @@ contract IntegrationBase is Deploy, Test { function _pledgeForDispute(address _sender, bytes32 _requestId, bytes32 _disputeId) internal { vm.prank(_sender); - bondEscalationModule.pledgeForDispute(_requests[_requestId], _disputes[_disputeId]); + bondEscalationModule.pledgeForDispute(_requests[_requestId], _disputes[_disputeId], _createAccessControl()); } function _pledgeAgainstDispute(bytes32 _requestId, bytes32 _disputeId) internal { @@ -133,7 +135,7 @@ contract IntegrationBase is Deploy, Test { function _pledgeAgainstDispute(address _sender, bytes32 _requestId, bytes32 _disputeId) internal { vm.prank(_sender); - bondEscalationModule.pledgeAgainstDispute(_requests[_requestId], _disputes[_disputeId]); + bondEscalationModule.pledgeAgainstDispute(_requests[_requestId], _disputes[_disputeId], _createAccessControl()); } function _settleBondEscalation(bytes32 _requestId, bytes32 _responseId, bytes32 _disputeId) internal { diff --git a/test/unit/CouncilArbitrator.t.sol b/test/unit/CouncilArbitrator.t.sol index df8d99d..b9bf5b3 100644 --- a/test/unit/CouncilArbitrator.t.sol +++ b/test/unit/CouncilArbitrator.t.sol @@ -118,11 +118,11 @@ contract CouncilArbitrator_Unit_Resolve is CouncilArbitrator_Unit_BaseTest { changePrank(_caller); vm.expectRevert(ICouncilArbitrator.CouncilArbitrator_OnlyArbitratorModule.selector); - councilArbitrator.resolve(_params.request, _params.response, _params.dispute); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute, _createAccessControl()); } function test_setResolutions(ICouncilArbitrator.ResolutionParameters calldata _params) public happyPath { - councilArbitrator.resolve(_params.request, _params.response, _params.dispute); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute, _createAccessControl()); bytes32 _disputeId = _params.dispute._getId(); (IOracle.Request memory _request, IOracle.Response memory _response, IOracle.Dispute memory _dispute) = @@ -138,7 +138,7 @@ contract CouncilArbitrator_Unit_Resolve is CouncilArbitrator_Unit_BaseTest { vm.expectEmit(); emit ResolutionStarted(_disputeId, _params.request, _params.response, _params.dispute); - councilArbitrator.resolve(_params.request, _params.response, _params.dispute); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute, _createAccessControl()); } } From c384c6b742a794ae2201e249706d2abb8453ead4 Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 11 Nov 2024 09:35:37 -0500 Subject: [PATCH 10/20] feat: add `_createAccessControl` helper --- test/utils/Helpers.sol | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/utils/Helpers.sol b/test/utils/Helpers.sol index 54fbbd9..164b5e9 100644 --- a/test/utils/Helpers.sol +++ b/test/utils/Helpers.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.19; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; import 'forge-std/Test.sol'; @@ -12,12 +13,12 @@ contract Helpers is Test { // Mock objects IOracle.Request public mockRequest = IOracle.Request({ + accessModule: address(0), requestModule: address(0), responseModule: address(0), disputeModule: address(0), resolutionModule: address(0), finalityModule: address(0), - accessControlModule: address(0), requestModuleData: bytes(''), responseModuleData: bytes(''), disputeModuleData: bytes(''), @@ -150,4 +151,17 @@ contract Helpers is Test { function _expectEmit(address _contract) internal { vm.expectEmit(true, true, true, true, _contract); } + + function _createAccessControl() internal returns (IAccessController.AccessControl memory _accessControl) { + (, address _msgSender,) = vm.readCallers(); + _accessControl = _createAccessControl(_msgSender); + } + + function _createAccessControl(address _user) + internal + pure + returns (IAccessController.AccessControl memory _accessControl) + { + _accessControl = IAccessController.AccessControl({user: _user, data: bytes('')}); + } } From 0c7830b5935af5ca9810241f4d959cb63d3ddae6 Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 11 Nov 2024 09:36:24 -0500 Subject: [PATCH 11/20] feat: add TODO to set access module in Deploy script --- script/Deploy.s.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index fe5c8ed..a6ea82f 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -171,7 +171,10 @@ contract Deploy is Script { _requestData.nonce = 0; // Set requester and modules + _requestData.requester = address(eboRequestCreator); + // todo : replace with HorizonOperatorAccessModule + _requestData.accessModule = address(0); _requestData.requestModule = address(eboRequestModule); _requestData.responseModule = address(bondedResponseModule); _requestData.disputeModule = address(bondEscalationModule); From 49186a72f090bc228bc996f88b4bf23ab901adb5 Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 11 Nov 2024 09:37:15 -0500 Subject: [PATCH 12/20] chore: update prophet dependencies --- package.json | 4 +- yarn.lock | 454 +++++++++++++++++++++++---------------------------- 2 files changed, 204 insertions(+), 254 deletions(-) diff --git a/package.json b/package.json index 9c25561..314c053 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "package.json": "sort-package-json" }, "dependencies": { - "@defi-wonderland/prophet-core": "0.0.0-3afab791", - "@defi-wonderland/prophet-modules": "0.0.0-43e8be69" + "@defi-wonderland/prophet-core": "0.0.0-8bb062e0", + "@defi-wonderland/prophet-modules": "0.0.0-86078350" }, "devDependencies": { "@commitlint/cli": "19.3.0", diff --git a/yarn.lock b/yarn.lock index 64edfed..959a157 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,28 +3,19 @@ "@babel/code-frame@^7.0.0": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" - integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== dependencies: - "@babel/highlight" "^7.24.7" - picocolors "^1.0.0" - -"@babel/helper-validator-identifier@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" - integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== - -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.7" - chalk "^2.4.2" + "@babel/helper-validator-identifier" "^7.25.9" js-tokens "^4.0.0" picocolors "^1.0.0" +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + "@commitlint/cli@19.3.0": version "19.3.0" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-19.3.0.tgz#44e6da9823a01f0cdcc43054bbefdd2c6c5ddf39" @@ -46,66 +37,66 @@ "@commitlint/types" "^19.0.3" conventional-changelog-conventionalcommits "^7.0.2" -"@commitlint/config-validator@^19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-19.0.3.tgz#052b181a30da6b4fc16dc5230f4589ac95e0bc81" - integrity sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q== +"@commitlint/config-validator@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-19.5.0.tgz#f0a4eda2109fc716ef01bb8831af9b02e3a1e568" + integrity sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw== dependencies: - "@commitlint/types" "^19.0.3" + "@commitlint/types" "^19.5.0" ajv "^8.11.0" -"@commitlint/ensure@^19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-19.0.3.tgz#d172b1b72ca88cbd317ea1ee79f3a03dbaccc76e" - integrity sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ== +"@commitlint/ensure@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-19.5.0.tgz#b087374a6a0a0140e5925a82901d234885d9f6dd" + integrity sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg== dependencies: - "@commitlint/types" "^19.0.3" + "@commitlint/types" "^19.5.0" lodash.camelcase "^4.3.0" lodash.kebabcase "^4.1.1" lodash.snakecase "^4.1.1" lodash.startcase "^4.4.0" lodash.upperfirst "^4.3.1" -"@commitlint/execute-rule@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz#928fb239ae8deec82a6e3b05ec9cfe20afa83856" - integrity sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw== +"@commitlint/execute-rule@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-19.5.0.tgz#c13da8c03ea0379f30856111e27d57518e25b8a2" + integrity sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg== "@commitlint/format@^19.3.0": - version "19.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-19.3.0.tgz#48dd9e6930d41eb0ca19f36159ee940c5b25d857" - integrity sha512-luguk5/aF68HiF4H23ACAfk8qS8AHxl4LLN5oxPc24H+2+JRPsNr1OS3Gaea0CrH7PKhArBMKBz5RX9sA5NtTg== + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-19.5.0.tgz#d879db2d97d70ae622397839fb8603d56e85a250" + integrity sha512-yNy088miE52stCI3dhG/vvxFo9e4jFkU1Mj3xECfzp/bIS/JUay4491huAlVcffOoMK1cd296q0W92NlER6r3A== dependencies: - "@commitlint/types" "^19.0.3" + "@commitlint/types" "^19.5.0" chalk "^5.3.0" -"@commitlint/is-ignored@^19.2.2": - version "19.2.2" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-19.2.2.tgz#503ddcf908ac6b2bc4586a49cb53893a1856f5b2" - integrity sha512-eNX54oXMVxncORywF4ZPFtJoBm3Tvp111tg1xf4zWXGfhBPKpfKG6R+G3G4v5CPlRROXpAOpQ3HMhA9n1Tck1g== +"@commitlint/is-ignored@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-19.5.0.tgz#f8b7f365887acc1e3bdb31b17117bb435585dddf" + integrity sha512-0XQ7Llsf9iL/ANtwyZ6G0NGp5Y3EQ8eDQSxv/SRcfJ0awlBY4tHFAvwWbw66FVUaWICH7iE5en+FD9TQsokZ5w== dependencies: - "@commitlint/types" "^19.0.3" + "@commitlint/types" "^19.5.0" semver "^7.6.0" "@commitlint/lint@^19.2.2": - version "19.2.2" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-19.2.2.tgz#57f69e24bd832a7dcce8ebf82d11e3bf03ccc2a9" - integrity sha512-xrzMmz4JqwGyKQKTpFzlN0dx0TAiT7Ran1fqEBgEmEj+PU98crOFtysJgY+QdeSagx6EDRigQIXJVnfrI0ratA== + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-19.5.0.tgz#f4e162e7857a1c0694b20b92527704897558ff70" + integrity sha512-cAAQwJcRtiBxQWO0eprrAbOurtJz8U6MgYqLz+p9kLElirzSCc0vGMcyCaA1O7AqBuxo11l1XsY3FhOFowLAAg== dependencies: - "@commitlint/is-ignored" "^19.2.2" - "@commitlint/parse" "^19.0.3" - "@commitlint/rules" "^19.0.3" - "@commitlint/types" "^19.0.3" + "@commitlint/is-ignored" "^19.5.0" + "@commitlint/parse" "^19.5.0" + "@commitlint/rules" "^19.5.0" + "@commitlint/types" "^19.5.0" "@commitlint/load@^19.2.0": - version "19.4.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-19.4.0.tgz#7df034e226e300fd577d3f63a72d790d5c821f53" - integrity sha512-I4lCWaEZYQJ1y+Y+gdvbGAx9pYPavqZAZ3/7/8BpWh+QjscAn8AjsUpLV2PycBsEx7gupq5gM4BViV9xwTIJuw== - dependencies: - "@commitlint/config-validator" "^19.0.3" - "@commitlint/execute-rule" "^19.0.0" - "@commitlint/resolve-extends" "^19.1.0" - "@commitlint/types" "^19.0.3" + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-19.5.0.tgz#67f90a294894d1f99b930b6152bed2df44a81794" + integrity sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA== + dependencies: + "@commitlint/config-validator" "^19.5.0" + "@commitlint/execute-rule" "^19.5.0" + "@commitlint/resolve-extends" "^19.5.0" + "@commitlint/types" "^19.5.0" chalk "^5.3.0" cosmiconfig "^9.0.0" cosmiconfig-typescript-loader "^5.0.0" @@ -113,70 +104,69 @@ lodash.merge "^4.6.2" lodash.uniq "^4.5.0" -"@commitlint/message@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-19.0.0.tgz#f789dd1b7a1f9c784578e0111f46cc3fecf5a531" - integrity sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw== +"@commitlint/message@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-19.5.0.tgz#c062d9a1d2b3302c3a8cac25d6d1125ea9c019b2" + integrity sha512-R7AM4YnbxN1Joj1tMfCyBryOC5aNJBdxadTZkuqtWi3Xj0kMdutq16XQwuoGbIzL2Pk62TALV1fZDCv36+JhTQ== -"@commitlint/parse@^19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-19.0.3.tgz#a2d09876d458e17ad0e1695b04f41af8b50a41c2" - integrity sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA== +"@commitlint/parse@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-19.5.0.tgz#b450dad9b5a95ac5ba472d6d0fdab822dce946fc" + integrity sha512-cZ/IxfAlfWYhAQV0TwcbdR1Oc0/r0Ik1GEessDJ3Lbuma/MRO8FRQX76eurcXtmhJC//rj52ZSZuXUg0oIX0Fw== dependencies: - "@commitlint/types" "^19.0.3" + "@commitlint/types" "^19.5.0" conventional-changelog-angular "^7.0.0" conventional-commits-parser "^5.0.0" "@commitlint/read@^19.2.1": - version "19.4.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-19.4.0.tgz#3866b1f9a272ef6a388986efa349d24228fc8b00" - integrity sha512-r95jLOEZzKDakXtnQub+zR3xjdnrl2XzerPwm7ch1/cc5JGq04tyaNpa6ty0CRCWdVrk4CZHhqHozb8yZwy2+g== + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-19.5.0.tgz#601f9f1afe69852b0f28aa81cd455b40979fad6b" + integrity sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ== dependencies: - "@commitlint/top-level" "^19.0.0" - "@commitlint/types" "^19.0.3" - execa "^8.0.1" + "@commitlint/top-level" "^19.5.0" + "@commitlint/types" "^19.5.0" git-raw-commits "^4.0.0" minimist "^1.2.8" + tinyexec "^0.3.0" -"@commitlint/resolve-extends@^19.1.0": - version "19.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz#fa5b8f921e9c8d76f53624c35bf25b9676bd73fa" - integrity sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg== +"@commitlint/resolve-extends@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-19.5.0.tgz#f3ec33e12d10df90cae0bfad8e593431fb61b18e" + integrity sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA== dependencies: - "@commitlint/config-validator" "^19.0.3" - "@commitlint/types" "^19.0.3" + "@commitlint/config-validator" "^19.5.0" + "@commitlint/types" "^19.5.0" global-directory "^4.0.1" import-meta-resolve "^4.0.0" lodash.mergewith "^4.6.2" resolve-from "^5.0.0" -"@commitlint/rules@^19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-19.0.3.tgz#de647a9055847cae4f3ae32b4798096b604584f3" - integrity sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw== +"@commitlint/rules@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-19.5.0.tgz#2a72ab506d49d7f33eda56f0ae072a3479429e74" + integrity sha512-hDW5TPyf/h1/EufSHEKSp6Hs+YVsDMHazfJ2azIk9tHPXS6UqSz1dIRs1gpqS3eMXgtkT7JH6TW4IShdqOwhAw== dependencies: - "@commitlint/ensure" "^19.0.3" - "@commitlint/message" "^19.0.0" - "@commitlint/to-lines" "^19.0.0" - "@commitlint/types" "^19.0.3" - execa "^8.0.1" + "@commitlint/ensure" "^19.5.0" + "@commitlint/message" "^19.5.0" + "@commitlint/to-lines" "^19.5.0" + "@commitlint/types" "^19.5.0" -"@commitlint/to-lines@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-19.0.0.tgz#aa6618eb371bafbc0cd3b48f0db565c4a40462c6" - integrity sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw== +"@commitlint/to-lines@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-19.5.0.tgz#e4b7f34f09064568c96a74de4f1fc9f466c4d472" + integrity sha512-R772oj3NHPkodOSRZ9bBVNq224DOxQtNef5Pl8l2M8ZnkkzQfeSTr4uxawV2Sd3ui05dUVzvLNnzenDBO1KBeQ== -"@commitlint/top-level@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-19.0.0.tgz#9c44d7cec533bb9598bfae9658737e2d6a903605" - integrity sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ== +"@commitlint/top-level@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-19.5.0.tgz#0017ffe39b5ba3611a1debd62efe28803601a14f" + integrity sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng== dependencies: find-up "^7.0.0" -"@commitlint/types@^19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-19.0.3.tgz#feff4ecac2b5c359f2a57f9ab094b2ac80ef0266" - integrity sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA== +"@commitlint/types@^19.0.3", "@commitlint/types@^19.5.0": + version "19.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-19.5.0.tgz#c5084d1231d4dd50e40bdb656ee7601f691400b3" + integrity sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg== dependencies: "@types/conventional-commits-parser" "^5.0.0" chalk "^5.3.0" @@ -190,22 +180,22 @@ solc-typed-ast "18.1.2" yargs "17.7.2" -"@defi-wonderland/prophet-core@0.0.0-3afab791": - version "0.0.0-3afab791" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-3afab791.tgz#e9e40fabf2ae50b1edbfca806d4159b29b64daec" - integrity sha512-0zvdUCehT2yMDzRPG60XUlMIwSESxeVqaWwVswnDlr3G4ISYhFl1kZvg4fShJTbB9pu9G9tfj19/zFXt0BFaHw== +"@defi-wonderland/prophet-core@0.0.0-823459fc": + version "0.0.0-823459fc" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-823459fc.tgz#a48f7b35899968468f37f5c9eb2c67a1c8a823ff" + integrity sha512-lqTFlKFUwt4yjBGnSUJf9PwNQE6MP4KJHUSCov2+yxJCkKHKzFlYQ7M25dAdebiwa6Hfd+XHQfLx1bzff6mM6Q== -"@defi-wonderland/prophet-core@0.0.0-4d28a0ec": - version "0.0.0-4d28a0ec" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-4d28a0ec.tgz#228896bb7b9b239c6c25b4deefa8b204d87d7118" - integrity sha512-BF+gSf+nZWNByr9V2/eUvdt7zHlScP0hF47L+grlllMHRadm8T7Eboo6jpIHOgMpLkfNAEVsOyg2vfvgABzACQ== +"@defi-wonderland/prophet-core@0.0.0-8bb062e0": + version "0.0.0-8bb062e0" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-8bb062e0.tgz#6678171885de8ddd484b7f51a8a8d6dca6ab9ab3" + integrity sha512-jjMly9ZjPHxxiBEpU6+OGNhyII+eDYYTVifTttX59uZTdmDsPSue818pkjr29YJJ62zGc0XEEe5Yzrwuirs5Tw== -"@defi-wonderland/prophet-modules@0.0.0-43e8be69": - version "0.0.0-43e8be69" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-43e8be69.tgz#64646bb83acb41767a0685df188a3b8597f99486" - integrity sha512-4DLkKph2RrDnv2Tq7YrD8W63Jddre8ZnoLnBIhzkbLtn2GZC0S8tZUTfBrNT2OWW2WO5OgJsGJOt08i50mHpjg== +"@defi-wonderland/prophet-modules@0.0.0-86078350": + version "0.0.0-86078350" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-86078350.tgz#902877ef3f6585cd1a61066f0989ed05ce2e5b89" + integrity sha512-vAooZ+EXiounXQ3fiTya9yslFk7THerCxnQGQFEtJCIJU3hadbr8AzZOr+uRyMljs5f2/62YBeZC64RAxj9S1w== dependencies: - "@defi-wonderland/prophet-core" "0.0.0-4d28a0ec" + "@defi-wonderland/prophet-core" "0.0.0-823459fc" "@openzeppelin/contracts" "4.9.5" solmate "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" @@ -248,9 +238,9 @@ integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== "@scure/base@~1.1.6": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" - integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== "@scure/bip32@1.4.0": version "1.4.0" @@ -284,11 +274,11 @@ "@types/node" "*" "@types/node@*": - version "22.1.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" - integrity sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw== + version "22.9.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" + integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== dependencies: - undici-types "~6.13.0" + undici-types "~6.19.8" JSONStream@^1.3.5: version "1.3.5" @@ -336,16 +326,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" @@ -402,9 +385,9 @@ available-typed-arrays@^1.0.7: possible-typed-array-names "^1.0.0" axios@^1.6.7: - version "1.7.3" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.3.tgz#a1125f2faf702bc8e8f2104ec3a76fab40257d85" - integrity sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw== + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -445,15 +428,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -491,13 +465,6 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -505,11 +472,6 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" @@ -580,11 +542,11 @@ conventional-commits-parser@^5.0.0: split2 "^4.0.0" cosmiconfig-typescript-loader@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz#0d3becfe022a871f7275ceb2397d692e06045dc8" - integrity sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA== + version "5.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.1.0.tgz#d8d02bff04e63faa2dc794d618168bd764c704be" + integrity sha512-7PtBB+6FdsOvZyJtlF3hEPpACq7RQX6BVGsgC7/lfVXnKMvNCu/XY3ykreqG5w/rBNdu2z8LCIKoF3kpHHdHlA== dependencies: - jiti "^1.19.1" + jiti "^1.21.6" cosmiconfig@^8.0.0: version "8.3.6" @@ -607,9 +569,9 @@ cosmiconfig@^9.0.0: parse-json "^5.2.0" cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.5.tgz#910aac880ff5243da96b728bc6521a5f6c2f2f82" + integrity sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" @@ -621,11 +583,11 @@ dargs@^8.0.0: integrity sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw== debug@~4.3.6: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" decimal.js@^10.4.3: version "10.4.3" @@ -676,9 +638,9 @@ dot-prop@^5.1.0: is-obj "^2.0.0" emoji-regex@^10.3.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" - integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + version "10.4.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.4.0.tgz#03553afea80b3975749cfcb36f776ca268e413d4" + integrity sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw== emoji-regex@^8.0.0: version "8.0.0" @@ -715,14 +677,9 @@ es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== escalade@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== ethereum-cryptography@^2.0.0: version "2.2.1" @@ -788,9 +745,9 @@ fast-json-stable-stringify@^2.0.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" - integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + version "3.0.3" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241" + integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw== fastq@^1.6.0: version "1.17.1" @@ -826,9 +783,9 @@ findup-sync@^5.0.0: resolve-dir "^1.0.1" follow-redirects@^1.12.1, follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== for-each@^0.3.3: version "0.3.3" @@ -842,9 +799,9 @@ for-each@^0.3.3: resolved "https://codeload.github.com/foundry-rs/forge-std/tar.gz/978ac6fadb62f5f0b723c996f64be52eddba6801" form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + version "4.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" @@ -875,9 +832,9 @@ get-caller-file@^2.0.5: integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-east-asian-width@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" - integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz#21b4071ee58ed04ee0db653371b55b4299875389" + integrity sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ== get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: version "1.2.4" @@ -986,11 +943,6 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "0.0.0" resolved "https://codeload.github.com/a16z/halmos-cheatcodes/tar.gz/c0d865508c0fee0a11b97732c5e90f9cad6b65a5" -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1040,14 +992,14 @@ human-signals@^5.0.0: integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== husky@>=8: - version "9.1.4" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.4.tgz#926fd19c18d345add5eab0a42b2b6d9a80259b34" - integrity sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA== + version "9.1.6" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.6.tgz#e23aa996b6203ab33534bdc82306b0cf2cb07d6c" + integrity sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A== ignore@^5.2.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.3.0: version "3.3.0" @@ -1183,7 +1135,7 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -jiti@^1.19.1: +jiti@^1.21.6: version "1.21.6" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== @@ -1250,9 +1202,9 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@>=10: - version "15.2.8" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.8.tgz#5e19eb7b4dbb922f56fafb4635b44ee3c92f7322" - integrity sha512-PUWFf2zQzsd9EFU+kM1d7UP+AZDbKFKuj+9JNVTBkhUFhbg4MAt6WfyMMwBfM4lYqd4D2Jwac5iuTu9rVj4zCQ== + version "15.2.10" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.10.tgz#92ac222f802ba911897dcf23671da5bb80643cd2" + integrity sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg== dependencies: chalk "~5.3.0" commander "~12.1.0" @@ -1260,15 +1212,15 @@ lint-staged@>=10: execa "~8.0.1" lilconfig "~3.1.2" listr2 "~8.2.4" - micromatch "~4.0.7" + micromatch "~4.0.8" pidtree "~0.6.0" string-argv "~0.3.2" yaml "~2.5.0" listr2@~8.2.4: - version "8.2.4" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.4.tgz#486b51cbdb41889108cb7e2c90eeb44519f5a77f" - integrity sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g== + version "8.2.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.5.tgz#5c9db996e1afeb05db0448196d3d5f64fec2593d" + integrity sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ== dependencies: cli-truncate "^4.0.0" colorette "^2.0.20" @@ -1370,10 +1322,10 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^4.0.4, micromatch@~4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== +micromatch@^4.0.4, micromatch@~4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" picomatch "^2.3.1" @@ -1412,10 +1364,10 @@ minimist@^1.2.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== npm-run-path@^5.1.0: version "5.3.0" @@ -1507,9 +1459,9 @@ path-type@^4.0.0: integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== picocolors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.3.1: version "2.3.1" @@ -1732,9 +1684,9 @@ solhint-community@4.0.0: optionalDependencies: prettier "^2.8.3" -"solmate@git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": +"solmate@https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": version "6.1.0" - resolved "git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" + resolved "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" sort-object-keys@^1.1.3: version "1.1.3" @@ -1807,13 +1759,6 @@ strip-final-newline@^3.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -1847,6 +1792,11 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== +tinyexec@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98" + integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== + tmp@0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -1861,10 +1811,10 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -undici-types@~6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.13.0.tgz#e3e79220ab8c81ed1496b5812471afd7cf075ea5" - integrity sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg== +undici-types@~6.19.8: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== unicorn-magic@^0.1.0: version "0.1.0" @@ -1894,38 +1844,38 @@ util@^0.12.5: is-typed-array "^1.1.3" which-typed-array "^1.1.2" -web3-errors@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.2.1.tgz#2f31cb814bd262a45b65f7701f56a0167d697ec2" - integrity sha512-dIsi8SFC9TCAWpPmacXeVMk/F8tDNa1Bvg8/Cc2cvJo8LRSWd099szEyb+/SiMYcLlEbwftiT9Rpukz7ql4hBg== +web3-errors@^1.2.0, web3-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.3.0.tgz#504e4d3218899df108856940087a8022d6688d74" + integrity sha512-j5JkAKCtuVMbY3F5PYXBqg1vWrtF4jcyyMY1rlw8a4PV67AkqlepjGgpzWJZd56Mt+TvHy6DA1F/3Id8LatDSQ== dependencies: web3-types "^1.7.0" web3-eth-abi@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-4.2.3.tgz#9efad6a45d7d6e52bb1eba56cbe45a3a321443e3" - integrity sha512-rPVwTn0O1CzbtfXwEfIjUP0W5Y7u1OFjugwKpSqJzPQE6+REBg6OELjomTGZBu+GThxHnv0rp15SOxvqp+tyXA== + version "4.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-4.4.0.tgz#30ded71d585b41d2f0f1f5d7c74faa2a4e70d240" + integrity sha512-RQzt9W93OgFBwOdNGcc9ulCyYt4zmRAMkKGbEdp3wcN4vmwTlRhh21+akj2ND4bg3C3RUiP4yprYgDEyN0/Fmg== dependencies: abitype "0.7.1" - web3-errors "^1.2.0" - web3-types "^1.7.0" - web3-utils "^4.3.1" + web3-errors "^1.3.0" + web3-types "^1.9.0" + web3-utils "^4.3.2" web3-validator "^2.0.6" -web3-types@^1.6.0, web3-types@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.7.0.tgz#9945fa644af96b20b1db18564aff9ab8db00df59" - integrity sha512-nhXxDJ7a5FesRw9UG5SZdP/C/3Q2EzHGnB39hkAV+YGXDMgwxBXFWebQLfEzZzuArfHnvC0sQqkIHNwSKcVjdA== +web3-types@^1.6.0, web3-types@^1.7.0, web3-types@^1.8.1, web3-types@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.9.0.tgz#4cfd17d5d3485797df1d72de8f2f8d03b0d1ac61" + integrity sha512-I520KBPoXqEaM/ybj6xHD1E3gRb8/WdudLQaRBvJNQSSfHuPW9P2sD59mbhm6dsKtnje+T90dIxSyzVVFlEdlg== -web3-utils@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.3.1.tgz#3dcd75e3c683c26f0ba824bf27d7bc0a68b111de" - integrity sha512-kGwOk8FxOLJ9DQC68yqNQc7AzN+k9YDLaW+ZjlAXs3qORhf8zXk5SxWAAGLbLykMs3vTeB0FTb1Exut4JEYfFA== +web3-utils@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.3.2.tgz#a952428d677b635fd0c16044ae4c534807a39639" + integrity sha512-bEFpYEBMf6ER78Uvj2mdsCbaLGLK9kABOsa3TtXOEEhuaMy/RK0KlRkKoZ2vmf/p3hB8e1q5erknZ6Hy7AVp7A== dependencies: ethereum-cryptography "^2.0.0" eventemitter3 "^5.0.1" - web3-errors "^1.2.0" - web3-types "^1.7.0" + web3-errors "^1.3.0" + web3-types "^1.8.1" web3-validator "^2.0.6" web3-validator@^2.0.6: @@ -1993,9 +1943,9 @@ y18n@^5.0.5: integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yaml@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" - integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== + version "2.5.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130" + integrity sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q== yargs-parser@^21.1.1: version "21.1.1" From 89102e3ebc45eebf748ad35269385d04d245c235 Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:15:56 +0400 Subject: [PATCH 13/20] refactor: rename a returned value --- src/interfaces/IEBORequestCreator.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/IEBORequestCreator.sol b/src/interfaces/IEBORequestCreator.sol index ce8ead1..39cc8f6 100644 --- a/src/interfaces/IEBORequestCreator.sol +++ b/src/interfaces/IEBORequestCreator.sol @@ -153,7 +153,7 @@ interface IEBORequestCreator { * @return _disputeModule The dispute module address * @return _resolutionModule The resolution module address * @return _finalityModule The finality module address - * @return _accessControlModule The address of the access control module + * @return _accessModule The address of the access control module * @return _requestModuleData The request module data * @return _responseModuleData The response module data * @return _disputeModuleData The dispute module data @@ -171,7 +171,7 @@ interface IEBORequestCreator { address _disputeModule, address _resolutionModule, address _finalityModule, - address _accessControlModule, + address _accessModule, bytes memory _requestModuleData, bytes memory _responseModuleData, bytes memory _disputeModuleData, From 8f63592d483c86e2612c5292773ce60e5a6890f4 Mon Sep 17 00:00:00 2001 From: Gas One Cent <86567384+gas1cent@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:16:58 +0400 Subject: [PATCH 14/20] fix: resolve a TODO --- src/contracts/CouncilArbitrator.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/src/contracts/CouncilArbitrator.sol b/src/contracts/CouncilArbitrator.sol index 72ba49f..de15186 100644 --- a/src/contracts/CouncilArbitrator.sol +++ b/src/contracts/CouncilArbitrator.sol @@ -70,7 +70,6 @@ contract CouncilArbitrator is ICouncilArbitrator { if (getAnswer[_disputeId] != IOracle.DisputeStatus.None) revert CouncilArbitrator_DisputeAlreadyArbitrated(); getAnswer[_disputeId] = _award; - // TODO: Make sure the access control is correct IAccessController.AccessControl memory _accessControl = IAccessController.AccessControl({user: address(this), data: bytes('')}); From a25f2aa620c566e3a2d61d7718bf4f1457317d7f Mon Sep 17 00:00:00 2001 From: zorzal Date: Tue, 12 Nov 2024 14:32:04 -0500 Subject: [PATCH 15/20] chore: remove todos --- src/contracts/EBORequestCreator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/EBORequestCreator.sol b/src/contracts/EBORequestCreator.sol index 3a7231a..edd42bf 100644 --- a/src/contracts/EBORequestCreator.sol +++ b/src/contracts/EBORequestCreator.sol @@ -84,7 +84,7 @@ contract EBORequestCreator is IEBORequestCreator { _requestModuleData.chainId = _chainId; _requestData.requestModuleData = abi.encode(_requestModuleData); - // TODO: Make sure the access control is correct + // default access control IAccessController.AccessControl memory _accessControl = IAccessController.AccessControl({user: address(this), data: bytes('')}); _requestId = ORACLE.createRequest(_requestData, bytes32(0), _accessControl); From e108a7f3beee88d9452cadd1d5bade41cfb6c4d5 Mon Sep 17 00:00:00 2001 From: zorzal Date: Tue, 12 Nov 2024 14:32:32 -0500 Subject: [PATCH 16/20] feat: accessControlModule is now accessModule --- src/interfaces/IEBORequestCreator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/IEBORequestCreator.sol b/src/interfaces/IEBORequestCreator.sol index 39cc8f6..3df7fac 100644 --- a/src/interfaces/IEBORequestCreator.sol +++ b/src/interfaces/IEBORequestCreator.sol @@ -153,7 +153,7 @@ interface IEBORequestCreator { * @return _disputeModule The dispute module address * @return _resolutionModule The resolution module address * @return _finalityModule The finality module address - * @return _accessModule The address of the access control module + * @return _accessModule The address of the access module * @return _requestModuleData The request module data * @return _responseModuleData The response module data * @return _disputeModuleData The dispute module data From f6e17627d0512e6ca0bbe97ad96037f537466c63 Mon Sep 17 00:00:00 2001 From: zorzal Date: Tue, 12 Nov 2024 14:33:08 -0500 Subject: [PATCH 17/20] feat: create access control objects using internal function --- test/integration/arbitrum/CreateRequest.t.sol | 9 +++--- .../arbitrum/IntegrationBase.t.sol | 30 ++++--------------- test/unit/CouncilArbitrator.t.sol | 18 +++++++---- 3 files changed, 23 insertions(+), 34 deletions(-) diff --git a/test/integration/arbitrum/CreateRequest.t.sol b/test/integration/arbitrum/CreateRequest.t.sol index 46a85d0..658b2e2 100644 --- a/test/integration/arbitrum/CreateRequest.t.sol +++ b/test/integration/arbitrum/CreateRequest.t.sol @@ -20,10 +20,9 @@ contract IntegrationCreateRequest is IntegrationBase { // Should revert if the requester is not the EBORequestCreator vm.expectRevert(IEBORequestModule.EBORequestModule_InvalidRequester.selector); _requestData.requester = _requester; - _accessControl.user = _requester; vm.prank(_requester); - oracle.createRequest(_requestData, '', _accessControl); + oracle.createRequest(_requestData, '', _createAccessControl()); // Should revert if the epoch is invalid vm.expectRevert(IEBORequestCreator.EBORequestCreator_InvalidEpoch.selector); @@ -44,11 +43,13 @@ contract IntegrationCreateRequest is IntegrationBase { _requestParams.chainId = _chainId; _requestData.requestModuleData = abi.encode(_requestParams); _requestData.requester = address(eboRequestCreator); - _accessControl.user = address(eboRequestCreator); // Expect the oracle to create the request vm.expectCall( - address(oracle), abi.encodeWithSelector(IOracle.createRequest.selector, _requestData, bytes32(0), _accessControl) + address(oracle), + abi.encodeWithSelector( + IOracle.createRequest.selector, _requestData, bytes32(0), _createAccessControl(address(eboRequestCreator)) + ) ); vm.prank(_requester); diff --git a/test/integration/arbitrum/IntegrationBase.t.sol b/test/integration/arbitrum/IntegrationBase.t.sol index 6babbb9..41d6243 100644 --- a/test/integration/arbitrum/IntegrationBase.t.sol +++ b/test/integration/arbitrum/IntegrationBase.t.sol @@ -38,8 +38,6 @@ contract IntegrationBase is Deploy, Test, Helpers { uint256 internal _currentEpoch; uint256 internal _blockNumber; - IAccessController.AccessControl internal _accessControl; - function setUp() public virtual override { vm.createSelectFork(vm.rpcUrl('arbitrum'), _ARBITRUM_SEPOLIA_FORK_BLOCK); @@ -66,9 +64,6 @@ contract IntegrationBase is Deploy, Test, Helpers { // Set block number _blockNumber = block.number; - - // Configure the access control - _accessControl = IAccessController.AccessControl({user: address(0), data: bytes('')}); } function _createRequest() internal returns (bytes32 _requestId) { @@ -95,11 +90,8 @@ contract IntegrationBase is Deploy, Test, Helpers { IOracle.Request memory _requestData = _requests[_requestId]; IOracle.Response memory _responseData = _instantiateResponseData(_requestId); - // Set the caller - _accessControl.user = _proposer; - vm.prank(_proposer); - oracle.proposeResponse(_requestData, _responseData, _accessControl); + oracle.proposeResponse(_requestData, _responseData, _createAccessControl()); _responseId = _responseData._getId(); _responses[_responseId] = _responseData; @@ -110,11 +102,8 @@ contract IntegrationBase is Deploy, Test, Helpers { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _instantiateDisputeData(_requestId, _responseId); - // Set the caller - _accessControl.user = _disputer; - vm.prank(_disputer); - oracle.disputeResponse(_requestData, _responseData, _disputeData, _accessControl); + oracle.disputeResponse(_requestData, _responseData, _disputeData, _createAccessControl()); _disputeId = _disputeData._getId(); _disputes[_disputeId] = _disputeData; @@ -151,10 +140,7 @@ contract IntegrationBase is Deploy, Test, Helpers { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _disputes[_disputeId]; - // Set the caller - _accessControl.user = address(this); - - oracle.escalateDispute(_requestData, _responseData, _disputeData, _accessControl); + oracle.escalateDispute(_requestData, _responseData, _disputeData, _createAccessControl(address(this))); } function _resolveDispute(bytes32 _requestId, bytes32 _responseId, bytes32 _disputeId) internal { @@ -162,10 +148,7 @@ contract IntegrationBase is Deploy, Test, Helpers { IOracle.Response memory _responseData = _responses[_responseId]; IOracle.Dispute memory _disputeData = _disputes[_disputeId]; - // Set the caller - _accessControl.user = address(this); - - oracle.resolveDispute(_requestData, _responseData, _disputeData, _accessControl); + oracle.resolveDispute(_requestData, _responseData, _disputeData, _createAccessControl(address(this))); } function _arbitrateDispute(bytes32 _disputeId, IOracle.DisputeStatus _award) internal { @@ -177,10 +160,7 @@ contract IntegrationBase is Deploy, Test, Helpers { IOracle.Request memory _requestData = _requests[_requestId]; IOracle.Response memory _responseData = _responses[_responseId]; - // Set the caller - _accessControl.user = address(this); - - oracle.finalize(_requestData, _responseData, _accessControl); + oracle.finalize(_requestData, _responseData, _createAccessControl(address(this))); } function _releaseUnfinalizableResponseBond(bytes32 _requestId, bytes32 _responseId) internal { diff --git a/test/unit/CouncilArbitrator.t.sol b/test/unit/CouncilArbitrator.t.sol index b9bf5b3..1657815 100644 --- a/test/unit/CouncilArbitrator.t.sol +++ b/test/unit/CouncilArbitrator.t.sol @@ -43,7 +43,6 @@ contract CouncilArbitrator_Unit_BaseTest is Test, Helpers { IOracle public oracle; IArbitratorModule public arbitratorModule; IArbitrable public arbitrable; - IAccessController.AccessControl internal _accessControl; event ResolutionStarted( bytes32 indexed _disputeId, IOracle.Request _request, IOracle.Response _response, IOracle.Dispute _dispute @@ -60,7 +59,6 @@ contract CouncilArbitrator_Unit_BaseTest is Test, Helpers { vm.mockCall(address(arbitratorModule), abi.encodeCall(IValidator.ORACLE, ()), abi.encode(oracle)); councilArbitrator = new MockCouncilArbitrator(arbitratorModule, arbitrable); - _accessControl = IAccessController.AccessControl({user: address(councilArbitrator), data: bytes('')}); } function _mockGetAnswer(bytes32 _disputeId, IOracle.DisputeStatus _status) internal { @@ -214,7 +212,7 @@ contract CouncilArbitrator_Unit_ArbitrateDispute is CouncilArbitrator_Unit_BaseT _params.resolutionParams.request, _params.resolutionParams.response, _params.resolutionParams.dispute, - _accessControl + _createAccessControl(address(councilArbitrator)) ) ) ); @@ -231,7 +229,12 @@ contract CouncilArbitrator_Unit_ArbitrateDispute is CouncilArbitrator_Unit_BaseT vm.expectCall( address(oracle), abi.encodeCall( - IOracle.finalize, (_params.resolutionParams.request, _params.resolutionParams.response, _accessControl) + IOracle.finalize, + ( + _params.resolutionParams.request, + _params.resolutionParams.response, + _createAccessControl(address(councilArbitrator)) + ) ) ); councilArbitrator.arbitrateDispute(_params.disputeId, IOracle.DisputeStatus(_params.award)); @@ -248,7 +251,12 @@ contract CouncilArbitrator_Unit_ArbitrateDispute is CouncilArbitrator_Unit_BaseT vm.expectCall( address(oracle), abi.encodeCall( - IOracle.finalize, (_params.resolutionParams.request, _params.resolutionParams.response, _accessControl) + IOracle.finalize, + ( + _params.resolutionParams.request, + _params.resolutionParams.response, + _createAccessControl(address(councilArbitrator)) + ) ) ); councilArbitrator.arbitrateDispute(_params.disputeId, IOracle.DisputeStatus(_params.award)); From 992c835bfb522b438f46432bfda504837795d9fb Mon Sep 17 00:00:00 2001 From: zorzal Date: Tue, 12 Nov 2024 14:45:28 -0500 Subject: [PATCH 18/20] feat: no need for ModuleAccessController in Finality and Request --- src/contracts/EBOFinalityModule.sol | 10 ++-------- src/contracts/EBORequestModule.sol | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/contracts/EBOFinalityModule.sol b/src/contracts/EBOFinalityModule.sol index 7f6ee62..e6495a1 100644 --- a/src/contracts/EBOFinalityModule.sol +++ b/src/contracts/EBOFinalityModule.sol @@ -2,8 +2,6 @@ pragma solidity 0.8.26; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; -import {ModuleAccessController} from - '@defi-wonderland/prophet-modules/solidity/contracts/modules/access/ModuleAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; @@ -20,7 +18,7 @@ import { * @notice Module allowing users to index data into the subgraph * as a result of a request being finalized */ -contract EBOFinalityModule is ModuleAccessController, IEBOFinalityModule { +contract EBOFinalityModule is Module, IEBOFinalityModule { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IEBOFinalityModule @@ -37,11 +35,7 @@ contract EBOFinalityModule is ModuleAccessController, IEBOFinalityModule { * @param _eboRequestCreator The address of the EBORequestCreator * @param _arbitrable The address of the Arbitrable contract */ - constructor( - IOracle _oracle, - IEBORequestCreator _eboRequestCreator, - IArbitrable _arbitrable - ) ModuleAccessController(_oracle) { + constructor(IOracle _oracle, IEBORequestCreator _eboRequestCreator, IArbitrable _arbitrable) Module(_oracle) { _addEBORequestCreator(_eboRequestCreator); ARBITRABLE = _arbitrable; } diff --git a/src/contracts/EBORequestModule.sol b/src/contracts/EBORequestModule.sol index edccefe..2355610 100644 --- a/src/contracts/EBORequestModule.sol +++ b/src/contracts/EBORequestModule.sol @@ -2,8 +2,6 @@ pragma solidity 0.8.26; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; -import {ModuleAccessController} from - '@defi-wonderland/prophet-modules/solidity/contracts/modules/access/ModuleAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import {IArbitrable, IEBORequestCreator, IEBORequestModule, IOracle} from 'interfaces/IEBORequestModule.sol'; @@ -12,7 +10,7 @@ import {IArbitrable, IEBORequestCreator, IEBORequestModule, IOracle} from 'inter * @title EBORequestModule * @notice Module allowing users to create a request for RPC data for a specific epoch */ -contract EBORequestModule is ModuleAccessController, IEBORequestModule { +contract EBORequestModule is Module, IEBORequestModule { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IEBORequestModule @@ -29,11 +27,7 @@ contract EBORequestModule is ModuleAccessController, IEBORequestModule { * @param _eboRequestCreator The address of the EBORequestCreator * @param _arbitrable The address of the Arbitrable contract */ - constructor( - IOracle _oracle, - IEBORequestCreator _eboRequestCreator, - IArbitrable _arbitrable - ) ModuleAccessController(_oracle) { + constructor(IOracle _oracle, IEBORequestCreator _eboRequestCreator, IArbitrable _arbitrable) Module(_oracle) { _addEBORequestCreator(_eboRequestCreator); ARBITRABLE = _arbitrable; } From 205cfa71b11cc545cbec93085005560432c83539 Mon Sep 17 00:00:00 2001 From: xorsal Date: Mon, 18 Nov 2024 11:10:38 -0500 Subject: [PATCH 19/20] feat: operator access module (#52) Closes GRT-227 --------- Co-authored-by: Ashitaka --- package.json | 6 +- src/contracts/CouncilArbitrator.sol | 5 +- src/contracts/EBOAccessModule.sol | 79 ++++++++++ src/contracts/EBORequestCreator.sol | 3 +- src/interfaces/IEBOAccessModule.sol | 55 +++++++ src/interfaces/external/IHorizonStaking.sol | 9 ++ .../integration/arbitrum/BondEscalation.t.sol | 8 +- .../arbitrum/DisputeResponse.t.sol | 2 +- .../arbitrum/IntegrationBase.t.sol | 2 +- test/unit/CouncilArbitrator.t.sol | 8 +- test/unit/EBOAccessModule.t.sol | 148 ++++++++++++++++++ test/unit/EBORequestCreator.t.sol | 2 +- test/unit/HorizonAccountingExtension.t.sol | 134 +++++++++++++--- test/utils/Helpers.sol | 2 +- yarn.lock | 36 ++--- 15 files changed, 439 insertions(+), 60 deletions(-) create mode 100644 src/contracts/EBOAccessModule.sol create mode 100644 src/interfaces/IEBOAccessModule.sol create mode 100644 test/unit/EBOAccessModule.t.sol diff --git a/package.json b/package.json index 314c053..0441263 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "forge build", "build:optimized": "FOUNDRY_PROFILE=optimized forge build", - "coverage": "forge coverage --report summary --report lcov --match-path 'test/unit/*'", + "coverage": "forge coverage --ir-minimum --report summary --report lcov --match-path 'test/unit/*'", "deploy:arbitrum": "bash -c 'source .env && forge script Deploy --rpc-url arbitrum --account $ARBITRUM_DEPLOYER_NAME --broadcast --verify --chain arbitrum -vvvvv'", "lint:check": "yarn lint:sol-tests && yarn lint:sol-logic && forge fmt --check", "lint:fix": "sort-package-json && forge fmt && yarn lint:sol-tests --fix && yarn lint:sol-logic --fix", @@ -34,8 +34,8 @@ "package.json": "sort-package-json" }, "dependencies": { - "@defi-wonderland/prophet-core": "0.0.0-8bb062e0", - "@defi-wonderland/prophet-modules": "0.0.0-86078350" + "@defi-wonderland/prophet-core": "0.0.0-819e5fe9", + "@defi-wonderland/prophet-modules": "0.0.0-022dfec8" }, "devDependencies": { "@commitlint/cli": "19.3.0", diff --git a/src/contracts/CouncilArbitrator.sol b/src/contracts/CouncilArbitrator.sol index de15186..550fc12 100644 --- a/src/contracts/CouncilArbitrator.sol +++ b/src/contracts/CouncilArbitrator.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; -import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/access/IAccessController.sol'; import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/ValidatorLib.sol'; import {IArbitrator} from '@defi-wonderland/prophet-modules/solidity/interfaces/IArbitrator.sol'; @@ -49,8 +49,7 @@ contract CouncilArbitrator is ICouncilArbitrator { function resolve( IOracle.Request calldata _request, IOracle.Response calldata _response, - IOracle.Dispute calldata _dispute, - IAccessController.AccessControl calldata _accessControl + IOracle.Dispute calldata _dispute ) external onlyArbitratorModule returns (bytes memory /* _data */ ) { bytes32 _disputeId = _dispute._getId(); diff --git a/src/contracts/EBOAccessModule.sol b/src/contracts/EBOAccessModule.sol new file mode 100644 index 0000000..fe11717 --- /dev/null +++ b/src/contracts/EBOAccessModule.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.26; + +import { + IAccessModule, + IArbitrable, + IEBOAccessModule, + IHorizonAccountingExtension, + IHorizonStaking, + IOracle +} from 'interfaces/IEBOAccessModule.sol'; + +import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; + +contract EBOAccessModule is IEBOAccessModule, Module { + /// @inheritdoc IEBOAccessModule + IArbitrable public immutable ARBITRABLE; + /// @inheritdoc IEBOAccessModule + IHorizonStaking public horizonStaking; + /// @inheritdoc IEBOAccessModule + IHorizonAccountingExtension public horizonAccountingExtension; + + /** + * @notice Constructor + * @param _oracle The address of the Oracle + * @param _arbitrable The address of the Arbitrable contract + * @param _horizonAccountingExtension The address of the Horizon Accounting Extension contract + */ + constructor( + IOracle _oracle, + IArbitrable _arbitrable, + IHorizonAccountingExtension _horizonAccountingExtension + ) Module(_oracle) { + ARBITRABLE = _arbitrable; + _setHorizonAccountingExtension(_horizonAccountingExtension); + } + + /// @inheritdoc IAccessModule + function decodeAccessControlParameters(bytes calldata _data) + public + pure + returns (IAccessModule.AccessControlParameters memory _params) + { + _params = abi.decode(_data, (IAccessModule.AccessControlParameters)); + } + + /// @inheritdoc IAccessModule + function hasAccess(bytes calldata _data) external view returns (bool _hasAccess) { + IAccessModule.AccessControlParameters memory _params = decodeAccessControlParameters(_data); + _hasAccess = + horizonStaking.isAuthorized(_params.accessControl.user, address(horizonAccountingExtension), _params.sender); + } + + /// @inheritdoc IEBOAccessModule + function setHorizonAccountingExtension(IHorizonAccountingExtension _horizonAccountingExtension) external { + ARBITRABLE.validateArbitrator(msg.sender); + + _setHorizonAccountingExtension(_horizonAccountingExtension); + } + + /// @inheritdoc IModule + function moduleName() external pure returns (string memory _moduleName) { + _moduleName = 'EBOAccessModule'; + } + + /** + * @notice Internal function to set the horizon accounting extension contract. + * @dev It also updates the `horizonStaking` address. + * @param _horizonAccountingExtension The new horizon accounting extension contract. + */ + function _setHorizonAccountingExtension(IHorizonAccountingExtension _horizonAccountingExtension) internal { + horizonAccountingExtension = _horizonAccountingExtension; + + // also update horizon staking address using the accounting extension view function + horizonStaking = _horizonAccountingExtension.HORIZON_STAKING(); + + emit HorizonAccountingExtensionSet(_horizonAccountingExtension); + } +} diff --git a/src/contracts/EBORequestCreator.sol b/src/contracts/EBORequestCreator.sol index edd42bf..ef40f89 100644 --- a/src/contracts/EBORequestCreator.sol +++ b/src/contracts/EBORequestCreator.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; -import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/access/IAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import { @@ -84,7 +84,6 @@ contract EBORequestCreator is IEBORequestCreator { _requestModuleData.chainId = _chainId; _requestData.requestModuleData = abi.encode(_requestModuleData); - // default access control IAccessController.AccessControl memory _accessControl = IAccessController.AccessControl({user: address(this), data: bytes('')}); _requestId = ORACLE.createRequest(_requestData, bytes32(0), _accessControl); diff --git a/src/interfaces/IEBOAccessModule.sol b/src/interfaces/IEBOAccessModule.sol new file mode 100644 index 0000000..c6d6798 --- /dev/null +++ b/src/interfaces/IEBOAccessModule.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.26; + +import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; +import {IAccessModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/access/IAccessModule.sol'; + +import {IHorizonAccountingExtension} from 'interfaces/IHorizonAccountingExtension.sol'; + +import {IHorizonStaking} from 'interfaces/external/IHorizonStaking.sol'; + +import {IArbitrable} from 'interfaces/IArbitrable.sol'; + +interface IEBOAccessModule is IAccessModule { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Emitted when the Horizon Accounting Extension contract is set + * @param _horizonAccountingExtension The new Horizon Accounting Extension contract + */ + event HorizonAccountingExtensionSet(IHorizonAccountingExtension indexed _horizonAccountingExtension); + + /*/////////////////////////////////////////////////////////////// + VARIABLES + //////////////////////////////////////////////////////////////*/ + + /** + * @notice The Arbitrable contract + * @return _arbitrable The Arbitrable contract + */ + function ARBITRABLE() external view returns (IArbitrable _arbitrable); + + /** + * @notice The Horizon Accounting Extension contract + * @return _horizonAccountingExtension The Horizon Accounting Extension contract + */ + function horizonAccountingExtension() external view returns (IHorizonAccountingExtension _horizonAccountingExtension); + + /** + * @notice The Horizon Staking contract + * @return _horizonStaking The Horizon Staking contract + */ + function horizonStaking() external view returns (IHorizonStaking _horizonStaking); + + /*/////////////////////////////////////////////////////////////// + LOGIC + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Sets the Horizon Accounting Extension contract + * @param _horizonAccountingExtension The new Horizon Accounting Extension contract + */ + function setHorizonAccountingExtension(IHorizonAccountingExtension _horizonAccountingExtension) external; +} diff --git a/src/interfaces/external/IHorizonStaking.sol b/src/interfaces/external/IHorizonStaking.sol index 4df32ff..d351a11 100644 --- a/src/interfaces/external/IHorizonStaking.sol +++ b/src/interfaces/external/IHorizonStaking.sol @@ -132,4 +132,13 @@ interface IHorizonStaking { * @param verifierDestination The address to transfer the verifier cut to */ function slash(address serviceProvider, uint256 tokens, uint256 tokensVerifier, address verifierDestination) external; + + /** + * @notice Check if an operator is authorized for the caller on a specific verifier / data service. + * @param serviceProvider The service provider on behalf of whom they're claiming to act + * @param verifier The verifier / data service on which they're claiming to act + * @param operator The address to check for auth + * @return Whether the operator is authorized or not + */ + function isAuthorized(address serviceProvider, address verifier, address operator) external view returns (bool); } diff --git a/test/integration/arbitrum/BondEscalation.t.sol b/test/integration/arbitrum/BondEscalation.t.sol index 6b805d4..3de635e 100644 --- a/test/integration/arbitrum/BondEscalation.t.sol +++ b/test/integration/arbitrum/BondEscalation.t.sol @@ -54,7 +54,7 @@ contract IntegrationBondEscalation is IntegrationBase { _pledgeForDispute(_requestId, _disputeId); // Do not pass the dispute deadline nor the tying buffer - vm.warp(_disputeCreatedAt + disputeDeadline); + vm.warp(_disputeCreatedAt + disputeDeadline - 1); // Thaw some tokens uint256 _tokensToThaw = disputeBondSize * (maxNumberOfEscalations - 1) + 1; @@ -101,7 +101,7 @@ contract IntegrationBondEscalation is IntegrationBase { _pledgeAgainstDispute(_requestId, _disputeId); // Do not pass the dispute deadline nor the tying buffer - vm.warp(_disputeCreatedAt + disputeDeadline); + vm.warp(_disputeCreatedAt + disputeDeadline - 1); // Thaw some tokens uint256 _tokensToThaw = disputeBondSize * (maxNumberOfEscalations - 1) + 1; @@ -226,7 +226,7 @@ contract IntegrationBondEscalation is IntegrationBase { _settleBondEscalation(_requestId, _responseId, _disputeId); // Do not pass the dispute deadline nor the tying buffer - vm.warp(_disputeCreatedAt + disputeDeadline); + vm.warp(_disputeCreatedAt + disputeDeadline - 1); // Pledge against the dispute _pledgeAgainstDispute(_requestId, _disputeId); @@ -291,7 +291,7 @@ contract IntegrationBondEscalation is IntegrationBase { _settleBondEscalation(_requestId, _responseId, _disputeId); // Do not pass the dispute deadline nor the tying buffer - vm.warp(_disputeCreatedAt + disputeDeadline); + vm.warp(_disputeCreatedAt + disputeDeadline - 1); // Pledge for the dispute _pledgeForDispute(_requestId, _disputeId); diff --git a/test/integration/arbitrum/DisputeResponse.t.sol b/test/integration/arbitrum/DisputeResponse.t.sol index a1d5b93..9f50508 100644 --- a/test/integration/arbitrum/DisputeResponse.t.sol +++ b/test/integration/arbitrum/DisputeResponse.t.sol @@ -40,7 +40,7 @@ contract IntegrationDisputeResponse is IntegrationBase { _disputeResponse(_requestId, _responseId); // Do not pass the dispute window - vm.warp(_responseCreation + disputeDisputeWindow); + vm.warp(_responseCreation + disputeDisputeWindow - 1); // Thaw some tokens _thaw(_disputer, 1); diff --git a/test/integration/arbitrum/IntegrationBase.t.sol b/test/integration/arbitrum/IntegrationBase.t.sol index 41d6243..a651f95 100644 --- a/test/integration/arbitrum/IntegrationBase.t.sol +++ b/test/integration/arbitrum/IntegrationBase.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; -import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/access/IAccessController.sol'; import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/ValidatorLib.sol'; import {_ARBITRUM_SEPOLIA_GOVERNOR} from 'script/Constants.sol'; diff --git a/test/unit/CouncilArbitrator.t.sol b/test/unit/CouncilArbitrator.t.sol index 1657815..8246d68 100644 --- a/test/unit/CouncilArbitrator.t.sol +++ b/test/unit/CouncilArbitrator.t.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.26; -import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {IValidator} from '@defi-wonderland/prophet-core/solidity/interfaces/IValidator.sol'; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/access/IAccessController.sol'; import {Helpers} from 'test/utils/Helpers.sol'; @@ -116,11 +116,11 @@ contract CouncilArbitrator_Unit_Resolve is CouncilArbitrator_Unit_BaseTest { changePrank(_caller); vm.expectRevert(ICouncilArbitrator.CouncilArbitrator_OnlyArbitratorModule.selector); - councilArbitrator.resolve(_params.request, _params.response, _params.dispute, _createAccessControl()); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute); } function test_setResolutions(ICouncilArbitrator.ResolutionParameters calldata _params) public happyPath { - councilArbitrator.resolve(_params.request, _params.response, _params.dispute, _createAccessControl()); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute); bytes32 _disputeId = _params.dispute._getId(); (IOracle.Request memory _request, IOracle.Response memory _response, IOracle.Dispute memory _dispute) = @@ -136,7 +136,7 @@ contract CouncilArbitrator_Unit_Resolve is CouncilArbitrator_Unit_BaseTest { vm.expectEmit(); emit ResolutionStarted(_disputeId, _params.request, _params.response, _params.dispute); - councilArbitrator.resolve(_params.request, _params.response, _params.dispute, _createAccessControl()); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute); } } diff --git a/test/unit/EBOAccessModule.t.sol b/test/unit/EBOAccessModule.t.sol new file mode 100644 index 0000000..2364b41 --- /dev/null +++ b/test/unit/EBOAccessModule.t.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.26; + +import '../utils/Helpers.sol'; +import { + EBOAccessModule, + IAccessModule, + IArbitrable, + IEBOAccessModule, + IHorizonAccountingExtension, + IHorizonStaking, + IOracle +} from 'contracts/EBOAccessModule.sol'; + +contract EBOAccessModuleForTest is EBOAccessModule { + constructor( + IOracle _oracle, + IArbitrable _arbitrable, + IHorizonAccountingExtension _horizonAccountingExtension + ) EBOAccessModule(_oracle, _arbitrable, _horizonAccountingExtension) {} + + function setHorizonAccountingExtensionForTest(IHorizonAccountingExtension _horizonAccountingExtension) external { + horizonAccountingExtension = _horizonAccountingExtension; + horizonStaking = _horizonAccountingExtension.HORIZON_STAKING(); + } +} + +contract EBOAccessModule_Unit_BaseTest is Helpers { + // Contracts + EBOAccessModuleForTest public eboAccessModule; + IOracle public oracle; + IArbitrable public arbitrable; + IHorizonAccountingExtension public horizonAccountingExtension; + IHorizonStaking internal horizonStaking = IHorizonStaking(makeAddr('horizonStaking')); + + function setUp() public { + oracle = IOracle(makeAddr('oracle')); + arbitrable = IArbitrable(makeAddr('arbitrable')); + horizonAccountingExtension = IHorizonAccountingExtension(makeAddr('horizonAccountingExtension')); + + _mockHorizonStakingCall(horizonAccountingExtension, horizonStaking); + + eboAccessModule = new EBOAccessModuleForTest(oracle, arbitrable, horizonAccountingExtension); + } + + function _mockHorizonStakingCall( + IHorizonAccountingExtension _horizonAccountingExtension, + IHorizonStaking _horizonStaking + ) internal { + vm.mockCall( + address(_horizonAccountingExtension), + abi.encodeCall(IHorizonAccountingExtension.HORIZON_STAKING, ()), + abi.encode(address(_horizonStaking)) + ); + } +} + +contract EBOAccessModule_Unit_Constructor is EBOAccessModule_Unit_BaseTest { + struct ConstructorParams { + IOracle oracle; + IArbitrable arbitrable; + IHorizonAccountingExtension horizonAccountingExtension; + } + + function test_setOracle(ConstructorParams calldata _params) public { + _assumeFuzzable(address(_params.horizonAccountingExtension)); + _mockHorizonStakingCall(_params.horizonAccountingExtension, horizonStaking); + + eboAccessModule = new EBOAccessModuleForTest(_params.oracle, _params.arbitrable, _params.horizonAccountingExtension); + + assertEq(address(eboAccessModule.ORACLE()), address(_params.oracle)); + } + + function test_setArbitrable(ConstructorParams calldata _params) public { + _assumeFuzzable(address(_params.horizonAccountingExtension)); + _mockHorizonStakingCall(_params.horizonAccountingExtension, horizonStaking); + + eboAccessModule = new EBOAccessModuleForTest(_params.oracle, _params.arbitrable, _params.horizonAccountingExtension); + + assertEq(address(eboAccessModule.ARBITRABLE()), address(_params.arbitrable)); + } + + function test_setHorizonAccountingExtension(ConstructorParams calldata _params) public { + _assumeFuzzable(address(_params.horizonAccountingExtension)); + _mockHorizonStakingCall(_params.horizonAccountingExtension, horizonStaking); + + vm.expectEmit(); + emit IEBOAccessModule.HorizonAccountingExtensionSet(_params.horizonAccountingExtension); + + eboAccessModule = new EBOAccessModuleForTest(_params.oracle, _params.arbitrable, _params.horizonAccountingExtension); + + assertEq(address(eboAccessModule.horizonAccountingExtension()), address(_params.horizonAccountingExtension)); + } +} + +contract EBOAccessModule_Unit_ModuleName is EBOAccessModule_Unit_BaseTest { + function test_returnModuleName() public view { + assertEq(eboAccessModule.moduleName(), 'EBOAccessModule'); + } +} + +contract EBOAccessModule_Unit_DecodeAccessControlParameters is EBOAccessModule_Unit_BaseTest { + function test_decodeAccessControlParameters(IAccessModule.AccessControlParameters calldata _params) public view { + bytes memory _data = abi.encode(_params); + + IAccessModule.AccessControlParameters memory _decodedParams = eboAccessModule.decodeAccessControlParameters(_data); + + assertEq(_decodedParams.accessControl.user, _params.accessControl.user); + assertEq(address(_decodedParams.sender), address(_params.sender)); + assertEq(_decodedParams.typehash, _params.typehash); + } +} + +contract EBOAccessModule_Unit_HasAccess is EBOAccessModule_Unit_BaseTest { + function test_hasAccess(IAccessModule.AccessControlParameters calldata _params) public { + bytes memory _data = abi.encode(_params); + + vm.mockCall( + address(horizonStaking), + abi.encodeWithSelector( + IHorizonStaking.isAuthorized.selector, + _params.accessControl.user, + address(horizonAccountingExtension), + _params.sender + ), + abi.encode(true) + ); + + eboAccessModule.hasAccess(_data); + } +} + +contract EBOAccessModule_Unit_SetHorizonAccountingExtension is EBOAccessModule_Unit_BaseTest { + function test_setHorizonAccountingExtension(IHorizonAccountingExtension _horizonAccountingExtension) public { + _assumeFuzzable(address(_horizonAccountingExtension)); + _mockHorizonStakingCall(_horizonAccountingExtension, horizonStaking); + vm.mockCall( + address(arbitrable), abi.encodeWithSelector(arbitrable.validateArbitrator.selector, msg.sender), abi.encode(true) + ); + + vm.expectEmit(); + emit IEBOAccessModule.HorizonAccountingExtensionSet(_horizonAccountingExtension); + + eboAccessModule.setHorizonAccountingExtension(_horizonAccountingExtension); + + assertEq(address(eboAccessModule.horizonAccountingExtension()), address(_horizonAccountingExtension)); + } +} diff --git a/test/unit/EBORequestCreator.t.sol b/test/unit/EBORequestCreator.t.sol index 565956b..9b21a1e 100644 --- a/test/unit/EBORequestCreator.t.sol +++ b/test/unit/EBORequestCreator.t.sol @@ -44,7 +44,7 @@ contract EBORequestCreatorForTest is EBORequestCreator { } } -abstract contract EBORequestCreator_Unit_BaseTest is Test { +contract EBORequestCreator_Unit_BaseTest is Test { /// Events event RequestCreated( bytes32 indexed _requestId, IOracle.Request _request, uint256 indexed _epoch, string indexed _chainId diff --git a/test/unit/HorizonAccountingExtension.t.sol b/test/unit/HorizonAccountingExtension.t.sol index 28aa0d8..020e96c 100644 --- a/test/unit/HorizonAccountingExtension.t.sol +++ b/test/unit/HorizonAccountingExtension.t.sol @@ -564,11 +564,16 @@ contract HorizonAccountingExtension_Unit_OnSettleBondEscalation is HorizonAccoun contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccountingExtension_Unit_BaseTest { modifier happyPath(uint256 _pledgesForDispute, uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount) { - vm.assume(_pledgesForDispute > 0 && _pledgesForDispute < type(uint64).max); - vm.assume(_pledgesAgainstDispute > 0 && _pledgesAgainstDispute < type(uint64).max); - vm.assume(_amount > type(uint16).max && _amount < type(uint64).max); - vm.assume(_bondSize > 0 && _bondSize < type(uint16).max); + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + _; + } + function _setUpHappyPath( + uint256 _pledgesForDispute, + uint256 _pledgesAgainstDispute, + uint256 _bondSize, + uint256 _amount + ) internal { horizonAccountingExtension.setDisputeBalanceForTest( _mockDisputeId, _amount * (_pledgesForDispute + _pledgesAgainstDispute) ); @@ -576,8 +581,6 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount horizonAccountingExtension.setEscalationResultForTest( _mockDisputeId, _mockRequestId, _amount, _bondSize, bondEscalationModule ); - - _; } function test_revertIfNoEscalationResult(address _pledger) public { @@ -591,7 +594,15 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _amount = bound(_amount, type(uint16).max, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + horizonAccountingExtension.setPledgerClaimedForTest(_mockRequestId, _pledger, true); vm.expectRevert(IHorizonAccountingExtension.HorizonAccountingExtension_AlreadyClaimed.selector); @@ -604,7 +615,15 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _amount = bound(_amount, type(uint16).max, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), @@ -634,7 +653,15 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _amount = bound(_amount, type(uint16).max, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), @@ -687,7 +714,15 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _amount = bound(_amount, type(uint16).max, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), @@ -734,7 +769,15 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _amount = bound(_amount, type(uint16).max, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), @@ -782,10 +825,18 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { vm.assume(_pledger != _slashedUser); vm.assume(_slashedUser != _notSlashedUser); + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max - 1); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max - 1); + _amount = bound(_amount, type(uint16).max, type(uint64).max - 1); + _bondSize = bound(_bondSize, 1, type(uint16).max - 1); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); + _pledgesAgainstDispute = _pledgesForDispute * _amount / _bondSize + 1; // Mock and expect the call to oracle checking the dispute status @@ -853,9 +904,16 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount uint256 _pledgesAgainstDispute, uint256 _bondSize, uint256 _amount - ) public happyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount) { + ) public { vm.assume(_pledger != _slashedUser); vm.assume(_slashedUser != _notSlashedUser); + // bound input parameters + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max - 1); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max - 1); + _amount = bound(_amount, type(uint16).max, type(uint64).max - 1); + _bondSize = bound(_bondSize, 1, type(uint16).max - 1); + + _setUpHappyPath(_pledgesForDispute, _pledgesAgainstDispute, _bondSize, _amount); _pledgesForDispute = _pledgesAgainstDispute * _amount / _bondSize + 1; @@ -1478,11 +1536,12 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni uint256 _pledgesForDispute, uint256 _bondSize ) { - vm.assume(_usersToSlash > 0 && _usersToSlash < type(uint16).max); - vm.assume(_maxUsersToCheck > 0 && _maxUsersToCheck < type(uint16).max); + _setUpHappyPath(_users, _pledgesForDispute, _bondSize); + _; + } + + function _setUpHappyPath(address[] memory _users, uint256 _pledgesForDispute, uint256 _bondSize) internal { vm.assume(_users.length > 0 && _users.length < type(uint16).max); - vm.assume(_pledgesForDispute > 0 && _pledgesForDispute < type(uint16).max); - vm.assume(_bondSize > 0 && _bondSize < type(uint16).max); uint256 _slashAmount = _pledgesForDispute * _bondSize; @@ -1499,7 +1558,6 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni horizonAccountingExtension.setEscalationResultForTest( _mockDisputeId, _mockRequestId, 1, _bondSize, bondEscalationModule ); - _; } function test_revertIfNoEscalationResult(uint256 _usersToSlash, uint256 _maxUsersToCheck, address _pledger) public { @@ -1518,7 +1576,15 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni address[] memory _users, uint256 _pledgesAgainstDispute, uint256 _bondSize - ) public happyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesAgainstDispute, _bondSize) { + ) public { + // bound input parameters + _usersToSlash = bound(_usersToSlash, 1, type(uint16).max); + _maxUsersToCheck = bound(_maxUsersToCheck, 1, type(uint16).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_users, _pledgesAgainstDispute, _bondSize); + horizonAccountingExtension.setBondedTokensForTest(_cleanPledgers.at(0), 0); // Mock and expect the call to oracle checking the dispute status @@ -1554,7 +1620,15 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni address[] memory _users, uint256 _pledgesAgainstDispute, uint256 _bondSize - ) public happyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesAgainstDispute, _bondSize) { + ) public { + // bound input parameters + _usersToSlash = bound(_usersToSlash, 1, type(uint16).max); + _maxUsersToCheck = bound(_maxUsersToCheck, 1, type(uint16).max); + _pledgesAgainstDispute = bound(_pledgesAgainstDispute, 1, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_users, _pledgesAgainstDispute, _bondSize); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), @@ -1599,7 +1673,15 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni address[] memory _users, uint256 _pledgesForDispute, uint256 _bondSize - ) public happyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesForDispute, _bondSize) { + ) public { + // bound input parameters + _usersToSlash = bound(_usersToSlash, 1, type(uint16).max); + _maxUsersToCheck = bound(_maxUsersToCheck, 1, type(uint16).max); + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_users, _pledgesForDispute, _bondSize); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), @@ -1644,7 +1726,15 @@ contract HorizonAccountingExtension_Unit_Slash is HorizonAccountingExtension_Uni address[] memory _users, uint256 _pledgesForDispute, uint256 _bondSize - ) public happyPath(_usersToSlash, _maxUsersToCheck, _users, _pledgesForDispute, _bondSize) { + ) public { + // bound input parameters + _usersToSlash = bound(_usersToSlash, 1, type(uint16).max); + _maxUsersToCheck = bound(_maxUsersToCheck, 1, type(uint16).max); + _pledgesForDispute = bound(_pledgesForDispute, 1, type(uint64).max); + _bondSize = bound(_bondSize, 1, type(uint16).max); + + _setUpHappyPath(_users, _pledgesForDispute, _bondSize); + // Mock and expect the call to oracle checking the dispute status _mockAndExpect( address(oracle), diff --git a/test/utils/Helpers.sol b/test/utils/Helpers.sol index 164b5e9..bf4b8e3 100644 --- a/test/utils/Helpers.sol +++ b/test/utils/Helpers.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.19; -import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; +import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/access/IAccessController.sol'; import 'forge-std/Test.sol'; diff --git a/yarn.lock b/yarn.lock index 959a157..dd2d686 100644 --- a/yarn.lock +++ b/yarn.lock @@ -180,22 +180,22 @@ solc-typed-ast "18.1.2" yargs "17.7.2" -"@defi-wonderland/prophet-core@0.0.0-823459fc": - version "0.0.0-823459fc" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-823459fc.tgz#a48f7b35899968468f37f5c9eb2c67a1c8a823ff" - integrity sha512-lqTFlKFUwt4yjBGnSUJf9PwNQE6MP4KJHUSCov2+yxJCkKHKzFlYQ7M25dAdebiwa6Hfd+XHQfLx1bzff6mM6Q== - -"@defi-wonderland/prophet-core@0.0.0-8bb062e0": - version "0.0.0-8bb062e0" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-8bb062e0.tgz#6678171885de8ddd484b7f51a8a8d6dca6ab9ab3" - integrity sha512-jjMly9ZjPHxxiBEpU6+OGNhyII+eDYYTVifTttX59uZTdmDsPSue818pkjr29YJJ62zGc0XEEe5Yzrwuirs5Tw== - -"@defi-wonderland/prophet-modules@0.0.0-86078350": - version "0.0.0-86078350" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-86078350.tgz#902877ef3f6585cd1a61066f0989ed05ce2e5b89" - integrity sha512-vAooZ+EXiounXQ3fiTya9yslFk7THerCxnQGQFEtJCIJU3hadbr8AzZOr+uRyMljs5f2/62YBeZC64RAxj9S1w== - dependencies: - "@defi-wonderland/prophet-core" "0.0.0-823459fc" +"@defi-wonderland/prophet-core@0.0.0-819e5fe9": + version "0.0.0-819e5fe9" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-819e5fe9.tgz#bd165f5cec99ae23bfd8c7f2f2cc3fa018abc676" + integrity sha512-K+zc0woc2mbZ6kqtO7ix/TJp7Y4YuCyz+l1XJL0VumsQkw7nJ5pLXOaV8Ss4wOyxu+P6vQ4aJpfY2yMHjQ+Hsw== + +"@defi-wonderland/prophet-core@0.0.0-c80cc1e9": + version "0.0.0-c80cc1e9" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-c80cc1e9.tgz#3586b8bcde26bd670384155f187888745af1e000" + integrity sha512-CU/IRGdOPoHDBiNv3XdimdJqx8Tl/4o3JrkYBKVfx+VW58k9e5i9XquAk+NqDiGZx18TMFZwskkt6fA5cMAQHQ== + +"@defi-wonderland/prophet-modules@0.0.0-022dfec8": + version "0.0.0-022dfec8" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-modules/-/prophet-modules-0.0.0-022dfec8.tgz#eade840c8b66689912f7effe1854add6c59113b8" + integrity sha512-TAsvkfkCyrk94jJ8YcV3HQtXX0jqiu/ufTq79PyUIpYWxTP09b//H4QPs5iE3xKcawSN2wUbmscNzJsH4/t/kw== + dependencies: + "@defi-wonderland/prophet-core" "0.0.0-c80cc1e9" "@openzeppelin/contracts" "4.9.5" solmate "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" @@ -1684,9 +1684,9 @@ solhint-community@4.0.0: optionalDependencies: prettier "^2.8.3" -"solmate@https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": +"solmate@git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c": version "6.1.0" - resolved "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" + resolved "git+https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" sort-object-keys@^1.1.3: version "1.1.3" From 92d752a351e7ec736cf72023eb31b30e2626016f Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 18 Nov 2024 12:38:48 -0500 Subject: [PATCH 20/20] chore: update yarn.lock --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index dd2d686..ed598be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -569,9 +569,9 @@ cosmiconfig@^9.0.0: parse-json "^5.2.0" cross-spawn@^7.0.3: - version "7.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.5.tgz#910aac880ff5243da96b728bc6521a5f6c2f2f82" - integrity sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" @@ -992,9 +992,9 @@ human-signals@^5.0.0: integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== husky@>=8: - version "9.1.6" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.6.tgz#e23aa996b6203ab33534bdc82306b0cf2cb07d6c" - integrity sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A== + version "9.1.7" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d" + integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== ignore@^5.2.4: version "5.3.2"