Skip to content

Extend Event Coverage Across Contracts#40

Open
aniket866 wants to merge 2 commits into
StabilityNexus:mainfrom
aniket866:adding-events
Open

Extend Event Coverage Across Contracts#40
aniket866 wants to merge 2 commits into
StabilityNexus:mainfrom
aniket866:adding-events

Conversation

@aniket866

@aniket866 aniket866 commented Feb 6, 2026

Copy link
Copy Markdown
Contributor
  • Add TreasuryUpdated Event in ProtocolParameters.sol

Why?: To create an immutable audit for sensitive change or mistake

  • Add FeePaidEvent in Contracts/EnglishAuction.sol

Why?: t:o record the exact protocol fee deducted during a withdrawal,

@kaneki003 Please review,
Closes #29

Summary by CodeRabbit

  • New Features
    • Auction withdrawal notifications now include the auctioneer, treasury recipient, calculated fees, and the full withdrawn amount for improved transparency.
    • Protocol parameter updates now emit events recording previous and new fee values and previous and new treasury addresses to improve auditability and governance tracking.

@coderabbitai

coderabbitai Bot commented Feb 6, 2026

Copy link
Copy Markdown

Walkthrough

Updated event emissions: EnglishAuction.withdraw(...) now emits Withdrawn with additional parameters (auctioneer, treasury, fees, withdrawAmount). ProtocolParameters.sol gains FeeUpdated and TreasuryUpdated events and emits them when parameters change. No function signatures or control flow modified.

Changes

Cohort / File(s) Summary
ProtocolParameters — events & emits
contracts/ProtocolParameters.sol
Added FeeUpdated(uint256 oldFee, uint256 newFee) and TreasuryUpdated(address indexed oldTreasury, address indexed newTreasury) event declarations; capture old values and emit these events in updateFee() and updateTreasury().
EnglishAuction — withdraw event payload
contracts/EnglishAuction.sol
Modified the emit Withdrawn(...) call in withdraw(...) to include additional arguments: auctioneer address, treasury/fee recipient, calculated fees, and full withdrawAmount. Fee calculation and transfers unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Solidity Lang

Suggested reviewers

  • ceilican

Poem

🐰 I hopped through code with eager paws,

Emitted events to keep the laws,
Fees and treasuries now in sight,
Audits hum by day and night,
A rabbit's cheer for logs made right!

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds TreasuryUpdated and FeeUpdated events in ProtocolParameters, meeting issue #29 requirements, but the EnglishAuction changes implement Withdrawn event updates instead of the requested FeePaid event. Add the FeePaid event to EnglishAuction.sol as specified in issue #29, or clarify why Withdrawn event modification addresses the fee logging requirement instead.
Out of Scope Changes check ⚠️ Warning The modification of the Withdrawn event signature in EnglishAuction is not explicitly mentioned in issue #29, which requests a FeePaid event instead. Either implement the FeePaid event as originally requested in issue #29, or update the issue to reflect the change to the Withdrawn event approach.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Extend Event Coverage Across Contracts' accurately and clearly summarizes the main change in the PR: adding new events (TreasuryUpdated, FeeUpdated, and modifications to Withdrawn) across multiple contract files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Comment thread contracts/EnglishAuction.sol Outdated
@aniket866 aniket866 requested a review from Zahnentferner March 20, 2026 18:29
@aniket866 aniket866 changed the title added-events Extend Event Coverage Across Contracts Mar 21, 2026
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.

Extend Event Coverage Across Contracts

2 participants