Skip to content

Conversation

@pajicf
Copy link
Contributor

@pajicf pajicf commented Aug 28, 2025

Description

This PR implements RBAC inside StakeManager to be able to support new "guardian" role.

Implemented roles:
Admin (DEFAULT_ADMIN_ROLE) - Previously handled by Ownable contract, now Admin inside RBAC.
Rewards Supplier (REWARDS_SUPPLIER_ROLE) - Previously a simple variable with a setter, now handled by RBAC
Guardian (GUARDIAN_ROLE) - Newly introduced role which is able to put StakeManager into emergency state.

Change list:

  • New roles added in StakeManager
  • Ownable removed from TrustedCodehashAccess.sol, replaced with AccessControlUpgradeable.sol
  • New tests added for guardian role
  • Foundry linting disabled, so that we can fully rely on the existing solution
  • Jetbrains IDE files ignored

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran pnpm adorno?
  • Ran pnpm verify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants