What problem does it solve?
Many Dojo-based games and worlds need on-chain fungible currency and NFTs plus reliable indexing for balances and transfers; manually implementing token models, deploying external contracts, and configuring Torii is error-prone and time consuming. This Skill consolidates best-practice Cairo/Dojo token patterns, deployment configuration, and Torii indexing guidance so teams can reliably add tokens to their game workflow.
Core Features & Use Cases
- ERC20 and ERC721 implementations: Provides model-driven examples for fungible in-game currency and NFT items using Dojo/Cairo patterns.
- Deployment integration: Explains how to add token contracts as external_contracts in Scarb and dojo_dev profiles and deploy them with sozo migrate.
- Indexer configuration: Shows how to register ERC20/ERC721 addresses in torii.toml or via CLI so Torii emits tokens, balances, and erc_transfers tables for SQL and SDK queries.
- Querying and SDK usage: Documents SQL tables and React SDK hooks to read token metadata and balances for UI integration.
- Troubleshooting tips: Common issues and validation steps for missing events, wrong prefixes, and Torii restarts.
Quick Start
Deploy an ERC20 Gold token with your Dojo world, add its deployed address to torii.toml using the ERC20: prefix, restart Torii, and verify balances via the tokens and balances tables.