Skip to content

Commit

Permalink
chore: update roles and name
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Feb 8, 2024
1 parent 46ac9e5 commit 7aa672e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
14 changes: 10 additions & 4 deletions contracts/Managers/RoleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ contract RoleManager is Governance2Step {
roles: uint96(
Roles.REPORTING_MANAGER |
Roles.DEBT_MANAGER |
Roles.QUEUE_MANAGER
Roles.QUEUE_MANAGER |
Roles.DEBT_PURCHASER
)
});

Expand All @@ -162,7 +163,7 @@ contract RoleManager is Governance2Step {
// The keeper can process reports and update debt.
_positions[KEEPER] = Position({
holder: _keeper,
roles: uint96(Roles.REPORTING_MANAGER | Roles.DEBT_MANAGER)
roles: uint96(Roles.REPORTING_MANAGER)
});

// Set just the roles for a debt allocator.
Expand Down Expand Up @@ -255,9 +256,14 @@ contract RoleManager is Governance2Step {

// Create the name and symbol to be standardized based on rating.
string memory ratingString = ratingToString[_rating];
// Name is "{SYMBOL} yVault-{RATING}"
// Name is "{SYMBOL}-{RATING} yVault"
string memory _name = string(
abi.encodePacked(ERC20(_asset).symbol(), " yVault-", ratingString)
abi.encodePacked(
ERC20(_asset).symbol(),
"-",
ratingString,
" yVault"
)
);
// Symbol is "yv{SYMBOL}-{RATING}".
string memory _symbol = string(
Expand Down
13 changes: 9 additions & 4 deletions tests/manager/test_role_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
from utils.helpers import to_bytes32

daddy_roles = ROLES.ALL
brain_roles = ROLES.REPORTING_MANAGER | ROLES.DEBT_MANAGER | ROLES.QUEUE_MANAGER
brain_roles = (
ROLES.REPORTING_MANAGER
| ROLES.DEBT_MANAGER
| ROLES.QUEUE_MANAGER
| ROLES.DEBT_PURCHASER
)
security_roles = ROLES.MAX_DEBT_MANAGER
keeper_roles = ROLES.REPORTING_MANAGER | ROLES.DEBT_MANAGER
keeper_roles = ROLES.REPORTING_MANAGER
debt_allocator_roles = ROLES.REPORTING_MANAGER | ROLES.DEBT_MANAGER
strategy_manager_roles = ROLES.ADD_STRATEGY_MANAGER | ROLES.REVOKE_STRATEGY_MANAGER

Expand Down Expand Up @@ -366,7 +371,7 @@ def test_deploy_new_vault(

symbol = asset.symbol()
assert vault.symbol() == f"yv{symbol}-A"
assert vault.name() == f"{symbol} yVault-A"
assert vault.name() == f"{symbol}-A yVault"

# Check debt allocator
assert debt_allocator.vault() == vault
Expand Down Expand Up @@ -543,7 +548,7 @@ def test_deploy_new_vault__default_values(

symbol = asset.symbol()
assert vault.symbol() == f"yv{symbol}-B"
assert vault.name() == f"{symbol} yVault-B"
assert vault.name() == f"{symbol}-B yVault"

# Check debt allocator
assert debt_allocator.vault() == vault
Expand Down

0 comments on commit 7aa672e

Please sign in to comment.