Skip to content

Commit

Permalink
Merge pull request #47 from satyambnsal/main
Browse files Browse the repository at this point in the history
Fix Manifest file path in auth and spawn scripts
  • Loading branch information
gianalarcon authored Apr 2, 2024
2 parents f4ecad0 + a357832 commit f115a39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions scripts/default_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
set -euo pipefail
pushd $(dirname "$0")/..

export RPC_URL="http://localhost:5050";
export RPC_URL="http://localhost:5050"

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

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

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

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

echo "Default authorizations have been successfully set."
echo "Default authorizations have been successfully set."
4 changes: 2 additions & 2 deletions scripts/spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pushd $(dirname "$0")/..

export RPC_URL="http://localhost:5050";

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

export ACTIONS_ADDRESS=$(cat ./target/dev/manifest.json | jq -r '.contracts[] | select(.name == "dojo_starter::systems::actions::actions" ).address')
export ACTIONS_ADDRESS=$(cat ./manifests/deployments/KATANA.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

0 comments on commit f115a39

Please sign in to comment.