Emit per-hub payment revenue events with event handles#3780
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
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 |
| ## 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.*** |
There was a problem hiding this comment.
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. |
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
Testing