Phase 1 MVP — 2 of 6 challenges implemented (33%) · Wave submission ready
A hands-on Soroban smart contract challenge platform. Pick a challenge, write your contract, run the tests, and level up your Stellar/Soroban skills.
PLEarn is a learn-by-doing platform for Soroban smart contract development. Each challenge gives you:
- A clear objective and requirements
- Starter code with
TODOstubs to fill in - Pre-written tests that validate your solution automatically
No guessing whether your contract is correct — the tests tell you.
PLEarn-Contract/
├── challenges/
│ ├── beginner/
│ │ ├── 01-hello-token/
│ │ │ ├── INSTRUCTIONS.md # What to build
│ │ │ ├── Cargo.toml
│ │ │ ├── src/lib.rs # Your solution goes here
│ │ │ └── tests/test.rs # Pre-written tests
│ │ └── 02-token-transfer/
│ │ ├── INSTRUCTIONS.md
│ │ ├── Cargo.toml
│ │ ├── src/lib.rs
│ │ └── tests/test.rs
│ ├── intermediate/
│ │ ├── 01-voting-contract/
│ │ └── 02-access-control/
│ └── advanced/
│ ├── 01-staking-contract/
│ └── 02-multisig-wallet/
├── scripts/
│ ├── run-tests.sh # Run all challenges
│ └── validate.sh # Validate a single challenge
└── docs/
- Rust (stable)
- Soroban target:
rustup target add wasm32-unknown-unknown - Soroban CLI (optional, for deployment)
Browse the challenges/ folder. Start with beginner/ if you're new to Soroban.
challenges/beginner/01-hello-token/INSTRUCTIONS.md
Each challenge has an INSTRUCTIONS.md with:
- The objective
- Required functions to implement
- Expected behavior
- Hints
Open src/lib.rs and fill in the TODO stubs:
#[contractimpl]
impl HelloToken {
pub fn initialize(env: Env, admin: Address) {
// your code here
}
pub fn mint(env: Env, to: Address, amount: i128) {
// your code here
}
pub fn balance(env: Env, account: Address) -> i128 {
// your code here
}
}./scripts/validate.sh challenges/beginner/01-hello-tokenYou'll see either:
✅ Challenge passed!
or a detailed test failure output showing exactly what went wrong.
./scripts/run-tests.sh| # | Challenge | Status | Description |
|---|---|---|---|
| 01 | Hello Token | ✅ Implemented | Mint a token and query balances |
| 02 | Token Transfer | ✅ Implemented | Add peer-to-peer transfer with auth |
| # | Challenge | Status | Description |
|---|---|---|---|
| 01 | Voting Contract | 🔲 Open | On-chain proposals and voting |
| 02 | Access Control | 🔲 Open | Role-based permissions system |
| # | Challenge | Status | Description |
|---|---|---|---|
| 01 | Staking Contract | 🔲 Open | Stake tokens and earn time-based rewards |
| 02 | Multisig Wallet | 🔲 Open | M-of-N approval before executing transactions |
PLEarn is built in the open. Contributions are welcome across all skill levels. See docs/contributing.md for the full guide.
- Add a new challenge — Create a new folder under the appropriate difficulty level with
INSTRUCTIONS.md,src/lib.rs,tests/test.rs, andCargo.toml - Write test cases — Improve coverage for existing challenges
- Fix broken tests — Find and fix tests that don't compile or have incorrect assertions
- Improve instructions — Make challenge descriptions clearer or add better hints
challenges/<difficulty>/<number>-<name>/
├── INSTRUCTIONS.md
├── Cargo.toml
├── src/
│ └── lib.rs # starter code with TODO stubs
└── tests/
└── test.rs # pre-written tests
Follow the naming convention: 01-hello-token, 02-token-transfer, etc.
-
INSTRUCTIONS.mdhas a clear objective, requirements, expected behavior, and hints -
src/lib.rshas the contract struct,#[contractimpl]block, andTODOcomments -
tests/test.rscovers the happy path and at least one failure case -
Cargo.tomlusessoroban-sdk = "22.0.11"withtestutilsfeature -
./scripts/validate.sh challenges/<path>runs without errors on a correct solution
| Script | Usage | Description |
|---|---|---|
validate.sh |
./scripts/validate.sh challenges/beginner/01-hello-token |
Test a single challenge |
run-tests.sh |
./scripts/run-tests.sh |
Test all challenges |
MIT