mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-04-28 03:00:41 -04:00
16 lines
378 B
TypeScript
16 lines
378 B
TypeScript
import { readFileSync } from "fs"
|
|
|
|
export type DeployedContracts = {
|
|
Poseidon: string
|
|
Semaphore: string
|
|
Verifier: string
|
|
}
|
|
|
|
export function getDeployedContracts(network: string | undefined): DeployedContracts | null {
|
|
try {
|
|
return JSON.parse(readFileSync(`./deployed-contracts/${network}.json`, "utf8"))
|
|
} catch (error) {
|
|
return null
|
|
}
|
|
}
|