Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update section Sozo model #177

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/toolchain/sozo/world-commands/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,30 @@
sozo model <COMMAND>

Commands:
get Get the class hash of a model
schema Retrieve the schema for a model
entity Get the model value for an entity
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

#### `get`
**Note**: Before to execute the following subcommands, ensure you have added your `world address` to your Scarb.toml file.

```toml
[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

```sh
sozo model get <NAME>
sozo model class-hash <NAME>
```

##### Arguments
Expand All @@ -43,12 +54,12 @@ sozo model schema <NAME>
_`NAME`_
&nbsp;&nbsp;&nbsp;&nbsp;The name of the model

#### `entity`
#### `get`

Get the model value for an entity

```sh
sozo model entity <NAME> [KEYS]...
sozo model get <NAME> [KEYS]...
```

##### Arguments
Expand Down