-
Notifications
You must be signed in to change notification settings - Fork 29
feat: Upgrade stellar crates and read events from specs #371
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: Upgrade stellar crates and read events from specs #371
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #371 +/- ##
=======================================
- Coverage 96.5% 96.5% -0.1%
=======================================
Files 76 76
Lines 26213 27116 +903
=======================================
+ Hits 25318 26177 +859
- Misses 895 939 +44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Mostly looks good, but we need a better way to handle the parsing. I would look at how we are doing it currently for functions to compare.
A few other things to keep in mind;
- Do we support user defined types (UDT)?
- Does this allow for backwards compatibility (we can use indexes and names for referencing parameters in event signatures)?
Anyway, I am trying to find a better way to do it |
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.
LGTM, don't forget to change the docs in other locations as well, for example a few that I found:
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.
Pull Request Overview
This PR upgrades Stellar crates from version 22 to 23 and implements support for reading event parameter names from contract specifications. The upgrade enables protocol 23 features, particularly event specifications that allow for named parameter access instead of numeric indexing.
- Upgrades stellar-xdr, stellar-rpc-client, and soroban-spec to version 23
- Implements event spec parsing to extract event names and parameter definitions
- Adds support for unpacking different StellarValue types (Map, Vec, Tuple) based on event specs
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updates Stellar crate versions to 23.x |
| src/services/blockchain/clients/stellar/client.rs | Updates base64 encoding method for XDR |
| src/services/filter/filters/stellar/helpers.rs | Adds event spec parsing and value unpacking functions |
| src/services/filter/filters/stellar/filter.rs | Implements event decoding with spec-based parameter names |
| src/services/filter/filters/stellar/evaluator.rs | Updates comparison logic for generic types |
| src/models/ | Adds event-related model definitions |
| tests/ | Adds comprehensive property tests and integration tests |
| docs/ | Updates documentation for named parameter access |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
Changes related to upgrade stellar crates:
src/services/blockchain/clients/stellar/client.rs(base64 encoding)src/services/filter/filters/stellar/filter.rs(changes related to ContractId)Testing Process
Checklist