Skip to content

Commit

Permalink
Merge pull request #6 from funDAOmental/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
rsodre authored Jan 19, 2024
2 parents f61cb10 + 92d48a5 commit be69353
Show file tree
Hide file tree
Showing 46 changed files with 1,094 additions and 479 deletions.
12 changes: 2 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:5173/",
"webRoot": "/Users/roger/Dev/Blockchain/Realms/lootunderworld/client/src/dojo",
// "webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
"webpack:/*": "${webRoot}/*",
"/./*": "${webRoot}/*",
"/src/*": "${webRoot}/*",
"/*": "*",
"/./~/*": "${webRoot}/node_modules/*"
},
"url": "http://localhost:3000/",
"webRoot": "${workspaceRoot}/client",
}
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ rustup update
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
# other stuff you might need
cargo install toml-cli
brew install protobuf
```

Expand Down
1 change: 0 additions & 1 deletion client/.env.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# pistols
NEXT_PUBLIC_PROOF_LOST_GAMES=1
NEXT_PUBLIC_DEBUG=1

# static
Expand Down
6 changes: 3 additions & 3 deletions client/.env.slot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pistols
NEXT_PUBLIC_PROOF_LOST_GAMES=0
NEXT_PUBLIC_DEBUG=1

# static
NEXT_PUBLIC_ETH_CONTRACT_ADDRESS=0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
Expand All @@ -11,5 +11,5 @@ NEXT_PUBLIC_WORLD_ADDRESS=0x269c58e5fa1e7f6fe3756f1de88ecdfab7d03ba67e79ba0365b4
NEXT_PUBLIC_NODE_URL=https://api.cartridge.gg/x/pistols/katana
NEXT_PUBLIC_TORII=https://api.cartridge.gg/x/pistols/torii
# from katana
NEXT_PUBLIC_MASTER_ADDRESS=0x35d0cdaf12e6816f4a1a5c074befbddd08abf61bbea87765342289b48b4bc16
NEXT_PUBLIC_MASTER_PRIVATE_KEY=0x2cbd34ec84e50d1616c3d0b17799a5f2fd7448f2039e4652eb950586f06ad60
NEXT_PUBLIC_MASTER_ADDRESS=0x2e0e12a0275b03172bb09aafac8e288599678032493fef65adc1af87771bdaa
NEXT_PUBLIC_MASTER_PRIVATE_KEY=0x3cfcac8524dd04d352479c89b5685b9f3b4e788e226305e1df18712154afd76
98 changes: 57 additions & 41 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
"create-components_local": "script/generateComponents.cjs ../dojo/target/dev/manifest.json src/dojo/contractComponents.ts"
},
"dependencies": {
"@dojoengine/core": "^0.2.9",
"@dojoengine/create-burner": "^0.2.9",
"@dojoengine/react": "^0.2.9",
"@dojoengine/core": "^0.3.4",
"@dojoengine/create-burner": "^0.3.4",
"@dojoengine/react": "^0.3.4",
"@dojoengine/recs": "^0.1.35",
"@dojoengine/torii-client": "^0.2.9",
"@dojoengine/utils": "^0.2.9",
"@dojoengine/state": "^0.3.4",
"@dojoengine/torii-client": "^0.3.4",
"@dojoengine/utils": "^0.3.4",
"@tweenjs/tween.js": "^21.0.0",
"event-emitter": "^0.3.5",
"next": "^13.5.6",
Expand All @@ -30,7 +31,7 @@
"semantic-ui-react": "^3.0.0-beta.0",
"starknet": "5.24.3",
"three": "^0.157.0",
"type-fest": "^4.8.3",
"type-fest": "^2.14.0",
"use-local-storage-state": "^19.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion client/src/dojo/DojoContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const useDojo = () => {


//
// pistols
// NEW
//

export const useDojoAccount = () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/dojo/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createClientComponents } from './createClientComponents'
import { createSystemCalls } from './createSystemCalls'
import { setupNetwork } from './setupNetwork'
import { getSyncEntities } from '@dojoengine/react'
import { getSyncEntities } from '@dojoengine/state'

export type SetupResult = Awaited<ReturnType<typeof setup>>

Expand Down
8 changes: 4 additions & 4 deletions client/src/dojo/setupNetwork.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Account, num } from 'starknet'
import { DojoProvider, } from '@dojoengine/core'
import * as torii from '@dojoengine/torii-client'
import { defineContractComponents } from './contractComponents'
import { world } from './world'
import { DojoProvider, } from '@dojoengine/core'
import { Account, num } from 'starknet'
import manifest from '@/manifest.json'
import * as torii from '@dojoengine/torii-client'

export type SetupNetworkResult = Awaited<ReturnType<typeof setupNetwork>>

Expand All @@ -14,7 +14,7 @@ export async function setupNetwork() {
if (!process.env.NEXT_PUBLIC_TORII) throw (`NEXT_PUBLIC_TORII is null`)

// Create a new DojoProvider instance.
const provider = new DojoProvider(process.env.NEXT_PUBLIC_WORLD_ADDRESS, manifest, process.env.NEXT_PUBLIC_NODE_URL)
const provider = new DojoProvider(manifest, process.env.NEXT_PUBLIC_NODE_URL)

const toriiClient = await torii.createClient([], {
rpcUrl: process.env.NEXT_PUBLIC_NODE_URL,
Expand Down
2 changes: 1 addition & 1 deletion client/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@
{
"name": "pistols::systems::actions::actions",
"address": "0x78af18db6887ee0eb2b339f95619e88b65aa47c7025ad42dc81c7be43b631ff",
"class_hash": "0x601e133e04612f3e315dd692d926f3e1fc04effea91773fc3b2cf21591eaa7d",
"class_hash": "0x6fd66f89f1e1ccde9397313d2cb416fb340f1f98b1e509877ef93593a327637",
"abi": [
{
"type": "impl",
Expand Down
2 changes: 1 addition & 1 deletion client/src/pistols/components/AppDojo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react'
import { useEffectOnce } from '@/pistols/hooks/useEffectOnce'
import { DojoProvider } from '@/dojo/DojoContext'
import { setup } from '@/dojo/setup.ts'
import { setup } from '@/dojo/setup'
import { GameplayProvider } from '@/pistols/hooks/GameplayContext'
import App from '@/pistols/components/App'

Expand Down
Loading

0 comments on commit be69353

Please sign in to comment.