Skip to content

Commit

Permalink
fix: build and dep issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Apr 4, 2024
1 parent cc0decf commit 5358dbf
Show file tree
Hide file tree
Showing 16 changed files with 108 additions and 51 deletions.
2 changes: 2 additions & 0 deletions examples/react/react-app/src/dojo/DojoContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const DojoProvider = ({
select,
isDeploying,
clear,
count,
copyToClipboard,
applyFromClipboard,
} = useBurnerManager({
Expand All @@ -62,6 +63,7 @@ export const DojoProvider = ({
get,
select,
clear,
count,
account: account ? account : masterAccount,
isDeploying,
copyToClipboard,
Expand Down
11 changes: 6 additions & 5 deletions examples/react/react-phaser-example/src/dojo/createBurner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ export const createBurner = async ({ ...config }: DojoConfig) => {

const burnerManager = new BurnerManager({
masterAccount: new Account(
rpcProvider,
{
nodeUrl: config.rpcUrl,
},
config.masterAddress,
config.masterPrivateKey,
"1"
config.masterPrivateKey
),
accountClassHash: config.accountClassHash,
rpcProvider,
rpcProvider: rpcProvider,
feeTokenAddress: config.feeTokenAddress,
});

try {
await burnerManager.init();
if (burnerManager.list().length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion examples/react/starknet-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react": "^18",
"react-dom": "^18",
"rxjs": "^7.8.1",
"starknet": "5.25.0",
"starknet": "^6.1.5",
"vite-plugin-top-level-await": "^1.3.1",
"vite-plugin-wasm": "^3.2.2"
},
Expand Down
23 changes: 14 additions & 9 deletions examples/react/starknet-react-app/src/dojo/DojoContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export const DojoProvider = ({

const { account: walletAccount } = useAccount();

const {
config: { masterAddress, masterPrivateKey },
dojoProvider,
} = value;

if (walletAccount) {
masterAccount = walletAccount;
} else {
const {
config: { masterAddress, masterPrivateKey },
dojoProvider,
} = value;

masterAccount = new Account(
dojoProvider.provider,
masterAddress,
Expand All @@ -46,12 +46,17 @@ export const DojoProvider = ({
);
}

console.log(value.dojoProvider.provider);

const burnerManager = new BurnerManager({
masterAccount: masterAccount,
masterAccount: new Account(
{
nodeUrl: dojoConfig.rpcUrl,
},
dojoConfig.masterAddress,
dojoConfig.masterPrivateKey
),
accountClassHash: dojoConfig.accountClassHash,
rpcProvider: value.dojoProvider.provider,
rpcProvider: dojoProvider.provider,
feeTokenAddress: dojoConfig.feeTokenAddress,
});

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { createSystemCalls } from "../createSystemCalls";
import { defineContractComponents } from "./contractComponents";
import { world } from "./world";
import { setupWorld } from "./generated";
import { Account } from "starknet";
import { BurnerManager } from "@dojoengine/create-burner";

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

Expand All @@ -16,6 +14,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
1 change: 1 addition & 0 deletions examples/vue/vue-app/dist/assets/index-CbQMbAXL.css

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

59 changes: 59 additions & 0 deletions examples/vue/vue-app/dist/assets/index-CfBgCni9.js

Large diffs are not rendered by default.

Binary file not shown.
14 changes: 14 additions & 0 deletions examples/vue/vue-app/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<script type="module" crossorigin src="/assets/index-CfBgCni9.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CbQMbAXL.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
1 change: 1 addition & 0 deletions examples/vue/vue-app/dist/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/vue/vue-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
2 changes: 1 addition & 1 deletion packages/torii-wasm/crate/Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/torii-wasm/crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[package]
edition = "2021"
name = "torii-client-wasm"
version = "0.3.1"
version = "0.6.1"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion packages/torii-wasm/crate/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly"
channel = "1.75.0"
2 changes: 1 addition & 1 deletion packages/utils-wasm/crate/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly"
channel = "1.75.0"
33 changes: 4 additions & 29 deletions pnpm-lock.yaml

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

0 comments on commit 5358dbf

Please sign in to comment.