-
Notifications
You must be signed in to change notification settings - Fork 40
Add withdrawer role to allow withdraw #406
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
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 20384400205Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds role-based access control to the MCPayment contract by introducing a WITHDRAWER_ROLE that allows designated accounts to withdraw owner funds in addition to the owner themselves. The implementation integrates OpenZeppelin's AccessControlUpgradeable and modifies withdrawal functions to support this new role.
Key changes:
- Adds AccessControlUpgradeable inheritance and WITHDRAWER_ROLE constant
- Implements setAdminRole function and onlyWithdrawerRoleOrOwner modifier for role-based withdrawals
- Modifies ownerWithdraw and ownerERC20Withdraw functions to allow WITHDRAWER_ROLE accounts to withdraw funds to their own addresses
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| contracts/payment/MCPayment.sol | Integrates AccessControlUpgradeable, adds WITHDRAWER_ROLE with associated modifier, implements setAdminRole function, and updates withdrawal functions to support the new role |
| test/payment/mc-payment.test.ts | Adds comprehensive test case for WITHDRAWER_ROLE functionality and updates existing test to reflect new AccessControl error types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9f03d15 to
b599e23
Compare
8eb45f1 to
bc48b47
Compare
No description provided.