Skip to content
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

landing #2472

Merged
merged 1 commit into from
Dec 13, 2024
Merged

landing #2472

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
2 changes: 1 addition & 1 deletion landing/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VITE_PUBLIC_WORLD_ADDRESS="0x5013b17c43a2b664ec2a38aa45f6d891db1188622ec7cf32041
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2"
VITE_PUBLIC_FEE_TOKEN_ADDRESS=0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7

VITE_PUBLIC_TORII=https://api.cartridge.gg/x/realms-world-5/torii
VITE_PUBLIC_TORII=https://eternum.glihm.xyz/
VITE_PUBLIC_NODE_URL=https://api.cartridge.gg/x/starknet/mainnet
VITE_PUBLIC_DEV=false
VITE_PUBLIC_GAME_VERSION="v1.0.0-rc0"
Expand Down
18 changes: 9 additions & 9 deletions landing/src/dojo/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WORLD_CONFIG_ID } from "@bibliothecadao/eternum";
import { DojoConfig } from "@dojoengine/core";
import { getEvents, getSyncEntities } from "@dojoengine/state";
import { getEntities, getEvents, syncEntities } from "@dojoengine/state";
import { Clause } from "@dojoengine/torii-client";
import { createClientComponents } from "./createClientComponents";
import { createSystemCalls } from "./createSystemCalls";
Expand Down Expand Up @@ -66,28 +66,28 @@ export async function setup({ ...config }: DojoConfig) {
},
];
// fetch all existing entities from torii with optional component filtering
await getSyncEntities(
await getEntities(
network.toriiClient,
network.contractComponents as any,
{ Composite: { operator: "Or", clauses } },
[],
10_000,
network.contractComponents as any,
40_000,
);

const sync = await getSyncEntities(
await getEntities(
network.toriiClient,
network.contractComponents as any,
{
Keys: {
keys: [undefined],
pattern_matching: "VariableLen",
models: filteredModels.map((model) => `s0_eternum-${model}`),
},
},
[],
10_000,
network.contractComponents as any,
40_000,
);

const sync = await syncEntities(network.toriiClient, network.contractComponents as any, [], false);

const eventSync = getEvents(
network.toriiClient,
network.contractComponents.events as any,
Expand Down
Loading