Skip to content

Commit

Permalink
Merge pull request #16 from dojoengine/torii
Browse files Browse the repository at this point in the history
Torii
  • Loading branch information
ponderingdemocritus authored Oct 17, 2023
2 parents aacbfc3 + 13ef173 commit 71ed0ba
Show file tree
Hide file tree
Showing 12 changed files with 419 additions and 135 deletions.
8 changes: 8 additions & 0 deletions .github/dojo-mark-full-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bun.lockb
Binary file not shown.
Binary file modified examples/react-app/bun.lockb
Binary file not shown.
14 changes: 8 additions & 6 deletions examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"codegen": "graphql-codegen",
"create-components": "npx @dojoengine/core src/manifest.json src/dojo/contractComponents.ts"
},
"create-components": "npx @dojoengine/core src/dojo/manifest.json src/dojo/contractComponents.ts"
},
"dependencies": {
"@dojoengine/core": "link:dojo-packages/packages/core",
"@dojoengine/create-burner": "link:dojo-packages/packages/create-burner",
"@dojoengine/utils": "link:dojo-packages/packages/utils",
"@latticexyz/react": "^2.0.0-next.9",
"@latticexyz/recs": "^2.0.0-next.9",
"@latticexyz/utils": "^2.0.0-next.9",
"@latticexyz/react": "^2.0.0-next.11",
"@latticexyz/recs": "^2.0.0-next.11",
"@latticexyz/utils": "^2.0.0-next.11",
"ethers": "^5.7.2",
"graphql": "^16.7.1",
"graphql-request": "^6.1.0",
Expand All @@ -26,7 +26,9 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rxjs": "^7.8.1",
"starknet": "^5.17.0"
"starknet": "^5.17.0",
"vite-plugin-top-level-await": "^1.3.1",
"vite-plugin-wasm": "^3.2.2"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
Expand Down
33 changes: 4 additions & 29 deletions examples/react-app/src/dojo/contractComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ export function defineContractComponents(world: World) {
world,
{
remaining: RecsType.Number,
last_direction: RecsType.Number,
},
{
metadata: {
name: name,
types: ["u8","Direction"],
},
}
);
Expand All @@ -24,39 +26,12 @@ export function defineContractComponents(world: World) {
world,
{
x: RecsType.Number,
y: RecsType.Number,
},
{
metadata: {
name: name,
},
}
);
})(),
AuthStatus: (() => {
const name = "AuthStatus";
return defineComponent(
world,
{
is_authorized: RecsType.Boolean,
},
{
metadata: {
name: name,
},
}
);
})(),
AuthRole: (() => {
const name = "AuthRole";
return defineComponent(
world,
{
id: RecsType.Number,
y: RecsType.Number
},
{
metadata: {
name: name,
types: ["Vec2"],
},
}
);
Expand Down
1 change: 1 addition & 0 deletions examples/react-app/src/dojo/createSystemCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ClientComponents } from "./createClientComponents";
import { updatePositionWithDirection } from "../utils";
import { getEvents, setComponentsFromEvents } from "@dojoengine/utils";


export type SystemCalls = ReturnType<typeof createSystemCalls>;

export function createSystemCalls(
Expand Down
Loading

0 comments on commit 71ed0ba

Please sign in to comment.