# Remix Challenge for ETHIndia ### Remix Challenge is an onchain quiz that uses a Zero Knowledge (ZK) Proof. People submitting answers won't reveal their solutions. ## Challenge Questions 1. What is the name of the plugin that allows Git operations in Remix Online IDE? 1. Fill in the blanks for the NatSpec tag to attach a script with a contract compilation in Remix IDE: `@_ _ _ _ _ _:dev-run-script` (**Hint**: It is a 6-letter word with two vowels) 3. What is the name of the workspace in Remix IDE when you connect a project using `remixd`? 4. What is the traditional name of the city in India known as the “Garden City of India” or the “Silicon Valley of India”? (**Hint**: It is a 9-letter word and 7th and 9th letter are the same) ## Steps to complete the challenge - Clone this repo in Remix IDE: https://github.com/yann300/remix-challenges - Open the file `./src/script/compute.ts` - Go to the **line 52**, and update the `nullifier` to some random value - In **lines 54-57**, put the answers to the four questions we have listed above. Answer values are NOT case-sensitive. Put them within the quotes e.g; *normalize("answer1")* - Run the script as explained during the workshop - If the program executes correctly, you have **successfully** found the 4 answers. In Remix's terminal, you'll see log of a proof. The script will save this proof in a file named `generated/proof.json` - If you have not answered the questions correctly, the proof will NOT be generated - This proof can be used in a verifier to prove that you have found the 4 values. Everyone can be certain that you know these values, without knowing the values themselves. That's why it is called a zero knowledge proof. ## Mint your reward NFT **NOTE**: Only the first 50 people submitting the proof will be able to mint a reward badge * Go to the `Deploy and Run Transactions` plugin in Remix IDE * Select `L2 - Optimism Provider` in the environment. * Make sure you are connected to Optimism in your browser wallet (often MetaMask), and that you have enough ETH to pay for the minting (usually about 40 cents). If you don't have **Optimism ETH** on your address, put your address in the hackmd file below, and we will give you the required amount of **Optimism ETH** to mint your reward. https://bit.ly/RemixChallenge2 * Run the script `scripts/publish-solution.ts`. This will use the proof generated in the previous section `generated/proof.json` for calling the function `publishChallenge` in the Remix Rewards contract. * Once the solution has been published, head to https://rewards.remix.ethereum.eth.limo to see the limited edition ETHIndia NFT badge. It will look like this: ![](https://i.imgur.com/OoIag9y.png)