Skip to content

treasury updated event#631

Merged
nafiuishaaq merged 1 commit into
MentoNest:mainfrom
koder-ns:feat/treasury-updated-event
May 30, 2026
Merged

treasury updated event#631
nafiuishaaq merged 1 commit into
MentoNest:mainfrom
koder-ns:feat/treasury-updated-event

Conversation

@koder-ns
Copy link
Copy Markdown
Contributor

closes #553

📝 Description

This PR adds the TreasuryUpdated event emission when an admin changes the treasury wallet address. This event provides on-chain transparency for treasury management, enabling stakeholders to monitor when and by whom the critical treasury address is modified.

Problem Statement

The current set_treasury() function allows administrators to update the treasury wallet without emitting any on-chain event. This creates several issues:

  • No historical record of treasury address changes
  • Stakeholders cannot easily detect unauthorized treasury changes
  • Auditors have no on-chain proof of treasury updates
  • Off-chain monitoring systems cannot alert on treasury modifications
  • No accountability for which admin performed the change

Solution

Emit a TreasuryUpdated event with old treasury, new treasury, and admin address whenever set_treasury() is successfully called. This event creates an immutable audit trail of all treasury changes on the blockchain.

Key Features

  • Event Signature: TreasuryUpdated(old_treasury: Address, new_treasury: Address, updated_by: Address)
  • Emission Timing: Emitted immediately after treasury address is updated
  • Complete Audit Trail: Records both previous and new addresses for historical tracking
  • Admin Accountability: Includes the address of the admin who made the change
  • Gas Efficiency: Minimal gas overhead for critical security event

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@koder-ns Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nafiuishaaq nafiuishaaq merged commit 6dbfe00 into MentoNest:main May 30, 2026
1 check failed
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.

Event — TreasuryUpdated event

2 participants