Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacharbon authored Sep 27, 2024
1 parent f72d0bb commit 67df9d1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions p2p/7.Voting-system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ In this step you'll focus on the deployment and the integration part of your sma
### 📌 **Tasks**:

- Using Anvil and forge, deploy your smart contract on a local testnet.
>💡 On a successful deployment, contract address appear next to the `deployed to` field.
- Paste the address of your deployed contract into the environment file at the root of the dApp folder named `VITE_ADDRESS`.

### ✔️ **Validation**:
Expand All @@ -82,6 +84,7 @@ Once you have done this, you should now be able to see the parameters you entere
### 📚 **Documentation**:

- [Anvil](https://book.getfoundry.sh/anvil/)
- [Deploy a Smart Contract local on Anvil with Foundry in 2 min](https://youtu.be/e5QmJaamdPE)

## Step 4: Code the contract

Expand All @@ -91,9 +94,8 @@ Crucial step! I'll leave you to code the rest of the contract yourself, so you c

### 📌 **Tasks**:

- Create a structure `Voter`

- Code the `vote` function. It should take an id in parameter.
- Create a structure `Voter` containing a boolean named `voted` and an uint `id`.
- Code the `vote` function. It should take the id of the proposal in parameter.
- Check if the voter had already voted and if the id is correct.
- Add a `voteCount` for the proposal.

Expand Down

0 comments on commit 67df9d1

Please sign in to comment.