Skip to content

Comments

Update to soroban-sdk v25#559

Merged
ozgunozerk merged 6 commits intoOpenZeppelin:mainfrom
NethermindEth:update-soroban25
Feb 3, 2026
Merged

Update to soroban-sdk v25#559
ozgunozerk merged 6 commits intoOpenZeppelin:mainfrom
NethermindEth:update-soroban25

Conversation

@Oghma
Copy link
Contributor

@Oghma Oghma commented Jan 28, 2026

Summary

  • Updates soroban-sdk dependency from 23.4.1 to 25.0.0.
  • Tests are migrated to the new Events::all() return types.
  • Added env.cost_estimate().disable_resource_limits() to the tests that exceed the Mainnet resource limits

Why

Projects using soroban-sdk = "25.0.0" cannot use stellar-access = "0.6.0" due to version mismatch errors:

error[E0308]: arguments to this function are incorrect
note: two different versions of crate `soroban_sdk` are being used;
      two types coming from two different versions of the same crate are different types

Fixes #558

  • Tests

Summary by CodeRabbit

  • New Features

    • Exposed event types for improved event handling and introspection across pausable and token modules.
  • Chores

    • Updated soroban-sdk dependency to version 25.0.0.
    • Enhanced test infrastructure for more robust event assertion handling and resource management.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

This pull request updates the soroban-sdk dependency from 23.4.0 to 25.0.0 and adapts test utilities to account for breaking changes in event testing APIs. The changes include modified event access patterns, new type exports, and resource limit handling adjustments across multiple test files.

Changes

Cohort / File(s) Change Summary
Dependency Update
Cargo.toml
Updated workspace dependency soroban-sdk from 23.4.0 to 25.0.0
Policy Test Event Structure
packages/accounts/src/policies/test/simple_threshold.rs, spending_limit.rs, weighted_threshold.rs
Adapted event counting to navigate nested structures via e.events().all().events().len() instead of e.events().all().len(); added resource limit disabling in spending_limit test
Smart Account Test Event Structure & Resource Limits
packages/accounts/src/smart_account/test/context_rules.rs, signers_and_policies.rs
Updated event access patterns to use .events().len() for nested events; added disable_resource_limits() calls in multiple tests
Contract Utils Event API & Type Exports
packages/contract-utils/src/pausable/test.rs
Refactored to use Event-based API; exposed public types Paused and Unpaused; changed event verification to use to_xdr() method and events().first() for access
Fee Abstraction Test Event Structure
packages/fee-abstraction/src/test.rs
Updated assertions to use events.events().len() instead of events.len()
Test Utils Event Assertion Helpers
packages/test-utils/event-assertion/src/lib.rs
Refactored event assertion logic with new helper methods (expect_event, assert_event_contract, event_topics_data, topic_as, assert_topic_symbol); updated find_event_by_symbol return type and event discovery logic; replaced direct data extraction with Map-based lookups
Token Test Event API & Type Exports
packages/tokens/src/fungible/test.rs
Exposed public type Approve; updated event retrieval to use events.events() API; refactored event comparison to use to_xdr()
RWA Token Test Resource Limits
packages/tokens/src/rwa/claim_topics_and_issuers/test.rs, extensions/doc_manager/test.rs, utils/token_binder/test.rs
Added e.cost_estimate().disable_resource_limits() calls in three test files to allow heavier operations without resource limit constraints

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 Our SDK hops to twenty-five,
Events nested, tests now thrive—
Resources freed, assertions dance,
Breaking changes? We'll enhance!
A smooth hop through soroban's advance! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update to soroban-sdk v25' directly summarizes the primary change: upgrading the soroban-sdk dependency from v23 to v25 with all necessary test migrations.
Description check ✅ Passed The PR description clearly explains the main change (soroban-sdk v25 upgrade), justifies it with a specific version conflict issue (#558), and documents all modifications including test migrations and resource limit adjustments.
Linked Issues check ✅ Passed The PR successfully addresses issue #558 requirements: the soroban-sdk dependency is updated to v25.0.0, all tests are migrated to handle the new Events::all() return types, and resource limits are disabled where needed to accommodate breaking changes.
Out of Scope Changes check ✅ Passed All code changes are directly related to the soroban-sdk v25 upgrade: dependency update in Cargo.toml, event assertion refactoring for new APIs, test migrations for Events::all() changes, and resource limit disabling in tests that exceed limits—no unrelated changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator

@brozorec brozorec left a comment

Choose a reason for hiding this comment

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

LGTM, only some nitpicks

@brozorec brozorec requested a review from ozgunozerk January 30, 2026 15:13
Copy link
Collaborator

@ozgunozerk ozgunozerk left a comment

Choose a reason for hiding this comment

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

agree with Boyan's suggestions, lgtm overall, thanks a lot! 🚀

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 99.15254% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.09%. Comparing base (26f939c) to head (1fbd6b5).

Files with missing lines Patch % Lines
packages/test-utils/event-assertion/src/lib.rs 99.15% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #559   +/-   ##
=======================================
  Coverage   96.08%   96.09%           
=======================================
  Files          54       54           
  Lines        5215     5225   +10     
=======================================
+ Hits         5011     5021   +10     
  Misses        204      204           

☔ 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.

@ozgunozerk
Copy link
Collaborator

@Oghma do you want us to take over? We greatly appreciate your contributions, and if you don't have enough time/resources on the fixes, it is no problem :)

We are going to wait for 2 more days in case you want to continue 👍

@Oghma
Copy link
Contributor Author

Oghma commented Feb 3, 2026

Changes committed :) Ready for a new review

Copy link
Collaborator

@brozorec brozorec left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Oghma 🙏

@ozgunozerk ozgunozerk merged commit 63167bb into OpenZeppelin:main Feb 3, 2026
3 checks passed
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.

Bump soroban_sdk to v25

3 participants