Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to add the candidates while creating election #73 #125

Merged
merged 12 commits into from
Feb 25, 2025

Conversation

rairohit17
Copy link
Contributor

@rairohit17 rairohit17 commented Feb 4, 2025

resolves #73
. changed the createElection functions parameters to pass a candidates array upon initialization
. created suitable frontend changes to allow users to add , remove ,update candidates while creating an election
. updated tests so that they do not fail due to change in contract 's function

Screen.Recording.2025-02-04.231854.mp4

. made sure all tests pass

Screen.Recording.2025-02-05.002541.mp4

@rairohit17
Copy link
Contributor Author

@Ronnieraj37 could you review the pr and tell if any changes are required
i have yet not not added tests for the updated function , just updated the existing ones , we can add some tests for the updated functions as well

@Ronnieraj37
Copy link
Contributor

Hey @rairohit17 Pl add a check for _candidates .length >= 2 in the createElection from the solidity side. So that we do not have bots creating empty elections from block explorer.

@rairohit17
Copy link
Contributor Author

hey @Ronnieraj37 i have added a check for _candidates.length>2 also i have added a warning for the same in frontend

Apart from that i have updated all tests and made them compatible with the contract's changes
i have also added optimizer for reducing the contract's bytecode size and lower gas costs when deploying as the contracts byecode exceeded the limit
please review and let me know if any changes are required

@Ronnieraj37
Copy link
Contributor

Hey @rairohit17 the changes look good. Just fix the merge conflicts!

@rairohit17
Copy link
Contributor Author

@Ronnieraj37 resolved all merge conflicts

@Ronnieraj37 Ronnieraj37 merged commit 42c90ad into AOSSIE-Org:main Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants