mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-01-14 00:30:53 +00:00
c7b18af7cd
One with the real Groth16 verifier, and one with a dummy verifier used for testing.
25 lines
734 B
JavaScript
25 lines
734 B
JavaScript
const { loadVerificationKey } = require("../verifier/verifier.js")
|
|
|
|
async function deployVerifier({ deployments, getNamedAccounts }) {
|
|
const { deployer } = await getNamedAccounts()
|
|
const verificationKey = loadVerificationKey(network.name)
|
|
await deployments.deploy("Groth16Verifier", {
|
|
args: [verificationKey],
|
|
from: deployer,
|
|
})
|
|
}
|
|
|
|
async function deployTestVerifier({ network, deployments, getNamedAccounts }) {
|
|
if (network.tags.local) {
|
|
const { deployer } = await getNamedAccounts()
|
|
await deployments.deploy("TestVerifier", { from: deployer })
|
|
}
|
|
}
|
|
|
|
module.exports = async (environment) => {
|
|
await deployVerifier(environment)
|
|
await deployTestVerifier(environment)
|
|
}
|
|
|
|
module.exports.tags = ["Verifier"]
|