From 146ccf182aeb0ef51908b993653f0345acc3e424 Mon Sep 17 00:00:00 2001 From: Caspar Oostendorp Date: Wed, 7 Aug 2024 15:35:29 -0400 Subject: [PATCH 1/3] fixing core build --- contracts/Scarb.toml | 3 -- contracts/Scarb_deploy.toml | 58 ++++++++++++++++++++++++++++ contracts/scripts/create_snapshot.sh | 15 +++++-- 3 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 contracts/Scarb_deploy.toml diff --git a/contracts/Scarb.toml b/contracts/Scarb.toml index acc410e..3e312fc 100644 --- a/contracts/Scarb.toml +++ b/contracts/Scarb.toml @@ -17,9 +17,6 @@ dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.4" } name = "pixelaw" path = "src/lib.cairo" -[[target.dojo]] -build-external-contracts = [ ] - [tool.dojo] initializer_class_hash = "0xbeef" diff --git a/contracts/Scarb_deploy.toml b/contracts/Scarb_deploy.toml new file mode 100644 index 0000000..4a04acb --- /dev/null +++ b/contracts/Scarb_deploy.toml @@ -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" +# +# diff --git a/contracts/scripts/create_snapshot.sh b/contracts/scripts/create_snapshot.sh index 619092b..5955294 100755 --- a/contracts/scripts/create_snapshot.sh +++ b/contracts/scripts/create_snapshot.sh @@ -61,20 +61,27 @@ done sozo clean # Sozo build +echo "sozo build" + sozo \ --profile $PROFILE \ + --manifest-path Scarb_deploy.toml \ 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 Scarb_deploy.toml \ + migrate \ + plan sozo \ --profile $PROFILE \ - migrate apply + --manifest-path Scarb_deploy.toml \ + migrate \ + apply sleep 1 From 310021633a3e890cd03e57f625d8b3ad3d313ce7 Mon Sep 17 00:00:00 2001 From: Caspar Oostendorp Date: Wed, 7 Aug 2024 15:54:17 -0400 Subject: [PATCH 2/3] fixing core build --- contracts/scripts/create_snapshot.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/contracts/scripts/create_snapshot.sh b/contracts/scripts/create_snapshot.sh index 5955294..14222a4 100755 --- a/contracts/scripts/create_snapshot.sh +++ b/contracts/scripts/create_snapshot.sh @@ -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 @@ -65,7 +66,7 @@ echo "sozo build" sozo \ --profile $PROFILE \ - --manifest-path Scarb_deploy.toml \ + --manifest-path $DEPLOY_SCARB \ build echo "sozo migrate plan" #starkli account deploy dev-account.json --keystore dev-keystore.json --rpc $STARKNET_RPC @@ -73,13 +74,13 @@ echo "sozo migrate plan" ## Sozo migrate sozo \ --profile $PROFILE \ - --manifest-path Scarb_deploy.toml \ + --manifest-path $DEPLOY_SCARB \ migrate \ plan sozo \ --profile $PROFILE \ - --manifest-path Scarb_deploy.toml \ + --manifest-path $DEPLOY_SCARB \ migrate \ apply @@ -112,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" From c60df919fa9e683a39763366a09623cd4bbdfb09 Mon Sep 17 00:00:00 2001 From: Caspar Oostendorp Date: Wed, 7 Aug 2024 15:55:22 -0400 Subject: [PATCH 3/3] Prepare v0.3.35 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9f558ed..1ff34fb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.34 +0.3.35