Tutorials
Step-by-step tutorials take you from deploying your first contract to a full NFT marketplace with royalties. Tutorials 1–4 build on each other and reference contracts that exist in the GEM repository; Tutorial 5 is still being written and has no contract in the repo yet.
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 (in development)
The walkthrough covers listing creation with escrow, purchase with royalties (basis points), cross-contract calls to transfer NFTs and DALLA, and a full buyer-seller flow. The marketplace contract itself does not exist in gem/ yet, so this one is a writing exercise rather than a deployable reference.
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.