mirror of
https://github.com/penxio/penx.git
synced 2026-04-19 03:03:06 -04:00
12 lines
354 B
TypeScript
12 lines
354 B
TypeScript
import { NetworkNames } from '@/lib/constants'
|
|
import { createPublicClient, http } from 'viem'
|
|
import { base, baseSepolia } from 'viem/chains'
|
|
|
|
export function getBasePublicClient(network: string) {
|
|
const baseClient = createPublicClient({
|
|
chain: network === NetworkNames.BASE ? base : baseSepolia,
|
|
transport: http(),
|
|
})
|
|
return baseClient
|
|
}
|