Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add highsec keeper for mint+distribute #139

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/CitadelMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ contract CitadelMinter is
keccak256("CONTRACT_GOVERNANCE_ROLE");
bytes32 public constant POLICY_OPERATIONS_ROLE =
keccak256("POLICY_OPERATIONS_ROLE");
bytes32 public constant HIGHSEC_KEEPER_ROLE =
keccak256("HIGHSEC_KEEPER_ROLE");

bytes32 public constant XCITADEL_LOCKER_EMISSIONS = keccak256("xcitadel-locker-emissions");

Expand Down Expand Up @@ -170,7 +172,7 @@ contract CitadelMinter is
*/
function mintAndDistribute()
external
onlyRole(POLICY_OPERATIONS_ROLE)
onlyRole(HIGHSEC_KEEPER_ROLE)
gacPausable
nonReentrant
{
Expand Down
2 changes: 2 additions & 0 deletions src/GlobalAccessControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ contract GlobalAccessControl is
keccak256("TREASURY_OPERATIONS_ROLE");

bytes32 public constant KEEPER_ROLE = keccak256("KEEPER_ROLE");
bytes32 public constant HIGHSEC_KEEPER_ROLE = keccak256("HIGHSEC_KEEPER_ROLE");

bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant UNPAUSER_ROLE = keccak256("UNPAUSER_ROLE");
Expand Down Expand Up @@ -73,6 +74,7 @@ contract GlobalAccessControl is
_setRoleAdmin(POLICY_OPERATIONS_ROLE, CONTRACT_GOVERNANCE_ROLE);
_setRoleAdmin(TREASURY_OPERATIONS_ROLE, CONTRACT_GOVERNANCE_ROLE);
_setRoleAdmin(KEEPER_ROLE, CONTRACT_GOVERNANCE_ROLE);
_setRoleAdmin(HIGHSEC_KEEPER_ROLE, CONTRACT_GOVERNANCE_ROLE);
_setRoleAdmin(PAUSER_ROLE, CONTRACT_GOVERNANCE_ROLE);
_setRoleAdmin(UNPAUSER_ROLE, CONTRACT_GOVERNANCE_ROLE);
_setRoleAdmin(BLOCKLIST_MANAGER_ROLE, CONTRACT_GOVERNANCE_ROLE);
Expand Down
9 changes: 9 additions & 0 deletions src/test/BaseFixture.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ contract BaseFixture is DSTest, Utils, stdCheats {
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant UNPAUSER_ROLE = keccak256("UNPAUSER_ROLE");

bytes32 public constant KEEPER_ROLE = keccak256("KEEPER_ROLE");
bytes32 public constant HIGHSEC_KEEPER_ROLE = keccak256("HIGHSEC_KEEPER_ROLE");

bytes32 public constant BLOCKLIST_MANAGER_ROLE =
keccak256("BLOCKLIST_MANAGER_ROLE");
bytes32 public constant BLOCKLISTED_ROLE = keccak256("BLOCKLISTED_ROLE");
Expand All @@ -67,6 +70,7 @@ contract BaseFixture is DSTest, Utils, stdCheats {
address immutable policyOps = getAddress("policyOps");
address immutable guardian = getAddress("guardian");
address immutable keeper = getAddress("keeper");
address immutable highsecKeeper = getAddress("highsecKeeper");
address immutable treasuryVault = getAddress("treasuryVault");
address immutable treasuryOps = getAddress("treasuryOps");

Expand Down Expand Up @@ -130,6 +134,7 @@ contract BaseFixture is DSTest, Utils, stdCheats {
vm.label(governance, "governance");
vm.label(policyOps, "policyOps");
vm.label(keeper, "keeper");
vm.label(highsecKeeper, "highsecKeeper");
vm.label(guardian, "guardian");
vm.label(treasuryVault, "treasuryVault");

Expand Down Expand Up @@ -286,6 +291,10 @@ contract BaseFixture is DSTest, Utils, stdCheats {

gac.grantRole(PAUSER_ROLE, guardian);
gac.grantRole(UNPAUSER_ROLE, techOps);

gac.grantRole(KEEPER_ROLE, keeper);
gac.grantRole(HIGHSEC_KEEPER_ROLE, highsecKeeper);

vm.stopPrank();

// Deposit initial assets to users
Expand Down