Skip to content

Commit

Permalink
depoly
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Dec 4, 2024
1 parent 0ec3b78 commit 25397d8
Show file tree
Hide file tree
Showing 7 changed files with 1,097 additions and 695 deletions.
10 changes: 5 additions & 5 deletions client/.env.preview
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ VITE_PUBLIC_MASTER_PRIVATE_KEY=0x075362a844768f31c8058ce31aec3dd7751686440b4f220
VITE_PUBLIC_WORLD_ADDRESS="0x5013b17c43a2b664ec2a38aa45f6d891db1188622ec7cf320411321c3248fb5"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2"
VITE_PUBLIC_FEE_TOKEN_ADDRESS=0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
VITE_PUBLIC_TORII=https://api.cartridge.gg/x/eternum-rc-sepolia/torii
VITE_PUBLIC_TORII=https://api.cartridge.gg/x/sepolia-rc-1/torii
VITE_PUBLIC_NODE_URL=https://api.cartridge.gg/x/starknet/sepolia
VITE_PUBLIC_DEV=false
VITE_PUBLIC_GAME_VERSION="v1.0.0-rc0"
VITE_PUBLIC_SHOW_FPS=false
VITE_PUBLIC_GRAPHICS_DEV=false
VITE_PUBLIC_TORII_RELAY=/dns4/api.cartridge.gg/tcp/443/x-parity-wss/%2Fx%2Feternum-rc-sepolia%2Ftorii%2Fwss
VITE_SEASON_PASS_ADDRESS=0x43e1d2187157c7744a96897c4a10303a9972c65727dbbed7348cbc6d98709a4
VITE_REALMS_ADDRESS=0xd2674cc335684896f2b1f942e6929611acab4dc07aa03d0371226812bbc349
VITE_LORDS_ADDRESS=0x31031b237b196b17179cf30154d03bfa2ed2e74731d6b1f9760b1085457861d
VITE_PUBLIC_TORII_RELAY=/dns4/api.cartridge.gg/tcp/443/x-parity-wss/%2Fx%2Fsepolia-rc-1%2Ftorii%2Fwss
VITE_SEASON_PASS_ADDRESS=0xafc50128e19996b15e95b97d2fdd89f2fadaf1f8385afc361c43f9aeb7caff
VITE_REALMS_ADDRESS=0x36f75b31145be5578c59e73c2d47d454f9b8e13bd2b67fc750d8eaa8ac18beb
VITE_LORDS_ADDRESS=0x342ad5cc14002c005a5cedcfce2bd3af98d5e7fb79e9bf949b3a91cf145d72e

VITE_PUBLIC_CHAIN=sepolia

Expand Down
19 changes: 15 additions & 4 deletions config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import type { Config } from "@bibliothecadao/eternum";
import devManifest from "../contracts/manifest_dev.json";
import productionManifest from "../contracts/manifest_prod.json";

import { EternumConfig, EternumGlobalConfig, EternumProvider } from "@bibliothecadao/eternum";
import { CapacityConfigCategory, EternumConfig, EternumGlobalConfig, EternumProvider } from "@bibliothecadao/eternum";
import { Account } from "starknet";
import { MAX_QUEST_RESOURCES } from "./speed";

if (
!process.env.VITE_PUBLIC_MASTER_ADDRESS ||
Expand All @@ -13,8 +14,13 @@ if (
throw new Error("VITE_PUBLIC_MASTER_ADDRESS is required");
}

const { VITE_PUBLIC_MASTER_ADDRESS, VITE_PUBLIC_MASTER_PRIVATE_KEY, VITE_PUBLIC_DEV, VITE_PUBLIC_NODE_URL } =
process.env;
const {
VITE_PUBLIC_MASTER_ADDRESS,
VITE_PUBLIC_MASTER_PRIVATE_KEY,
VITE_PUBLIC_DEV,
VITE_PUBLIC_NODE_URL,
VITE_PUBLIC_CHAIN,
} = process.env;

const manifest = VITE_PUBLIC_DEV === "true" ? devManifest : productionManifest;

Expand All @@ -38,14 +44,19 @@ console.log("Account set up");
const account = new Account(provider.provider, VITE_PUBLIC_MASTER_ADDRESS, VITE_PUBLIC_MASTER_PRIVATE_KEY);

const setupConfig: Config =
VITE_PUBLIC_DEV === "true"
VITE_PUBLIC_DEV === "true" || VITE_PUBLIC_CHAIN === "sepolia"
? {
...EternumGlobalConfig,
questResources: MAX_QUEST_RESOURCES as typeof EternumGlobalConfig.questResources,
stamina: {
...EternumGlobalConfig.stamina,
travelCost: 0,
exploreCost: 0,
},
carryCapacityGram: {
...EternumGlobalConfig.carryCapacityGram,
[CapacityConfigCategory.Storehouse]: 300_000_000_000,
},
battle: {
graceTickCount: 0,
graceTickCountHyp: 0,
Expand Down
11 changes: 11 additions & 0 deletions config/speed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { QUEST_RESOURCES } from "@bibliothecadao/eternum";

export const MAX_QUEST_RESOURCES = Object.fromEntries(
Object.entries(QUEST_RESOURCES).map(([questType, resources]) => [
questType,
resources.map((resource) => ({
resource: resource.resource,
amount: resource.amount * 100000,
})),
]),
);
Loading

0 comments on commit 25397d8

Please sign in to comment.