Soroban (Rust) smart contracts and design notes for SmartDrop on Stellar.
| Repository | Role |
|---|---|
| smart-frontend | Next.js app (Freighter, RPC) |
| smartdrop-backend | APIs and indexing (planned) |
| SmartDrop | Original monorepo (reference) |
contracts/— reserved layout / pointerssoroban/— Soroban design and future Rust workspace
Contract sources live under soroban/. After deployment, publish the factory contract ID and RPC URL to the frontend repo’s environment variables.
- Rust with the
wasm32-unknown-unknowntarget - Stellar CLI (
stellar) - A funded Stellar identity on the target network (testnet or mainnet)
rustup target add wasm32-unknown-unknown
stellar keys generate default --network testnet # if you do not already have an identityFund testnet accounts via Friendbot.
Network RPC URLs and passphrases are defined in stellar.toml. The deploy script registers the selected network with the CLI automatically.
make build # compile release WASM to soroban/target/wasm32-unknown-unknown/release/
make test # run contract unit tests
make deploy-testnet # install pool WASM, deploy factory, initialize, write .contract-ids.json
make deploy-mainnet # same flow on mainnet (requires a funded mainnet identity)scripts/deploy.sh accepts optional environment variables:
| Variable | Default | Description |
|---|---|---|
NETWORK |
testnet |
testnet or mainnet |
SOURCE |
default |
Stellar CLI identity used to sign transactions |
ADMIN |
address of SOURCE |
Factory admin passed to initialize |
STELLAR_TOML |
./stellar.toml |
Network configuration file |
CONTRACT_IDS_FILE |
./.contract-ids.json |
Output path for deployed IDs |
Example with a custom identity:
SOURCE=alice ADMIN=G... make deploy-testnetOn success, .contract-ids.json contains the factory contract ID and installed pool WASM hash (gitignored).