What's Changed
New Features
- MuxedAddress now implements ScVal conversion traits and SorobanArbitrary, allowing it to be used as a field in
#[contracttype]structs. (#1782)
Improvements
- Compiler error for reserved type names in contract types:
#[contracttype]definitions whose names collide with SDK built-in type names (e.g. Address, Bytes, Symbol) now produce a clear compile-time error instead of silently mapping to the built-in type in the contract spec. (#1788) - Using
#[contractevent(data_format = "single-value")]with more than one data field now produces a clear compile-time error. (#1794) #[contractimpl]macro now correctly resolves associated types in function return values (not just inputs), and emits clear compiler errors when it cannot resolve an associated type. (#1780)LedgerSnapshot::write_filenow writes to a temporary file before atomically replacing the destination, preventing corrupted snapshot files if serialization fails. (#1796)- Replaces regular subtraction with
saturating_subwhen computingmax_ttlto guard against potential underflow from misconfiguration. (#1792)
Bug Fixes
- Generated
try_ clientmethods were always callingmock_all_auths()and ignoring theallow_non_root_authflag, causing non-root auth to silently fail. They now correctly callmock_all_auths_allowing_non_root_auth()when the flag is set. (#1761) - Doc comment truncation could split multi-byte UTF-8 codepoints, producing invalid UTF-8 in the contract's spec XDR. Truncation now always occurs at a valid character boundary. (#1769)
- The
build.rstarget check was evaluating against the host target instead of the compilation target, so the Rust version check never fired during cross-compilation. This could silently produce Wasm binaries with unsupported features. The error message now also recommends wasm32v1-none as the preferred target. (#1771) - Added checks in
register_contract_with_sourceandregister_stellar_asset_contract_v2to prevent potential auth manager overrides. (#1803)
Documentation
- Added documentation for the ToXdr and FromXdr traits. (#1767)
- Improved documentation for Val conversion behavior in SDK collection types. (#1774)
- Added documentation for the SHA-256 hash verification options available in contractimport! and contractfile! macros. (#1790)
- Documented how
#[contractimpl]determines the exported function names in the contract spec. (#1809) - Updated the
Pausabletrait doc examples to include access control patterns. (#1764) - Expanded documentation on how to use mock auth in test scenarios. (#1798)
- Improved documentation for Poseidon hash functions. (#1816)
All Changes
- Add comment for future EnvTestConfig API privatization by @leighmcculloch in #1752
- Fix try_ client ignoring allow_non_root_auth flag by @leighmcculloch in #1761
- Add access control to Pausable trait examples by @leighmcculloch in #1764
- Document ToXdr and FromXdr traits by @leighmcculloch in #1767
- Fix rust and wasm target check for sdk by @leighmcculloch in #1771
- Improve docs around Val conversion in collections by @mootz12 in #1774
- Add ScVal conversion and SorobanArbitrary impls for MuxedAddress by @mootz12 in #1782
- Improve parsing for associated type usage and add better errors for unsupported patterns by @mootz12 in #1780
- Fix docs_from_attrs truncating mid-UTF-8 codepoint by @leighmcculloch in #1769
- chore: use saturating sub with max_ttl computation by @mootz12 in #1792
- Add compiler error when single value event used with multiple data entries by @mootz12 in #1794
- Expand docs for mock auth usage in tests by @mootz12 in #1798
- Write to a temp file first during snapshot write_file by @mootz12 in #1796
- Add compiler error when reserved type names are used as contract types by @mootz12 in #1788
- Document
contractimport!andcontractfile!SHA-256 verification options by @mootz12 in #1790 - Fix panic safety in register_contract_with_source and register_stellar_asset_contract_v2 by @mootz12 in #1803
- Fix misc typos and doc links by @mootz12 in #1804
- Document
#[contractimpl]export name behaviour by @leighmcculloch in #1809 - Skip privacy-pools in soroban-examples CI by @leighmcculloch in #1811
- improve poseidon, poseidon2_permutation docs by @jayz22 in #1816
- Bump version to 25.3.1 by @github-actions[bot] in #1821
Full Changelog: v25.3.0...v25.3.1