diff --git a/contracts/contracts/coordination/AllowList.sol b/contracts/contracts/coordination/AllowList.sol index 53b63d86..d0504884 100644 --- a/contracts/contracts/coordination/AllowList.sol +++ b/contracts/contracts/coordination/AllowList.sol @@ -1,14 +1,13 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlDefaultAdminRules.sol"; -import "./IAccessController.sol"; +import "./IRitualAuthorizer.sol"; import "./Coordinator.sol"; -contract AllowList is AccessControlDefaultAdminRules, IAccessController { +contract AllowList is AccessControlDefaultAdminRules, IRitualAuthorizer { Coordinator public coordinator; - // mapp - mapping(uint256 => mapping(address => bool)) public rituals; + mapping(uint256 => mapping(address => bool)) public authorizations; constructor( Coordinator _coordinator, diff --git a/contracts/contracts/coordination/Coordinator.sol b/contracts/contracts/coordination/Coordinator.sol index a8f81591..874d24f1 100644 --- a/contracts/contracts/coordination/Coordinator.sol +++ b/contracts/contracts/coordination/Coordinator.sol @@ -8,6 +8,8 @@ import "./IFeeModel.sol"; import "./IReimbursementPool.sol"; import "../lib/BLS12381.sol"; import "../../threshold/IAccessControlApplication.sol"; +import "../../../../nucypher/tests/acceptance/contracts/.cache/openzeppelin/v4.8.1/access/IAccessControl.sol"; +import "./IRitualAuthorizer.sol"; /** * @title Coordinator @@ -55,7 +57,7 @@ contract Coordinator is AccessControlDefaultAdminRules { address authority; uint16 dkgSize; bool aggregationMismatch; - address accessController; + IRitualAuthorizer accessController; BLS12381.G1Point publicKey; bytes aggregatedTranscript; Participant[] participant; @@ -80,7 +82,7 @@ contract Coordinator is AccessControlDefaultAdminRules { uint16 _maxDkgSize, address _admin, address _feeModel, - address _defaultAccessController + IRitualAuthorizer _defaultAccessController ) AccessControlDefaultAdminRules(0, _admin) { require(address(_feeModel.stakes()) == address(_stakes), "Invalid stakes for fee model"); diff --git a/contracts/contracts/coordination/IAccessControler.sol b/contracts/contracts/coordination/IRitualAuthorizer.sol similarity index 71% rename from contracts/contracts/coordination/IAccessControler.sol rename to contracts/contracts/coordination/IRitualAuthorizer.sol index 5a8c8c9f..8685eaa8 100644 --- a/contracts/contracts/coordination/IAccessControler.sol +++ b/contracts/contracts/coordination/IRitualAuthorizer.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; -interface IAccessController { - function isEnricoAuthorized( +interface IRitualAuthorizer { + function isAuthorized( uint256 ritualID, bytes memory evidence, bytes memory ciphertextHash