This is a group activity for at least 3 students:
- Develop and run scripts for “Ballot.sol” within your group to give voting rights, casting votes, delegating votes and querying results
- Write a report with each function execution and the transaction hash, if successful, or the revert reason, if failed
- Submit your weekend project by filling the form provided in Discord
- Submit your code in a github repository in the form
Unique id | Discord username |
---|---|
RAAzLF | @GRAVER 👾 |
2SyBp0 | @wackozacco |
10exgX | @δαλλασκατ |
r5YSqY | @imchrismayfield |
HhHAQw | @swooz |
Pok9XD | @Timster |
T5zGzt | @Carl Youngblood |
-
💫 [Pass]: Deployed
Ballot.sol
smart contract on Sepolia testnetnpx ts-node --files scripts/DeployWithViem.ts
- TxHash (0x80...bF9B)
- Script ↗
-
💫 [Pass]: Call
vote
functionnpx ts-node --files scripts/CastVote.ts 0x329590c91563584091f6f4d8909728eb1050efec 2
- TxHash (0x81...91b0)
- Script ↗
-
💫 [Pass]: Call
giveRightToVote
function from the chairman addressnpx ts-node --files scripts/GiveRightToVote.ts 0x329590C91563584091f6f4D8909728EB1050EFEC 0x99940BeaCB5FC1d87b7Df18736559c66A0f98b23
- TxHash (0x80715279...496BEbF9B)
- Script ↗
🚨 Attempting to call this function with an address that isn't part of the voters will cause it to revert with an unspecified error message.
-
💫 [Pass]: Call
delegateVote
functionnpx ts-node --files scripts/DelegateVote.ts 0x329590C91563584091f6f4D8909728EB1050EFEC 0x99940BeaCB5FC1d87b7Df18736559c66A0f98b23
- TxHash (0x80715279...496BEbF9B)
- Script ↗
-
💫 [Pass]: Call
winnerName
view functionnpx ts-node --files scripts/PrintResults.ts 0x329590c91563584091f6f4d8909728eb1050efec
- Script ↗
-
💫 [Pass]: Call
vote
function-
npx ts-node --files scripts/CastVote.ts 0x329590c91563584091f6f4d8909728eb1050efec 3
-
-
💫 [Pass]: Call
vote
function