Giter Site home page Giter Site logo

opcode-open-spring-fest / ballot_block Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 3.0 58 KB

"BallotBlock" is a voting system that utilizes blockchain technology to offer a groundbreaking approach to secure, transparent, and tamper-resistant elections.

JavaScript 2.11% Solidity 97.89%
blockchain iiitbh open-spring-fest smart-contracts solidity type-medium

ballot_block's People

Contributors

mishrasomesh001 avatar sahilmorwal avatar shobhit15082003 avatar

ballot_block's Issues

[Feature]: Time limit

So, what is it about?

  1. Make the start and end function to be accesible only for the owner.

2)Create a function where the registar set a time limit as to when the the voting is started by the registar after a fixed amount of time as to when the end function will be automatically triggered if not pressed earlier. This amount of time will be taken as an input.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: Create 2 functions start and end .

So, what is it about?

Create two functions start and end one . Start function starts the auction and End function ends the auction.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: addvote

So, what is it about?

So in this project addVote is a very important function. As well as it must have some features which are listed below:-
1. Access Control: Ensure that only eligible voters can add their votes. This may involve checking a whitelist or verifying some form of identification.

2. Single Vote Per Address: Implement logic to prevent duplicate votes from the same address. This ensures that each participant can only vote once.

3. Vote Validation: Validate the vote being added to ensure it meets the criteria for a valid vote. For example, the vote may need to be for a specific candidate or option.

4. Timestamping: Record the timestamp of when the vote was added. This can be useful for auditing purposes and ensuring that votes are only accepted within a certain time frame.

5. Event Logging: Emit events when a vote is added. This provides transparency and allows external parties to monitor the voting process.

6. Immutable Storage: Once a vote is added, it should be stored immutably on the blockchain. This ensures that votes cannot be altered or deleted after they are submitted.

7. Gas Efficiency: Optimize the function to minimize gas costs for users when adding their votes. This can be achieved by writing efficient code and minimizing unnecessary storage operations.

8. Error Handling: Implement error handling to gracefully handle cases where an invalid or duplicate vote is submitted. Provide informative error messages to users to guide them in correcting their actions.

9. Security Considerations: Ensure that the function is resistant to common attacks such as replay attacks, reentrancy, and overflow/underflow vulnerabilities.

10. Testing: Thoroughly test the function in different scenarios to ensure its correctness and robustness. This may involve writing unit tests and conducting security audits.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: testing

So, what is it about?

for test

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: branch test

So, what is it about?

another test

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: Result

So, what is it about?

Create a result function which can be accessed only when the end function is triggered.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: test

So, what is it about?

Just for testing

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: Create a Registar

So, what is it about?

  1. Create a function where the register takes all the data(Name and Aadhar Number) of the all the voters who might visit in order to vote.

2)Create a function where the user enters their name and aadhar and the registar checks whenever a voter comes to vote whether his name and aadhar number is present on the data provided above to cast their vote else display an error.

3)If the voters name is present on the list then the registar provides the voter with a certain password which he must enter along with his vote in order for the vote to be successful else display an error.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: dummy

So, what is it about?

for again testing

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: Changes in Add function

So, what is it about?

1)Update the Add function such that it takes address of the candidate to whom the user wants to vote for.
2) Modifier : Set a modifier which makes sure that the vote only goes to 4 candidates who are contesting.
3)Add another argument in the Add function which asks the user to enter their vote and make sure they are 18+ to vote.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: Tie

So, what is it about?

Suggest a solution as to what is to be done if two candidates gets the same amount of vote and apply it.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: testing

So, what is it about?

we are testing

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: dummyIssue

So, what is it about?

for testing

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]timeframe

So, what is it about?

NOTICE: We will accept your PR only when your features satisfies all of our points described below!!!

In a voting system implemented on the blockchain, managing the time frame is crucial to ensure the integrity and fairness of the voting process. Here are some features related to time frame management that you should consider:

1. Voting Period: Define a specific time frame during which voters can cast their votes. This period should be clearly communicated to all participants in advance.

2. Start and End Times: Implement mechanisms to specify the start and end times of the voting period. Ensure that these times are immutable once set to prevent manipulation.

3. Dynamic Time Frame: Depending on the requirements of your voting system, you may need to support dynamic time frames for different elections or voting events.

4. Validation of Votes within Time Frame: Validate that votes are only accepted during the designated voting period. Reject any attempts to add or retrieve votes outside of this time frame.

5. Timestamping: Record the timestamp of each vote to ensure that it falls within the voting period. This information can be useful for auditing and verifying the legitimacy of the votes.

6. Countdown Mechanism: Optionally, implement a countdown mechanism to inform users of the remaining time left in the voting period. This can help encourage participation and prevent last-minute rushes.

7. Automatic Closure: Automatically close the voting period once the specified end time is reached. This prevents any further votes from being cast after the deadline.

8. Extension Mechanism: Optionally, allow for extensions to the voting period under certain circumstances, such as technical issues or unforeseen events. Implement appropriate mechanisms to prevent abuse of this feature.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.