The sample contract lives in contracts/verified-demo and exposes a single
hello function.
This repository uses the recommended structure for a Soroban project:
.
├── contracts
│ └── verified-demo
│ ├── src
│ │ ├── lib.rs
│ │ └── test.rs
│ └── Cargo.toml
├── Cargo.toml
└── README.md
- New Soroban contracts can be put in
contracts, each in their own directory. - Contracts should have their own
Cargo.tomlfiles that rely on the top-levelCargo.tomlworkspace for their dependencies.
With the released Stellar CLI:
stellar contract build --manifest-path contracts/verified-demo/Cargo.toml --package verified-demoWith the PR #2525 CLI build, use the Docker backend:
$STELLAR contract build \
--backend docker \
--manifest-path contracts/verified-demo/Cargo.toml \
--package verified-demo