Skip to content

Commit

Permalink
flip the arguments for fflonk
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Aug 17, 2023
1 parent 20ebe64 commit ece6bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions snarkjs-generate-solidity/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ async function getCurveFromName(name) {
}


async function groth16SolidityVerifier(verificationKey, _logger) {
async function groth16SolidityVerifier(verificationKey, logger) {
const template = await fs__default["default"].promises.readFile(path__default["default"].join(__dirname, "templates", "verifier_groth16.sol.ejs"), "utf8");
return ejs__default["default"].render(template, verificationKey);
}

async function plonkSolidityVerifier(verificationKey, _logger) {
async function plonkSolidityVerifier(verificationKey, logger) {
const template = await fs__default["default"].promises.readFile(path__default["default"].join(__dirname, "templates", "verifier_plonk.sol.ejs"), "utf8");
return ejs__default["default"].render(template, verificationKey);
}
Expand Down Expand Up @@ -95,7 +95,7 @@ function p256(n) {
return nstr;
}

async function groth16SolidityCallData(_proof, _pub) {
async function groth16SolidityCallData(_proof, _pub, logger) {
const proof = unstringifyBigInts(_proof);
const pub = unstringifyBigInts(_pub);

Expand All @@ -114,7 +114,7 @@ async function groth16SolidityCallData(_proof, _pub) {
return S;
}

async function plonkSolidityCallData(_proof, _pub) {
async function plonkSolidityCallData(_proof, _pub, logger) {
const proof = unstringifyBigInts(_proof);
const pub = unstringifyBigInts(_pub);

Expand Down Expand Up @@ -142,7 +142,7 @@ async function plonkSolidityCallData(_proof, _pub) {
`[${inputs}]`;
}

async function fflonkSolidityCallData(_pub, _proof) {
async function fflonkSolidityCallData(_proof, _pub, logger) {
const proof = unstringifyBigInts(_proof);
const pub = unstringifyBigInts(_pub);

Expand Down
2 changes: 1 addition & 1 deletion snarkjs-generate-solidity/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function plonkSolidityCallData(_proof, _pub, logger) {
`[${inputs}]`;
}

async function fflonkSolidityCallData(_pub, _proof, logger) {
async function fflonkSolidityCallData(_proof, _pub, logger) {
const proof = unstringifyBigInts(_proof);
const pub = unstringifyBigInts(_pub);

Expand Down

0 comments on commit ece6bc4

Please sign in to comment.