-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9164ba8
Showing
21 changed files
with
1,887 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to release (e.g., v1.0.0)' | ||
required: true | ||
type: string | ||
dojo_version: | ||
description: 'Dojo version to use' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOJO_VERSION: ${{ inputs.dojo_version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup and test with specified Dojo version | ||
- run: curl -L https://install.dojoengine.org | bash | ||
- run: /home/runner/.config/.dojo/bin/dojoup -v ${{ env.DOJO_VERSION }} | ||
- run: | | ||
/home/runner/.config/.dojo/bin/sozo build | ||
/home/runner/.config/.dojo/bin/sozo test | ||
# Create tag and release | ||
- name: Create Tag | ||
run: | | ||
git tag ${{ inputs.version }} | ||
git push origin ${{ inputs.version }} | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ inputs.version }} | ||
name: Release ${{ inputs.version }} | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
|
||
jobs: | ||
sozo-test: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOJO_VERSION: v1.0.0-rc.0 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: curl -L https://install.dojoengine.org | bash | ||
- run: /home/runner/.config/.dojo/bin/dojoup -v ${{ env.DOJO_VERSION }} | ||
- run: | | ||
/home/runner/.config/.dojo/bin/sozo build | ||
/home/runner/.config/.dojo/bin/sozo test | ||
if [[ `git status --porcelain` ]]; then | ||
echo The git repo is dirty | ||
echo "Make sure to run \"sozo build\" after changing Scarb.toml" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"cairo1.enableLanguageServer": true, | ||
"cairo1.enableScarb": true, | ||
"cairo1.languageServerPath": "${userHome}/.dojo/bin/dojo-language-server" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Dojo | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
![Dojo Starter](./assets/cover.png) | ||
|
||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset=".github/mark-dark.svg"> | ||
<img alt="Dojo logo" align="right" width="120" src=".github/mark-light.svg"> | ||
</picture> | ||
|
||
<a href="https://twitter.com/dojostarknet"> | ||
<img src="https://img.shields.io/twitter/follow/dojostarknet?style=social"/> | ||
</a> | ||
<a href="https://github.com/dojoengine/dojo"> | ||
<img src="https://img.shields.io/github/stars/dojoengine/dojo?style=social"/> | ||
</a> | ||
|
||
[![discord](https://img.shields.io/badge/join-dojo-green?logo=discord&logoColor=white)](https://discord.gg/PwDa2mKhR4) | ||
[![Telegram Chat][tg-badge]][tg-url] | ||
|
||
[tg-badge]: https://img.shields.io/endpoint?color=neon&logo=telegram&label=chat&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fdojoengine | ||
[tg-url]: https://t.me/dojoengine | ||
|
||
# Dojo Starter: Official Guide | ||
|
||
A quickstart guide to help you build and deploy your first Dojo provable game. | ||
|
||
Read the full tutorial [here](https://dojoengine.org/tutorial/dojo-starter). | ||
|
||
## Running Locally | ||
|
||
#### Terminal one (Make sure this is running) | ||
|
||
```bash | ||
# Run Katana | ||
katana --disable-fee --allowed-origins "*" | ||
``` | ||
|
||
#### Terminal two | ||
|
||
```bash | ||
# Build the example | ||
sozo build | ||
|
||
# Migrate the example | ||
sozo migrate | ||
|
||
# Start Torii | ||
# Replace <WORLD_ADDRESS> with the address of the deployed world from the previous step | ||
torii --world <WORLD_ADDRESS> --allowed-origins "*" | ||
``` | ||
|
||
--- | ||
|
||
## Contribution | ||
|
||
1. **Report a Bug** | ||
|
||
- If you think you have encountered a bug, and we should know about it, feel free to report it [here](https://github.com/dojoengine/dojo-starter/issues) and we will take care of it. | ||
|
||
2. **Request a Feature** | ||
|
||
- You can also request for a feature [here](https://github.com/dojoengine/dojo-starter/issues), and if it's viable, it will be picked for development. | ||
|
||
3. **Create a Pull Request** | ||
- It can't get better then this, your pull request will be appreciated by the community. | ||
|
||
Happy coding! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Code generated by scarb DO NOT EDIT. | ||
version = 1 | ||
|
||
[[package]] | ||
name = "dojo" | ||
version = "1.0.0-rc.0" | ||
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.0#f4199aec570a395278b8c8748bc46e2f6be3d0c7" | ||
dependencies = [ | ||
"dojo_plugin", | ||
] | ||
|
||
[[package]] | ||
name = "dojo_cairo_test" | ||
version = "1.0.0-rc.0" | ||
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.0#f4199aec570a395278b8c8748bc46e2f6be3d0c7" | ||
dependencies = [ | ||
"dojo", | ||
] | ||
|
||
[[package]] | ||
name = "dojo_plugin" | ||
version = "2.8.4" | ||
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.0#f4199aec570a395278b8c8748bc46e2f6be3d0c7" | ||
|
||
[[package]] | ||
name = "dojo_starter" | ||
version = "1.0.0-rc.0" | ||
dependencies = [ | ||
"dojo", | ||
"dojo_cairo_test", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
cairo-version = "=2.8.4" | ||
name = "dojo_starter" | ||
version = "1.0.0-rc.0" | ||
|
||
[cairo] | ||
sierra-replace-ids = true | ||
|
||
[scripts] | ||
migrate = "sozo build && sozo migrate apply" | ||
spawn = "./scripts/spawn.sh" | ||
move = "./scripts/move.sh" | ||
|
||
[dependencies] | ||
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-rc.0" } | ||
|
||
[[target.starknet-contract]] | ||
build-external-contracts = ["dojo::world::world_contract::world"] | ||
|
||
|
||
[dev-dependencies] | ||
dojo_cairo_test = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-rc.0" } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[world] | ||
name = "Dojo starter" | ||
description = "The official Dojo Starter guide, the quickest and most streamlined way to get your Dojo Autonomous World up and running. This guide will assist you with the initial setup, from cloning the repository to deploying your world." | ||
cover_uri = "file://assets/cover.png" | ||
icon_uri = "file://assets/icon.png" | ||
website = "https://github.com/dojoengine/dojo-starter" | ||
seed = "dojo_starter" | ||
|
||
[world.socials] | ||
x = "https://x.com/ohayo_dojo" | ||
discord = "https://discord.gg/FB2wR6uF" | ||
github = "https://github.com/dojoengine/dojo-starter" | ||
telegram = "https://t.me/dojoengine" | ||
|
||
[namespace] | ||
default = "dojo_starter" | ||
|
||
[env] | ||
rpc_url = "http://localhost:5050/" | ||
# Default account for katana with seed = 0 | ||
account_address = "0x127fd5f1fe78a71f8bcd1fec63e3fe2f0486b6ecd5c86a0466c3a21fa5cfcec" | ||
private_key = "0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912" | ||
# world_address = "0x3b34889efbdf01f707d5d7421f112e8fb85a42fb6f2e5422c75ce3253148b0e" | ||
|
||
[writers] | ||
"dojo_starter" = ["dojo_starter-actions"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[world] | ||
name = "Dojo starter" | ||
description = "The official Dojo Starter guide, the quickest and most streamlined way to get your Dojo Autonomous World up and running. This guide will assist you with the initial setup, from cloning the repository to deploying your world." | ||
cover_uri = "file://assets/cover.png" | ||
icon_uri = "file://assets/icon.png" | ||
website = "https://github.com/dojoengine/dojo-starter" | ||
seed = "dojo_starter" | ||
|
||
[world.socials] | ||
x = "https://x.com/ohayo_dojo" | ||
discord = "https://discord.gg/FB2wR6uF" | ||
github = "https://github.com/dojoengine/dojo-starter" | ||
telegram = "https://t.me/dojoengine" | ||
|
||
[namespace] | ||
default = "dojo_starter" | ||
|
||
[env] | ||
rpc_url = "http://localhost:5050/" | ||
# Default account for katana with seed = 0 | ||
account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca" | ||
private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a" | ||
# world_address = "0x3fc79ccfd72c1450d2ccb73c5c521a7ec68b6c6af0caf96a0f1c39ce58876c8" # Uncomment and update this line with your world address. | ||
|
||
[writers] | ||
"dojo_starter" = ["dojo_starter-actions"] |
Oops, something went wrong.