Skip to content

fix(contracts): align Cargo workspace members and document criteria (#1002) - #1019

Open
devpassionOX wants to merge 2 commits into
StellarDevHub:mainfrom
devpassionOX:fix/1002-cargo-workspace-alignment
Open

fix(contracts): align Cargo workspace members and document criteria (#1002)#1019
devpassionOX wants to merge 2 commits into
StellarDevHub:mainfrom
devpassionOX:fix/1002-cargo-workspace-alignment

Conversation

@devpassionOX

Copy link
Copy Markdown

Overview

This PR aligns the contracts/ Cargo workspace with every buildable Soroban contract crate, documents clear membership criteria, and adds a cargo check --workspace CI step so contributors can tell workspace packages from educational templates and incomplete scaffolding.

Related Issue

Closes #1002

Changes

📦 Workspace Alignment

  • [MODIFY] contracts/Cargo.toml

    • Adds all remaining buildable contract crates as workspace members (alphabetically sorted).
    • Excludes incomplete scaffolding such as did_registry/ (no Cargo.toml yet).
    • Removes nested empty [workspace] tables from previously standalone crates so they join the root workspace cleanly.
  • [ADD] docs/contracts/WORKSPACE.md

    • Documents selection criteria for workspace vs non-workspace content.
    • Clarifies that contracts/src/*.rs educational templates belong to the root package and are not separate members.
    • Provides contributor steps for adding a new contract crate.
  • [MODIFY] .github/workflows/ci.yml

    • Runs cargo check --workspace, cargo clippy --workspace, and cargo build --workspace.

🔧 Compile Fixes For Newly Covered Members

  • [MODIFY] contracts/payment_gateway/src/lib.rs — replace invalid assert!(..., Error) usage, fix ledger timestamp typing, shorten event symbols to ≤9 chars.
  • [MODIFY] contracts/zk_proof_verifier/src/lib.rs — convert Hash<32> via .into() and hash addresses with ToXdr.
  • [MODIFY] contracts/hello_world/src/lib.rs — accept String greeting input so the crate builds under no_std.

Verification Results

cd contracts
cargo check --workspace
✅ Finished `dev` profile (exit 0)

Membership coverage check:
✅ 26/26 directories with Cargo.toml are workspace members
✅ Incomplete `did_registry/` excluded (documented)
Acceptance Criteria Status
Document selection criteria for workspace members docs/contracts/WORKSPACE.md
Add all buildable contracts to the workspace (or organize sub-workspaces) ✅ All compiling crates added; incomplete dirs excluded with rationale
Add cargo check --workspace CI validation ✅ Contracts CI job updated

Made with Cursor

Document membership criteria, include all compiling crates under contracts/, and enforce cargo check --workspace in CI so contributors know what belongs in the workspace.
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@devpassionOX is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@devpassionOX 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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔄 [MEDIUM] Cargo Workspace Members vs Actual Contract Directories Alignment

1 participant