Skip to content

Conversation

@aniket866
Copy link

@aniket866 aniket866 commented Jan 27, 2026

Changes Made:

  • Added the onlyOwner modifier to the function signature.

  • This ensures that only the contract owner (the address that deployed the contract) can trigger the withdrawal of accumulated fees to the treasury address.

@kumawatkaran523 Please checkout this Patch

Summary by CodeRabbit

  • Bug Fixes
    • Restricted fee withdrawal to the contract owner, closing an access gap that previously allowed unrestricted calls. This strengthens fund protection and aligns behavior with expected permissions. Users and integrators do not need to change workflows; only the designated owner can initiate withdrawals. All other contract operations remain unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

The withdrawFees() function in the Chainvoice contract was modified to include the onlyOwner access control modifier, restricting the function execution to the contract owner. No logic or error handling was altered.

Changes

Cohort / File(s) Summary
Access Control Enhancement
contracts/src/Chainvoice.sol
Added onlyOwner modifier to withdrawFees() function to restrict execution to contract owner only

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 The fees now guarded, locked up tight,
Only the owner can claim their right,
One modifier added, simple and clean,
The safest withdrawal ever seen! 🔐

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the primary change: adding the onlyOwner modifier to the withdrawFees function signature for access control.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@aniket866
Copy link
Author

@kumawatkaran523 please check it out

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.

1 participant