Skip to content

sozo migrate

migrate is used to perform the migration (deployment) process, declaring and deploying contracts as necessary to deploy or update the World.

Changes made to the local World after the initial deployment, can easily be pushed to the remote counterpart by running sozo migrate --world <WORLD_ADDRESS> with WORLD_ADDRESS being the address of the remote World. In the background, migrate will compute the diffs of the local and remote World, then, start constructing a migration strategy to determine, if any, which part of the local World needs to be pushed upstream.

USAGE

sozo migrate [OPTIONS]

OPTIONS

General Options

--name NAME
    Name of the World. At the moment, the only usage for this option is to be used as a salt when deploying the World contract to avoid address conflicts. This option is required when performing the initial migration of the World.

World Options

--world WORLD_ADDRESS
    The address of the World contract.
    ENV: DOJO_WORLD_ADDRESS

Starknet Options

--rpc-url URL
    The Starknet RPC endpoint. [default: http://localhost:5050]
    ENV: STARKNET_RPC_URL

Account Options

--account-address ACCOUNT_ADDRESS
    The Starknet account address.
    ENV: DOJO_ACCOUNT_ADDRESS

Signer Options - Raw

--private-key PRIVATE_KEY
    The raw private key associated with the account contract.
    ENV: DOJO_PRIVATE_KEY

Signer Options - Keystore

--keystore PATH
    Use the keystore in the given folder or file.

--password PASSWORD
    The keystore password. Used with --keystore.
    ENV: DOJO_KEYSTORE_PASSWORD

EXAMPLES

  1. Deploying your World for the first time to a local Katana node
sozo migrate --name ohayo --rpc-url http://localhost:5050
  1. Updating a remote World after making some changes
sozo migrate --world 0x123456
  1. Deploying your World using profile options
sozo --profile dev migrate