dojo-token

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

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Kepler22bee/House-of-Stark --skill dojo-token-kepler22bee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dojo-token
Source: https://github.com/Kepler22bee/House-of-Stark/tree/main/contracts/.agents/skills/dojo-token
Command: npx skills add https://github.com/Kepler22bee/House-of-Stark --skill dojo-token-kepler22bee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding fungible and non-fungible token support to a Dojo game and making token balances, transfers, and metadata discoverable via Torii is repetitive and error prone; developers need a clear pattern for implementing tokens in Cairo, deploying them as external contracts, and configuring indexers to surface token data to clients and queries.

Core Features & Use Cases

  • ERC20 and ERC721 implementations: Patterns and model examples for fungible currency and NFT items using Dojo models and Cairo traits.
  • Deployment guidance: Instructions to include token contracts as external contracts in Scarb.toml and deploy with sozo build and sozo migrate.
  • Indexer configuration and queries: How to add token contracts to Torii indexing, available database tables (tokens, balances, erc_transfers), SQL examples, and client SDK usage.
  • Use Cases: Create in-game currency (ERC20), mint and transfer collectible items (ERC721), and surface balances and transfer history to frontends and analytics.

Quick Start

Deploy an ERC20 token contract alongside your Dojo world, add its address to Torii's indexing configuration, and run Torii so balances and transfers become queryable.

Frequently Asked Questions about dojo-token

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

FAQPage Schema
How do I implement ERC20 and ERC721 tokens in a Dojo Cairo project?

To implement ERC20 and ERC721 tokens in a Dojo Cairo project, use provided model examples and Cairo traits for fungible currency and NFT items. This approach integrates token contracts seamlessly with your existing Dojo world architecture during development and production deployments.

How do I deploy external token contracts using sozo build and sozo migrate?

Deploy external token contracts by including them in your Scarb.toml configuration, then run sozo build to compile and sozo migrate to deploy. This ensures your ERC20 or ERC721 contracts are deployed alongside your main Dojo world.

How do I configure Torii to index ERC20 and ERC721 token balances and transfers?

Configure Torii indexing by adding your token contract addresses to torii.toml. Once Torii runs, it automatically populates database tables with token balances, transfer events, and metadata, making them queryable for client frontends and analytics.

What database tables does Torii provide for querying indexed token data?

Torii provides specific database tables including tokens, balances, and erc_transfers for indexed token data. You can query these tables using SQL or client SDKs to retrieve token balances, transfer history, and metadata for your Dojo game clients.

Can I surface in-game currency and NFT transfer history to frontends using Dojo and Torii?

Yes, you can surface in-game currency and NFT transfer history to frontends by deploying ERC20 and ERC721 contracts as external contracts and configuring Torii to index them. Client SDKs can then query the indexed balances and transfer events directly.