Skip to content

feat: add event emitter#675

Merged
crypto-banker merged 5 commits into
mainfrom
feat-add-event-emitter
Apr 28, 2026
Merged

feat: add event emitter#675
crypto-banker merged 5 commits into
mainfrom
feat-add-event-emitter

Conversation

@crypto-banker

Copy link
Copy Markdown
Contributor

Adds an exceedingly simple periphery contract which allows the owner to call it in order to emit events.

Currently this contract implements 3 methods: emitFeeClaimQueued, emitFeeClaimExecuted, and emitGenericEvent.

We had previously discussed only the 2nd one of these; the others are included for completeness and future flexibility -- using emitFeeClaimQueued when queuing a fee claim could help with observability (it perhaps can help an observer decode and understand what is being queued), and emitGenericEvent provides the ability to add new events in the future without needing to migrate to a different contract (although because the contract code will not contain the event definition, the events may be challenging to decode / the topic0 will not be automatically processed e.g. by Etherscan).

Let me know if we are confident we will not use emitFeeClaimQueued and/or emitGenericEvent and I will remove them.

Otherwise, I could see potentially wanting the FeeClaimQueued/FeeClaimExecuted events to have their data styled a bit closer to what will be used for the actual fee claim call -- let me know if there are any changes desired here.

Comment thread contracts/script/EventEmitter.s.sol
@crypto-banker

Copy link
Copy Markdown
Contributor Author

Discussed in person:
If we want to emit an event on queuing, that call would originate from the multisig.
However, since anyone can execute queued actions via the Timelock, to guarantee an event emission on execution we would want the queued action to also contain a call to this new EventEmitter contract.
So if we want both events then we need to change the permissions, so that both the multisig and the timelock can call these functions.

Comment thread contracts/src/periphery/EventEmitter.sol
swap Ownable => AccessControlEnumerable

on deployment we make both relevant addresses admins and restrict contract access to this role
@crypto-banker

Copy link
Copy Markdown
Contributor Author

@Will-Smith11 I've opted to modify the access control pattern of this contract -- on deployment we make both relevant addresses admins and restrict function access to this role. This should be sufficient to allow relevant addresses to emit events both on queuing and on executing fee claims

@crypto-banker crypto-banker merged commit a43c9d2 into main Apr 28, 2026
0 of 5 checks passed
@crypto-banker crypto-banker deleted the feat-add-event-emitter branch April 28, 2026 17:18
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