Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.06 KB

File metadata and controls

42 lines (29 loc) · 1.06 KB

Contracts Contribution Guide

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.

Setup

cd apps/onchain

Required toolchain:

  • Rust stable
  • wasm32-unknown-unknown target
  • Soroban CLI (as needed for deployment/testing workflows)

Daily Commands

# Format
cargo fmt --all

# Lint (deny warnings)
cargo clippy --all-targets --all-features -- -D warnings

# Test workspace
cargo test --workspace

Standards

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

Done for Contracts Changes

  • cargo fmt --all applied.
  • cargo clippy --all-targets --all-features -- -D warnings passes.
  • cargo test --workspace passes.
  • Interface-impacting changes are documented.