Skip to content

Commit

Permalink
init jokers of Neon
Browse files Browse the repository at this point in the history
  • Loading branch information
nicon44 committed Oct 30, 2024
0 parents commit e7546e7
Show file tree
Hide file tree
Showing 81 changed files with 32,259 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Setup'
description: 'Setup tooling'
runs:
using: "composite"
steps:
- name: Install dojoup
run: curl -L https://install.dojoengine.org | bash
shell: bash

- name: Install dojo
run: |
/home/runner/.config/.dojo/bin/dojoup --version ${{ env.DOJO_VERSION }}
sudo mv /home/runner/.config/.dojo/bin/katana /usr/local/bin/
sudo mv /home/runner/.config/.dojo/bin/sozo /usr/local/bin/
shell: bash
87 changes: 87 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: JON

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

env:
DOJO_VERSION: v1.0.0-alpha.19
SCARB_VERSION: v2.7.0

jobs:
check:
runs-on: ubuntu-latest
name: Format
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ env.SCARB_VERSION }}
- name: Format
run: scarb fmt --check
shell: bash

test_calculate_hand:
runs-on: ubuntu-latest
name: Test - calculate_hand
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup

- name: Test calculate_hand.cairo
run: sozo test -f test_calculate_hand
shell: bash

test_game_play:
runs-on: ubuntu-latest
name: Test - game_play
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup

- name: Test game_play.cairo
run: sozo test -f test_game_play
shell: bash

test_game_discard_effect_card:
runs-on: ubuntu-latest
name: Test - game_discard_effect_card
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup

- name: Test game_discard_effect_card.cairo
run: sozo test -f test_game_discard_effect_card
shell: bash

test_game_discard_special_card:
runs-on: ubuntu-latest
name: Test - game_discard_special_card
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup

- name: Test game_discard_special_card.cairo
run: sozo test -f test_game_discard_special_card
shell: bash

test_shop:
runs-on: ubuntu-latest
name: Test - shop
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup

- name: Test test_shop.cairo
run: sozo test -f test_shop
shell: bash
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target
manifests/dev/base
manifests/dev/deployment/abis
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @dpinones @dubzn
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.
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
katana:
katana --disable-fee --allowed-origins "*" --invoke-max-steps 4294967295

setup:
@./scripts/setup.sh

deploy-slot:
@./scripts/deploy_slot.sh $(PROFILE) $(ACTION)

deploy-sepolia:
@./scripts/deploy_sepolia.sh $(ACTION)

generate-event-keys:
@./scripts/generateEventKeys.sh

# Define tasks that are not real files
.PHONY: deploy-slot deploy-sepolia katana setup torii generate-event-keys

# Catch-all rule for undefined commands
%:
@echo "Error: Command '$(MAKECMDGOALS)' is not defined."
@exit 1
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### Setting up the Local Environment

To get started follow these steps to set up your local environment.

1. Install Dojoup
```bash
curl -L https://install.dojoengine.org | bash
dojoup --version 1.0.0-alpha.13
```

2. Run the following commands in separate terminals:

```bash
# Terminal 1
make katana
```

```bash
# Terminal 2
make setup
```
### Setting up the Slot Environment

To get started follow these steps to set up your Slot environment.

Slot version `0.17.0`.
You must be a member of either the `jokers-of-neon-prod` or `jokers-of-neon-testing` group. Executing this command will deploy to the production or testing environment, as applicable.

`make deploy-slot SCOPE=prod`

`make deploy-slot SCOPE=testing`

_We are using the same seed for both prod and testing. The accounts and systems will not change. The only things that will change are the URLs for Katana and Torii_
75 changes: 75 additions & 0 deletions Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "alexandria_bytes"
version = "0.1.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_data_structures",
"alexandria_math",
]

[[package]]
name = "alexandria_data_structures"
version = "0.2.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_encoding",
]

[[package]]
name = "alexandria_encoding"
version = "0.1.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_bytes",
"alexandria_math",
"alexandria_numeric",
]

[[package]]
name = "alexandria_math"
version = "0.2.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_data_structures",
]

[[package]]
name = "alexandria_numeric"
version = "0.1.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_math",
"alexandria_searching",
]

[[package]]
name = "alexandria_searching"
version = "0.1.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_data_structures",
]

[[package]]
name = "alexandria_sorting"
version = "0.1.0"
source = "git+https://github.com/dubzn/quaireaux.git?branch=main#f9f9d0bd2ffe54b12dc49638f2708e6e1977b703"
dependencies = [
"alexandria_data_structures",
]

[[package]]
name = "dojo"
version = "1.0.0-alpha.4"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.19#ef696ea9bbaa22d3f6db392d9692b4821578c23c"

[[package]]
name = "jokers_of_neon"
version = "0.0.1"
dependencies = [
"alexandria_sorting",
"dojo",
]
27 changes: 27 additions & 0 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
cairo-version = "=2.7.0"
name = "jokers_of_neon"
version = "0.0.1"

[cairo]
sierra-replace-ids = true

[[target.dojo]]

[tool.fmt]
sort-module-level-items = true
max-line-length = 120

[scripts]
migrate = "sozo build && sozo migrate apply && ./scripts/default_auth.sh"
spawn = "./scripts/spawn.sh"
move = "./scripts/move.sh"
deploy-sepolia = "rm -rf ./manifest/sepolia && sozo --profile sepolia clean && sozo --profile sepolia build && sozo --profile sepolia migrate plan && sozo --profile sepolia migrate apply"

[dependencies]
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.19" }
alexandria_sorting = { git = "https://github.com/dubzn/quaireaux.git", branch = "main" }

[profile.prod]
[profile.testing]
[profile.sepolia]
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.
15 changes: 15 additions & 0 deletions dojo_dev.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[world]
description = "jokers of neon"
name = "jokers_of_neon"
seed = "jokers_of_neon"

[namespace]
default = "jokers_of_neon"
mappings = { }

[env]
rpc_url = "http://localhost:5050/"
# Default account for katana with seed = 0
account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca"
private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a"
#world_address = "0x42e172247714a480a40121c97c13acb1338e6cc8948b5ae23f5d7d53cd26338"
18 changes: 18 additions & 0 deletions dojo_prod.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[world]
description = "jokers of neon"
name = "jokers_of_neon"
seed = "jokers_of_neon"

[namespace]
default = "jokers_of_neon"
mappings = { }

[env]
rpc_url = "https://api.cartridge.gg/x/jon-prod/katana"
# Default account for katana with seed = 0
account_address = "0x7f43a30ba57d75c02bbbbcd2400f4482537a9b4e19d4d64c9c051d39a8a7497"
private_key = "0x63c758f1cd37cb012c70e788cf3a3a8d38943744d0989bfd99b48c2075e0f2e"
# world_address = "0x7d1b0c56b70f543f40cffb9e120316fc764fcc452e7c1636fee3330d564aa7f"

[migration]
skip_contracts = []
19 changes: 19 additions & 0 deletions dojo_sepolia.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[world]
description = "jokers of neon"
name = "jokers_of_neon"
seed = "jokers_of_neon"

[namespace]
default = "jokers_of_neon"
mappings = { }

[env]
rpc_url = "https://api.cartridge.gg/x/starknet/sepolia"
# Replace with your account details
account_address = "0x4053da4d8736dedbf87890818f1efd7c9477d0df08faa65df0c8d50cbf13478"
private_key = "0x026e3a08622f55d090292086c234f1029a75e8ba7acab4c8f8eeaba719c77834"
# Replace with the address of the world once you deploy it
#world_address = ""

[migration]
skip_contracts = []
18 changes: 18 additions & 0 deletions dojo_testing.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[world]
description = "jokers of neon"
name = "jokers_of_neon"
seed = "jokers_of_neon"

[namespace]
default = "jokers_of_neon"
mappings = { }

[env]
rpc_url = "https://api.cartridge.gg/x/jon-testing/katana"
# Default account for katana with seed = 0
account_address = "0x7f43a30ba57d75c02bbbbcd2400f4482537a9b4e19d4d64c9c051d39a8a7497"
private_key = "0x63c758f1cd37cb012c70e788cf3a3a8d38943744d0989bfd99b48c2075e0f2e"
# world_address = "0x7d1b0c56b70f543f40cffb9e120316fc764fcc452e7c1636fee3330d564aa7f"

[migration]
skip_contracts = []
Loading

0 comments on commit e7546e7

Please sign in to comment.