Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
PoulavBhowmick03 committed Nov 3, 2024
0 parents commit 9164ba8
Show file tree
Hide file tree
Showing 21 changed files with 1,887 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/mark-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions .github/mark-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
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
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
5 changes: 5 additions & 0 deletions .vscode/settings.json
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"
}
21 changes: 21 additions & 0 deletions LICENSE
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.
65 changes: 65 additions & 0 deletions README.md
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!
31 changes: 31 additions & 0 deletions Scarb.lock
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",
]
22 changes: 22 additions & 0 deletions Scarb.toml
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" }
Binary file added assets/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions dojo_dev.toml
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"]
26 changes: 26 additions & 0 deletions dojo_release.toml
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"]
Loading

0 comments on commit 9164ba8

Please sign in to comment.