Skip to content

Commit

Permalink
Fix: Provide name of contract
Browse files Browse the repository at this point in the history
  • Loading branch information
gianalarcon committed Apr 5, 2024
1 parent e1ad028 commit fa926a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
8 changes: 3 additions & 5 deletions scripts/default_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ export RPC_URL="http://localhost:5050"

export WORLD_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.world.address')

export ACTIONS_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.contracts[] | select(.name == "dojo_starter::systems::actions::actions" ).address')

echo "---------------------------------------------------------------------------"
echo world : $WORLD_ADDRESS
echo " "
echo actions : $ACTIONS_ADDRESS
echo actions : dojo_starter::systems::actions::actions
echo "---------------------------------------------------------------------------"

# enable system -> models authorizations
sozo auth grant --world $WORLD_ADDRESS --wait writer \
Position,$ACTIONS_ADDRESS \
Moves,$ACTIONS_ADDRESS \
Position,dojo_starter::systems::actions::actions\
Moves,dojo_starter::systems::actions::actions\
>/dev/null

echo "Default authorizations have been successfully set."
5 changes: 1 addition & 4 deletions scripts/move.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ pushd $(dirname "$0")/..
export RPC_URL="http://localhost:5050";

export WORLD_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.world.address')

export ACTIONS_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.contracts[] | select(.name == "dojo_starter::systems::actions::actions" ).address')

# sozo execute --world <WORLD_ADDRESS> <CONTRACT> <ENTRYPOINT>
sozo execute --world $WORLD_ADDRESS $ACTIONS_ADDRESS move --calldata 1 --wait
sozo execute --world $WORLD_ADDRESS dojo_starter::systems::actions::actions move -c 1 --wait
4 changes: 1 addition & 3 deletions scripts/spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ export RPC_URL="http://localhost:5050";

export WORLD_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.world.address')

export ACTIONS_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.contracts[] | select(.name == "dojo_starter::systems::actions::actions" ).address')

# sozo execute --world <WORLD_ADDRESS> <CONTRACT> <ENTRYPOINT>
sozo execute --world $WORLD_ADDRESS $ACTIONS_ADDRESS spawn --wait
sozo execute --world $WORLD_ADDRESS dojo_starter::systems::actions::actions spawn --wait

0 comments on commit fa926a9

Please sign in to comment.