Skip to content

feat(revenue_split): emit DistributionExecuted event on distribute - #636

Open
woahwhattheheck wants to merge 3 commits into
Protocol-Guild:mainfrom
woahwhattheheck:type/payd-515-distribution-executed
Open

woahwhattheheck wants to merge 3 commits into
Protocol-Guild:mainfrom
woahwhattheheck:type/payd-515-distribution-executed

Conversation

@woahwhattheheck

Copy link
Copy Markdown

Summary

Closes #515.

The revenue_split contract performed distributions without a structured event that off-chain indexers and the dashboard could consume. This PR adds DistributionExecutedEvent and emits it once per asset inside distribute.

Event fields

  • asset — token being distributed
  • total_amount — amount distributed for that asset
  • recipient_count — number of recipients in the active split
  • split_percentages — share weights in basis points (10000 = 100%)

Replaces the prior ad-hoc ("distribute", token) -> amount publish so the payload matches the structured #[contractevent] pattern used by bulk_payment.

Acceptance criteria

  • Event emitted on each distribution (per asset)
  • Contains total amount and recipient count (plus split weights)
  • Tests verify emission (test_distribute_emits_distribution_executed_event, test_distribute_emits_one_event_per_asset)
  • Event shape compatible with existing indexer (topic0 = distribution_executed_event, map payload)

Tests

cargo test -p revenue_split

11 passed (including 2 new event tests).

Tip

KEEP

woahwhattheheck and others added 3 commits September 26, 2026 01:11
Add a structured DistributionExecutedEvent with asset, total_amount,
recipient_count, and split_percentages (basis points) so off-chain
indexers can track revenue distributions. Replace the ad-hoc Symbol
publish. Tests cover emission and one-event-per-asset.

Closes Protocol-Guild#515
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.

Add DistributionExecuted event to revenue_split contract

1 participant