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

feat: treasury executor role #68

Merged
merged 5 commits into from
Sep 16, 2024
Merged

Conversation

shenshin
Copy link
Contributor

What

  • Create Executor role for the Treasury contract
  • Treasury is now deployed along with other DAO contracts within the Governor module
  • The Timelock is assigned the Executor role for the Treasury in the deployment script following deployment.
  • Make use of the Executor role in the tests

Why

The Treasury contract should have two distinct roles: Default Admin and Executor, instead of just the Default Admin role as it was before. The Default Admin role is assigned to the deployer, whose function is to manage the assignment of other roles. Ideally, only the deployer should have this role.

The Executor role is assigned to the Timelock contract, which will execute Governor proposals, and only it will be able to call the withdraw functions. The Admin should not have the ability to withdraw funds, as that is not part of its function.

The Treasury contract is now deployed after the other contracts within the same module, as it is necessary to call the grantRole function post-deployment to assign the Executor role to the Timelock.

@bezerrablockchain bezerrablockchain merged commit 818a162 into develop Sep 16, 2024
2 checks passed
@shenshin shenshin deleted the treasury-executor-role branch September 20, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants