Skip to content

Commit 3e84355

Browse files
committed
adapt readme to changes for grader
1 parent 188454b commit 3e84355

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ Our contract will support three main functions:
161161
🔍 Open it up and check out the placeholder functions. Each of them represents a key piece of the voting logic.
162162
If you can already explain what they’re supposed to do, you’re ahead of the game! 😎
163163

164+
💡 The `Verifier.sol` contract is currently just a placeholder and will be replaced with the actual implementation later.
165+
164166
But this time you won’t just be working on the smart contract **🙂**
165167

166168
### **🥅 Goals**
@@ -943,7 +945,7 @@ You’ve built the circuit, created the verifier contract — now it’s time to
943945

944946
### 🔹 Step 1: Bring in the Verifier Contract
945947

946-
1. Copy your verifier contract into **`packages/hardhat/contracts`**.
948+
1. Replace the placeholder verifier contract **`Verifier.sol`** in **`packages/hardhat/contracts`** with the newly generated contract located in **`packages/circuits/target`**.
947949
2. Open **`00_deploy_your_voting_contract.ts`** and:
948950
- Uncomment the verifier deployment
949951
- Comment out the `verifierAddress`
@@ -982,8 +984,6 @@ That’s why **nullifiers are the cornerstone** of privacy-preserving voting.
982984
- Increment `s_yesVotes` or `s_noVotes` accordingly
983985
- Emit the `VoteCast` event
984986

985-
> 🚨⚠️ Go to packages/hardhat/contracts/mocks and uncomment all the code. This enables the mock contracts needed for local testing and verification.
986-
987987
<details>
988988
<summary>🦉 Guiding Questions</summary>
989989

@@ -1714,8 +1714,8 @@ const voteOnSepolia = async ({
17141714
functionName: "vote",
17151715
args: [
17161716
toHex(proofData.proof),
1717-
proofData.publicInputs[0], // _root
1718-
proofData.publicInputs[1], // _nullifierHash
1717+
proofData.publicInputs[0], // _nullifierHash
1718+
proofData.publicInputs[1], // _root
17191719
proofData.publicInputs[2], // _vote
17201720
proofData.publicInputs[3], // _depth
17211721
],

extension/README.md.args.mjs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ Our contract will support three main functions:
163163
🔍 Open it up and check out the placeholder functions. Each of them represents a key piece of the voting logic.
164164
If you can already explain what they’re supposed to do, you’re ahead of the game! 😎
165165
166+
💡 The \`Verifier.sol\` contract is currently just a placeholder and will be replaced with the actual implementation later.
167+
166168
But this time you won’t just be working on the smart contract **🙂**
167169
168170
### **🥅 Goals**
@@ -948,7 +950,7 @@ You’ve built the circuit, created the verifier contract — now it’s time to
948950
949951
### 🔹 Step 1: Bring in the Verifier Contract
950952
951-
1. Copy your verifier contract into **\`packages/hardhat/contracts\`**.
953+
1. Replace the placeholder verifier contract **\`Verifier.sol\`** in **\`packages/hardhat/contracts\`** with the newly generated contract located in **\`packages/circuits/target\`**.
952954
2. Open **\`00_deploy_your_voting_contract.ts\`** and:
953955
- Uncomment the verifier deployment
954956
- Comment out the \`verifierAddress\`
@@ -987,8 +989,6 @@ That’s why **nullifiers are the cornerstone** of privacy-preserving voting.
987989
- Increment \`s_yesVotes\` or \`s_noVotes\` accordingly
988990
- Emit the \`VoteCast\` event
989991
990-
> 🚨⚠️ Go to packages/hardhat/contracts/mocks and uncomment all the code. This enables the mock contracts needed for local testing and verification.
991-
992992
<details>
993993
<summary>🦉 Guiding Questions</summary>
994994
@@ -1075,16 +1075,6 @@ function vote(bytes memory _proof, bytes32 _nullifierHash, bytes32 _root, bytes3
10751075
10761076
emit VoteCast(_nullifierHash, msg.sender, _vote == bytes32(uint256(1)), block.timestamp, s_yesVotes, s_noVotes);
10771077
}
1078-
1079-
emit VoteCast(
1080-
_nullifierHash,
1081-
msg.sender,
1082-
_vote == bytes32(uint256(1)),
1083-
block.timestamp,
1084-
s_yesVotes,
1085-
s_noVotes
1086-
);
1087-
}
10881078
\`\`\`
10891079
10901080
</details>
@@ -1729,8 +1719,8 @@ const voteOnSepolia = async ({
17291719
functionName: "vote",
17301720
args: [
17311721
toHex(proofData.proof),
1732-
proofData.publicInputs[0], // _root
1733-
proofData.publicInputs[1], // _nullifierHash
1722+
proofData.publicInputs[0], // _nullifierHash
1723+
proofData.publicInputs[1], // _root
17341724
proofData.publicInputs[2], // _vote
17351725
proofData.publicInputs[3], // _depth
17361726
],

0 commit comments

Comments
 (0)