From 255d65709b058869e4d87ba6d6fb8464b5840285 Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Thu, 3 Oct 2024 18:42:23 -0500 Subject: [PATCH 1/9] Create wsl.md Explaining how to use install wsl to install dojo --- docs/pages/getting-started/wsl.md | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 docs/pages/getting-started/wsl.md diff --git a/docs/pages/getting-started/wsl.md b/docs/pages/getting-started/wsl.md new file mode 100644 index 00000000..1efab412 --- /dev/null +++ b/docs/pages/getting-started/wsl.md @@ -0,0 +1,133 @@ + +**Installing Dojo with WSL2 on Windows** + +1. **Enable the "Windows Subsystem for Linux" feature:** + - Open "Control Panel" -> "Programs" -> "Turn Windows features on or off". + - Enable the "Windows Subsystem for Linux" checkbox and click "OK". + - Restart your computer. + +2. **Install Ubuntu:** + - Open a command prompt. + - Run the following command: + ``` + wsl --install -d Ubuntu + ``` + +3. **Verify Installation (Step moved):** + - Open a command prompt. + - Run the following command: + ``` + wsl -l + ``` + - You should see "Ubuntu" listed as an installed distro. + +4. **You will be prompted to create a Username and a password.** + +5. **Installing rustup on Linux** + + - Open your WSL2 Ubuntu terminal. + - Run the following command to install the latest stable release of Rust: + ``` + curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh + ``` + - When prompted, select the first option "1) Proceed with standard installation (default - just press enter)". + - After completion, you should see "Rust is installed now. Great!" + + **Temporarily adding Cargo bin directory to PATH (Optional):** + + - If you don't want to restart your terminal, you can temporarily add the 'Cargo bin directory' to your PATH environment variable. + - Run the following command in your terminal: + ```bash + export PATH=$PATH:$HOME/.cargo/bin + ``` + - This tells the system where to search for executables like `rustc` and `cargo`. + +6. **Installing git** + + - At the time of writing, git v2.43.0 comes pre-installed with WSL2 Ubuntu 24.04.1 LTS. + - You can verify this by running: + ``` + git --version + ``` + +7. **Installing Scarb** + + - Run the following command in your terminal to install the latest stable release of Scarb: + ``` + curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh](https://docs.swmansion.com/scarb/install.sh) | sh + ``` + - Follow the on-screen instructions during the installation. + + **Updating your PATH for Scarb (Optional):** + + - If you don't want to open a new terminal, run this command to update your PATH: + ``` + source /home//.bashrc + ``` + - Replace `` with your actual username. + + - Now you can check the installation by running: + ``` + scarb --version + ``` + +8. **Installing DOJO with asdf ** + + - Run the following command to install asdf: + ``` + git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1 + ``` + - Run the following commands in your terminal to configure asdf for Dojo: + + ```bash + echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc + echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc + + source ~/.bashrc # Reload the .bashrc file + ``` + +9. **Installing dojo** + + - Add the Dojo plugin to asdf and install version 1.0.0-alpha.5: + + ``` + asdf plugin add dojo https://github.com/dojoengine/asdf-dojo + asdf install dojo 1.0.0-alpha.5 + ``` + + - Set the global version of Dojo: + + ``` + asdf global dojo 1.0.0-alpha.5 + ``` + +10. **Verifying Installation** + + - View the currently installed Dojo version: + + ``` + asdf current dojo + ``` + + - This should output something like: + ``` + > dojo 1.0.0-alpha.5 /home//.tool-versions + ``` + + - Alternatively, you can use the `sozo` command (provided by Dojo) to check the installed versions of Dojo, Scarb, Cairo, and Sierra: + + ``` + sozo --version + ``` + +**Note:** + +- Replace `` in the Scarb and Dojo PATH update commands with your actual username. + +[dojo](https://book.dojoengine.org/getting-started) +[wsl2](https://learn.microsoft.com/en-us/windows/wsl/install) +[scarb](https://docs.swmansion.com/scarb/download.html) +[asdf](https://asdf-vm.com/guide/getting-started.html) + + + From 9f88f48d7677f1ddee9cb4659686dbd7e112edcf Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Thu, 3 Oct 2024 18:44:26 -0500 Subject: [PATCH 2/9] Update getting-started.md --- docs/pages/getting-started.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/getting-started.md b/docs/pages/getting-started.md index 3fbac20b..83d24d66 100644 --- a/docs/pages/getting-started.md +++ b/docs/pages/getting-started.md @@ -4,6 +4,8 @@ Windows it not natively supported, we suggest using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to develop with Dojo on Windows. ::: +:::Alternitively you can use our [WSL install](/getting-started/wsl) instructions + Let's get started building on **Dojo**! This guide will walk you through installing the Dojo toolchain and preparing your environment for development. Dojo is built around a set of development tools - [Katana](/toolchain/katana), [Torii](/toolchain/torii) and [Sozo](/toolchain/sozo). From 04d7eacf1b3294d8af48f5dfe0852d1ff2a6a5a2 Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Thu, 3 Oct 2024 18:45:12 -0500 Subject: [PATCH 3/9] Update getting-started.md Fixing Link error, as well as visual ::: --- docs/pages/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/getting-started.md b/docs/pages/getting-started.md index 83d24d66..c9b97535 100644 --- a/docs/pages/getting-started.md +++ b/docs/pages/getting-started.md @@ -4,7 +4,7 @@ Windows it not natively supported, we suggest using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to develop with Dojo on Windows. ::: -:::Alternitively you can use our [WSL install](/getting-started/wsl) instructions +:::Alternitively you can use our [WSL install](/getting-started/wsl.md) instructions::: Let's get started building on **Dojo**! This guide will walk you through installing the Dojo toolchain and preparing your environment for development. Dojo is built around a set of development tools - [Katana](/toolchain/katana), [Torii](/toolchain/torii) and [Sozo](/toolchain/sozo). From f86df5f65fc3a844a2baa582b9a847d69669047e Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Thu, 3 Oct 2024 18:56:42 -0500 Subject: [PATCH 4/9] Update getting-started.md --- docs/pages/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/getting-started.md b/docs/pages/getting-started.md index c9b97535..d2f5a1e3 100644 --- a/docs/pages/getting-started.md +++ b/docs/pages/getting-started.md @@ -4,7 +4,7 @@ Windows it not natively supported, we suggest using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to develop with Dojo on Windows. ::: -:::Alternitively you can use our [WSL install](/getting-started/wsl.md) instructions::: +:::Alternitively you can use our [WSL install](/getting-started-1/wsl) instructions::: Let's get started building on **Dojo**! This guide will walk you through installing the Dojo toolchain and preparing your environment for development. Dojo is built around a set of development tools - [Katana](/toolchain/katana), [Torii](/toolchain/torii) and [Sozo](/toolchain/sozo). From abc2c4a91abc411419e571f80c2930f014b39c3c Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Fri, 4 Oct 2024 00:05:17 +0000 Subject: [PATCH 5/9] GITBOOK-5: No subject --- readme.md => README.md | 10 +- SUMMARY.md | 129 ++++++++++++++++++ docs/README.md | 2 + docs/pages/README.md | 2 + docs/pages/client/README.md | 2 + docs/pages/client/sdk/README.md | 2 + docs/pages/client/sdk/js/README.md | 2 + docs/pages/client/sdk/unity/README.md | 2 + docs/pages/community/README.md | 2 + docs/pages/framework/README.md | 2 + docs/pages/framework/contracts/README.md | 2 + docs/pages/framework/migration/README.md | 2 + docs/pages/framework/models/README.md | 2 + docs/pages/framework/world/README.md | 2 + docs/pages/getting-started-1/README.md | 2 + docs/pages/getting-started.md | 12 +- docs/pages/misc/README.md | 2 + docs/pages/theory/README.md | 2 + docs/pages/toolchain/README.md | 2 + docs/pages/toolchain/katana/README.md | 2 + docs/pages/toolchain/katana/cli/README.md | 2 + docs/pages/toolchain/katana/cli/db/README.md | 2 + docs/pages/toolchain/katana/cli/db/stats.md | 5 +- docs/pages/toolchain/katana/cli/katana.md | 82 +++++------ docs/pages/toolchain/katana/genesis.md | 86 ++++++------ docs/pages/toolchain/katana/rpc/README.md | 2 + docs/pages/toolchain/origami/README.md | 2 + docs/pages/toolchain/slot/README.md | 2 + .../slot/deployment-commands/README.md | 2 + .../slot/deployment-commands/index.md | 30 ++-- docs/pages/toolchain/sozo/README.md | 2 + .../toolchain/sozo/common-options/README.md | 2 + .../pages/toolchain/sozo/deployment/README.md | 2 + .../toolchain/sozo/project-commands/README.md | 2 + docs/pages/toolchain/torii/README.md | 2 + docs/pages/toolchain/torii/reference.md | 48 ++++--- docs/pages/tutorial/README.md | 2 + .../tutorial/deploy-using-slot/README.md | 2 + .../tutorial/katana-starkli-scarb/README.md | 2 + 39 files changed, 313 insertions(+), 151 deletions(-) rename readme.md => README.md (92%) create mode 100644 SUMMARY.md create mode 100644 docs/README.md create mode 100644 docs/pages/README.md create mode 100644 docs/pages/client/README.md create mode 100644 docs/pages/client/sdk/README.md create mode 100644 docs/pages/client/sdk/js/README.md create mode 100644 docs/pages/client/sdk/unity/README.md create mode 100644 docs/pages/community/README.md create mode 100644 docs/pages/framework/README.md create mode 100644 docs/pages/framework/contracts/README.md create mode 100644 docs/pages/framework/migration/README.md create mode 100644 docs/pages/framework/models/README.md create mode 100644 docs/pages/framework/world/README.md create mode 100644 docs/pages/getting-started-1/README.md create mode 100644 docs/pages/misc/README.md create mode 100644 docs/pages/theory/README.md create mode 100644 docs/pages/toolchain/README.md create mode 100644 docs/pages/toolchain/katana/README.md create mode 100644 docs/pages/toolchain/katana/cli/README.md create mode 100644 docs/pages/toolchain/katana/cli/db/README.md create mode 100644 docs/pages/toolchain/katana/rpc/README.md create mode 100644 docs/pages/toolchain/origami/README.md create mode 100644 docs/pages/toolchain/slot/README.md create mode 100644 docs/pages/toolchain/slot/deployment-commands/README.md create mode 100644 docs/pages/toolchain/sozo/README.md create mode 100644 docs/pages/toolchain/sozo/common-options/README.md create mode 100644 docs/pages/toolchain/sozo/deployment/README.md create mode 100644 docs/pages/toolchain/sozo/project-commands/README.md create mode 100644 docs/pages/toolchain/torii/README.md create mode 100644 docs/pages/tutorial/README.md create mode 100644 docs/pages/tutorial/deploy-using-slot/README.md create mode 100644 docs/pages/tutorial/katana-starkli-scarb/README.md diff --git a/readme.md b/README.md similarity index 92% rename from readme.md rename to README.md index 3bfa6c36..d1d09dd5 100644 --- a/readme.md +++ b/README.md @@ -1,16 +1,20 @@ -## 📖 The Dojo Book +--- +icon: hand-wave +--- + +# The Dojo Book > Migration from rustbook to vocs in process. Make all edits and PRs into dojo-book. Explore the world of Autonomous Worlds with Dojo, your trusted toolchain. [Dive in now](https://book.dojoengine.org/). -### Contributing +## Contributing Embrace the open-source spirit of Dojo. As it's in its nascent phase, we welcome contributors with open arms. Peruse our [contributing guidelines](docs/pages/misc/contributors.md). From minor wording adjustments to extensive chapters, every contribution matters! -### Setup +## Setup 1. Install Vocs dependencies diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 00000000..a28870fe --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,129 @@ +# Table of contents + +* [The Dojo Book](README.md) +* [docs](docs/README.md) + * [pages](docs/pages/README.md) + * [FAQ](docs/pages/faq.md) + * [Getting Started](docs/pages/getting-started.md) + * [Welcome to the Dojo](docs/pages/index.md) + * [client](docs/pages/client/README.md) + * [Torii Client](docs/pages/client/torii.md) + * [sdk](docs/pages/client/sdk/README.md) + * [Dojo c](docs/pages/client/sdk/c.md) + * [js](docs/pages/client/sdk/js/README.md) + * [Common Problems](docs/pages/client/sdk/js/common-problems.md) + * [Concepts](docs/pages/client/sdk/js/concepts.md) + * [dojo.js](docs/pages/client/sdk/js/dojojs.md) + * [Dojo.js 101 example](docs/pages/client/sdk/js/example.md) + * [Examples](docs/pages/client/sdk/js/getting-started.md) + * [Dojo.js Packages](docs/pages/client/sdk/js/packages.md) + * [RECS](docs/pages/client/sdk/js/recs.md) + * [unity](docs/pages/client/sdk/unity/README.md) + * [Common problems and solutions](docs/pages/client/sdk/unity/common-problems.md) + * [Example with Dojo Starter and dojo.unity](docs/pages/client/sdk/unity/example.md) + * [Getting Started](docs/pages/client/sdk/unity/get-started.md) + * [Dojo Unity Concepts](docs/pages/client/sdk/unity/important-concepts.md) + * [Dojo.unity](docs/pages/client/sdk/unity/index.md) + * [dojo.unity](docs/pages/client/sdk/unity/unity.md) + * [community](docs/pages/community/README.md) + * [get-started](docs/pages/community/get-started.md) + * [framework](docs/pages/framework/README.md) + * [Config](docs/pages/framework/config.md) + * [Dojo Framework](docs/pages/framework/index.md) + * [Cairo Testing Cheat Codes: A Comprehensive Guide](docs/pages/framework/testing-cheat-codes.md) + * [Testing](docs/pages/framework/testing.md) + * [contracts](docs/pages/framework/contracts/README.md) + * [Events](docs/pages/framework/contracts/events.md) + * [Dojo Contract](docs/pages/framework/contracts/index.md) + * [Macros](docs/pages/framework/contracts/macros.md) + * [Metadata](docs/pages/framework/contracts/metadata.md) + * [Systems](docs/pages/framework/contracts/systems.md) + * [migration](docs/pages/framework/migration/README.md) + * [Migration Guide to 0.3.0](docs/pages/framework/migration/0.3.0.md) + * [Migration Guide to 0.4.0](docs/pages/framework/migration/0.4.0.md) + * [models](docs/pages/framework/models/README.md) + * [Entities](docs/pages/framework/models/entities.md) + * [enum](docs/pages/framework/models/enum.md) + * [index](docs/pages/framework/models/index.md) + * [Introspection](docs/pages/framework/models/introspect.md) + * [world](docs/pages/framework/world/README.md) + * [World's API](docs/pages/framework/world/api.md) + * [Authorization](docs/pages/framework/world/authorization.md) + * [Events emitted by the world](docs/pages/framework/world/events.md) + * [World Contract](docs/pages/framework/world/index.md) + * [Metadata](docs/pages/framework/world/metadata.md) + * [getting-started](docs/pages/getting-started-1/README.md) + * [Development Setup](docs/pages/getting-started/setup.md) + * [wsl](docs/pages/getting-started/wsl.md) + * [misc](docs/pages/misc/README.md) + * [Contributing to Dojo Book](docs/pages/misc/contributors.md) + * [theory](docs/pages/theory/README.md) + * [autonomous-worlds](docs/pages/theory/autonomous-worlds.md) + * [tutorial](docs/pages/tutorial/README.md) + * [Dojo starter guide](docs/pages/tutorial/dojo-starter.md) + * [deploy-using-slot](docs/pages/tutorial/deploy-using-slot/README.md) + * [Deploy your game using Slot](docs/pages/tutorial/deploy-using-slot/main.md) + * [katana-starkli-scarb](docs/pages/tutorial/katana-starkli-scarb/README.md) + * [Deploy your Cairo smart contract using Katana. Advanced Tutorial](docs/pages/tutorial/katana-starkli-scarb/main.md) + * [Building a Chess Game](docs/pages/tutorial/onchain-chess/README.md) + * [0. Setup](docs/pages/tutorial/onchain-chess/0-setup.md) + * [1. Actions](docs/pages/tutorial/onchain-chess/1-action.md) + * [2 Move function](docs/pages/tutorial/onchain-chess/2-move.md) + * [3 Test Contract](docs/pages/tutorial/onchain-chess/3-test.md) + * [toolchain](docs/pages/toolchain/README.md) + * [katana](docs/pages/toolchain/katana/README.md) + * [Execution Engines](docs/pages/toolchain/katana/execution.md) + * [Forking](docs/pages/toolchain/katana/forking.md) + * [Genesis Configuration](docs/pages/toolchain/katana/genesis.md) + * [index](docs/pages/toolchain/katana/index.md) + * [Interact with Katana on Starknet. Deploy a Cairo smart contract using Katana](docs/pages/toolchain/katana/interact.md) + * [Messaging](docs/pages/toolchain/katana/messaging.md) + * [Mining Modes](docs/pages/toolchain/katana/mining.md) + * [Settlement](docs/pages/toolchain/katana/settlement.md) + * [Storage Modes](docs/pages/toolchain/katana/storage.md) + * [Supported Transaction Types](docs/pages/toolchain/katana/transactions.md) + * [cli](docs/pages/toolchain/katana/cli/README.md) + * [katana completions](docs/pages/toolchain/katana/cli/completions.md) + * [index](docs/pages/toolchain/katana/cli/index.md) + * [katana](docs/pages/toolchain/katana/cli/katana.md) + * [db](docs/pages/toolchain/katana/cli/db/README.md) + * [index](docs/pages/toolchain/katana/cli/db/index.md) + * [katana db stats](docs/pages/toolchain/katana/cli/db/stats.md) + * [rpc](docs/pages/toolchain/katana/rpc/README.md) + * [dev Namespace](docs/pages/toolchain/katana/rpc/dev.md) + * [JSON-RPC](docs/pages/toolchain/katana/rpc/index.md) + * [katana Namespace](docs/pages/toolchain/katana/rpc/katana.md) + * [starknet Namespace](docs/pages/toolchain/katana/rpc/starknet.md) + * [torii Namespace](docs/pages/toolchain/katana/rpc/torii.md) + * [origami](docs/pages/toolchain/origami/README.md) + * [index](docs/pages/toolchain/origami/index.md) + * [slot](docs/pages/toolchain/slot/README.md) + * [index](docs/pages/toolchain/slot/index.md) + * [slot reference](docs/pages/toolchain/slot/reference.md) + * [deployment-commands](docs/pages/toolchain/slot/deployment-commands/README.md) + * [create](docs/pages/toolchain/slot/deployment-commands/create.md) + * [delete](docs/pages/toolchain/slot/deployment-commands/delete.md) + * [describe](docs/pages/toolchain/slot/deployment-commands/describe.md) + * [index](docs/pages/toolchain/slot/deployment-commands/index.md) + * [list](docs/pages/toolchain/slot/deployment-commands/list.md) + * [logs](docs/pages/toolchain/slot/deployment-commands/logs.md) + * [update](docs/pages/toolchain/slot/deployment-commands/update.md) + * [sozo](docs/pages/toolchain/sozo/README.md) + * [index](docs/pages/toolchain/sozo/index.md) + * [common-options](docs/pages/toolchain/sozo/common-options/README.md) + * [Configuration Priorities](docs/pages/toolchain/sozo/common-options/configurations.md) + * [Sozo --offline option](docs/pages/toolchain/sozo/common-options/offline.md) + * [Sozo --profile option](docs/pages/toolchain/sozo/common-options/profile.md) + * [deployment](docs/pages/toolchain/sozo/deployment/README.md) + * [Local Deployment with Katana](docs/pages/toolchain/sozo/deployment/locally.md) + * [Deployment to Remote Network](docs/pages/toolchain/sozo/deployment/remote.md) + * [project-commands](docs/pages/toolchain/sozo/project-commands/README.md) + * [sozo build](docs/pages/toolchain/sozo/project-commands/build.md) + * [sozo clean](docs/pages/toolchain/sozo/project-commands/clean.md) + * [sozo init](docs/pages/toolchain/sozo/project-commands/init.md) + * [sozo test](docs/pages/toolchain/sozo/project-commands/test.md) + * [torii](docs/pages/toolchain/torii/README.md) + * [Torii - GraphQL](docs/pages/toolchain/torii/graphql.md) + * [gRPC](docs/pages/toolchain/torii/grpc.md) + * [index](docs/pages/toolchain/torii/index.md) + * [torii reference](docs/pages/toolchain/torii/reference.md) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..7dd802a4 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,2 @@ +# docs + diff --git a/docs/pages/README.md b/docs/pages/README.md new file mode 100644 index 00000000..1dda9bba --- /dev/null +++ b/docs/pages/README.md @@ -0,0 +1,2 @@ +# pages + diff --git a/docs/pages/client/README.md b/docs/pages/client/README.md new file mode 100644 index 00000000..164a39d1 --- /dev/null +++ b/docs/pages/client/README.md @@ -0,0 +1,2 @@ +# client + diff --git a/docs/pages/client/sdk/README.md b/docs/pages/client/sdk/README.md new file mode 100644 index 00000000..1bcfa0dc --- /dev/null +++ b/docs/pages/client/sdk/README.md @@ -0,0 +1,2 @@ +# sdk + diff --git a/docs/pages/client/sdk/js/README.md b/docs/pages/client/sdk/js/README.md new file mode 100644 index 00000000..818a55d3 --- /dev/null +++ b/docs/pages/client/sdk/js/README.md @@ -0,0 +1,2 @@ +# js + diff --git a/docs/pages/client/sdk/unity/README.md b/docs/pages/client/sdk/unity/README.md new file mode 100644 index 00000000..42cf87c4 --- /dev/null +++ b/docs/pages/client/sdk/unity/README.md @@ -0,0 +1,2 @@ +# unity + diff --git a/docs/pages/community/README.md b/docs/pages/community/README.md new file mode 100644 index 00000000..ec9e76b0 --- /dev/null +++ b/docs/pages/community/README.md @@ -0,0 +1,2 @@ +# community + diff --git a/docs/pages/framework/README.md b/docs/pages/framework/README.md new file mode 100644 index 00000000..1f121d77 --- /dev/null +++ b/docs/pages/framework/README.md @@ -0,0 +1,2 @@ +# framework + diff --git a/docs/pages/framework/contracts/README.md b/docs/pages/framework/contracts/README.md new file mode 100644 index 00000000..6ecd92ce --- /dev/null +++ b/docs/pages/framework/contracts/README.md @@ -0,0 +1,2 @@ +# contracts + diff --git a/docs/pages/framework/migration/README.md b/docs/pages/framework/migration/README.md new file mode 100644 index 00000000..4df9307a --- /dev/null +++ b/docs/pages/framework/migration/README.md @@ -0,0 +1,2 @@ +# migration + diff --git a/docs/pages/framework/models/README.md b/docs/pages/framework/models/README.md new file mode 100644 index 00000000..5a90d920 --- /dev/null +++ b/docs/pages/framework/models/README.md @@ -0,0 +1,2 @@ +# models + diff --git a/docs/pages/framework/world/README.md b/docs/pages/framework/world/README.md new file mode 100644 index 00000000..c4219f7e --- /dev/null +++ b/docs/pages/framework/world/README.md @@ -0,0 +1,2 @@ +# world + diff --git a/docs/pages/getting-started-1/README.md b/docs/pages/getting-started-1/README.md new file mode 100644 index 00000000..c375f560 --- /dev/null +++ b/docs/pages/getting-started-1/README.md @@ -0,0 +1,2 @@ +# getting-started + diff --git a/docs/pages/getting-started.md b/docs/pages/getting-started.md index d2f5a1e3..c0a2c14b 100644 --- a/docs/pages/getting-started.md +++ b/docs/pages/getting-started.md @@ -1,14 +1,10 @@ # Getting Started -:::note -Windows it not natively supported, we suggest using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to develop with Dojo on Windows. -::: +:::note Windows it not natively supported, we suggest using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to develop with Dojo on Windows. ::: -:::Alternitively you can use our [WSL install](/getting-started-1/wsl) instructions::: +:::Alternitively you can use our [WSL install](getting-started/wsl.md) instructions::: -Let's get started building on **Dojo**! This guide will walk you through installing the Dojo toolchain and preparing your environment for development. Dojo is built around a set of development tools - [Katana](/toolchain/katana), [Torii](/toolchain/torii) and [Sozo](/toolchain/sozo). - - +Let's get started building on **Dojo**! This guide will walk you through installing the Dojo toolchain and preparing your environment for development. Dojo is built around a set of development tools - [Katana](../../toolchain/katana/), [Torii](../../toolchain/torii/) and [Sozo](../../toolchain/sozo/). ## Prerequisites @@ -82,4 +78,4 @@ asdf local dojo 0.7.0 # Set locally in your project directory :::: -Once you're up and running, check out the [Dojo Starter guide](/tutorial/dojo-starter)! +Once you're up and running, check out the [Dojo Starter guide](../../tutorial/dojo-starter/)! diff --git a/docs/pages/misc/README.md b/docs/pages/misc/README.md new file mode 100644 index 00000000..62c361e3 --- /dev/null +++ b/docs/pages/misc/README.md @@ -0,0 +1,2 @@ +# misc + diff --git a/docs/pages/theory/README.md b/docs/pages/theory/README.md new file mode 100644 index 00000000..44f7e06d --- /dev/null +++ b/docs/pages/theory/README.md @@ -0,0 +1,2 @@ +# theory + diff --git a/docs/pages/toolchain/README.md b/docs/pages/toolchain/README.md new file mode 100644 index 00000000..dff3a844 --- /dev/null +++ b/docs/pages/toolchain/README.md @@ -0,0 +1,2 @@ +# toolchain + diff --git a/docs/pages/toolchain/katana/README.md b/docs/pages/toolchain/katana/README.md new file mode 100644 index 00000000..efa320d0 --- /dev/null +++ b/docs/pages/toolchain/katana/README.md @@ -0,0 +1,2 @@ +# katana + diff --git a/docs/pages/toolchain/katana/cli/README.md b/docs/pages/toolchain/katana/cli/README.md new file mode 100644 index 00000000..6dd5d3e0 --- /dev/null +++ b/docs/pages/toolchain/katana/cli/README.md @@ -0,0 +1,2 @@ +# cli + diff --git a/docs/pages/toolchain/katana/cli/db/README.md b/docs/pages/toolchain/katana/cli/db/README.md new file mode 100644 index 00000000..a9c44339 --- /dev/null +++ b/docs/pages/toolchain/katana/cli/db/README.md @@ -0,0 +1,2 @@ +# db + diff --git a/docs/pages/toolchain/katana/cli/db/stats.md b/docs/pages/toolchain/katana/cli/db/stats.md index e03286a0..770f0763 100644 --- a/docs/pages/toolchain/katana/cli/db/stats.md +++ b/docs/pages/toolchain/katana/cli/db/stats.md @@ -1,4 +1,4 @@ -# `katana db stats` +# katana db stats Dispays database tables information. @@ -10,5 +10,4 @@ katana db stats [OPTIONS] ## Options -`-p, --path ` -    Path to the database directory [default: ~/.katana/db] +`-p, --path ` Path to the database directory \[default: \~/.katana/db] diff --git a/docs/pages/toolchain/katana/cli/katana.md b/docs/pages/toolchain/katana/cli/katana.md index 1d2b9d85..b7fb2485 100644 --- a/docs/pages/toolchain/katana/cli/katana.md +++ b/docs/pages/toolchain/katana/cli/katana.md @@ -1,85 +1,65 @@ -## NAME +# katana + +### NAME `katana` - Create a local Starknet sequencer for deploying and developing Starknet smart contracts. -## USAGE +### USAGE ```sh katana [OPTIONS] [COMMAND] ``` -## OPTIONS +### OPTIONS -### General Options +#### General Options -`--silent` -     Don't print anything on startup. +`--silent` Don't print anything on startup. -`--no-mining` -     Disable auto and interval mining, and mine on demand instead. +`--no-mining` Disable auto and interval mining, and mine on demand instead. -`-b, --block-time ` -     Block time in milliseconds for interval mining. +`-b, --block-time ` Block time in milliseconds for interval mining. -`--db-dir ` -     Directory path of the database to initialize from. The path must either be an empty directory or a directory which already contains a previously initialized Katana database. +`--db-dir ` Directory path of the database to initialize from. The path must either be an empty directory or a directory which already contains a previously initialized Katana database. -`--json-log` -     Output logs in JSON format. +`--json-log` Output logs in JSON format. -`--rpc-url ` -     The Starknet RPC provider to fork the network from. +`--rpc-url ` The Starknet RPC provider to fork the network from. -`--fork-block-number ` -     Fork the network at a specific block. +`--fork-block-number ` Fork the network at a specific block. -`--messaging ` -     Configure the messaging service to allow Katana to listen/send messages on a settlement chain that can be either Ethereum or another Starknet sequencer (experimental). +`--messaging ` Configure the messaging service to allow Katana to listen/send messages on a settlement chain that can be either Ethereum or another Starknet sequencer (experimental). -`-h, --help` -     Print help (see a summary with '-h'). +`-h, --help` Print help (see a summary with '-h'). -`-V, --version` -     Print version information. +`-V, --version` Print version information. -### Server Options +#### Server Options -`-p, --port ` -     Port number to listen on. [default: 5050] +`-p, --port ` Port number to listen on. \[default: 5050] -`--host ` -     The IP address the server will listen on. +`--host ` The IP address the server will listen on. -`--max-connections ` -     Maximum number of concurrent connections allowed. [default: 100] +`--max-connections ` Maximum number of concurrent connections allowed. \[default: 100] -### Starknet Options +#### Starknet Options -`--seed ` -     Specify the seed for randomness of accounts to be predeployed. +`--seed ` Specify the seed for randomness of accounts to be predeployed. -`--accounts ` -     Number of pre-funded accounts to generate. [default: 10] +`--accounts ` Number of pre-funded accounts to generate. \[default: 10] -`--disable-fee` -     Disable charging fee for transactions. +`--disable-fee` Disable charging fee for transactions. -`--disable-validate` -     Disable validation when executing transactions. Allowing transaction to be executed even with invalid signature. +`--disable-validate` Disable validation when executing transactions. Allowing transaction to be executed even with invalid signature. -#### Environment Options +**Environment Options** -`--chain-id ` -     The chain ID. [default: KATANA] +`--chain-id ` The chain ID. \[default: KATANA] -`--gas-price ` -     The gas price. +`--gas-price ` The gas price. -`--validate-max-steps ` -     The maximum number of steps available for the account validation logic. +`--validate-max-steps ` The maximum number of steps available for the account validation logic. -`--invoke-max-steps ` -     The maximum number of steps available for the account execution logic. +`--invoke-max-steps ` The maximum number of steps available for the account execution logic. -`--genesis ` -     The genesis configuration file. +`--genesis ` The genesis configuration file. diff --git a/docs/pages/toolchain/katana/genesis.md b/docs/pages/toolchain/katana/genesis.md index 6c94f3c8..5c568a05 100644 --- a/docs/pages/toolchain/katana/genesis.md +++ b/docs/pages/toolchain/katana/genesis.md @@ -13,79 +13,79 @@ The genesis configuration provides a convenient way to customize the chain's sta The genesis config file is a JSON file that contains the following fields: -- `number` +* `number`\ _The block number of the genesis block._ -- `parentHash` +* `parentHash`\ _The parent hash of the genesis block._ -- `timestamp` +* `timestamp`\ _The timestamp of the genesis block._ -- `stateRoot` +* `stateRoot`\ _The state root of the genesis block._ -- `sequencerAddress` +* `sequencerAddress`\ _The sequencer address._ -- `gasPrices` _The gas prices for the L1 tokens at the genesis block._ - - `ETH` +* `gasPrices` _The gas prices for the L1 tokens at the genesis block._ + * `ETH`\ _The price of ETH in wei._ - - `STRK` + * `STRK`\ _The price of STRK in fri._ -- `feeToken` _The network fee token configuration. (optional)_ - - `name` +* `feeToken` _The network fee token configuration. (optional)_ + * `name`\ _The name of the fee token._ - - `symbol` + * `symbol`\ _The symbol of the fee token._ - - `decimals` + * `decimals`\ _The number of decimal places for the fee token._ - - `address` (optional) + * `address` (optional)\ _The fee token contract address._ - - `class` (optional) + * `class` (optional)\ _The class of the fee token. It is has a value of either a `classHash` or a `name`._ - - `classHash` (option) - _The hash of the fee token class hash (`0x` prefixed hex value)._ - - `name` (option) - _The name of the fee token class defined in `classes`._ - - `storage` (optional) + * `classHash` (option)\ + _The hash of the fee token class hash (`0x` prefixed hex value)._ + * `name` (option)\ + _The name of the fee token class defined in `classes`._ + * `storage` (optional)\ _Key-value pairs for the fee token's storage._ -- `universalDeployer` _The universal deployer configuration. (optional)_ - - `address` (optional) +* `universalDeployer` _The universal deployer configuration. (optional)_ + * `address` (optional)\ _The universal deployer contract address._ - - `storage` (optional) + * `storage` (optional)\ _Key-value pairs for the universal deployer's storage._ -- `accounts` _The genesis allocations._ - - \_The address of the account contract.* - - `publicKey` +* `accounts` _The genesis allocations._ + * \ \_The address of the account contract._ + * `publicKey`\ _The public key associated with the account._ - - `privateKey` (optional) + * `privateKey` (optional)\ _The private key associated with publicKey._ - - `balance` (optional) + * `balance` (optional)\ _The initial balance of the account._ - - `nonce` (optional) + * `nonce` (optional)\ _The nonce of the account._ - - `class` (optional) + * `class` (optional)\ _The class to be used for the account contract. It is has a value of either a `classHash` or a `name`._ - - `classHash` (option) + * `classHash` (option)\ _The hash of the contract class (`0x` prefixed hex value)._ - - `name` (option) + * `name` (option)\ _The name of contract class defined in `classes`._ - - `storage` (optional) + * `storage` (optional)\ _Key-value pairs for the account's storage._ -- `contracts` _Genesis contract deployments._ - - \_The address of the contract.* - - `class` +* `contracts` _Genesis contract deployments._ + * \ \_The address of the contract._ + * `class`\ _The class of the contract. It is has a value of either a `classHash` or a `name`._ - - `classHash` (option) + * `classHash` (option)\ _The hash of the contract class (`0x` prefixed hex value)._ - - `name` (option) + * `name` (option)\ _The name of the contract class defined in `classes`._ - - `balance` (optional) + * `balance` (optional)\ _The balance allocated to the contract._ - - `storage` (optional) + * `storage` (optional)\ _Key-value pairs for the contract's storage._ -- `classes` _Classes to declare at genesis._ - - `class` +* `classes` _Classes to declare at genesis._ + * `class`\ _The path to the class artifact file relative to the genesis config file, or the full class artifact object._ - - `classHash` (optional) + * `classHash` (optional)\ _The hash of the class. To override the actual class hash that will be computed from the class definition itself._ - - `name` (optional) + * `name` (optional)\ _The name of the class to be used as a reference for the class hash._ ### Example diff --git a/docs/pages/toolchain/katana/rpc/README.md b/docs/pages/toolchain/katana/rpc/README.md new file mode 100644 index 00000000..9a41f6f3 --- /dev/null +++ b/docs/pages/toolchain/katana/rpc/README.md @@ -0,0 +1,2 @@ +# rpc + diff --git a/docs/pages/toolchain/origami/README.md b/docs/pages/toolchain/origami/README.md new file mode 100644 index 00000000..ce3190a6 --- /dev/null +++ b/docs/pages/toolchain/origami/README.md @@ -0,0 +1,2 @@ +# origami + diff --git a/docs/pages/toolchain/slot/README.md b/docs/pages/toolchain/slot/README.md new file mode 100644 index 00000000..fadae51b --- /dev/null +++ b/docs/pages/toolchain/slot/README.md @@ -0,0 +1,2 @@ +# slot + diff --git a/docs/pages/toolchain/slot/deployment-commands/README.md b/docs/pages/toolchain/slot/deployment-commands/README.md new file mode 100644 index 00000000..70b3e21c --- /dev/null +++ b/docs/pages/toolchain/slot/deployment-commands/README.md @@ -0,0 +1,2 @@ +# deployment-commands + diff --git a/docs/pages/toolchain/slot/deployment-commands/index.md b/docs/pages/toolchain/slot/deployment-commands/index.md index 7ca6d5e0..ef8344c9 100644 --- a/docs/pages/toolchain/slot/deployment-commands/index.md +++ b/docs/pages/toolchain/slot/deployment-commands/index.md @@ -1,29 +1,23 @@ -## slot deployments +# index + +### slot deployments It allows you the manage your slot deployments. -## Commands +### Commands -`create` -    Create a new deployment. +`create` Create a new deployment. -`delete` -    Delete a deployment. +`delete` Delete a deployment. -`update` -    Update a deployment. +`update` Update a deployment. -`fork` -    Fork a deployment. +`fork` Fork a deployment. -`describe` -    Describe a deployment's configuration. +`describe` Describe a deployment's configuration. -`list` -    List all deployments. +`list` List all deployments. -`logs` -    Fetch logs for a deployment. +`logs` Fetch logs for a deployment. -`help` -    Print this message or the help of the given subcommand(s) +`help` Print this message or the help of the given subcommand(s) diff --git a/docs/pages/toolchain/sozo/README.md b/docs/pages/toolchain/sozo/README.md new file mode 100644 index 00000000..d04c7cc0 --- /dev/null +++ b/docs/pages/toolchain/sozo/README.md @@ -0,0 +1,2 @@ +# sozo + diff --git a/docs/pages/toolchain/sozo/common-options/README.md b/docs/pages/toolchain/sozo/common-options/README.md new file mode 100644 index 00000000..c5c564d7 --- /dev/null +++ b/docs/pages/toolchain/sozo/common-options/README.md @@ -0,0 +1,2 @@ +# common-options + diff --git a/docs/pages/toolchain/sozo/deployment/README.md b/docs/pages/toolchain/sozo/deployment/README.md new file mode 100644 index 00000000..cf9cf8a3 --- /dev/null +++ b/docs/pages/toolchain/sozo/deployment/README.md @@ -0,0 +1,2 @@ +# deployment + diff --git a/docs/pages/toolchain/sozo/project-commands/README.md b/docs/pages/toolchain/sozo/project-commands/README.md new file mode 100644 index 00000000..e998b688 --- /dev/null +++ b/docs/pages/toolchain/sozo/project-commands/README.md @@ -0,0 +1,2 @@ +# project-commands + diff --git a/docs/pages/toolchain/torii/README.md b/docs/pages/toolchain/torii/README.md new file mode 100644 index 00000000..b9cbbe26 --- /dev/null +++ b/docs/pages/toolchain/torii/README.md @@ -0,0 +1,2 @@ +# torii + diff --git a/docs/pages/toolchain/torii/reference.md b/docs/pages/toolchain/torii/reference.md index 2ec50f41..579ac4f8 100644 --- a/docs/pages/toolchain/torii/reference.md +++ b/docs/pages/toolchain/torii/reference.md @@ -1,27 +1,27 @@ -## torii reference +# torii reference -### Name +## Name torii - An automatic indexer and networking layer for a world contract. -### USAGE +## USAGE ```sh torii [OPTIONS] ``` -### DESCRIPTION +## DESCRIPTION `torii` starts the indexer and exposes GraphQL/gRPC API endpoints. The indexer queries the specified Starknet RPC endpoint for transaction blocks and listens for transactions related to the world contract. These transactions can include component/system registrations, entity state updates, system calls, and events. The parsed data is then stored in a local SQLite database. The GraphQL and gRPC API endpoints run in tandem with the indexer, providing custom queries specific to the world contract for client applications. -#### Database URL +### Database URL `torii` uses a sqlite database to store indexed data. The database can be stored either in-memory or persistently on the filesystem. -- The in-memory database is ephemeral and only lasts as long as the indexer is running. This is a fast and simple option to start the indexer for development/testing. -- Persistent storage should be used in production. It relies on the local filesystem for storage. +* The in-memory database is ephemeral and only lasts as long as the indexer is running. This is a fast and simple option to start the indexer for development/testing. +* Persistent storage should be used in production. It relies on the local filesystem for storage. Note: If using in-memory db, the memory will be garbage collected after a period of inactivity, causing queries to result in errors. Workaround is to use a persistent database. @@ -30,30 +30,28 @@ Note: If using in-memory db, the memory will be garbage collected after a period torii --database indexer.db ``` -### OPTIONS +## OPTIONS -#### General Options +### General Options -`-w, --world` -     Address of the world contract to index +`-w, --world`\ +Address of the world contract to index -`--rpc` -     Starknet RPC endpoint to use [default: http//localhost:5050] +`--rpc`\ +Starknet RPC endpoint to use \[default: http//localhost:5050] -`-d, --database ` -     Database filepath (ex: indexer.db) [default: :memory:] +`-d, --database `\ +Database filepath (ex: indexer.db) \[default: :memory:] -`-s, --start-block ` -     Specify a block to start indexing from, ignored if stored head exists [default: 0] +`-s, --start-block `\ +Specify a block to start indexing from, ignored if stored head exists \[default: 0] -`--allowed-origins ` -     Specify allowed origins for api endpoints (comma-separated list of allowed origins, or "\*" for all) [default: *] +`--allowed-origins `\ +Specify allowed origins for api endpoints (comma-separated list of allowed origins, or "\*" for all) \[default: \*] -`--external-url ` -     The external url of the server, used for configuring the GraphQL Playground in a hosted environment +`--external-url `\ +The external url of the server, used for configuring the GraphQL Playground in a hosted environment -`-h, --help` -     Print help +`-h, --help` Print help -`-V, --version` -     Print version +`-V, --version` Print version diff --git a/docs/pages/tutorial/README.md b/docs/pages/tutorial/README.md new file mode 100644 index 00000000..60d2caae --- /dev/null +++ b/docs/pages/tutorial/README.md @@ -0,0 +1,2 @@ +# tutorial + diff --git a/docs/pages/tutorial/deploy-using-slot/README.md b/docs/pages/tutorial/deploy-using-slot/README.md new file mode 100644 index 00000000..f0ed52e6 --- /dev/null +++ b/docs/pages/tutorial/deploy-using-slot/README.md @@ -0,0 +1,2 @@ +# deploy-using-slot + diff --git a/docs/pages/tutorial/katana-starkli-scarb/README.md b/docs/pages/tutorial/katana-starkli-scarb/README.md new file mode 100644 index 00000000..cc05456e --- /dev/null +++ b/docs/pages/tutorial/katana-starkli-scarb/README.md @@ -0,0 +1,2 @@ +# katana-starkli-scarb + From fa7ad4ff4fddd07936c54cf5803ff38a02c2b8cd Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Thu, 3 Oct 2024 19:07:57 -0500 Subject: [PATCH 6/9] Update getting-started.md Specifying wsl + unity --- docs/pages/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/getting-started.md b/docs/pages/getting-started.md index c0a2c14b..04e45b2d 100644 --- a/docs/pages/getting-started.md +++ b/docs/pages/getting-started.md @@ -2,7 +2,7 @@ :::note Windows it not natively supported, we suggest using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to develop with Dojo on Windows. ::: -:::Alternitively you can use our [WSL install](getting-started/wsl.md) instructions::: +:::Alternitively you can use our [WSL + Unity install](getting-started/wsl.md) instructions::: Let's get started building on **Dojo**! This guide will walk you through installing the Dojo toolchain and preparing your environment for development. Dojo is built around a set of development tools - [Katana](../../toolchain/katana/), [Torii](../../toolchain/torii/) and [Sozo](../../toolchain/sozo/). From a1b676c1c7f461feea5bb3dcf1aec34673ba3f9d Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Fri, 4 Oct 2024 00:11:50 +0000 Subject: [PATCH 7/9] GITBOOK-6: No subject From 3dc1eb378b4ee3761ecb7cd0c6b0808d2ff81b9d Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Fri, 4 Oct 2024 00:17:40 +0000 Subject: [PATCH 8/9] GITBOOK-7: No subject From 8fb258a49ac988280255b31c4d14388a27e1e726 Mon Sep 17 00:00:00 2001 From: Terrence Andrews Date: Fri, 4 Oct 2024 00:19:24 +0000 Subject: [PATCH 9/9] GITBOOK-8: Terrence's Oct 3 changes