Add option count to interface token vote

This commit is contained in:
lash 2023-05-07 19:16:08 +01:00
parent 2c666cc2aa
commit 3edc8bf021
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,11 @@ interface ITokenVote {
// Same as propose(...), but provide options to vote on.
function proposeMulti(bytes32 _description, bytes32[] memory _options, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
// Get number of options available for the proposal.
// This decides the boundary of the index that can be used with voteOptions(...)
// If the result is 0, vote(...) can be used aswell.
function optionCount(uint256 _proposalIdx) external view returns(uint256);
// Get proposal option. Assumes that proposal was created with proposeMulti(...)
function getOption(uint256 _proposalIdx, uint256 _optionIdx) external view returns (bytes32);