Skip to content

Commit

Permalink
Merge pull request #79 from NilFoundation/77-deploy-fails-if-gate-lib…
Browse files Browse the repository at this point in the history
…s-list

77 deploy fails if gate libs list
  • Loading branch information
ETatuzova authored Oct 11, 2023
2 parents 4758b8c + c8f76b8 commit cbeb5e2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions deploy/modular-verifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ module.exports = async function() {
});

let deployedLib = {}
let libs = losslessJSON.parse(fs.readFileSync("./contracts/zkllvm/"+circuits[k]+"/gate_libs_list.json", 'utf8'));
for (let lib of libs){
await deploy(lib, {
from: deployer,
log: true,
});
deployedLib[lib] = (await hre.deployments.get(lib)).address
if( fs.existsSync("./contracts/zkllvm/"+circuits[k]+"/gate_libs_list.json")) {
let libs = losslessJSON.parse(fs.readFileSync("./contracts/zkllvm/"+circuits[k]+"/gate_libs_list.json", 'utf8'));
for (let lib of libs){
await deploy(lib, {
from: deployer,
log: true,
});
deployedLib[lib] = (await hre.deployments.get(lib)).address
}
}
gate_argument_contract = await deploy("modular_gate_argument_" + circuits[k], {
from: deployer,
Expand Down

0 comments on commit cbeb5e2

Please sign in to comment.