feat: emit withdraw event with creator, amount, and token#265
Merged
aji70 merged 3 commits intoMyFanss:mainfrom Feb 25, 2026
Merged
feat: emit withdraw event with creator, amount, and token#265aji70 merged 3 commits intoMyFanss:mainfrom
aji70 merged 3 commits intoMyFanss:mainfrom
Conversation
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.
Closes #206
Description
This pull request updates the
creator-earningscontract with improvements to event emission and authorization logic, as well as enhanced test coverage. The most important changes are summarized below.Event emission improvements:
withdrawevent now includes thecreator,amount, andtoken_addressas event data, and the event topics have been updated to only include the symbol"withdraw"instead of both the symbol and the creator address.Authorization logic changes:
require_authchecks for both the admin and authorized depositors have been removed from thedepositfunction, potentially relying on upstream authentication or simplifying the logic. [1] [2]Test improvements:
withdraw_emits_eventto verify that the correct event is emitted on withdrawal, including checks for the event's topics and data structure.Events,Symbol, andTryIntoValfor improved event handling and assertions.