2018-03-28 02:16:51 +00:00
|
|
|
pragma solidity ^0.4.21;
|
|
|
|
|
2018-03-29 19:09:30 +00:00
|
|
|
import "../token/MiniMeTokenInterface.sol";
|
2018-03-28 02:16:51 +00:00
|
|
|
import "./TrustNetworkInterface.sol";
|
|
|
|
import "./DelegationProxyInterface.sol";
|
2018-03-29 19:09:30 +00:00
|
|
|
import "./FeeCollector.sol";
|
2018-03-28 02:16:51 +00:00
|
|
|
/**
|
2018-03-29 19:09:30 +00:00
|
|
|
* @title ProposalManagerInterface
|
2018-03-28 02:16:51 +00:00
|
|
|
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
|
|
|
|
*/
|
|
|
|
contract ProposalManagerInterface {
|
|
|
|
|
|
|
|
struct Proposal {
|
|
|
|
bytes32 topic;
|
|
|
|
bytes32 txHash;
|
|
|
|
|
2018-03-29 19:09:30 +00:00
|
|
|
uint visibilityFee;
|
2018-03-28 02:16:51 +00:00
|
|
|
|
|
|
|
uint blockStart;
|
|
|
|
uint voteBlockEnd;
|
|
|
|
uint vetoBlockEnd;
|
|
|
|
|
|
|
|
mapping(address => Vote) voteMap;
|
|
|
|
mapping(address => Tabulations) tabulated;
|
|
|
|
mapping(uint8 => uint256) results;
|
|
|
|
|
2018-03-29 19:09:30 +00:00
|
|
|
Vote result;
|
2018-03-28 02:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Tabulations {
|
|
|
|
bool vote;
|
|
|
|
bool veto;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Vote {
|
|
|
|
Null,
|
|
|
|
Reject,
|
|
|
|
Approve,
|
|
|
|
Veto
|
|
|
|
}
|
2018-03-29 19:09:30 +00:00
|
|
|
|
|
|
|
TrustNetworkInterface public trustNet;
|
|
|
|
MiniMeTokenInterface public token;
|
|
|
|
FeeCollector public feeCollector;
|
|
|
|
uint256 public tabulationBlockDelay;
|
|
|
|
uint256 public minVisibilityFee = 1000;
|
|
|
|
Proposal[] public proposals;
|
|
|
|
|
|
|
|
event ProposalSet(bytes32 indexed topic, uint256 _proposalId, bytes32 _txHash, uint256 _visibility);
|
|
|
|
event ProposalResult(uint256 _proposalId, Vote finalResult);
|
2018-03-28 02:16:51 +00:00
|
|
|
|
2018-03-29 19:09:30 +00:00
|
|
|
function addProposal(bytes32 _topic, bytes32 _txHash, uint _visibilityFee) public returns (uint);
|
2018-03-30 05:31:08 +00:00
|
|
|
function getProposal(uint _id) public view returns (bytes32 topic, bytes32 txHash, bool approved);
|
2018-03-29 19:09:30 +00:00
|
|
|
function voteProposal(uint _proposal, Vote _vote) public;
|
2018-03-28 02:16:51 +00:00
|
|
|
function tabulateVote(uint _proposal, address _delegator) public;
|
|
|
|
function tabulateVeto(uint _proposal, address _delegator) public;
|
2018-03-29 19:09:30 +00:00
|
|
|
function finalResult(uint _proposalId) public;
|
2018-03-28 02:16:51 +00:00
|
|
|
}
|