Tutorials
Five comprehensive, step-by-step tutorials take you from deploying your first contract to building a full NFT marketplace with royalties. Each tutorial builds on the previous one, using real contracts from the GEM repository as reference implementations.
Tutorial Series
Tutorial 1: Hello BelizeChain
Deploy your first contract in 5 minutes. Create a project with cargo contract, write a message-storage contract with events, build, deploy to a local node, and interact via CLI. The simplest path to your first smart contract.
Tutorial 2: Token Economy
Build a PSP22 fungible token in 15 minutes. Implement custom name, symbol, initial supply, max cap, transfer, approval, and minting functions. Deploy and test token transfers between accounts.
Tutorial 3: NFT Collection
Create a PSP34 NFT collection in 20 minutes. Build unique token IDs, IPFS metadata URIs, transfer and approval system, minting, and burning. Deploy and mint your first NFT with metadata.
Tutorial 4: Build a DAO
Implement governance in 30 minutes. Define proposal structures, implement create/vote/execute functions, integrate token-weighted voting with DALLA, and manage quorum-based decision making.
Tutorial 5: NFT Marketplace
Build a complete marketplace in 45 minutes. Implement listing creation with escrow, purchase with royalties (basis points), cross-contract calls to transfer NFTs and DALLA, and a full buyer-seller flow.
Best Practices
Five essential patterns for ink! development: saturating arithmetic to prevent overflows, events for all state changes, input validation before state mutations, Result types for error handling, and comprehensive test coverage.