Skip to content

Commit

Permalink
feat(scratch): assign MANAGE_NODE_OPERATOR_ROLE to agent (manager is …
Browse files Browse the repository at this point in the history
…voting)
  • Loading branch information
arwer13 committed Dec 6, 2023
1 parent caeab68 commit 2842af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions contracts/0.4.24/template/LidoTemplate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,11 @@ contract LidoTemplate is IsContract {
// NodeOperatorsRegistry
perms[0] = _state.operators.MANAGE_SIGNING_KEYS();
perms[1] = _state.operators.SET_NODE_OPERATOR_LIMIT_ROLE();
// Need MANAGE_NODE_OPERATOR_ROLE to make current scratch acceptance script
// (scripts/scratch/checks/scratch-acceptance-test.js) work.
// After voting utilities added to the repo should rewrite the acceptance
// script to grant/renounce this role and remove granting from here.
perms[2] = _state.operators.MANAGE_NODE_OPERATOR_ROLE();
for (i = 0; i < 3; ++i) {
for (i = 0; i < 2; ++i) {
_createPermissionForVoting(acl, _state.operators, perms[i], voting);
}
acl.createPermission(_state.stakingRouter, _state.operators, _state.operators.STAKING_ROUTER_ROLE(), voting);
acl.createPermission(_state.agent, _state.operators, _state.operators.MANAGE_NODE_OPERATOR_ROLE(), voting);

// Lido
perms[0] = _state.lido.PAUSE_ROLE();
Expand Down
4 changes: 2 additions & 2 deletions scripts/scratch/checks/scratch-acceptance-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ async function prepareProtocolForSubmitDepositReportWithdrawalFlow(protocol, sta
await withdrawalQueue.resume({ from: agent.address })
await withdrawalQueue.renounceRole(await withdrawalQueue.RESUME_ROLE(), agent.address, { from: agent.address })

await nodeOperatorsRegistry.addNodeOperator('1', ADDRESS_1, { from: voting.address })
await nodeOperatorsRegistry.addNodeOperator('2', ADDRESS_2, { from: voting.address })
await nodeOperatorsRegistry.addNodeOperator('1', ADDRESS_1, { from: agent.address })
await nodeOperatorsRegistry.addNodeOperator('2', ADDRESS_2, { from: agent.address })

await nodeOperatorsRegistry.addSigningKeys(0, 1, pad('0x010203', 48), pad('0x01', 96), { from: voting.address })
await nodeOperatorsRegistry.addSigningKeys(
Expand Down

0 comments on commit 2842af4

Please sign in to comment.