Skip to content

Conversation

@daveroga
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Dec 18, 2025

Pull Request Test Coverage Report for Build 20384400205

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 85.977%

Totals Coverage Status
Change from base Build 20378025506: 0.2%
Covered Lines: 1412
Relevant Lines: 1543

💛 - Coveralls

Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

@daveroga daveroga force-pushed the chore/allow-withdrawer-role-withdraw branch from 9f03d15 to b599e23 Compare December 19, 2025 16:44
@daveroga daveroga force-pushed the chore/allow-withdrawer-role-withdraw branch from 8eb45f1 to bc48b47 Compare December 19, 2025 18:09
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