Skip to content

Commit

Permalink
fix: relay
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Apr 3, 2024
1 parent 2be0fd6 commit ba6eccc
Show file tree
Hide file tree
Showing 11 changed files with 6,122 additions and 769 deletions.
2 changes: 1 addition & 1 deletion examples/react/react-app/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import manifest from "../../dojo-starter/target/dev/manifest.json";
import manifest from "../../dojo-starter/manifests/deployments/KATANA.json";
import { createDojoConfig } from "@dojoengine/core";

export const dojoConfig = createDojoConfig({
Expand Down
12 changes: 6 additions & 6 deletions examples/react/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"create-components": "npx @dojoengine/core ../../dojo-starter/target/dev/manifest.json src/dojo/generated/contractComponents.ts http://localhost:5050 0x28f5999ae62fec17c09c52a800e244961dba05251f5aaf923afabd9c9804d1a"
},
"dependencies": {
"@dojoengine/core": "^0.5.0",
"@dojoengine/create-burner": "^0.5.0",
"@dojoengine/torii-client": "^0.5.0",
"@dojoengine/utils": "^0.5.0",
"@dojoengine/react": "^0.5.0",
"@dojoengine/state": "^0.5.0",
"@dojoengine/core": "^0.6.1-alpha.1",
"@dojoengine/create-burner": "^0.6.1-alpha.1",
"@dojoengine/torii-client": "^0.6.1-alpha.1",
"@dojoengine/utils": "^0.6.1-alpha.1",
"@dojoengine/react": "^0.6.1-alpha.1",
"@dojoengine/state": "^0.6.1-alpha.1",
"@dojoengine/recs": "0.1.35",
"@latticexyz/react": "^2.0.0-next.11",
"@latticexyz/utils": "^2.0.0-next.11",
Expand Down
2 changes: 0 additions & 2 deletions examples/react/react-app/src/dojo/DojoContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const DojoProvider = ({
select,
isDeploying,
clear,
count,
copyToClipboard,
applyFromClipboard,
} = useBurnerManager({
Expand All @@ -65,7 +64,6 @@ export const DojoProvider = ({
clear,
account: account ? account : masterAccount,
isDeploying,
count,
copyToClipboard,
applyFromClipboard,
},
Expand Down
1 change: 1 addition & 0 deletions examples/react/react-app/src/dojo/generated/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export async function setup({ ...config }: DojoConfig) {
const toriiClient = await torii.createClient([], {
rpcUrl: config.rpcUrl,
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});

Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
KATANA_PREFUNDED_ADDRESS,
KATANA_PREFUNDED_PRIVATE_KEY,
LOCAL_KATANA,
LOCAL_RELAY,
LOCAL_TORII,
KATANA_ETH_CONTRACT_ADDRESS,
} from "../constants";
Expand All @@ -12,6 +13,7 @@ export type DojoConfig = ReturnType<typeof createDojoConfig>;
interface DojoConfigParams {
rpcUrl?: string;
toriiUrl?: string;
relayUrl?: string;
masterAddress?: string;
masterPrivateKey?: string;
accountClassHash?: string;
Expand All @@ -26,6 +28,7 @@ export function createDojoConfig({ manifest, ...config }: DojoConfigParams) {
return {
rpcUrl: config.rpcUrl ?? LOCAL_KATANA,
toriiUrl: config.toriiUrl ?? LOCAL_TORII,
relayUrl: config.relayUrl ?? LOCAL_RELAY,
masterAddress: config.masterAddress ?? KATANA_PREFUNDED_ADDRESS,
masterPrivateKey:
config.masterPrivateKey ?? KATANA_PREFUNDED_PRIVATE_KEY,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const LOCAL_KATANA = "http://localhost:5050";
export const LOCAL_RELAY = "";
export const LOCAL_TORII = "http://localhost:8080";
export const KATANA_PREFUNDED_ADDRESS =
"0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03";
Expand Down
Loading

0 comments on commit ba6eccc

Please sign in to comment.