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

Fix/food labor #2664

Merged
merged 7 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 6 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
14 changes: 11 additions & 3 deletions config/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import type { Config, SeasonAddresses } from "@bibliothecadao/eternum";
import localSeasonAddresses from "../../contracts/common/addresses/local.json";
import mainnetSeasonAddresses from "../../contracts/common/addresses/mainnet.json";
import sepoliaSeasonAddresses from "../../contracts/common/addresses/sepolia.json";
import slotSeasonAddresses from "../../contracts/common/addresses/slot.json";

import localGameManifest from "../../contracts/game/manifest_local.json";
import mainnetGameManifest from "../../contracts/game/manifest_mainnet.json";
import sepoliaGameManifest from "../../contracts/game/manifest_sepolia.json";
import slotGameManifest from "../../contracts/game/manifest_slot.json";

import localConfig from "../environments/data/local.json";
import mainnetConfig from "../environments/data/mainnet.json";
import sepoliaConfig from "../environments/data/sepolia.json";
import slotConfig from "../environments/data/slot.json";

/** Valid chain identifiers */
export type Chain = "sepolia" | "mainnet" | "slot";
export type Chain = "sepolia" | "mainnet" | "slot" | "local";

/**
* Retrieves the season addresses for a specific chain
Expand All @@ -29,6 +31,8 @@ export function getSeasonAddresses(chain: Chain): SeasonAddresses {
return mainnetSeasonAddresses;
case "slot":
return slotSeasonAddresses;
case "local":
return localSeasonAddresses;
default:
throw new Error(`Invalid chain: ${chain}`);
}
Expand Down Expand Up @@ -60,6 +64,8 @@ export function getGameManifest(chain: Chain): GameManifest {
return mainnetGameManifest;
case "slot":
return slotGameManifest;
case "local":
return localGameManifest;
default:
throw new Error(`Invalid chain: ${chain}`);
}
Expand Down Expand Up @@ -92,7 +98,9 @@ export function getConfigFromNetwork(chain: Chain): Config {
case "mainnet":
return mainnetConfig.configuration;
case "slot":
return slotConfig.configuration;
return slotConfig.configuration ;
case "local":
return localConfig.configuration;
default:
throw new Error(`Invalid chain: ${chain}`);
}
Expand Down
1 change: 0 additions & 1 deletion contracts/game/dojo_local.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ website = "https://alpha-eternum.realms.world/"
"s1_eternum-production_systems",
"s1_eternum-config_systems",
"s1_eternum-dev_bank_systems",
"s1_eternum-dev_realm_systems",
"s1_eternum-dev_resource_systems",
"s1_eternum-donkey_systems",
"s1_eternum-guild_systems",
Expand Down
1 change: 0 additions & 1 deletion contracts/game/dojo_sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ website = "https://eternum.realms.world/"
"s1_eternum-production_systems",
"s1_eternum-config_systems",
"s1_eternum-dev_bank_systems",
"s1_eternum-dev_realm_systems",
"s1_eternum-dev_resource_systems",
"s1_eternum-donkey_systems",
"s1_eternum-guild_systems",
Expand Down
Loading
Loading