-
Notifications
You must be signed in to change notification settings - Fork 4
/
env.mjs
28 lines (27 loc) · 1.26 KB
/
env.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { createEnv } from "@t3-oss/env-nextjs"
import { z } from "zod"
export const env = createEnv({
client: {
NEXT_PUBLIC_API_EVENT_CACHE: z.string().url(),
NEXT_PUBLIC_MAINNET_RPC: z.string().url().optional(),
NEXT_PUBLIC_BASE_RPC: z.string().url().optional(),
NEXT_PUBLIC_OPTIMISM_RPC: z.string().url().optional(),
NEXT_PUBLIC_SEPOLIA_RPC: z.string().url().optional(),
NEXT_PUBLIC_BASE_SEPOLIA_RPC: z.string().url().optional(),
NEXT_PUBLIC_OPTIMISM_SEPOLIA_RPC: z.string().url().optional(),
NEXT_PUBLIC_PROJECT_ID: z.string().min(1),
NEXT_PUBLIC_ALCHEMY_API_KEY: z.string().min(1),
},
runtimeEnv: {
NEXT_PUBLIC_API_EVENT_CACHE: process.env.NEXT_PUBLIC_API_EVENT_CACHE,
NEXT_PUBLIC_MAINNET_RPC: process.env.NEXT_PUBLIC_MAINNET_RPC,
NEXT_PUBLIC_BASE_RPC: process.env.NEXT_PUBLIC_BASE_RPC,
NEXT_PUBLIC_OPTIMISM_RPC: process.env.NEXT_PUBLIC_OPTIMISM_RPC,
NEXT_PUBLIC_SEPOLIA_RPC: process.env.NEXT_PUBLIC_SEPOLIA_RPC,
NEXT_PUBLIC_BASE_SEPOLIA_RPC: process.env.NEXT_PUBLIC_BASE_SEPOLIA_RPC,
NEXT_PUBLIC_OPTIMISM_SEPOLIA_RPC:
process.env.NEXT_PUBLIC_OPTIMISM_SEPOLIA_RPC,
NEXT_PUBLIC_PROJECT_ID: process.env.NEXT_PUBLIC_PROJECT_ID,
NEXT_PUBLIC_ALCHEMY_API_KEY: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY,
},
})