Contracts written in Cairo using Dojo to showcase a Pixel World with app interoperability. Its interoperability is made possible with core actions. Apps are any other contracts that are deployed to the Pixel World.
The easiest way is to use the VSCode DevContainer, all tools will be installed already. Keep reading for this approach. You can also install all tools in your local environment, see Local Environment. This README is all about using the Devcontainer (recommended)
Open this folder in VSCode, and build/run the devcontainer.
You will see a series of commands executed in the terminal, which you can close when done. After that you have a fully configured environment with Katana, Torii and the Pixelaw server running. Use klog
, tlog
and slog
to see the logs for each.
When doing local development, you'll use the build-in Katana accounts which have been preconfigured.
When ready to deploy to Sepolia testnet, you'll have to create and fund an account, and install the keystore file in your project.
You can use the scripts/account_from_key.sh
for this.
All normal Dojo tooling is available, see the Dojo Documentation
This will compile the Cairo contracts in /src
sozo build
Deploy (migrate) the contracts
sozo migrate
The idea is that you'll copy this template and create your own PixeLAW app with it. So eventually the versions of Core, Dojo may get outdated.
To upgrade Dojo, you have to upgrade Pixelaw Core (see below)
The easiest is to do a full-text search/replace on the Core version number (for example 0.5.11
) and replace it with the new version. Then it's easiest to
- Delete the
/target/
folder - Delete the
Scarb.lock
file - Full Rebuild using
sozo build
- Fix any compile issues
- Run (integration) tests with
sozo test
- Fix any test issues
- If applicable: Upgrade your live code using
sozo migrate --profile sepolia