-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(relayer): ListOperations api endpoint #4089
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4089 +/- ##
==========================================
- Coverage 60.56% 0.00% -60.57%
==========================================
Files 129 1 -128
Lines 1656 14 -1642
Branches 176 0 -176
==========================================
- Hits 1003 0 -1003
+ Misses 626 14 -612
+ Partials 27 0 -27
|
Slightly annoying how the operation status is serialized:
whereas I would've wanted the value to have no nesting: |
@daniel-savu are there any alternative enum representations https://serde.rs/enum-representations.html that would help? maybe the internal one where we can have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 🔥
might be nice in the future to include gas payments but for now I think this is sufficient
turns out there is a way, since individual enum member can be |
Description
Adds a
list_operations
API endpoint to the relayer, which returns all operations in its prepare queue.Example output from
GET http://0.0.0.0:9092/list_operations?destination_domain=13371
Drive-by changes
Makes
PendingOperation
serializable, which means switching from JSON format to e.g. CSV (for easily filtering / aggregating in excel) should be very easy.Related issues
Backward compatibility
Yes
Testing
Manual and Unit Tests