diff --git a/apps/api/src/common/config/index.ts b/apps/api/src/common/config/index.ts index 4484c62..dd5592b 100644 --- a/apps/api/src/common/config/index.ts +++ b/apps/api/src/common/config/index.ts @@ -1,13 +1,6 @@ import dotenv from "dotenv"; import { Address } from "viem"; -import { - localhost, - mainnet, - sepolia, - zksync, - zksyncLocalNode, - zksyncSepoliaTestnet, -} from "viem/chains"; +import { localhost, mainnet, sepolia } from "viem/chains"; import { MetadataConfig } from "@zkchainhub/metadata"; import { PricingConfig } from "@zkchainhub/pricing"; @@ -77,17 +70,6 @@ const getChain = (environment: "mainnet" | "testnet" | "local") => { } }; -const getL2Chain = (environment: "mainnet" | "testnet" | "local") => { - switch (environment) { - case "mainnet": - return zksync; - case "testnet": - return zksyncSepoliaTestnet; - case "local": - return zksyncLocalNode; - } -}; - export const config = { port: envData.PORT, environment: envData.ENVIRONMENT, @@ -96,13 +78,6 @@ export const config = { rpcUrls: envData.L1_RPC_URLS, chain: getChain(envData.ENVIRONMENT), }, - l2: - envData.L2_RPC_URLS.length > 0 - ? { - rpcUrls: envData.L2_RPC_URLS, - chain: getL2Chain(envData.ENVIRONMENT), - } - : undefined, bridgeHubAddress: envData.BRIDGE_HUB_ADDRESS as Address, sharedBridgeAddress: envData.SHARED_BRIDGE_ADDRESS as Address, stateTransitionManagerAddresses: envData.STATE_MANAGER_ADDRESSES as Address[], diff --git a/apps/api/src/common/config/schemas.ts b/apps/api/src/common/config/schemas.ts index 6d036b3..96d640b 100644 --- a/apps/api/src/common/config/schemas.ts +++ b/apps/api/src/common/config/schemas.ts @@ -25,13 +25,6 @@ const baseSchema = z.object({ STATE_MANAGER_ADDRESSES: addressArraySchema, ENVIRONMENT: z.enum(["mainnet", "testnet", "local"]).default("mainnet"), L1_RPC_URLS: urlArraySchema, - L2_RPC_URLS: z - .union([z.literal(""), urlArraySchema]) - .optional() - .transform((val) => { - if (val === undefined || val === "") return []; - return val; - }), PRICING_SOURCE: z.enum(["dummy", "coingecko"]).default("dummy"), DUMMY_PRICE: z.coerce.number().optional(), COINGECKO_API_KEY: z.string().optional(),