Skip to content

Commit

Permalink
docs: minor fixes on new address
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Jan 17, 2024
1 parent 2f16e24 commit 04f57a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions examples/spawn-and-move/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ sozo model schema Moves --world 0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c
> }

# Get the value of the Moves model for an entity. (in this example,
# 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973 is
# the calling account.
sozo model get Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973 --world 0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c6d6473ecb60b4560e
# 0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03, is
# the calling account which is also the key to retrieve a Moves model)
sozo model get Moves 0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03 --world 0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c6d6473ecb60b4560e
> struct Moves {
> #[key]
> player: ContractAddress = 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973,
> player: ContractAddress = 0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03,
> remaining: u8 = 0,
> last_direction: Direction = None,
> }

# The returned value is 0 since we haven't spawned yet.
# We can spawn a player using the actions contract address
# We can spawn a player using the actions contract address.
sozo execute 0x152dcff993befafe5001975149d2c50bd9621da7cbaed74f68e7d5e54e65abc spawn

# Fetch the updated entity
sozo model get Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973 --world 0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c6d6473ecb60b4560e
# Fetch the updated entity.
sozo model get Moves 0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03 --world 0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c6d6473ecb60b4560e
> struct Moves {
> #[key]
> player: ContractAddress = 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973,
> player: ContractAddress = 0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03,
> remaining: u8 = 1,
> last_direction: Direction = None,
> }
Expand Down
2 changes: 1 addition & 1 deletion examples/spawn-and-move/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ rpc_url = "http://localhost:5050/"
# Default account for katana with seed = 0
account_address = "0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03"
private_key = "0x1800000000300000180000000000030000000000003006001800006600"
world_address = "0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c6d6473ecb60b4560e"
world_address = "0x33ac2f528bb97cc7b79148fd1756dc368be0e95d391d8c6d6473ecb60b4560e"

0 comments on commit 04f57a4

Please sign in to comment.