Skip to content

Commit

Permalink
Merge pull request #2 from dojoengine/0.3.0
Browse files Browse the repository at this point in the history
update
  • Loading branch information
ponderingdemocritus authored Sep 29, 2023
2 parents 6bf67e2 + c42836e commit dd2a639
Show file tree
Hide file tree
Showing 33 changed files with 1,257 additions and 228 deletions.
53 changes: 53 additions & 0 deletions .github/actions/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and NPM Release

on:
workflow_dispatch:

jobs:
build-and-release:
runs-on: ubuntu-latest

strategy:
matrix:
package: ['packages/core', 'packages/create-burner', 'packages/utils']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: |
cd ${{ matrix.package }}
npm ci
- name: Bump version
run: |
cd ${{ matrix.package }}
npm version patch -m "Bump version to %s"
env:
GH_TOKEN: ${{ secrets.GIT_TOKEN }}

- name: Build
run: |
cd ${{ matrix.package }}
npm run build
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GIT_TOKEN }}
directory: ${{ matrix.package }}
force: true

- name: NPM Publish
run: |
cd ${{ matrix.package }}
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/react-app/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ VITE_PUBLIC_ETH_CONTRACT_ADDRESS=0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c74
VITE_PUBLIC_ACCOUNT_CLASS_HASH=0x04d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f
VITE_PUBLIC_MASTER_ADDRESS=0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
VITE_PUBLIC_MASTER_PRIVATE_KEY=0x1800000000300000180000000000030000000000003006001800006600
VITE_PUBLIC_WORLD_ADDRESS=0x223b959926c92e10a5de78a76871fa40cefafbdce789137843df7c7b30e3e0
VITE_PUBLIC_WORLD_ADDRESS=0x2430f23de0cd9a957e1beb7aa8ef2db2af872cc7bb3058b9be833111d5518f5
VITE_PUBLIC_NODE_URL=http://localhost:5050
VITE_PUBLIC_TORII=http://localhost:8080
Binary file modified examples/react-app/bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"@dojoengine/core": "link:dojo-packages/packages/core",
"@dojoengine/create-burner": "link:dojo-packages/packages/create-burner",
"@dojoengine/utils": "link:dojo-packages/packages/utils",
"@dojoengine/react": "^0.0.3",
"@latticexyz/recs": "^1.43.0",
"@latticexyz/utils": "^1.43.0",
"@latticexyz/react": "^2.0.0-next.9",
"@latticexyz/recs": "^2.0.0-next.9",
"@latticexyz/utils": "^2.0.0-next.9",
"ethers": "^5.7.2",
"graphql": "^16.7.1",
"graphql-request": "^6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './App.css';
import { useDojo } from './DojoContext';
import { useComponentValue } from "@dojoengine/react";
import { useComponentValue } from "@latticexyz/react";
import { Direction, } from './dojo/createSystemCalls'
import { EntityIndex, setComponent } from '@latticexyz/recs';
import { useEffect } from 'react';
Expand Down
7 changes: 4 additions & 3 deletions examples/react-app/src/dojo/createSystemCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ export function createSystemCalls(
) {

const spawn = async (signer: Account) => {

const entityId = parseInt(signer.address) as EntityIndex;

const positionId = uuid();
Position.addOverride(positionId, {
entity: entityId,
value: { x: 1000, y: 1000 },
value: { x: 10, y: 10 },
});

const movesId = uuid();
Expand All @@ -29,7 +30,7 @@ export function createSystemCalls(
});

try {
const tx = await execute(signer, "spawn", []);
const tx = await execute(signer, "player_actions", 'spawn', []);

console.log(tx)
const receipt = await signer.waitForTransaction(tx.transaction_hash, { retryInterval: 100 })
Expand Down Expand Up @@ -62,7 +63,7 @@ export function createSystemCalls(
});

try {
const tx = await execute(signer, "move", [direction]);
const tx = await execute(signer, "player_actions", "move", [direction]);

console.log(tx)
const receipt = await signer.waitForTransaction(tx.transaction_hash, { retryInterval: 100 })
Expand Down
Loading

0 comments on commit dd2a639

Please sign in to comment.