25.0.0
What's Changed
Breaking Changes
- Simplified Contract Event Testing: New ContractEvents struct from env.events().all() with XDR conversion via to_contract_event and improved debug output showing actual values instead of object references. The change is backwards compatible for most contracts we observed because the new type is comparable with the old data format, but some contracts that do more than comparisons with the old data may see a compiler error and require updating. (#1638)
New Features
- BN254 Cryptographic Support: Added BN254 elliptic curve operations (G1Affine, scalar field types) and exposed Poseidon/Poseidon2 hash functions via CryptoHazmat (gated by hazmat-crypto feature). (#1667)
- Test Resource Limit Enforcement: Added resource limit enforcement during testing with mainnet limits enabled by default, helping detect heavy contracts early. Limits are customizable or can be disabled. (#1677)
- MuxedAddress String Parsing: Added MuxedAddress::from_str and from_string methods to parse Stellar strkey addresses (G.../M.../C...) directly in contracts using no-alloc strkey parsing for Wasm compatibility. (#1678)
Improvements
- Compact Ledger Snapshot Format: ~35% file size reduction and ~3x faster serialization for snapshot files. Backwards compatible with old format. (#1648)
Bug Fixes
- Contract Event Field Order: Fixed contractevent with vec data format to preserve field declaration order. (#1680)
- Qualified Trait Paths in contractimpl: Support full paths like crate::module::Trait in impl Trait for Contract blocks. (#1691)
- Unit Type Spec Mapping: () now correctly maps to SC_SPEC_TYPE_VOID instead of empty tuple. (#1666)
All Changes
- Add contracttrait macro internal developer documentation by @leighmcculloch in #1655
- Map empty tuple () to SC_SPEC_TYPE_VOID by @leighmcculloch in #1666
- Add reference to the org contributing guide by @leighmcculloch in #1669
- Update contributing documentation by @leighmcculloch in #1670
- Issues/1310 shrink snapshot file by @mootz12 in #1648
- Simplify contract event testing by @mootz12 in #1638
- Add bn254 support and expose poseidon/poseidon2 host functions by @mootz12 in #1667
- Bump version to 25.0.0-rc.1 by @github-actions[bot] in #1675
- Fix contractevent vec data format to preserve field declaration order by @mootz12 in #1680
- Bump version to 25.0.0-rc.2 by @github-actions[bot] in #1682
- Update fuzz Cargo.lock in bump-version workflow by @leighmcculloch in #1684
- Allow unreachable_code in wasm error helper by @leighmcculloch in #1687
- Use previous minor Rust version for semver-checks by @leighmcculloch in #1692
- Support qualified trait paths in contractimpl by @leighmcculloch in #1691
- Add MuxedAddress::from_str and from_string methods by @leighmcculloch in #1678
- Fix permissions from bump-version workflow by @leighmcculloch in #1694
- Bump version to 25.0.0 by @github-actions[bot] in #1695
- Add v25 contracttrait migration notes by @leighmcculloch in #1696
- Add test resource limit enforcement functionality. by @dmkozh in #1677
Full Changelog: v23.4.0...v25.0.0