You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a lot of trouble discovering how to generate parameters to pass to an ethersjs contract function. It's possible that I've gone in the wrong direction, but I wanted to document the steps I took and the suggestions I have.
First, the unstringifyBigInts function is necessary & can be imported as follows:
This all took a while for me to put together. A function like snarkjs.plonk.generateSolidityParams(proof, publicSignals) which formats the proof and publicSignals for web3 / ethers would be very useful for people new to snarkjs.
Hopefully this helps someone!
The text was updated successfully, but these errors were encountered:
I had a lot of trouble discovering how to generate parameters to pass to an ethersjs contract function. It's possible that I've gone in the wrong direction, but I wanted to document the steps I took and the suggestions I have.
First, the
unstringifyBigInts
function is necessary & can be imported as follows:Next, here is the code I've used to submit a
verifyProof
call. Note thatverifierContract
is an instance of an ethersjs contract.This all took a while for me to put together. A function like
snarkjs.plonk.generateSolidityParams(proof, publicSignals)
which formats theproof
andpublicSignals
for web3 / ethers would be very useful for people new to snarkjs.Hopefully this helps someone!
The text was updated successfully, but these errors were encountered: