Sending a solution transaction

Generating a solving proof for an already defined bqTest in solve mode (solveModeTest) proves that you know a certain solution. You will need the smart contract to verify whether this solution is valid, and grant you the credential if so. You can send a solution transaction by doing:

await solveModeTest.sendSolutionTransaction( 
    signer,
    proof
)

Where proof is the result of generating a proof, and signer is a valid ethers.Signer, which corresponds to the account that will send the solving transaction.

Note that the account that sends the solving transaction is not necessarily the account that receives the credential. The recipient of the credential, also known as the solver, is embedded in the proof itself. This means that anyone can post someone else's proof without risk of cheating, allowing for transaction relaying to be built on top.

Last updated