Skip to content

Marketplace

The Cartridge Marketplace brings onchain assets directly to your players, enabling richer and more complex game experiences.

Adding Assets

Adding assets to your game's marketplace is simple. First, configure your game's Torii instances to index the asset, and then configure your Controller with Torii.

Configure your Torii

Every digital asset on the Marketplace must be indexed by Torii. To configure Torii to index an onchain asset, add the token address to the configuration file:

# torii.toml
 
[indexing]
contracts = [
  "erc20:<contract-address>",
  "erc721:<contract-address>"
]

Add Torii to Controller

Once Torii is indexing your asset, pass the URL to your game's Controller. The URL of your Torii instance should be passed as the slot option:

import { Controller } from '@cartridge/controller'
 
controller = new Controller({
  // other options
  slot: "https://api.cartridge.gg/x/my-game/torii"
})