diff --git a/package.json b/package.json index 7318676..0441263 100644 --- a/package.json +++ b/package.json @@ -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 index a06898c..fe11717 100644 --- a/src/contracts/EBOAccessModule.sol +++ b/src/contracts/EBOAccessModule.sol @@ -35,7 +35,7 @@ contract EBOAccessModule is IEBOAccessModule, Module { _setHorizonAccountingExtension(_horizonAccountingExtension); } - /// @inheritdoc IEBOAccessModule + /// @inheritdoc IAccessModule function decodeAccessControlParameters(bytes calldata _data) public pure diff --git a/src/contracts/EBOFinalityModule.sol b/src/contracts/EBOFinalityModule.sol index 7f6ee62..438ad50 100644 --- a/src/contracts/EBOFinalityModule.sol +++ b/src/contracts/EBOFinalityModule.sol @@ -3,7 +3,7 @@ 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'; + '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; diff --git a/src/contracts/EBORequestCreator.sol b/src/contracts/EBORequestCreator.sol index 3d0ca46..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 { diff --git a/src/contracts/EBORequestModule.sol b/src/contracts/EBORequestModule.sol index edccefe..c060c47 100644 --- a/src/contracts/EBORequestModule.sol +++ b/src/contracts/EBORequestModule.sol @@ -3,7 +3,7 @@ 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'; + '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import {IArbitrable, IEBORequestCreator, IEBORequestModule, IOracle} from 'interfaces/IEBORequestModule.sol'; 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 6babbb9..921da75 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 b9bf5b3..1d9479f 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'; @@ -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, _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) = @@ -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, _createAccessControl()); + councilArbitrator.resolve(_params.request, _params.response, _params.dispute); } } diff --git a/test/unit/HorizonAccountingExtension.t.sol b/test/unit/HorizonAccountingExtension.t.sol index b9644f8..cb540d9 100644 --- a/test/unit/HorizonAccountingExtension.t.sol +++ b/test/unit/HorizonAccountingExtension.t.sol @@ -830,10 +830,10 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount vm.assume(_slashedUser != _notSlashedUser); // 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); + _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); @@ -908,10 +908,10 @@ contract HorizonAccountingExtension_Unit_ClaimEscalationReward is HorizonAccount vm.assume(_pledger != _slashedUser); vm.assume(_slashedUser != _notSlashedUser); // 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); + _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); 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"