Skip to content

Commit bdc38ee

Browse files
authored
Merge pull request #420 from aniokedianne/feat/issue-126-395-396-401
feat(tutorials): add deploy tutorial
2 parents 7ad323c + 3bc308c commit bdc38ee

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

tutorials/deploy/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Deploy a Soroban Contract
2+
3+
Structured tutorial for building, uploading, and instantiating your first Soroban smart contract on Stellar testnet with StarForge.
4+
5+
## Milestones
6+
7+
1. **Balance check** — confirm your deployer wallet has enough XLM for fees
8+
2. **Build** — compile your contract to WASM with Stellar CLI
9+
3. **Simulate** — dry-run to validate size, fees, and output before broadcasting
10+
4. **Upload** — push the WASM to the Stellar network and record the contract hash
11+
5. **Verify** — confirm the deployment appears in your local deploy history
12+
13+
## Prerequisites
14+
15+
- Completed the [hello-world](../hello-world/README.md) tutorial (wallet created and funded)
16+
- A Soroban contract project in your current directory
17+
- Stellar CLI installed (`stellar --version`)
18+
19+
## Interactive flow
20+
21+
```bash
22+
starforge tutorial start deploy
23+
starforge tutorial next # after each milestone
24+
starforge tutorial status
25+
```
26+
27+
Step definitions live in `tutorial.json` beside this README.

tutorials/deploy/tutorial.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"slug": "deploy",
3+
"title": "Deploy a Soroban Contract",
4+
"description": "Build, upload, and instantiate a Soroban smart contract on Stellar testnet using StarForge.",
5+
"steps": [
6+
{
7+
"title": "Check your wallet balance",
8+
"description": "Confirm your deployer wallet has enough XLM to cover upload and instantiation fees.",
9+
"command": "starforge wallet balance deployer"
10+
},
11+
{
12+
"title": "Build the contract",
13+
"description": "Compile your Soroban contract to WASM. Run this from your contract project directory.",
14+
"command": "stellar contract build"
15+
},
16+
{
17+
"title": "Validate the WASM",
18+
"description": "Run a dry-run deploy to check WASM size, fees, and that the contract compiles correctly — nothing is broadcast yet.",
19+
"command": "starforge deploy --wasm target/wasm32v1-none/release/<your_contract>.wasm --wallet deployer --simulate"
20+
},
21+
{
22+
"title": "Upload the contract",
23+
"description": "Upload the compiled WASM to the Stellar network. This registers the contract code and returns a WASM hash.",
24+
"command": "starforge deploy --wasm target/wasm32v1-none/release/<your_contract>.wasm --wallet deployer"
25+
},
26+
{
27+
"title": "Verify on-chain",
28+
"description": "Confirm the deployment succeeded by listing your recent deployments.",
29+
"command": "starforge deploy list"
30+
}
31+
]
32+
}

0 commit comments

Comments
 (0)