Skip to content

models

sozo model

model is used to interact with World's models. It is useful for querying about a model's information, or a model value of an entity.

USAGE

Usage: sozo model [OPTIONS] <COMMAND>
 
Commands:
  class-hash        Retrieve the class hash of a model
  contract-address  Retrieve the contract address of a model
  schema            Retrieve the schema for a model
  get               Get a models value for the provided key
  help              Print this message or the help of the given subcommand(s)

SUBCOMMANDS

class-hash

Get the class hash of a model.

sozo model class-hash <NAME>
Arguments

NAME     The name of the model.

contract-address

Get the contract address of a model.

sozo model contract-address <NAME>
Arguments

NAME     The name of the model.

schema

Retrieve the schema for a model.

sozo model schema <NAME>
Arguments

NAME
    The name of the model.

get

Get the model value for an entity.

sozo model get <NAME> [KEYS]...
Arguments

NAME
    The name of the model.

KEYS
    The keys of the entity that you want to query.
    Comma separated values e.g., sozo model get my_model 0x12345,0x69420.

OPTIONS

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