Skip to content

Commit

Permalink
Merge branch 'main' into update/test-code
Browse files Browse the repository at this point in the history
  • Loading branch information
posaune0423 authored Aug 7, 2024
2 parents a2f1aac + c60df91 commit ffa82bc
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.34
0.3.35
1 change: 1 addition & 0 deletions contracts/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.4" }
name = "pixelaw"
path = "src/lib.cairo"


# [[target.dojo]]
# build-external-contracts = [ ]

Expand Down
58 changes: 58 additions & 0 deletions contracts/Scarb_deploy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[package]
cairo-version = "=2.7.0-rc.3"
name = "pixelaw"
version = "0.3.35"
homepage = "https://github.com/pixelaw/core"
# Use the prelude with the less imports as possible
# from corelib.
# edition = "2024_07"

[cairo]
sierra-replace-ids = true

[dependencies]
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.4" }


[[target.dojo]]
build-external-contracts = [ ]
path = "../contracts/src/lib.cairo"

[tool.dojo]
initializer_class_hash = "0xbeef"

[scripts]
init_auth = "./scripts/init_auth.sh"

# The "Empty" world
# ----------------------------------------------------------------------------
[tool.dojo.world]
description = "Empty PixeLAW world"
name = "pixelaw"
seed="pixelaw"

[tool.dojo.world.namespace]
default = "pixelaw"
mappings = { }


[tool.dojo.env]
rpc_url = "http://localhost:5050/"
account_address = "0x003c4dd268780ef738920c801edc3a75b6337bc17558c74795b530c0ff502486"
private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a"
world_address= "0xd4136ca2b9f1b08c6d6857b0f19da3dc8d136105ec46459787a6de0fd92bf8"


## The "Populated" world
## ----------------------------------------------------------------------------
#[profile.dev-pop.tool.dojo.world]
#description = "Populated PixeLAW world"
#name = "dev-pop"
#
#[profile.dev-pop.tool.dojo.env]
#rpc_url = "http://localhost:5050/"
#account_address = "0x003c4dd268780ef738920c801edc3a75b6337bc17558c74795b530c0ff502486"
#private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a"
#world_address = "0x00a712727a27defbf77122fae30c91e90ec62bba8f09a2a396eddc29b768386b"
#
#
26 changes: 17 additions & 9 deletions contracts/scripts/create_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ MANIFEST="manifests/$PROFILE/deployment/manifest.json"
TORII_DB="$OUT/torii.sqlite"
TORII_DB_ZIP="$OUT/torii.sqlite.zip"
TORII_LOG="$OUT/torii.log"
DEPLOY_SCARB="Scarb_deploy.toml"

# Stop existing katana/torii
pkill -f katana
Expand Down Expand Up @@ -61,20 +62,27 @@ done

sozo clean
# Sozo build
echo "sozo build"

sozo \
--profile $PROFILE \
--manifest-path $DEPLOY_SCARB \
build

echo "sozo migrate plan"
#starkli account deploy dev-account.json --keystore dev-keystore.json --rpc $STARKNET_RPC

# Sozo migrate
## Sozo migrate
sozo \
--profile $PROFILE \
migrate plan
--manifest-path $DEPLOY_SCARB \
migrate \
plan

sozo \
--profile $PROFILE \
migrate apply
--manifest-path $DEPLOY_SCARB \
migrate \
apply

sleep 1

Expand Down Expand Up @@ -105,28 +113,28 @@ unset LS_COLORS && torii \

echo "Write permissions for CORE_ACTIONS"
for model in ${CORE_MODELS[@]}; do
sozo --profile $PROFILE auth grant --wait writer model:$model,pixelaw-actions
sozo --manifest-path $DEPLOY_SCARB --profile $PROFILE auth grant --wait writer model:$model,pixelaw-actions
done
echo "Write permissions for CORE_ACTIONS: Done"

echo "Write permissions for SNAKE_ACTIONS"
for model in ${SNAKE_MODELS[@]}; do
sozo --profile $PROFILE auth grant --wait writer model:$model,pixelaw-snake_actions
sozo --manifest-path $DEPLOY_SCARB --profile $PROFILE auth grant --wait writer model:$model,pixelaw-snake_actions
done
echo "Write permissions for SNAKE_ACTIONS: Done"


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

echo "Initialize CORE_ACTIONS: Done"

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

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

echo "Initialize PAINT_ACTIONS: Done"

Expand Down

0 comments on commit ffa82bc

Please sign in to comment.