Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ jobs:
run: cargo fmt --check
- name: Clippy Check
working-directory: ./contracts
run: cargo clippy
run: cargo clippy --workspace
- name: Workspace Check
working-directory: ./contracts
run: cargo check --workspace
- name: Build
working-directory: ./contracts
run: cargo build
run: cargo build --workspace
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The application is fully deployed and accessible online:

```text
web3-student-lab/
β”œβ”€β”€ contracts/ # Platform smart contracts (e.g., on-chain certificates)
β”œβ”€β”€ contracts/ # Soroban Cargo workspace (see docs/contracts/WORKSPACE.md)
β”œβ”€β”€ frontend/ # Next.js/React frontend application
β”‚ └── src/app/
β”‚ β”œβ”€β”€ simulator/ # Visual blockchain tools
Expand Down
49 changes: 49 additions & 0 deletions contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 27 additions & 11 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,45 @@ name = "soroban-certificate-contract"
version = "0.0.0"
edition = "2021"

# Workspace root for all buildable Soroban contract crates under contracts/.
# See docs/contracts/WORKSPACE.md for membership criteria and contributor guidance.
[workspace]
members = [
".",
"proxy",
"implementation_v1",
"implementation_v2",
"smart_vault",
"payment_streaming",
"payment_gateway",
"auth_checker",
"automated_testing_suite",
"cicd_pipeline",
"commit_reveal_rng",
"content_management_system",
"continuous_bonding_curve",
"quadratic_funding",
"multisig_wallet_timelock",
"did_registry",
"course_proxy",
"auth_checker",
"cross_chain_client",
"dao_governance",
"fractional_nft_vault",
"freelance-platform",
"pr_simulation",
"hackathon-team-matching",
"content_management_system",
"hello_world",
"implementation_v1",
"implementation_v2",
"lending_pool",
"multisig_wallet_timelock",
"parametric_insurance",
"payment_gateway",
"payment_streaming",
"pr_simulation",
"proxy",
"quadratic_funding",
"smart_vault",
"testnet_faucet_integration",
"automated_testing_suite",
"cicd_pipeline"
"zk_proof_verifier",
]
# Incomplete or non-crate directories under contracts/ must not be listed as members.
# Example: did_registry/ (source only, no Cargo.toml yet).
exclude = [
"did_registry",
]

[lib]
Expand Down
6 changes: 6 additions & 0 deletions contracts/PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ We successfully built and deployed all 7 of the functional, standalone workspace
## ⏭️ Next Steps
1. **Frontend Integration**: Export these Contract IDs into the frontend's environment variables (`.env.local`) and map them to their corresponding `soroban-client` invocation hooks.
2. **Educational Repair**: Incrementally audit and resolve the missing dependencies and Rust compiler errors residing in the remaining 70+ tutorial modules in `src/*.rs`.

## Workspace membership

All buildable contract crates under `contracts/` are listed in the Cargo workspace (`contracts/Cargo.toml`).
See [`docs/contracts/WORKSPACE.md`](../docs/contracts/WORKSPACE.md) for selection criteria, exclusions
(e.g. incomplete `did_registry/`), and how CI validates members with `cargo check --workspace`.
2 changes: 0 additions & 2 deletions contracts/continuous_bonding_curve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "continuous-bonding-curve"
version = "0.1.0"
edition = "2021"

[workspace]

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
2 changes: 0 additions & 2 deletions contracts/dao_governance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "dao-governance"
version = "0.1.0"
edition = "2021"

[workspace]

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
2 changes: 0 additions & 2 deletions contracts/fractional_nft_vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "fractional-nft-vault"
version = "0.1.0"
edition = "2021"

[workspace]

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
8 changes: 4 additions & 4 deletions contracts/hello_world/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_std]

use soroban_sdk::{contract, contractimpl, Env, String, Symbol, Vec};
use soroban_sdk::{contract, contractimpl, Env, String, Vec};

#[contract]
pub struct HelloWorldContract;
Expand All @@ -9,10 +9,10 @@ pub struct HelloWorldContract;
impl HelloWorldContract {
/// Returns a personalized greeting for the given name.
/// Example: hello("Alice") -> ["Hello", "Alice"]
pub fn hello(env: Env, to: Symbol) -> Vec<String> {
pub fn hello(env: Env, to: String) -> Vec<String> {
let mut greeting = Vec::new(&env);
greeting.push_back(String::from_str(&env, "Hello"));
greeting.push_back(String::from_str(&env, &to.to_string()));
greeting.push_back(to);
greeting
}
}
Expand All @@ -28,7 +28,7 @@ mod tests {
let contract_id = env.register(HelloWorldContract, ());
let client = HelloWorldContractClient::new(&env, &contract_id);

let greeting = client.hello(&Symbol::new(&env, "World"));
let greeting = client.hello(&String::from_str(&env, "World"));

assert_eq!(greeting.len(), 2);
assert_eq!(greeting.get(0).unwrap(), String::from_str(&env, "Hello"));
Expand Down
2 changes: 0 additions & 2 deletions contracts/lending_pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "lending-pool"
version = "0.1.0"
edition = "2021"

[workspace]

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
2 changes: 0 additions & 2 deletions contracts/parametric_insurance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "parametric-insurance"
version = "0.1.0"
edition = "2021"

[workspace]

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
Loading