Skip to content

Commit

Permalink
refactor(spawn-and-move): up to date readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Nov 27, 2023
1 parent 84fbcb7 commit ef822b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/spawn-and-move/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sozo build
sozo migrate

# Get the class hash of the Moves model by name
sozo model get --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves
sozo model class-hash --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves
> 0x2b97f0b24be59ecf4504a27ac2301179be7df44c4c7d9482cd7b36137bc0fa4

# Get the schema of the Moves model
Expand All @@ -24,14 +24,14 @@ sozo model schema --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219f
# Get the value of the Moves model for an entity. (in this example,
# 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973 is
# the calling account.
sozo model entity --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
sozo model get --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
> 0x0

# The returned value is 0 since we haven't spawned yet. Let's spawn
# a player for the caller
sozo execute --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 spawn
# The returned value is 0 since we haven't spawned yet.
# We can spawn a player using the actions contract address
sozo execute 0x31571485922572446df9e3198a891e10d3a48e544544317dbcbb667e15848cd spawn

# Fetch the updated entity
sozo model entity --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
sozo model get --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
> 0xa
```

0 comments on commit ef822b0

Please sign in to comment.