Skip to content

Commit

Permalink
Merge pull request #177 from dpinones/update-sozo-model
Browse files Browse the repository at this point in the history
Update section Sozo model
  • Loading branch information
gianalarcon authored Jan 11, 2024
2 parents 44399b0 + d9614e6 commit 01739c1
Showing 1 changed file with 18 additions and 7 deletions.
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

0 comments on commit 01739c1

Please sign in to comment.