Transactions
state-changing
function requestPermission(bytes category, bytes metadataHash) public returns(uint);
Requests permission to perform the action described in the metadataHash.
- starts a poll.
- called for each proposal that is associated with the slate.
Emits the following event:
event PermissionRequested(uint requestID, bytes metadataHash);
Return value: the identifier of the request being made, specified by
requestID
.function recommendSlate(
uint batchNumber,
uint category,
uint[] memory requestIDs,
bytes memory metadataHash
) public returns (uint);
Creates a new slate with the associated requestIds and metadata hash (stored in IPFS).
Emits the following event:
event SlateCreated(uint slateID, address indexed recommender, bytes metadataHash);
Return value: the identifier of the created slate, specified by
slateID
.function depositVoteTokens(uint numTokens) public returns(bool);
Deposits tokens into the Gatekeeper to use in voting, specified as
voteTokenBalance[msg.sender]
.- assumes that
msg.sender
has approved the Gatekeeper to spend on their behalf.
Emits the following event:
event SlateCreated(uint slateID, address indexed recommender, bytes metadataHash);
Return value: a boolean value indicating if the tokens were successfully transferred from the
msg.sender
to the Gatekeeper contract.function commitBallot(bytes32 commitHash, uint numTokens) public;
Submits a commitment for the current ballot.
- commit period must be active for the given epoch.
- if the voter doesn't have enough tokens for voting, deposit more and vote with a greater number of tokens.
Emits the following event:
event BallotCommitted(uint ballotID, address indexed voter, uint numTokens, bytes32 commitHash);
function stakeTokens(uint slateID) public payable returns(bool);
function acceptSlate(uint batchNumber, uint contest, uint slateID) public;
function revealBallot(uint batchNumber) public;
function startRunoff(uint batchNumber, uint contest) public;
function finalizeResult(uint batchNumber, uint contest) public;
function createCategory(address to, uint tokens, bytes metadataHash) public;
Last modified 3yr ago