Loading...
Loading...
Deploy Dojo worlds to local Katana, testnet, or mainnet. Configure Katana sequencer and manage deployments with sozo. Use when deploying your game or starting local development environment.
npx skill4agent add dojoengine/book dojo-deploysozo migrate"Start Katana and deploy my world""Deploy my world to Sepolia""Deploy to Starknet mainnet"katana --dev --dev.no-feehttp://localhost:5050sozo build && sozo migrate# Preview deployment
sozo inspect
# Execute a system
sozo execute dojo_starter-actions spawn# dojo_sepolia.toml
[world]
name = "My Game"
seed = "my-game-sepolia"
[env]
rpc_url = "https://api.cartridge.gg/x/starknet/sepolia"
account_address = "YOUR_ACCOUNT"
private_key = "YOUR_KEY"
[namespace]
default = "my_game"
[writers]
"my_game" = ["my_game-actions"]sozo build --profile sepolia
sozo migrate --profile sepolia# dojo_mainnet.toml
[world]
name = "My Game"
seed = "my-game-mainnet"
[env]
rpc_url = "https://api.cartridge.gg/x/starknet/mainnet"
account_address = "YOUR_ACCOUNT"
keystore_path = "~/.starknet_accounts/mainnet.json"
[namespace]
default = "my_game"
[writers]
"my_game" = ["my_game-actions"]sozo build --profile mainnet
sozo migrate --profile mainnetkatana --dev --dev.no-feekatana --dev --dev.no-feekatana --block-time 10000katana --db-dir ./katana-dbkatana --fork.provider https://api.cartridge.gg/x/starknet/mainnetkatana --fork.provider https://api.cartridge.gg/x/starknet/mainnet --fork.block 1000000sozo build# See what will be deployed/changed
sozo inspect# Deploy with default dev profile
sozo migrate
# Deploy with specific profile
sozo migrate --profile sepolia# Call a system function
sozo execute <CONTRACT_TAG> <FUNCTION> [ARGS...]
# Example: spawn
sozo execute dojo_starter-actions spawn
# Example: move with argument
sozo execute dojo_starter-actions move 1sozo testdojo-reviewdojo-configsozo buildsozo inspectsozo migratemanifest_<profile>.jsondojo-indexerdojo-clientdojo-worldkatana --dev --dev.no-feesozo build && sozo migratetorii --world <WORLD_ADDRESS> --indexing.controllersdeploy_local.shscripts/cp deploy_local.sh your-project/scripts/chmod +x scripts/deploy_local.sh# Default dev profile
./scripts/deploy_local.sh
# Specific profile
PROFILE=staging ./scripts/deploy_local.shPROFILERPC_URLhttp://localhost:5050TORII_URLhttp://localhost:8080slot auth loginslot deployments create <PROJECT_NAME> katana --optimisticslot deployments create <PROJECT_NAME> katana --config katana.tomltorii.tomlslot deployments create <PROJECT_NAME> torii --config torii.toml --version <DOJO_VERSION>dojo-indexer# Stream logs
slot deployments logs <PROJECT_NAME> katana -f
slot deployments logs <PROJECT_NAME> torii -f
# Delete a deployment
slot deployments delete <PROJECT_NAME> katana
slot deployments delete <PROJECT_NAME> toriimanifest_<profile>.json{
"world": {
"address": "0x...",
"class_hash": "0x..."
},
"models": [
{
"tag": "dojo_starter-Position",
"address": "0x..."
}
],
"contracts": [
{
"tag": "dojo_starter-actions",
"address": "0x..."
}
]
}sozo buildtarget/dojo_<profile>.toml--profilehttp://localhost:5050https://api.cartridge.gg/x/starknet/sepoliahttps://api.cartridge.gg/x/starknet/mainnetdojo-indexerdojo-clientdojo-worlddojo-migrate