From 3edc8bf02122db7c6ea4908f5edb102036a634e0 Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 7 May 2023 19:16:08 +0100 Subject: [PATCH] Add option count to interface token vote --- solidity/TokenVote.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solidity/TokenVote.sol b/solidity/TokenVote.sol index b91e4e9..3b0e9b2 100644 --- a/solidity/TokenVote.sol +++ b/solidity/TokenVote.sol @@ -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);