mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-04-28 03:00:41 -04:00
11 lines
387 B
JavaScript
11 lines
387 B
JavaScript
import Mustache from "mustache"
|
|
import { readFileSync, writeFileSync } from "fs"
|
|
|
|
const network = process.argv.at(2)
|
|
|
|
const template = readFileSync("./subgraph.template.yaml", "utf-8")
|
|
const networks = JSON.parse(readFileSync("./networks.json", "utf-8"))
|
|
const subgraph = Mustache.render(template, { network, ...networks[network].Semaphore })
|
|
|
|
writeFileSync("./subgraph.yaml", subgraph)
|