This is a clickable simulation of the Stellar Speedrun Platform — the kind of guided, gamified onboarding flow we're building for SCF #44. Walk through the NFT Minting challenge below: you'll set up the dev environment, read the contract, deploy it, mint a token through Freighter, and earn your first XLM reward.
soroban-cli, soroban-react, and Freighter wallet.
// challenges/01-nft-mint/contracts/nft_mint.rs #![no_std] use soroban_sdk::{contract, contractimpl, contracttype, Address, Env, Symbol, String}; #[contracttype] #[derive(Clone)] pub struct NFT { pub id: u32, pub owner: Address, pub name: String, } #[contract] pub struct NFTMintContract; #[contractimpl] impl NFTMintContract { /// Mint a new NFT to `owner` with `name`. Returns the NFT id. pub fn mint(env: Env, owner: Address, name: String) -> u32 { owner.require_auth(); let next_id: u32 = env.storage().instance() .get(&Symbol::new(&env, "next")) .unwrap_or(1); let nft = NFT { id: next_id, owner: owner.clone(), name }; env.storage().persistent().set(&next_id, &nft); env.storage().instance().set( &Symbol::new(&env, "next"), &(next_id + 1), ); env.events().publish( (Symbol::new(&env, "mint"), owner), next_id, ); next_id } /// Read the NFT for a given id. pub fn get(env: Env, id: u32) -> Option<NFT> { env.storage().persistent().get(&id) } }
The full platform with 6 challenges and on-chain XLM rewards ships after SCF #44 funding. Early-access devs get priority support and a Genesis NFT.
Confirm transaction · Stellar testnet