Skip to content

Conversation

@NicoMolinaOZ
Copy link
Contributor

@NicoMolinaOZ NicoMolinaOZ commented Oct 15, 2025

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

  • Add a reference to related issues in the PR description.
  • Add unit tests if applicable.
  • Add integration tests if applicable.
  • Add property-based tests if applicable.
  • Update documentation if applicable.

@NicoMolinaOZ NicoMolinaOZ marked this pull request as ready for review October 15, 2025 21:17
@NicoMolinaOZ NicoMolinaOZ requested a review from a team as a code owner October 15, 2025 21:17
@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 95.23810% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.5%. Comparing base (6b26bb6) to head (6b6c45b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/services/filter/filters/stellar/helpers.rs 94.6% 36 Missing ⚠️
src/services/filter/filters/stellar/filter.rs 91.9% 9 Missing ⚠️
src/services/blockchain/clients/stellar/client.rs 90.0% 1 Missing ⚠️
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     
Flag Coverage Δ
integration 60.9% <63.8%> (+0.1%) ⬆️
properties 29.6% <53.6%> (+0.8%) ⬆️
unittests 87.0% <87.1%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NicoMolinaOZ NicoMolinaOZ linked an issue Oct 16, 2025 that may be closed by this pull request
Copy link
Member

@shahnami shahnami left a 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;

  1. Do we support user defined types (UDT)?
  2. Does this allow for backwards compatibility (we can use indexes and names for referencing parameters in event signatures)?

@NicoMolinaOZ
Copy link
Contributor Author

  • Do we support user defined types (UDT)?
    Yes, we do, actually the integration test here is supporting UDT for UserAdded event

  • Does this allow for backwards compatibility (we can use indexes and names for referencing parameters in event signatures)?
    Yes, I have added a test using the names and there is another still running using indexes

Anyway, I am trying to find a better way to do it

Copy link
Member

@shahnami shahnami left a comment

Choose a reason for hiding this comment

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

@shahnami shahnami requested a review from Copilot October 16, 2025 18:09
Copy link

Copilot AI left a 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.

@NicoMolinaOZ NicoMolinaOZ merged commit 7273a3f into main Oct 16, 2025
23 checks passed
@NicoMolinaOZ NicoMolinaOZ deleted the 318-support-event-parameter-names-for-stellar branch October 16, 2025 21:21
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support event parameter names as variables Stellar event templates

3 participants