The bqTest Object
The bqSDK is centered around the bqTest object. You can import it at the top of your file by doing:
This can be used in two different ways:
Reading mode: to just retrieve the on-chain data that defines a test.
Solving mode: extending on the reading mode usability, it also allows you to grade solutions, generate and verify the corresponding proofs, and post solving transactions.
The examples provided here have been done using deployed contracts on the Mumbai testnet. An exam has already been created on TestCreator.sol, with the following characteristics:
testType = 50, meaning it is a mixed test where the multiple choice component accounts for 50% of the grade.
nQuestions = 64, meaning the open answer component of this mixed test consists of 64 questions.
minimumGrade = 1, so to obtain this credential we only need to get 1/100 on the test.
credentialLimit = 0, there is no limit to the number of credentials that can be minted.
timeLimit = 0, there is no limit in time to solve the test and obtain the credential.
solvingHashes = [104. . .053, 102. . .551], which represent the roots of the multiple choice answer tree and the open answer tree. These are the result of setting every multiple choice answer to A (which means, using a value of 1), and every open answer to deenz.
requiredPass = 0x000. . .000, so there is no NFT holding requirement to obtain the test.
credentialsGained = Test Credential
testURI = https://twitter.com/0xdeenz
You can learn more about how the Test object is defined internally by referring to the Block Qualified tests section.
Last updated