mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-01-09 14:48:12 -05:00
@@ -21,6 +21,7 @@ async function exec(command: string) {
|
||||
|
||||
async function main() {
|
||||
const buildPath = config.paths.build.snark
|
||||
const templatesPath = config.paths["snarkjs-templates"]
|
||||
const solidityVersion = config.solidity.version
|
||||
|
||||
if (!fs.existsSync(buildPath)) {
|
||||
@@ -53,7 +54,7 @@ async function main() {
|
||||
|
||||
let verifierCode = await zKey.exportSolidityVerifier(
|
||||
`${buildPath}/semaphore_final.zkey`,
|
||||
{ groth16: fs.readFileSync("./node_modules/snarkjs/templates/verifier_groth16.sol.ejs", "utf8") },
|
||||
{ groth16: fs.readFileSync(`${templatesPath}/verifier_groth16.sol.ejs`, "utf8") },
|
||||
logger
|
||||
)
|
||||
verifierCode = verifierCode.replace(/pragma solidity \^\d+\.\d+\.\d+/, `pragma solidity ^${solidityVersion}`)
|
||||
|
||||
Reference in New Issue
Block a user