Skip to content

Emit per-hub payment revenue events with event handles#3780

Merged
jolestar merged 1 commit into
mainfrom
feat/payment-revenue-event-handles
Nov 21, 2025
Merged

Emit per-hub payment revenue events with event handles#3780
jolestar merged 1 commit into
mainfrom
feat/payment-revenue-event-handles

Conversation

@jolestar

Copy link
Copy Markdown
Contributor

Summary

  • emit payment_revenue events via per-hub event handles derived from hub_id
  • add helper to derive handle IDs and a unit test covering handle uniqueness across hubs/types
  • keep existing event payloads; only the handle is scoped per account to enable account-filtered indexing/UI

Testing

  • cargo build --profile dev --bin rooch
  • make test-move-frameworks

@vercel

vercel Bot commented Nov 20, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rooch-portal-v2.1 Ready Ready Preview Comment Nov 20, 2025 3:23pm
test-portal Ready Ready Preview Comment Nov 20, 2025 3:23pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rooch Ignored Ignored Preview Nov 20, 2025 3:23pm

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the payment revenue event emission system by scoping events to per-hub event handles, enabling more efficient account-filtered indexing and UI queries.

Key Changes

  • Modified event emission to use per-hub event handles derived from hub_id instead of global handles
  • Added revenue_event_handle_id<T>() helper function to derive unique handle IDs for each hub and event type combination
  • Added comprehensive unit test to verify handle uniqueness across different hubs and event types

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frameworks/rooch-framework/sources/payment_revenue.move Updated event emissions in withdraw_from_revenue_hub, deposit_to_revenue_hub, and borrow_or_create_revenue_hub to use per-hub handles; added helper function and test for handle derivation
AGENTS.md Added new repository guidelines document covering project structure, build/test commands, coding style, testing guidelines, and PR conventions

Comment thread AGENTS.md
## Commit & Pull Request Guidelines
- Use `<type>(<scope>): <subject>` (types: feat, fix, refactor, ci, docs, chore, rfc), mirroring history such as `chore(deps): bump inferno...`. Keep subjects in present tense with a concise scope.
- Open draft PRs early; fill the template with a clear Summary and `Fixes #issue` when relevant. Include repro steps, configs, and screenshots for UI-facing work.
- Before review, ensure `make lint` plus relevant tests are green; link any blocked items or follow-ups in the PR description.***

Copilot AI Nov 20, 2025

Copy link

Choose a reason for hiding this comment

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

Remove extra asterisks at the end of the line. The line ends with "***" which appears to be a typo.

Suggested change
- Before review, ensure `make lint` plus relevant tests are green; link any blocked items or follow-ups in the PR description.***
- Before review, ensure `make lint` plus relevant tests are green; link any blocked items or follow-ups in the PR description.

Copilot uses AI. Check for mistakes.
@jolestar jolestar merged commit 469a6de into main Nov 21, 2025
25 checks passed
@jolestar jolestar deleted the feat/payment-revenue-event-handles branch November 21, 2025 00:36
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.

Emit per-account revenue events via EventHandle in payment_revenue to enable account-scoped queries

2 participants