diff --git a/apps/api/.env.example b/apps/api/.env.example index 64e4a65..4826b94 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -7,7 +7,8 @@ SHARED_BRIDGE_ADDRESS="" STATE_MANAGER_ADDRESSES="" #CSV list of State managers addresses L1_RPC_URLS="" #CSV list of L1 RPC URLs -L2_RPC_URLS="" #CSV list of L2 RPC URLs +# map from chain id to CSV list of L2 RPC URLs +L2_RPC_URLS_MAP={} PRICING_SOURCE="dummy" # Pricing source: 'dummy' | 'coingecko' diff --git a/apps/api/README.md b/apps/api/README.md index 78f95e0..097b7f1 100644 --- a/apps/api/README.md +++ b/apps/api/README.md @@ -39,6 +39,7 @@ Available options: | `SHARED_BRIDGE_ADDRESS` | Shared Bridge address | N/A | Yes | | | `STATE_MANAGER_ADDRESSES` | CSV list of State manager addresses | N/A | Yes | | | `L1_RPC_URLS` | CSV list of RPC URLs. For example, `https://eth.llamarpc.com,https://rpc.flashbots.net/fast` | N/A | Yes | You can check [Chainlist](https://chainlist.org/) for a list of public RPCs | +| `L2_RPC_URLS_MAP` | JSON from chain id to CSV list of L2 RPC URLs. For example, {"324":"https://mainnet.era.zksync.io,https://zksync.drpc.org"} | N/A | No | You can check [Chainlist](https://chainlist.org/) for a list of public RPCs | | `PRICING_SOURCE` | Pricing source to use (`'dummy'`, `'coingecko'`) | 'dummy' | No | | | `DUMMY_PRICE` | Price for dummy pricing source | undefined | No | Only applicable if `PRICING_SOURCE` is `'dummy'` | | `COINGECKO_API_KEY` | API key for CoinGecko | N/A | If `'coingecko'` is selected | You can get an API key by creating an account on [CoinGecko's site](https://www.coingecko.com/en/api) | diff --git a/apps/api/vitest.config.ts b/apps/api/vitest.config.ts index 3aa3262..7568b88 100644 --- a/apps/api/vitest.config.ts +++ b/apps/api/vitest.config.ts @@ -1,5 +1,5 @@ import path from "path"; -import { defineConfig } from "vitest/config"; +import { configDefaults, defineConfig } from "vitest/config"; export default defineConfig({ test: { @@ -10,7 +10,13 @@ export default defineConfig({ coverage: { provider: "v8", reporter: ["text", "json", "html"], // Coverage reporters - exclude: ["node_modules", "dist"], // Files to exclude from coverage + exclude: [ + "node_modules", + "dist", + "src/api-docs", + "src/index.ts", + ...configDefaults.exclude, + ], // Files to exclude from coverage }, }, resolve: {