Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 52 additions & 90 deletions bun.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mprocs.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ procs:
shell: bun run dev
torii:
cwd: packages/contracts
shell: wait-port 5050 && torii --world "0xfea62706381254891e4e1a685a1c5b7c91ce4dddcd1390fd229691654019c4" --http.cors_origins "*"
shell: wait-port 5050 && torii --world "0x545eeac1e37165b8aebc1af423f823b5dd941d82f1d16208eb4a26f562e3aa6" --http.cors_origins "*"
katana:
cwd: packages/contracts
shell: katana --dev --dev.no-fee --http.cors_origins "*"
shell: katana --dev --dev.no-fee --http.cors_origins "*" --cartridge.controllers --cartridge.paymaster
7 changes: 4 additions & 3 deletions packages/client/.env.development
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
VITE_CONTROLLER_CHAINID=0x57505f5448454f52554747494e545241494c
VITE_TOKEN_HTTP_RPC=https://api.cartridge.gg/x/lore-v2/katana
VITE_CONTROLLER_CHAINID=0x4b4154414e41
VITE_TOKEN_HTTP_RPC=https://api.cartridge.gg/x/lore-v3/katana
VITE_TOKEN_CONTRACT_ADDRESS=0x050ab7cbc80f8c7ee18f859dcc81e7ae4213e08da243851a8889d48c2ed7f765
VITE_KATANA_HTTP_RPC=http://localhost:5050
VITE_TORII_HTTP_RPC=http://localhost:8080
VITE_TORII_WS_RPC=ws://localhost:8080
VITE_BURNER_ADDRESS=0x6677fe62ee39c7b07401f754138502bab7fac99d2d3c5d37df7d1c6fab10819
VITE_BURNER_PRIVATE_KEY=0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4
VITE_BURNER_PRIVATE_KEY=0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4
VITE_SLOT=lore-v3
12 changes: 6 additions & 6 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"start": "bunx serve -s /dist --port 8080"
},
"dependencies": {
"@cartridge/controller": "^0.7.13",
"@cartridge/controller": "^0.9.2",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@dojoengine/core": "^1.5.10",
"@dojoengine/create-burner": "^1.5.10",
"@dojoengine/sdk": "^1.5.10",
"@dojoengine/utils": "^1.5.10",
"@dojoengine/core": "^1.6.0",
"@dojoengine/create-burner": "^1.6.0",
"@dojoengine/sdk": "^1.6.0",
"@dojoengine/utils": "^1.6.0",
"@lore/contracts": "workspace:*",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-context-menu": "^2.2.6",
Expand All @@ -44,7 +44,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sonner": "^2.0.3",
"starknet": "^6.23.1",
"starknet": "^7.6.4",
"tailwind-merge": "^3.0.1",
"tailwindcss": "^4.0.3",
"tw-animate-css": "^1.2.5",
Expand Down
10 changes: 6 additions & 4 deletions packages/client/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { schema } from "@lib/dojo_bindings/typescript/models.gen";
import manifestJson from "@lore/contracts/manifest";
import type manifestJsonType from "@lore/contracts/manifest_dev.json";
import { cleanEnv, str, url } from "envalid";
import { Account, Contract, RpcProvider } from "starknet";
import { Account, Contract, RpcProvider, provider } from "starknet";

const getOrFail = <T>(value: T | undefined, name?: string): T => {
if (value === undefined || value === null) {
Expand All @@ -11,7 +11,7 @@ const getOrFail = <T>(value: T | undefined, name?: string): T => {
return value;
};

const slotEnv = import.meta.env.MODE === "slot" ? { VITE_SLOT: str() } : {};
// const slotEnv = import.meta.env.MODE === "slot" ? { VITE_SLOT: str() } : {};
const isLocalhost = window.location.hostname === "localhost";
const isEditor = window.location.pathname.startsWith("/editor");

Expand All @@ -24,7 +24,8 @@ const env = cleanEnv(import.meta.env, {
VITE_TORII_WS_RPC: str(),
VITE_BURNER_ADDRESS: str(),
VITE_BURNER_PRIVATE_KEY: str(),
...slotEnv,
VITE_SLOT: str(),
//...slotEnv,
});

const endpoints = {
Expand Down Expand Up @@ -104,7 +105,8 @@ export const LORE_CONFIG = {
contract_address: env.VITE_TOKEN_CONTRACT_ADDRESS,
erc20: ["0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"],
},
useController: import.meta.env.MODE === "slot",
useController: true,
// import.meta.env.MODE === "slot",
env: env,
LOCALHOST: isLocalhost,
EDITOR_MODE: isEditor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DojoProvider, DojoCall } from "@dojoengine/core";
import { Account, AccountInterface, BigNumberish, CairoOption, CairoCustomEnum, ByteArray } from "starknet";
import { Account, AccountInterface, BigNumberish, CairoOption, CairoCustomEnum } from "starknet";
import * as models from "./models.gen";

export function setupWorld(provider: DojoProvider) {
Expand Down Expand Up @@ -571,15 +571,15 @@ export function setupWorld(provider: DojoProvider) {
}
};

const build_prompt_prompt_calldata = (cmd: ByteArray): DojoCall => {
const build_prompt_prompt_calldata = (cmd: string): DojoCall => {
return {
contractName: "prompt",
entrypoint: "prompt",
calldata: [cmd],
};
};

const prompt_prompt = async (snAccount: Account | AccountInterface, cmd: ByteArray) => {
const prompt_prompt = async (snAccount: Account | AccountInterface, cmd: string) => {
try {
return await provider.execute(
snAccount,
Expand Down
Loading
Loading