diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8868075d..d482af42 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: run: git submodule update --init --recursive - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v v0.7.0-alpha.5 + - run: /home/runner/.config/.dojo/bin/dojoup -v v0.7.0 - run: | cd examples/dojo-starter /home/runner/.config/.dojo/bin/sozo build diff --git a/examples/dojo-starter b/examples/dojo-starter index 358f66bc..26403c65 160000 --- a/examples/dojo-starter +++ b/examples/dojo-starter @@ -1 +1 @@ -Subproject commit 358f66bcfaf5c7e83305666f7975428ba8af256d +Subproject commit 26403c656d26c14cdb06194842c4b87c9bcaf20d diff --git a/examples/react/react-app/package.json b/examples/react/react-app/package.json index 7f86d2cd..189c38f3 100644 --- a/examples/react/react-app/package.json +++ b/examples/react/react-app/package.json @@ -8,7 +8,7 @@ "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "create-components": "npx @dojoengine/core ../../dojo-starter/manifests/dev/manifest.json src/dojo/generated/contractComponents.ts http://localhost:5050 0x559e9e223d83b6a3121ba33b1339323a3bdf4c7c302078fb3e755fddc68a2fb" + "create-components": "npx @dojoengine/core ../../dojo-starter/manifests/dev/manifest.json src/dojo/generated/contractComponents.ts http://localhost:5050 0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18" }, "dependencies": { "@dojoengine/core": "workspace:*", diff --git a/examples/react/react-app/src/App.tsx b/examples/react/react-app/src/App.tsx index 309a2587..b5210422 100644 --- a/examples/react/react-app/src/App.tsx +++ b/examples/react/react-app/src/App.tsx @@ -30,6 +30,8 @@ function App() { const moves = useComponentValue(Moves, entityId); const directions = useComponentValue(DirectionsAvailable, entityId); + console.log(moves); + const handleRestoreBurners = async () => { try { await account?.applyFromClipboard(); diff --git a/examples/react/react-app/src/dojo/generated/contractComponents.ts b/examples/react/react-app/src/dojo/generated/contractComponents.ts index fd453e3e..9592e0f1 100644 --- a/examples/react/react-app/src/dojo/generated/contractComponents.ts +++ b/examples/react/react-app/src/dojo/generated/contractComponents.ts @@ -28,11 +28,12 @@ export function defineContractComponents(world: World) { player: RecsType.BigInt, remaining: RecsType.Number, last_direction: RecsType.Number, + can_move: RecsType.Boolean, }, { metadata: { name: "Moves", - types: ["contractaddress", "u8", "enum"], + types: ["contractaddress", "u8", "enum", "bool"], customTypes: ["Direction"], }, } diff --git a/packages/state/src/recs/index.ts b/packages/state/src/recs/index.ts index bba129ac..01b61b64 100644 --- a/packages/state/src/recs/index.ts +++ b/packages/state/src/recs/index.ts @@ -30,8 +30,6 @@ export const getEntities = async ( while (continueFetching) { const entities = await client.getAllEntities(limit, cursor); - console.log("load entities", entities); - setEntities(entities, components); if (Object.keys(entities).length < limit) { diff --git a/packages/state/src/utils/index.ts b/packages/state/src/utils/index.ts index f3320857..a47005cd 100644 --- a/packages/state/src/utils/index.ts +++ b/packages/state/src/utils/index.ts @@ -35,6 +35,7 @@ export function convertValues(schema: Schema, values: any) { case RecsType.String: case RecsType.BigInt: + case RecsType.Boolean: case RecsType.Number: acc[key] = value.value; break;