This guide covers app-specific standards for apps/onchain. All contracts are built with Soroban/Rust. For migration context from prior chain assumptions, see Stellar Migration Notes.
cd apps/onchainRequired toolchain:
- Rust stable
wasm32-unknown-unknowntarget- Soroban CLI (as needed for deployment/testing workflows)
# Format
cargo fmt --all
# Lint (deny warnings)
cargo clippy --all-targets --all-features -- -D warnings
# Test workspace
cargo test --workspace- Preserve deterministic contract behavior and storage compatibility.
- Keep events and errors explicit for on-chain observability.
- Add/update tests for each behavior change, including edge cases.
- Document any contract interface or upgrade-impacting change.
cargo fmt --allapplied.cargo clippy --all-targets --all-features -- -D warningspasses.cargo test --workspacepasses.- Interface-impacting changes are documented.