dojo-token

Implement and deploy ERC20 and ERC721 token contracts with Torii indexing.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/shariqazeem/Prophecy-Roguelite --skill dojo-token-shariqazeem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dojo-token
Source: https://github.com/shariqazeem/Prophecy-Roguelite/tree/main/.agents/skills/dojo-token
Command: npx skills add https://github.com/shariqazeem/Prophecy-Roguelite --skill dojo-token-shariqazeem

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about dojo-token

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy and index ERC20 tokens in a Dojo game world?

Register ERC721 token addresses in torii.toml using the ERC721 prefix, then restart Torii. This configures the indexer to emit tokens, balances, and erc_transfers tables, allowing you to query NFT ownership and transfer history via SQL or SDK hooks.

How do I configure Torii to index external ERC721 NFT contracts in Starknet?

Register ERC721 token addresses in torii.toml using the ERC721 prefix, then restart Torii. This configures the indexer to emit tokens, balances, and erc_transfers tables, allowing you to query NFT ownership and transfer history via SQL or SDK hooks.

Why are token balances and transfers not showing up in my Torii SQL queries?

Missing token balances in Torii SQL queries often result from incorrect address prefixes in torii.toml or failure to restart Torii after configuration changes. Ensure standard transfer events are emitted by the Cairo contract and validate the ERC20 or ERC721 prefix matches the deployed address.

What is the best way to create in-game currency and NFTs using Dojo and Cairo?

Yes, you can query indexed Dojo token data using SQL tables and React SDK hooks. Once ERC20 or ERC721 contracts are registered with Torii, it generates tokens, balances, and erc_transfers tables that expose token metadata and balances for frontend integration.

Can I use React SDK hooks to read ERC20 balances from a Dojo world?

Yes, you can query indexed Dojo token data using SQL tables and React SDK hooks. Once ERC20 or ERC721 contracts are registered with Torii, it generates tokens, balances, and erc_transfers tables that expose token metadata and balances for frontend integration.