PollBackend activatePoll e9daae65Activates poll so users could vote and no more changes can be made.
delegatecall only. Multisignature required
| outputs | 0 | uint256 | _resultCode | result code of an operation. |
active 02fb0c5eGets if a poll has active status and people still could vote
changeContractOwnership 557f4bc9Prepares ownership pass. * Can only be called by current owner.
| inputs | 0 | address | _to | address of the next owner. 0x0 is not allowed. |
| outputs | 0 | bool |
claimContractOwnership 4592cd1dFinalize ownership pass. * Can only be called by pending owner.
| outputs | 0 | bool |
contractOwner ce606ee0destroy 83197ef0Only owner can call it
Destroy contract and scrub a data
endPoll 8d99b2ebEnds poll so after that users couldn't vote anymore.
delegatecall only. Multisignature required
| outputs | 0 | uint256 | _resultCode | result code of an operation. |
getDetails fbbf93a0Gets full details of a poll including a number of options
delegatecall only
| outputs | 0 | address | _owner | |
| 1 | bytes32 | _detailsIpfsHash | ||
| 2 | uint256 | _votelimit | ||
| 3 | uint256 | _deadline | ||
| 4 | bool | _status | ||
| 5 | bool | _active | ||
| 6 | uint256 | _creation | ||
| 7 | uint256 | _optionsCount |
getEventsHistory fff10abaGets eventsHistory for the manager
| outputs | 0 | address |
getPollListener f12e6101returns listener to react on PollListenerInterface's actions
getVoteLimit 657e8c13Gets vote limit for a poll.
Actually shows the value from associated VotingManager
| outputs | 0 | uint256 |
getVotesBalances 934f2f0bGets intermediate retults of a poll by providing options and their balances.
delegatecall only
| outputs | 0 | uint8[] | _options | poll's options indices |
| 1 | uint256[] | _balances | associated balances for options |
hasMember 12d42835Checks if a user is participating in the poll
delegatecall only
| inputs | 0 | address | _user | address of a user to Checks |
| outputs | 0 | bool |
init 19ab453cInitializes internal fields. Contracts owner only.
Will rollback transaction if something goes wrong during initialization.
| inputs | 0 | address | _contractsManager | is contract manager, must be not 0x0 |
| outputs | 0 | uint256 |
init 75a2490cInitializes internal variables. Poll by default is not active so to start voting first activate a poll.
Could be invoked only once. delegatecall only
| inputs | 0 | uint256 | _optionsCount | number of options in a poll |
| 1 | bytes32 | _detailsIpfsHash | ipfs hash for poll's details info | |
| 2 | uint256 | _votelimit | votelimit. Should be less than votelimit that is defined on a backend | |
| 3 | uint256 | _deadline | time to end voting | |
| outputs | 0 | uint256 |
isAuthorized fe9fbb80Returns if _address is authorized (CBE)
| inputs | 0 | address | _key | |
| outputs | 0 | bool |
killPoll 483e3956Erases poll from records. Should be called before activation or after poll completion. Couldn't be invoked in the middle of voting.
delegatecall only. Authorized contracts only.
lookupManager 4fe59012Makes search in contractsManager for registered contract by some identifier
| inputs | 0 | bytes32 | _identifier | string identifier of a manager |
| outputs | 0 | address | manager | address of a manager, 0x0 if nothing was found |
memberOptions 91c7a0ae| inputs | 0 | address |
memberVotes 4a9f914e| inputs | 0 | address |
optionsBalance 07e829d1| inputs | 0 | uint8 |
owner 8da5cb5bGets owner of a poll
delegatecall only
pendingContractOwner 5aa77d3ctokenDeposit 9cd00448Implements deposit method and receives calls from TimeHolder. Updates poll according to changes made with balance and adds value to a member chosen option. In case if were deposited enough amount to end a poll it will be ended automatically. Make sence only for active poll
initialized poll only. VotingManager only
| inputs | 0 | address | ||
| 1 | address | _address | address for which changes are made | |
| 2 | uint256 | _amount | a value of change | |
| 3 | uint256 | _total | total amount of tokens on _address's balance | |
| outputs | 0 | uint256 |
tokenWithdrawn 4ca95be8Implements withdrawn method and receives calls from TimeHolder. Updates poll according to changes made with balance and removes value from a member's chosen option. In case if _total value is equal to 0 then _address has no more rights to vote and his choice is reset.
initialized poll only. VotingManager only
| inputs | 0 | address | ||
| 1 | address | _address | address for which changes are made | |
| 2 | uint256 | _amount | a value of change | |
| 3 | uint256 | _total | total amount of tokens on _address's balance | |
| outputs | 0 | uint256 |
transferContractOwnership a843c51fDirect ownership pass without change/claim pattern. Can be invoked only by current contract owner
| inputs | 0 | address | _to | the next contract owner |
| outputs | 0 | bool |
updatePollDetailsIpfsHash 628c2bfcChanges details hash with a new version. Should be called before poll will be activated Emits PollDetailsHashUpdated event
delegatecall only. poll owner only
| inputs | 0 | bytes32 | _detailsIpfsHash | updated ipfs hash value |
| outputs | 0 | uint256 |
vote b3f98adcPerforms a vote of caller with provided choice. When a required balance for an option will reach votelimit value then poll automatically ends.
delegatecall only. Should be called by only those contracts that have balance in TimeHolder.
| inputs | 0 | uint8 | _choice | picked option value by user. Should be between 1 and number of options in a poll |
| outputs | 0 | uint256 | _resultCode | result code of an operation. Returns ERROR_POLL_BACKEND_NO_SHARES if a balance in TimeHolder for the user is equal to zero. |