This is an implementation of Treasure Hunter, forking from paint application. We used app_template.
- Player can play as paint app.
- However, player might hit a star when he/she is lucky. (1/1024)
- The star will apear in the pixel as emoji.
- Comment out
LastAttemptfeatures to defend from bots.
This is a heavily WIP attempt to allow creation of PixeLAW apps without managing the main "game" repo.
PixeLAW is built on top of Dojo. Refer to this page to get it installed.
Run sozo init. This will initialize the project by cloning the repo.
sozo init <replace-with-project-file-path> pixelaw/app_templateUse this template to create a new repository or clone this repository locally.
sozo testRun Pixelaw/core
There are multiple ways to have a local copy of PixeLAW core for development:
This is the easiest way to get PixeLAW core up and running in http://localhost:3000. There is a docker-compose file in this repository specifically for running a local image of PixeLAW core.
Running the following command will run core in a container.
docker compose up -dAnother way to go about it is by using the Docker engine by itself.
The following script will create the docker network for the container to run in:
docker network create --driver bridge pixelawAnd this will run the actual container in http://localhost:3000:
docker run -d --name pixelaw-core -p 5050:5050 -p 3000:3000 -p 8080:8080 -p 50051 --restart unless-stopped --network pixelaw oostvoort/pixelaw-core:v0.0.6This will take the most time. This entails cloning the PixeLAW core repos and running each individual component manually. Refer to the GitHub repository for how to run it.
Whichever way you've chosen to start up PixeLAW core, it will take a while for all the core contracts to get deployed and start running. Wait until http://localhost:3000/manifests/core stops returning NOT FOUND. To check if you can start deploying your app, use the following script (this will print out "Ready for app deployment" when the core contracts have finished initialization):
scarb run ready_for_deploymentAfter which you can start deploying your app onto your local PixeLAW via:
sozo buildThis will deploy your app to the local PixeLAW using sozo migrate.
sozo migrate --name pixelawThis will grant writer permission to your app for any custom models made.
scarb run initializescarb run upload_manifestDeploying to demo is almost the same as local development. The only difference is needing the RPC_URL of the Demo environment as well as the DEMO_URL (NOTE: this must end in a slash i.e. '/') of the Demo App to upload your manifest to. Both URLs can be provided by us. Please reach out through discord.
sozo buildThis will deploy your app to the local PixeLAW using sozo migrate.
sozo migrate --name pixelaw --rpc-url <replace-this-with-provided-rpc-url>This will grant writer permission to your app for any custom models made.
scarb run initialize <replace-this-with-provided-rpc-url>scarb run upload_manifest <replace-this-with-provided-demo-url>The following is a current unresolved issue in Dojo.
test myapp::tests::tests::test_myapp_actions ... fail (gas usage est.: 1044740) failures: myapp::tests::tests::test_myapp_actions - panicked with [6445855526543742234424738320591137923774065490617582916 ('CLASS_HASH_NOT_DECLARED'), 23583600924385842957889778338389964899652 ('ENTRYPOINT_FAILED'), 23583600924385842957889778338389964899652 ('ENTRYPOINT_FAILED'), ]