Last active
August 7, 2023 10:25
-
-
Save OkoliEvans/98d8a4c33f739a0e0e4590c5f42c63e0 to your computer and use it in GitHub Desktop.
Schematics of voting contract functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.13; | |
interface IVoting { | |
/// @notice To add vote administrators | |
function addAgent(address agent, string calldata name, uint voteId) external returns(bool); | |
/// @notice To remove vote administrators | |
function rmAgent(address agent, uint voteId) external returns(bool); | |
/// @notice To add vote candidates for a post | |
function addCandidate(string calldata name, string calldata post, uint Id, uint voteId) external returns(bool); | |
/// @notice To remove vote candidates for a post | |
function rmCandidate(string calldata name, uint voteId) external returns(bool); | |
/// @notice To verify voters | |
function verify(address voter, uint voteId) external returns(bool); | |
/// @notice To initialise a vote contest | |
function init(uint start, uint end, uint voteId, string calldata contest) external returns(bool); | |
/// @notice To start voting process | |
function start(uint voteId) external; | |
/// @notice To end voting process | |
function end(uint voteId) external; | |
/// @notice To display duration | |
function time(uint voteId) external; | |
/// @notice To collect votes | |
function vote(uint voteId, string calldata candidate) external returns (bool); | |
/// @notice To display results | |
function result(uint voteId) external; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment