Skip to content

feat: emit withdraw event with creator, amount, and token#265

Merged
aji70 merged 3 commits intoMyFanss:mainfrom
dinahmaccodes:issue#206
Feb 25, 2026
Merged

feat: emit withdraw event with creator, amount, and token#265
aji70 merged 3 commits intoMyFanss:mainfrom
dinahmaccodes:issue#206

Conversation

@dinahmaccodes
Copy link
Contributor

Closes #206

Description

This pull request updates the creator-earnings contract with improvements to event emission and authorization logic, as well as enhanced test coverage. The most important changes are summarized below.

Event emission improvements:

  • The withdraw event now includes the creator, amount, and token_address as 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:

  • The explicit require_auth checks for both the admin and authorized depositors have been removed from the deposit function, potentially relying on upstream authentication or simplifying the logic. [1] [2]

Test improvements:

  • Added a new test withdraw_emits_event to verify that the correct event is emitted on withdrawal, including checks for the event's topics and data structure.
  • Updated test imports to include Events, Symbol, and TryIntoVal for improved event handling and assertions.

Copy link
Contributor

@aji70 aji70 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lfg

@aji70 aji70 merged commit 4c9a69e into MyFanss:main Feb 25, 2026
3 checks passed
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.

Creator-earnings: event emission for withdraw

2 participants