feat: implement issues #621 #622 #626 #637 — No-Std Compliance, WASM Metadata, Integration Mocks & Rustdoc - #661
Merged
Conversation
…, StellarFlow-Network#626, StellarFlow-Network#637 ## Changes Summary ### StellarFlow-Network#621 - No-Std Compliance - Added `default-features = false` to all soroban-sdk and soroban-token-sdk dependency declarations in workspace and all sub-crate Cargo.toml files - Added `[target.'cfg(target_arch = "wasm32")']` rustflags in .cargo/config.toml with stack-size=16384 for wasm32 target - Confirmed `#![no_std]` is declared across all workspace crates ### StellarFlow-Network#622 - Binary Metadata (contractmeta!) - Added `contractmeta!` macro to `src/lib.rs` with version, author, description, interface name, build_time, and git_sha fields - Created `build.rs` that exports GIT_SHA (from `git rev-parse HEAD`) and BUILD_TIME (UNIX timestamp) as cargo rustc-env vars - Metadata is inspectable via `stellar contract inspect` CLI command ### StellarFlow-Network#626 - Integration Mock Framework - Created `tests/mocks/` directory with mock implementations - `tests/mocks/token_mocks.rs` - mock token approvals, transfers, and allowances - `tests/mocks/oracle_mocks.rs` - mock oracle price feeds and updates - `tests/mocks/mod.rs` - module declarations - `tests/integration.rs` - integration tests using mock environments, no live network connectivity required ### StellarFlow-Network#637 - Comprehensive Rustdoc - Added module-level `//!` documentation to `src/storage.rs` explaining gas-optimized storage keys and helpers - Added `///` field documentation to `DataKey` enum variants - Added `///` method documentation for public API functions - Added `///` struct documentation for `NodeProfile` and other public types - Added `//!` module docs covering purpose and usage for key modules - All documentation uses ``# Parameters``, ``# Returns``, ``# Errors`` sections Co-authored-by: OpenCode Agent
|
@Hotmopo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Summary
This PR implements four issues across the StellarFlow contracts workspace:
#621 - 🚫 No-Std Compliance | Strict
#![no_std]Verificationdefault-features = falseto allsoroban-sdkandsoroban-token-sdkdependency declarations across the workspace (rootCargo.toml+ all 7 sub-crateCargo.tomlfiles)[target.'cfg(target_arch = "wasm32")']rustflags in.cargo/config.tomlwithstack-size=16384for wasm32 target#![no_std]is declared in all workspace crates; this PR enforces strict no_std at the dependency levelno_stdenvironment requirements#622 - 🏷 Binary-Metadata | Embedded WASM Interface Metadata (
contractmeta!)contractmeta!macro tosrc/lib.rswith version, author, description, interface, build_time, git_shabuild.rsthat exportsGIT_SHAandBUILD_TIMEat compile timestellar contract inspectCLI command#626 - 🎭 Integration-Mocks | Cross-Contract Invocation Mock Framework
tests/mocks/token_mocks.rs— mock token approvals, transfers, allowancestests/mocks/oracle_mocks.rs— mock oracle price feeds and updatestests/mocks/mod.rs— module declarationstests/integration.rs— integration tests using mock environments, no live network required#637 - 📚 Documentation | Comprehensive Rustdoc Inline API Specifications
//!docs and///field/method documentation across public APIs# Parameters,# Returns,# Errorssections to public functionscargo doc --no-depsRelated Issues