Skip to content

chore: bump dojo.c to get latest publishMessage endpoint #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
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
15 changes: 15 additions & 0 deletions .changeset/wild-trees-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@dojoengine/torii-wasm": patch
"@dojoengine/core": patch
"@dojoengine/sdk": patch
"@dojoengine/create-burner": patch
"@dojoengine/create-dojo": patch
"@dojoengine/predeployed-connector": patch
"@dojoengine/react": patch
"@dojoengine/state": patch
"@dojoengine/torii-client": patch
"@dojoengine/utils": patch
"@dojoengine/utils-wasm": patch
---

chore: bump dojo.c to get latest publishMessage endpoint
1 change: 0 additions & 1 deletion examples/example-node-worker/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ global.WorkerGlobalScope = global;
const sdk = await init({
client: {
toriiUrl: dojoConfig.toriiUrl,
relayUrl: "/ip4/127.0.0.1/tcp/9092/ws",
worldAddress: dojoConfig.manifest.world.address,
},
domain: {
Expand Down
1 change: 0 additions & 1 deletion examples/example-vanillajs-phaser-recs/src/dojo/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export async function setup({ ...config }: Config) {
try {
toriiClient = await torii.createClient({
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-experimental-sdk/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ async function main() {
const sdk = await init({
client: {
toriiUrl: dojoConfig.toriiUrl,
relayUrl: dojoConfig.relayUrl,
worldAddress: dojoConfig.manifest.world.address,
},
domain: {
Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-grpc-playground/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ async function main() {
const sdk = await init({
client: {
toriiUrl: dojoConfig.toriiUrl,
relayUrl: dojoConfig.relayUrl,
worldAddress: dojoConfig.manifest.world.address,
},
domain: {
Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-kitchen-sink/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ async function main() {
const sdk = await init<SchemaType>({
client: {
toriiUrl: env.VITE_TORII_URL,
relayUrl: env.VITE_RELAY_URL,
worldAddress: dojoConfig.manifest.world.address,
},
domain: {
Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-phaser-sdk/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ async function main() {
const sdk = await init<SchemaType>({
client: {
toriiUrl: dojoConfig.toriiUrl,
relayUrl: dojoConfig.relayUrl,
worldAddress: dojoConfig.manifest.world.address,
},
domain: {
Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-react-app-recs/src/dojo/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export async function setup({ ...config }: DojoConfig) {
// Initialize Torii client for interacting with the Dojo network
const toriiClient = new torii.ToriiClient({
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export async function setup({ ...config }: DojoConfig) {
// torii client
const toriiClient = new torii.ToriiClient({
toriiUrl: config.toriiUrl,
relayUrl: config.relayUrl,
worldAddress: config.manifest.world.address || "",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export async function setup({ ...config }: DojoConfig) {
// torii client
const toriiClient = new torii.ToriiClient({
toriiUrl: config.toriiUrl,
relayUrl: config.relayUrl,
worldAddress: config.manifest.world.address || "",
});

Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-react-sql/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ async function main() {
const sdk = await init<SchemaType>({
client: {
toriiUrl: dojoConfig.toriiUrl,
relayUrl: dojoConfig.relayUrl,
worldAddress: dojoConfig.manifest.world.address,
},
domain: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export async function setup({ ...config }: DojoConfig) {
// torii client
const toriiClient = new torii.ToriiClient({
toriiUrl: config.toriiUrl,
relayUrl: config.relayUrl,
worldAddress: config.manifest.world.address || "",
});

Expand Down
1 change: 0 additions & 1 deletion examples/example-vite-svelte-recs/src/dojo/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export async function setup({ ...config }: DojoConfig) {
// torii client
const toriiClient = await torii.createClient({
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});

Expand Down
1 change: 0 additions & 1 deletion examples/example-vue-app-recs/src/dojo/generated/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export async function setup({ ...config }: DojoConfig) {
// torii client
const toriiClient = new torii.ToriiClient({
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});

Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
KATANA_PREFUNDED_ADDRESS,
KATANA_PREFUNDED_PRIVATE_KEY,
LOCAL_KATANA,
LOCAL_RELAY,
LOCAL_TORII,
} from "../constants";

Expand All @@ -13,7 +12,6 @@ export type DojoConfig = ReturnType<typeof createDojoConfig>;
interface DojoConfigParams {
rpcUrl?: string;
toriiUrl?: string;
relayUrl?: string;
masterAddress?: string;
masterPrivateKey?: string;
accountClassHash?: string;
Expand All @@ -28,7 +26,6 @@ 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: 0 additions & 1 deletion packages/sdk/src/__example__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ async function exampleUsage() {
const db = await init<MockSchemaType>({
client: {
toriiUrl: "your-torii-url",
relayUrl: "your-relay-url",
worldAddress: "your-world-address",
},
domain: {
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/src/__tests__/generateTypedData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ describe("generateTypedData", () => {
const mockConfig = {
client: {
toriiUrl: "http://localhost:8080",
relayUrl: "/ip4/127.0.0.1/tcp/9090",
worldAddress: "0x123",
},
domain: {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/internal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export interface SDK<T extends SchemaType> {
sendMessage: (
data: TypedData,
account?: Account
) => Promise<Result<Uint8Array, string>>;
) => Promise<Result<string, string>>;

/**
* @param {string[]} contract_addresses
Expand Down
3 changes: 1 addition & 2 deletions packages/sdk/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export * from "../internal/models.ts";

export const defaultClientConfig: Partial<torii.ClientConfig> = {
toriiUrl: "http://localhost:8080",
relayUrl: "/ip4/127.0.0.1/tcp/9090",
};

export async function init<T extends SchemaType>(
Expand Down Expand Up @@ -193,7 +192,7 @@ export async function init<T extends SchemaType>(
sendMessage: async (
data: TypedData,
_account?: Account
): Promise<Result<Uint8Array, string>> => {
): Promise<Result<string, string>> => {
if (!options.signer) {
return err(NO_SIGNER);
}
Expand Down
3 changes: 1 addition & 2 deletions packages/sdk/src/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export async function createClient(

export const defaultClientConfig: Partial<torii.ClientConfig> = {
toriiUrl: "http://localhost:8080",
relayUrl: "/ip4/127.0.0.1/tcp/9090",
};

/**
Expand Down Expand Up @@ -212,7 +211,7 @@ export async function init<T extends SchemaType>(
sendMessage: async (
data: TypedData,
account?: Account
): Promise<Result<Uint8Array, string>> => {
): Promise<Result<string, string>> => {
if (!account) {
return err(NO_ACCOUNT);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/torii-wasm/dojo.c
Submodule dojo.c updated 8 files
+209 −2,912 Cargo.lock
+4 −6 Cargo.toml
+5 −29 dojo.h
+11 −13 dojo.hpp
+5 −20 dojo.pyx
+3 −12 src/c/mod.rs
+7 −12 src/wasm/mod.rs
+0 −2 src/wasm/types.rs
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const db =
// your config
client: {
toriiUrl: dojoConfig.toriiUrl,
relayUrl: dojoConfig.relayUrl,
worldAddress: dojoConfig.manifest.world.address,
},
// allows typed messaging via indexer
Expand Down Expand Up @@ -195,18 +194,19 @@ Before running examples, you need to build the packages:
```bash
pnpm run dev
```
- Try out a specific example :

- Try out a specific example :

```bash
pnpm run dev --filter example-vite-react-sdk
```


### Running The Examples

To run the examples, you'll need to set up three terminal windows:

**With docker**:
**With docker**:

1. Navigate to the Dojo starter directory:

```bash
Expand Down
Loading