diff --git a/packages/api/src/root.ts b/packages/api/src/root.ts index de13958b..ee1842b4 100644 --- a/packages/api/src/root.ts +++ b/packages/api/src/root.ts @@ -20,8 +20,7 @@ export function appRouter( createInviteLink: (seal: string) => string, dataSealPass: string, isLocalDev: boolean, - infuraKey: string, - quickNodeKey: string, + alchemyKey: string, ) { const mailApi = initMailApi(mailApiKey); const sendInvite = createSendInvite( @@ -41,8 +40,7 @@ export function appRouter( environments: environmentsRouter(store), deployments: deploymentsRouter(store), providers: providersRouter(isLocalDev, { - infura: infuraKey, - quickNode: quickNodeKey, + alchemy: alchemyKey, }), users: usersRouter(store), }); diff --git a/packages/chains/src/index.ts b/packages/chains/src/index.ts index 637e572e..93df33d0 100644 --- a/packages/chains/src/index.ts +++ b/packages/chains/src/index.ts @@ -1,6 +1,5 @@ import { configureChains } from "@wagmi/core"; -import { infuraProvider } from "@wagmi/core/providers/infura"; -import { jsonRpcProvider } from "@wagmi/core/providers/jsonRpc"; +import { alchemyProvider } from "@wagmi/core/providers/alchemy"; import { publicProvider } from "@wagmi/core/providers/public"; import { defineChain } from "viem"; import { @@ -21,8 +20,7 @@ import { } from "viem/chains"; export interface ApiKeys { - infura?: string; - quickNode?: string; + alchemy?: string; } // Note: copied from viem@2.9.22 @@ -78,22 +76,10 @@ function supportedChains(isLocalDev = false) { } function configuredChains(isLocalDev = false, apiKeys?: ApiKeys) { - const infuraKey = apiKeys?.infura ?? ""; - const quickNodeKey = apiKeys?.quickNode ?? ""; + const alchemyKey = apiKeys?.alchemy ?? ""; return configureChains(supportedChains(isLocalDev), [ - infuraProvider({ apiKey: infuraKey }), - jsonRpcProvider({ - rpc: (chain) => { - let slug = "breakit"; - if (chain.id === arbitrumNova.id) { - slug = "nova-mainnet"; - } - return { - http: `https://skilled-yolo-mountain.${slug}.quiknode.pro/${quickNodeKey}/`, - }; - }, - }), + alchemyProvider({ apiKey: alchemyKey }), publicProvider(), ]); } diff --git a/packages/cli/.env.example b/packages/cli/.env.example index 542711a1..c729b57e 100644 --- a/packages/cli/.env.example +++ b/packages/cli/.env.example @@ -6,5 +6,4 @@ SESSION_COOKIE_NAME="STUDIO_SESSION" SESSION_COOKIE_PASS="secure password secure password secure password secure password secure password secure password secure password" DATA_SEAL_PASS="secure password secure password secure password secure password secure password secure password secure password" POSTMARK_API_KEY=fillme(optional) -NEXT_PUBLIC_API_ROUTER_INFURA_KEY="api key" -NEXT_PUBLIC_API_ROUTER_QUICK_NODE_KEY="api key" \ No newline at end of file +NEXT_PUBLIC_API_ROUTER_ALCHEMY_KEY="api key" \ No newline at end of file diff --git a/packages/cli/test/setup.ts b/packages/cli/test/setup.ts index 80d4853f..b4438549 100644 --- a/packages/cli/test/setup.ts +++ b/packages/cli/test/setup.ts @@ -171,7 +171,6 @@ async function startStudioApi({ store }: { store: Store }) { process.env.DATA_SEAL_PASS!, true, "", - "", ); // Create a local server to receive data from diff --git a/packages/web/components/wagmi-provider.tsx b/packages/web/components/wagmi-provider.tsx index b95dd4c4..b8e693f6 100644 --- a/packages/web/components/wagmi-provider.tsx +++ b/packages/web/components/wagmi-provider.tsx @@ -9,8 +9,7 @@ const { chains, publicClient, webSocketPublicClient } = configuredChains( (window.location?.hostname === "localhost" || window.location?.hostname === "127.0.0.1"), { - infura: process.env.NEXT_PUBLIC_API_ROUTER_INFURA_KEY ?? "", - quickNode: process.env.NEXT_PUBLIC_API_ROUTER_QUICK_NODE_KEY ?? "", + alchemy: process.env.NEXT_PUBLIC_API_ROUTER_ALCHEMY_KEY ?? "", }, ); diff --git a/packages/web/lib/api-router.ts b/packages/web/lib/api-router.ts index 5b26ffef..ca7eccb2 100644 --- a/packages/web/lib/api-router.ts +++ b/packages/web/lib/api-router.ts @@ -11,6 +11,5 @@ export const apiRouter = appRouter( (seal) => `${baseUrl}/invite?seal=${seal}`, process.env.DATA_SEAL_PASS!, process.env.NODE_ENV === "development", - process.env.NEXT_PUBLIC_API_ROUTER_INFURA_KEY ?? "", - process.env.NEXT_PUBLIC_API_ROUTER_QUICK_NODE_KEY ?? "", + process.env.NEXT_PUBLIC_API_ROUTER_ALCHEMY_KEY ?? "", );