models
sozo model
model
is used to interact with a World's models. It is useful for querying about a model's information, or a model value of an entity.
USAGE
sozo model <COMMAND>
Commands:
class-hash Get the class hash of a model
schema Retrieve the schema for a model
get Get the model value for an entity
SUBCOMMANDS
Note: Before to execute the following subcommands, ensure you have added your world address
to your Scarb.toml file.
[tool.dojo.env]
rpc_url = "http://localhost:5050/"
# Default account for katana with seed = 0
account_address = "0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973"
private_key = "0x1800000000300000180000000000030000000000003006001800006600"
world_address = "0x28f5999ae62fec17c09c52a800e244961dba05251f5aaf923afabd9c9804d1a"
class-hash
Get the class hash of a model
sozo model class-hash <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., 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