Skip to content

Commit

Permalink
fix: scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
posaune0423 committed Aug 21, 2024
1 parent 99f9ab1 commit bafbb8e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
10 changes: 5 additions & 5 deletions contracts/scripts/create_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ sozo \

# Setup PixeLAW auth and init
declare "WORLD"=$(cat $MANIFEST | jq -r '.world.address')
declare "CORE_ACTIONS"=$(cat $MANIFEST | jq -r '.contracts[] | select(.name=="pixelaw::core::actions::actions") | .address')
declare "PAINT_ACTIONS"=$(cat $MANIFEST | jq -r '.contracts[] | select(.name=="pixelaw::apps::paint::app::paint_actions") | .address')
declare "SNAKE_ACTIONS"=$(cat $MANIFEST | jq -r '.contracts[] | select(.name=="pixelaw::apps::snake::app::snake_actions") | .address')
declare "CORE_ACTIONS"=$(cat $MANIFEST | jq -r '.contracts[] | select(.tag=="pixelaw-actions") | .address')
declare "PAINT_ACTIONS"=$(cat $MANIFEST | jq -r '.contracts[] | select(.tag=="pixelaw-paint_actions") | .address')
declare "SNAKE_ACTIONS"=$(cat $MANIFEST | jq -r '.contracts[] | select(.tag=="pixelaw-snake_actions") | .address')

CORE_MODELS=("App" "AppName" "CoreActionsAddress" "Pixel" "Permissions" "QueueItem")
SNAKE_MODELS=("Snake" "SnakeSegment")
CORE_MODELS=("pixelaw-App" "pixelaw-AppName" "pixelaw-CoreActionsAddress" "pixelaw-Pixel" "pixelaw-Permissions" "pixelaw-QueueItem" "pixelaw-Snake" "pixelaw-Instruction")
SNAKE_MODELS=("pixelaw-Snake" "pixelaw-SnakeSegment")


echo "Write permissions for CORE_ACTIONS"
Expand Down
6 changes: 2 additions & 4 deletions contracts/scripts/create_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ sleep 1
# Setup PixeLAW auth and init
declare "WORLD"=$(cat $MANIFEST | jq -r '.world.address')

CORE_MODELS=("App" "AppName" "CoreActionsAddress" "Pixel" "Permissions" "QueueItem")
SNAKE_MODELS=("Snake" "SnakeSegment")
CORE_MODELS=("pixelaw-App" "pixelaw-AppName" "pixelaw-CoreActionsAddress" "pixelaw-Pixel" "pixelaw-Permissions" "pixelaw-QueueItem" "pixelaw-Snake" "pixelaw-Instruction")
SNAKE_MODELS=("pixelaw-Snake" "pixelaw-SnakeSegment")

echo "Start Torii"
unset LS_COLORS && torii \
Expand Down Expand Up @@ -126,7 +126,6 @@ echo "Write permissions for SNAKE_ACTIONS: Done"

echo "Initialize CORE_ACTIONS"
sozo --manifest-path $DEPLOY_SCARB --profile $PROFILE execute --wait pixelaw-actions init

echo "Initialize CORE_ACTIONS: Done"

echo "Initialize SNAKE_ACTIONS: Done"
Expand All @@ -135,7 +134,6 @@ echo "Initialize SNAKE_ACTIONS: Done"

echo "Initialize PAINT_ACTIONS: Done"
sozo --manifest-path $DEPLOY_SCARB --profile $PROFILE execute --wait pixelaw-paint_actions init

echo "Initialize PAINT_ACTIONS: Done"


Expand Down
1 change: 0 additions & 1 deletion contracts/scripts/init_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fi

# make sure all components/systems are deployed
CORE_MODELS=("pixelaw-App" "pixelaw-AppName" "pixelaw-CoreActionsAddress" "pixelaw-Pixel" "pixelaw-Permissions" "pixelaw-QueueItem" "pixelaw-Snake" "pixelaw-Instruction")

SNAKE_MODELS=("pixelaw-Snake" "pixelaw-SnakeSegment")

echo "Write permissions for CORE_ACTIONS"
Expand Down
2 changes: 1 addition & 1 deletion contracts/scripts/update_scarb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail
pushd $(dirname "$0")/..

# Get world address from manifest
WORLD_ADDRESS=$(cat target/dev/manifest.json | jq '.world.address')
WORLD_ADDRESS=$(cat manifests/dev/deployment/manifest.json | jq '.world.address')

# Check if WORLD_ADDRESS is not "null"
if [ "$WORLD_ADDRESS" != "null" ]; then
Expand Down
4 changes: 2 additions & 2 deletions contracts/scripts/update_scarb_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail
pushd $(dirname "$0")/..

# Get world address from manifest
WORLD_ADDRESS=$(cat target/dev/manifest.json | jq -r '.world.address')
WORLD_ADDRESS=$(cat manifests/dev/deployment/manifest.json | jq -r '.world.address')

# Check if WORLD_ADDRESS is not "null"
if [ "$WORLD_ADDRESS" != "null" ]; then
Expand All @@ -12,4 +12,4 @@ if [ "$WORLD_ADDRESS" != "null" ]; then
sed -i '' "s/world_address = \".*\"/world_address = \"$WORLD_ADDRESS\"/" Scarb.toml
fi

echo "Scarb.toml has been updated with address(es)"
echo "Scarb.toml has been updated with address(es)"
2 changes: 1 addition & 1 deletion contracts/scripts/upload_manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SYSTEMS=("core" "paint" "snake")
DEFAULT_BASE_URL="http://localhost:3000/manifests"
JSON_FILE="./target/dev/manifest.json"
JSON_FILE="./manifests/dev/deployment/manifest.json"

# Check if a command line argument is provided
if [ "$#" -ne 0 ]; then
Expand Down

0 comments on commit bafbb8e

Please sign in to comment.