Skip to content

Commit

Permalink
chore: use env rpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
marthendalnunes committed Apr 16, 2024
1 parent 208fb1f commit 6839405
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions apps/website/app/(general)/pending-withdrawals/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { env } from "@/env.mjs"
import { createPublicClient, http } from "viem"
import {
base,
Expand All @@ -13,42 +14,30 @@ import { publicActionsL1, publicActionsL2 } from "viem/op-stack"

export const mainnetPublicClient = createPublicClient({
chain: mainnet,
transport: http(
"https://eth-mainnet.g.alchemy.com/v2/imurRzka-9M0AUppaAAFZx7QVv3pqMNU"
),
transport: http(env.NEXT_PUBLIC_MAINNET_RPC),
}).extend(publicActionsL1())
export const sepoliaPublicClient = createPublicClient({
chain: sepolia,
transport: http(
"https://eth-sepolia.g.alchemy.com/v2/Mu9SzE6925AGVSMdGyRS3X2wQNRXyQME"
),
transport: http(env.NEXT_PUBLIC_SEPOLIA_RPC),
}).extend(publicActionsL1())

// L2 Public Clients

export const optimismPublicClient = createPublicClient({
chain: optimism,
transport: http(
"https://opt-mainnet.g.alchemy.com/v2/AxNqYtzVHrAzXLjZHuNGty2zLYaPMJh7"
),
transport: http(env.NEXT_PUBLIC_OPTIMISM_RPC),
}).extend(publicActionsL2())
export const basePublicClient = createPublicClient({
chain: base,
transport: http(
"https://base-mainnet.g.alchemy.com/v2/q1PUZ7dQsmOFrQIbf4YDwivcEeNAT_vR"
),
transport: http(env.NEXT_PUBLIC_BASE_RPC),
}).extend(publicActionsL2())
export const optimismSepoliaPublicClient = createPublicClient({
chain: optimismSepolia,
transport: http(
"https://opt-sepolia.g.alchemy.com/v2/XDl5n49_YWGzzrxIeiNGOznM_JNpy4l4"
),
transport: http(env.NEXT_PUBLIC_OPTIMISM_SEPOLIA_RPC),
}).extend(publicActionsL2())
export const baseSepoliaPublicClient = createPublicClient({
chain: baseSepolia,
transport: http(
"https://base-sepolia.g.alchemy.com/v2/80Rxv3F3Vxcxdik8QVAbxWpmR4BZwStv"
),
transport: http(env.NEXT_PUBLIC_BASE_SEPOLIA_RPC),
}).extend(publicActionsL2())

export function getPublicClients({ l2ChainId }: { l2ChainId: number }) {
Expand Down

0 comments on commit 6839405

Please sign in to comment.