-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #645 from PolymathNetwork/abstract-class-voting
Refactoring voting modules & adding functionality
- Loading branch information
Showing
23 changed files
with
837 additions
and
229 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
pragma solidity ^0.5.0; | ||
|
||
interface IVoting { | ||
|
||
/** | ||
* @notice Allows the token issuer to set the active stats of a ballot | ||
* @param _ballotId The index of the target ballot | ||
* @param _isActive The bool value of the active stats of the ballot | ||
* @return bool success | ||
*/ | ||
function changeBallotStatus(uint256 _ballotId, bool _isActive) external; | ||
|
||
/** | ||
* @notice Queries the result of a given ballot | ||
* @param _ballotId Id of the target ballot | ||
* @return uint256 voteWeighting | ||
* @return uint256 tieWith | ||
* @return uint256 winningProposal | ||
* @return bool isVotingSucceed | ||
* @return uint256 totalVoters | ||
*/ | ||
function getBallotResults(uint256 _ballotId) external view returns( | ||
uint256[] memory voteWeighting, | ||
uint256[] memory tieWith, | ||
uint256 winningProposal, | ||
bool isVotingSucceed, | ||
uint256 totalVoters | ||
); | ||
|
||
/** | ||
* @notice Get the voted proposal | ||
* @param _ballotId Id of the ballot | ||
* @param _voter Address of the voter | ||
*/ | ||
function getSelectedProposal(uint256 _ballotId, address _voter) external view returns(uint256 proposalId); | ||
|
||
/** | ||
* @notice Get the details of the ballot | ||
* @param _ballotId The index of the target ballot | ||
* @return uint256 quorum | ||
* @return uint256 totalSupplyAtCheckpoint | ||
* @return uint256 checkpointId | ||
* @return uint256 startTime | ||
* @return uint256 endTime | ||
* @return uint256 totalProposals | ||
* @return uint256 totalVoters | ||
* @return bool isActive | ||
*/ | ||
function getBallotDetails(uint256 _ballotId) external view returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool); | ||
} |
This file contains 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
This file contains 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
6 changes: 3 additions & 3 deletions
6
.../ERC20/ERC20DividendCheckpointFactory.sol → .../ERC20/ERC20DividendCheckpointFactory.sol
This file contains 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
8 changes: 4 additions & 4 deletions
8
...nt/ERC20/ERC20DividendCheckpointProxy.sol → ...nd/ERC20/ERC20DividendCheckpointProxy.sol
This file contains 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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ckpoint/Ether/EtherDividendCheckpoint.sol → ...ividend/Ether/EtherDividendCheckpoint.sol
This file contains 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
6 changes: 3 additions & 3 deletions
6
.../Ether/EtherDividendCheckpointFactory.sol → .../Ether/EtherDividendCheckpointFactory.sol
This file contains 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
8 changes: 4 additions & 4 deletions
8
...nt/Ether/EtherDividendCheckpointProxy.sol → ...nd/Ether/EtherDividendCheckpointProxy.sol
This file contains 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
Oops, something went wrong.