Skip to content

Commit

Permalink
Respond to RFCs in PR nucypher#89
Browse files Browse the repository at this point in the history
  • Loading branch information
KPrasch committed Jul 9, 2023
1 parent 1c191e3 commit db11b8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 3 additions & 4 deletions contracts/contracts/coordination/AllowList.sol
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
6 changes: 4 additions & 2 deletions contracts/contracts/coordination/Coordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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
Expand Down Expand Up @@ -58,7 +60,7 @@ contract Coordinator is AccessControlDefaultAdminRules {
address authority;
uint16 dkgSize;
bool aggregationMismatch;
address accessController;
IRitualAuthorizer accessController;
BLS12381.G1Point publicKey;
bytes aggregatedTranscript;
Participant[] participant;
Expand Down Expand Up @@ -92,7 +94,7 @@ contract Coordinator is AccessControlDefaultAdminRules {
uint16 _maxDkgSize,
address _admin,
IFeeModel _feeModel,
address _defaultAccessController
IRitualAuthorizer _defaultAccessController
) AccessControlDefaultAdminRules(0, _admin)
{
require(address(_feeModel.stakes()) == address(_stakes), "Invalid stakes for fee model");
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit db11b8f

Please sign in to comment.