Add admin function to rotate fee recipient addresses#401
Open
JamesVictor-O wants to merge 2 commits into
Open
Conversation
…sses Closes accesslayerorg#395 - Add `update_protocol_fee_recipient` callable only by stored protocol admin - Add `update_creator_fee_recipient` callable only by current fee recipient (self-rotation) - Both reject zero address and emit structured events - Add `Unauthorized` error variant (discriminant 17) - Add `ProtocolFeeRecipientUpdated` and `CreatorFeeRecipientUpdated` events - Add comprehensive tests: successful rotation, unauthorized caller, zero address rejection, fee routing after rotation, chained rotation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #395
update_protocol_fee_recipient(admin, new_recipient)— only callable by the stored protocol admin, rejects zero address, emitsProtocolFeeRecipientUpdatedeventupdate_creator_fee_recipient(creator, caller, new_recipient)— only callable by the current fee recipient for that creator (self-rotation), rejects zero address, emitsCreatorFeeRecipientUpdatedeventUnauthorizederror variant (discriminant 17, appended to end of enum per ABI stability rules)Test plan
update_protocol_fee_recipientis rejected withUnauthorizedZeroAddressProtocolFeeRecipientUpdatedevent emitted with correct old and new addressesupdate_creator_fee_recipientis rejected withUnauthorizedNotRegisteredCreatorFeeRecipientUpdatedevent emitted with correct creator, old, and new addresses