diff --git a/client/src/hooks/useSeasonStart.tsx b/client/src/hooks/useSeasonStart.tsx index 6ea2e3eda..f20c8f2a6 100644 --- a/client/src/hooks/useSeasonStart.tsx +++ b/client/src/hooks/useSeasonStart.tsx @@ -1,8 +1,8 @@ -//import { configManager } from "@/dojo/setup"; +import { configManager } from "@/dojo/setup"; import { useMemo, useState } from "react"; export const useSeasonStart = () => { - const seasonStart = BigInt(new Date("2024-12-11T15:35:00Z").getTime() / 1000);/*useMemo(() => BigInt(configManager.getSeasonConfig().startAt || 0), []);*/ + const seasonStart = useMemo(() => BigInt(configManager.getSeasonConfig().startAt || 0), []); const nextBlockTimestamp = useMemo(() => BigInt(Math.floor(Date.now() / 1000)), []); const [countdown, setCountdown] = useState(0n); diff --git a/config/index.ts b/config/index.ts index 38e416815..3455cba6f 100644 --- a/config/index.ts +++ b/config/index.ts @@ -1,17 +1,15 @@ import type { Config } from "@bibliothecadao/eternum"; import devManifest from "../contracts/manifest_dev.json"; -import productionManifest from "../contracts/manifest_prod.json"; +import productionManifest from "../contracts/manifest_mainnet.json"; import { - CapacityConfigCategory, EternumConfig, EternumGlobalConfig, EternumProvider, getContractByName, - NAMESPACE, + NAMESPACE } from "@bibliothecadao/eternum"; import { Account } from "starknet"; -import { MAX_QUEST_RESOURCES } from "./speed"; if ( !process.env.VITE_PUBLIC_MASTER_ADDRESS || @@ -51,68 +49,7 @@ const provider = new EternumProvider(manifest, nodeUrl, VITE_VRF_PROVIDER_ADDRES 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_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, - delaySeconds: 0, - }, - - // increase the probability of failure for shards mines - exploration: { - ...EternumGlobalConfig.exploration, - shardsMinesFailProbability: 10000, - }, - - // bridge fees to multi in dev mode - bridge: { - ...EternumGlobalConfig.bridge, - velords_fee_recipient: BigInt(VITE_PUBLIC_MASTER_ADDRESS), - season_pool_fee_recipient: BigInt(getContractByName(manifest, `${NAMESPACE}-season_systems`)), // Season System holds the Lords... - }, - - // make it easier to build hyperstructures in dev mode - hyperstructures: { - ...EternumGlobalConfig.hyperstructures, - hyperstructurePointsForWin: 100_000, - // hyperstructureTotalCosts: [ - // ...EternumGlobalConfig.hyperstructures.hyperstructureTotalCosts.map((cost) => ({ - // resource_tier: cost.resource_tier, - // min_amount: Math.floor(Math.random() * 4) + 1, - // max_amount: Math.floor(Math.random() * 10) + 5, - // })), - // { - // resource_tier: ResourceTier.Lords, - // min_amount: 3, - // max_amount: 3, - // }, - // { - // resource_tier: ResourceTier.Food, - // min_amount: 0, - // max_amount: 0, - // }, - // { - // resource_tier: ResourceTier.Military, - // min_amount: 0, - // max_amount: 0, - // }, - // ], - }, - } - : EternumGlobalConfig; +const setupConfig: Config = EternumGlobalConfig; // const setupConfig: Config = EternumGlobalConfig; @@ -124,11 +61,12 @@ setupConfig.vrf.vrfProviderAddress = VITE_VRF_PROVIDER_ADDRESS!; velords_fee_recipient: BigInt("0x045c587318c9ebcf2fbe21febf288ee2e3597a21cd48676005a5770a50d433c5"), // burner season_pool_fee_recipient: BigInt(getContractByName(manifest, `${NAMESPACE}-season_systems`)), }), + // Season Pass (setupConfig.season = { ...EternumGlobalConfig.season, - startAfterSeconds: 60 * 10, // 10 minutes - bridgeCloseAfterEndSeconds: 60 * 60 * 1, // 2 hours + startAfterSeconds: 60 * 60, // 60 minutes + // bridgeCloseAfterEndSeconds: 60 * 60 * 1, // 2 hours seasonPassAddress: process.env.VITE_SEASON_PASS_ADDRESS!, realmsAddress: process.env.VITE_REALMS_ADDRESS!, lordsAddress: process.env.VITE_LORDS_ADDRESS!, diff --git a/contracts/manifest_mainnet.json b/contracts/manifest_mainnet.json index a9fc2ed14..087fa55df 100644 --- a/contracts/manifest_mainnet.json +++ b/contracts/manifest_mainnet.json @@ -1482,7 +1482,7 @@ }, { "address": "0x4ed3a7c5f53c6e96186eaf1b670bd2e2a3699c08e070aedf4e5fc6ac246ddc1", - "class_hash": "0x201104f5060cf70aada2986e9569d578251884db4208862b88aa48bf491eed1", + "class_hash": "0x1d705daa1501a2647e6e051aceaff470486f0d803d528461d8a23c27265072", "abi": [ { "type": "impl", @@ -1686,7 +1686,7 @@ }, { "address": "0x2620f65aa2fd72d705306ada1ee7410023a3df03da9291f1ccb744fabfebc0", - "class_hash": "0x40e7660b0e34f56e08bbdf7573bc55eb94f9d88e580f76890c136f418aa60bd", + "class_hash": "0x6212c2b9ed24053620aa93e85707a364870d5ab5696a164233d5f46efd412b6", "abi": [ { "type": "impl", @@ -2775,7 +2775,7 @@ }, { "address": "0x421446d51cac1e926cb1a2b00ae318b52df71beb737159d5c1d7061030758cf", - "class_hash": "0x2a1623aa93f362b754f5c9dc9c592ef42bf820498ba120b256002463aa89292", + "class_hash": "0x682236180454ea85548145c9c75a1db98361212b8320a4dad0757066ee4ead6", "abi": [ { "type": "impl", diff --git a/landing/src/components/modules/season-start-timer.tsx b/landing/src/components/modules/season-start-timer.tsx index 24846921f..942eb25e3 100644 --- a/landing/src/components/modules/season-start-timer.tsx +++ b/landing/src/components/modules/season-start-timer.tsx @@ -10,7 +10,7 @@ export const SeasonStartTimer = () => { return (
- {"<"} {String(hours).padStart(2, "0")}:{String(minutes).padStart(2, "0")}:{String(seconds).padStart(2, "0")} + {String(hours).padStart(2, "0")}:{String(minutes).padStart(2, "0")}:{String(seconds).padStart(2, "0")}
); }; diff --git a/landing/src/components/ui/elements/CountdownTimer.tsx b/landing/src/components/ui/elements/CountdownTimer.tsx index c05e176cd..f1ae81bae 100644 --- a/landing/src/components/ui/elements/CountdownTimer.tsx +++ b/landing/src/components/ui/elements/CountdownTimer.tsx @@ -22,7 +22,6 @@ export function CountdownTimer() { Eternum is Launching in
- {"<"} diff --git a/landing/src/hooks/use-season-start.tsx b/landing/src/hooks/use-season-start.tsx index cfe4a36b7..b49fbc8b7 100644 --- a/landing/src/hooks/use-season-start.tsx +++ b/landing/src/hooks/use-season-start.tsx @@ -1,9 +1,8 @@ +import { configManager } from "@/dojo/setup"; import { useEffect, useState } from "react"; export const useSeasonStart = () => { - const seasonStart = BigInt(new Date("2024-12-11T15:35:00Z").getTime() / 1000); - - /*BigInt(configManager.getSeasonConfig().startAt || 0);*/ + const seasonStart = BigInt(configManager.getSeasonConfig().startAt || 0); const nextBlockTimestamp = BigInt(Math.floor(Date.now() / 1000)); const [countdown, setCountdown] = useState(0n); diff --git a/sdk/packages/eternum/src/constants/global.ts b/sdk/packages/eternum/src/constants/global.ts index 6ee8d4d17..1faa01ef5 100644 --- a/sdk/packages/eternum/src/constants/global.ts +++ b/sdk/packages/eternum/src/constants/global.ts @@ -186,7 +186,7 @@ export const EternumGlobalConfig: Config = { carryCapacityGram: { [CapacityConfigCategory.None]: 0, [CapacityConfigCategory.Structure]: BigInt(2) ** BigInt(128) - BigInt(1), - [CapacityConfigCategory.Donkey]: 4_000_000, + [CapacityConfigCategory.Donkey]: 500_000, [CapacityConfigCategory.Army]: 10_000, [CapacityConfigCategory.Storehouse]: 300_000_000, }, diff --git a/sdk/packages/eternum/src/constants/quests.ts b/sdk/packages/eternum/src/constants/quests.ts index 768fd0012..1ff5c53db 100644 --- a/sdk/packages/eternum/src/constants/quests.ts +++ b/sdk/packages/eternum/src/constants/quests.ts @@ -42,7 +42,7 @@ export const QUEST_RESOURCES: { [key in QuestType]: ResourceCost[] } = { { resource: ResourcesIds.Mithral, amount: 5 }, { resource: ResourcesIds.Dragonhide, amount: 5 }, ], - [QuestType.BuildResource]: [{ resource: ResourcesIds.Donkey, amount: 0.025 }], + [QuestType.BuildResource]: [{ resource: ResourcesIds.Donkey, amount: 0.2 }], [QuestType.PauseProduction]: [ { resource: ResourcesIds.Knight, amount: 0.5 }, { resource: ResourcesIds.Crossbowman, amount: 0.5 }, @@ -53,10 +53,10 @@ export const QUEST_RESOURCES: { [key in QuestType]: ResourceCost[] } = { { resource: ResourcesIds.Paladin, amount: 0.5 }, { resource: ResourcesIds.Crossbowman, amount: 0.5 }, ], - [QuestType.CreateDefenseArmy]: [{ resource: ResourcesIds.Donkey, amount: 0.125 }], - [QuestType.Travel]: [{ resource: ResourcesIds.Donkey, amount: 0.025 }], + [QuestType.CreateDefenseArmy]: [{ resource: ResourcesIds.Donkey, amount: 1 }], + [QuestType.Travel]: [{ resource: ResourcesIds.Donkey, amount: 0.2 }], [QuestType.CreateTrade]: [ - { resource: ResourcesIds.Donkey, amount: 0.025 }, + { resource: ResourcesIds.Donkey, amount: 0.2 }, { resource: ResourcesIds.Paladin, amount: 1 }, { resource: ResourcesIds.Knight, amount: 1 }, { resource: ResourcesIds.Crossbowman, amount: 1 }, diff --git a/sdk/packages/eternum/src/constants/resources.ts b/sdk/packages/eternum/src/constants/resources.ts index 816634b0a..3d1984158 100644 --- a/sdk/packages/eternum/src/constants/resources.ts +++ b/sdk/packages/eternum/src/constants/resources.ts @@ -480,7 +480,7 @@ export const RESOURCE_OUTPUTS: ResourceOutputs = { [ResourcesIds.Adamantine]: 30, [ResourcesIds.Mithral]: 30, [ResourcesIds.Dragonhide]: 30, - [ResourcesIds.Donkey]: 0.01, + [ResourcesIds.Donkey]: 0.5, [ResourcesIds.Knight]: 0.04, [ResourcesIds.Crossbowman]: 0.04, [ResourcesIds.Paladin]: 0.04,