Skip to content

Commit 5c8a05d

Browse files
fix: prettier
2 parents ecb3f41 + 06a2372 commit 5c8a05d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4759
-104
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
22
docs
33

4-
.DS_Store
4+
.DS_Store
5+
# Local Netlify folder
6+
.netlify

.gitmodules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
[submodule "dojo-starter"]
22
path = worlds/dojo-starter
3-
url = https://github.com/dojoengine/dojo-starter
3+
url = https://github.com/dojoengine/dojo-starter
4+
[submodule "onchain-dash"]
5+
path = worlds/onchain-dash
6+
url = https://github.com/MartianGreed/onchain-dash
7+
[submodule "worlds/onchain-dash"]
8+
path = worlds/onchain-dash
9+
url = https://github.com/MartianGreed/onchain-dash
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VITE_RPC_URL="http://localhost:5050"
2+
VITE_RPC_API_KEY=""
3+
VITE_CONTROLLER_URL="https://x.cartridge.gg/mainnet"
4+
VITE_CONTROLLER_RPC="https://x.cartridge.gg/mainnet"
5+
VITE_TORII_URL="http://localhost:8080"
6+
VITE_RELAY_URL="/ip4/127.0.0.1/tcp/9090"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["next/core-web-vitals", "next/typescript"]
3+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
/dist/
12+
13+
# next.js
14+
/.next/
15+
/out/
16+
17+
# production
18+
/build
19+
20+
# misc
21+
.DS_Store
22+
*.pem
23+
24+
# debug
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
29+
# local env files
30+
.env*.local
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts
38+
.env
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# OnChainDash Vite Kitchen Sink
2+
3+
This project aims at showcasing dojo's capabilities outside of gaming.
4+
5+
## Getting Started
6+
7+
First, install dependencies:
8+
9+
```bash
10+
pnpm install
11+
```
12+
13+
In one terminal window, start katana (the sequencer). If you want to use sepolia / mainnet contracts, you can just use a classic rpc (e.g. `https://rpc.netermind.io/(mainnet|sepolia)-juno`). If this is the case, you can skip the next command.
14+
15+
```bash
16+
katana --disable-fee --allowed-origins "*"
17+
```
18+
19+
In another terminal window, start torii server
20+
21+
```bash
22+
# with katana
23+
torii --world 0x6dd367f5e11f11e0502cb2c4db7ae9bb6d8b5a4a431750bed7bec88b218e12 --allowed-origins "*"
24+
# with mainnet|sepolia
25+
torii --world 0x6dd367f5e11f11e0502cb2c4db7ae9bb6d8b5a4a431750bed7bec88b218e12 --allowed-origins "*" --rpc "https://rpc.nethermind.io/(mainnet|sepolia)-juno?apikey={apikey}" -s 204922
26+
```
27+
28+
Then, start the development server:
29+
30+
```bash
31+
pnpm run dev
32+
```
33+
34+
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
35+
36+
## Local Contracts deployment
37+
38+
In order to make those commands work, you need to have torii & katana running.
39+
40+
```bash
41+
cd src/onchain
42+
sozo build
43+
sozo migrate apply
44+
```
45+
46+
### Notes
47+
48+
- you main want to update `actions` contract address in `src/components/caller-counter.tsx` & `src/components/global-counter.tsx` which is hardcoded in those files.
49+
- if you want to have braavos & argent wallet working, you need to deploy classes and deploy your wallet manually.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
}
20+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Dojo Onchain Dash</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# example netlify.toml
2+
[build]
3+
command = "pnpm run build"
4+
functions = "netlify/functions"
5+
publish = "examples/example-vite-kitchen-sink/dist"
6+
7+
## Uncomment to use this redirect for Single Page Applications like create-react-app.
8+
## Not needed for static site generators.
9+
#[[redirects]]
10+
# from = "/*"
11+
# to = "/index.html"
12+
# status = 200
13+
14+
## (optional) Settings for Netlify Dev
15+
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
16+
#[dev]
17+
# command = "yarn start" # Command to start your dev server
18+
# port = 3000 # Port that the dev server will be listening on
19+
# publish = "dist" # Folder with the static content for _redirect file
20+
21+
## more info on configuring this file: https://ntl.fyi/file-based-build-config
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "sink",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "tsc -b && vite build",
8+
"lint": "eslint .",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"@cartridge/connector": "^0.3.46",
13+
"@dojoengine/core": "workspace:*",
14+
"@dojoengine/sdk": "workspace:*",
15+
"@dojoengine/torii-wasm": "workspace:*",
16+
"@dojoengine/torii-client": "workspace:*",
17+
"@radix-ui/react-dialog": "^1.1.1",
18+
"@radix-ui/react-dropdown-menu": "^2.1.1",
19+
"@radix-ui/react-icons": "^1.3.0",
20+
"@radix-ui/react-label": "^2.1.0",
21+
"@radix-ui/react-select": "^2.1.1",
22+
"@radix-ui/react-slot": "^1.1.0",
23+
"@radix-ui/react-switch": "^1.1.0",
24+
"@radix-ui/react-tooltip": "^1.1.2",
25+
"@starknet-react/chains": "^3.0.0",
26+
"@starknet-react/core": "2.9.0",
27+
"@t3-oss/env-core": "^0.11.1",
28+
"@t3-oss/env-nextjs": "^0.11.1",
29+
"class-variance-authority": "^0.7.0",
30+
"clsx": "^2.1.1",
31+
"dotenv": "^16.4.5",
32+
"jiti": "^1.21.6",
33+
"lucide-react": "^0.441.0",
34+
"next": "14.2.12",
35+
"react": "^18.3.1",
36+
"react-dom": "^18.3.1",
37+
"react-hook-form": "^7.53.0",
38+
"starknet": "6.11.0",
39+
"tailwind-merge": "^2.5.2",
40+
"tailwindcss-animate": "^1.0.7",
41+
"vaul": "^0.9.9",
42+
"zod": "^3.23.8"
43+
},
44+
"devDependencies": {
45+
"@types/node": "^20.16.10",
46+
"@types/react": "^18.3.10",
47+
"@types/react-dom": "^18.3.0",
48+
"@vitejs/plugin-react": "^4.3.2",
49+
"eslint": "^8.57.1",
50+
"eslint-config-next": "14.2.12",
51+
"postcss": "^8.4.47",
52+
"tailwindcss": "^3.4.13",
53+
"typescript": "^5.6.2",
54+
"vite": "^5.4.8",
55+
"vite-plugin-top-level-await": "^1.4.4",
56+
"vite-plugin-wasm": "^3.3.0",
57+
"vite-preset-react": "^2.3.0"
58+
}
59+
}

0 commit comments

Comments
 (0)