Contract for all voting operations of DAO
/contracts/interactive/DaoVoting.sol

Digix Holdings

constructor

DaoVoting

inputs0address_resolver
function, constant

CONTRACT_ADDRESS db4ecbc1

function

commitVoteOnProposal 5e8254ea

Function to commit a vote on proposal (Voting Round)

inputs0bytes32_proposalId

ID of the proposal

inputs1uint8_index

Index of the Voting Round

inputs2bytes32_commitHash

Hash of the vote to commit (hash = SHA3(address(pub_address), bool(vote), bytes32(random string)))

function

commitVoteOnSpecialProposal be29783f

Function to commit a vote on special proposal

inputs0bytes32_proposalId

ID of the proposal

inputs1bytes32_commitHash

Hash of the vote to commit (hash = SHA3(address(pub_address), bool(vote), bytes(random string)))

function, constant

currentQuarterNumber 7f6a26b6

Get the current quarter index

Quarter indexes starts from 1

outputs0uint256_quarterNumber

the current quarter index

function, constant

currentTimeInQuarter 560a25ea

Get the current relative time in the quarter

For example: the currentTimeInQuarter of the first second of any quarter is 1

outputs0uint256_currentT

the current relative time in the quarter

function, constant

getAddressConfig 1d8ccd04

inputs0bytes32_configKey
function, constant

getBytesConfig 93ddad08

inputs0bytes32_configKey
function, constant

getUintConfig b1e2b9dd

inputs0bytes32_configKey
function, constant

get_contract 3f83acff

Get the address of a contract

inputs0bytes32_key

the resolver key to look up

outputs0address_contract

the address of the contract

function, constant

isDaoNotReplaced d70d9358

Check if the DAO contracts have been replaced by a new set of contracts

outputs0bool_isNotReplaced

true if it is not replaced, false if it has already been replaced

function, constant

isLockingPhase 7d6fed80

Check if it is currently in the locking phase

No governance activities can happen in the locking phase. The locking phase is from t=0 to t=CONFIG_LOCKING_PHASE_DURATION-1

outputs0bool_isLockingPhase

true if it is in the locking phase

function, constant

isMainPhase 68533060

Check if it is currently in a main phase.

The main phase is where all the governance activities could take plase. If the DAO is replaced, there can never be any more main phase.

outputs0bool_isMainPhase

true if it is in a main phase

function, constant

isModerator fa6f3936

Check if a user is a moderator in the current quarter

inputs0address_user
function, constant

isParticipant 929066f5

Check if a user is a participant in the current quarter

inputs0address_user
function, constant

isProposalPaused f94f0f33

Check if a proposal is currently paused/stopped

If a proposal is paused/stopped (by the PRLs): proposer cannot call for voting, a current on-going voting round can still pass, but no funding can be withdrawn.A paused proposal can still be unpausedIf a proposal is stopped, this function also returns true

inputs0bytes32_proposalId
outputs0bool_isPausedOrStopped

true if the proposal is paused(or stopped)

function, constant

key 3943380c

function, constant

resolver 04f3bcec

function

revealVoteOnProposal 2b051b50

Function to reveal a committed vote on proposal (Voting Round)

The lockedDGDStake that would be counted behind a participant's vote is his lockedDGDStake when this function is called

inputs0bytes32_proposalId

ID of the proposal

inputs1uint8_index

Index of the Voting Round

inputs2bool_vote

Boolean, true if voted for, false if voted against

inputs3bytes32_salt

Random bytes used to commit vote

function

revealVoteOnSpecialProposal d9db3c73

Function to reveal a committed vote on special proposal

The lockedDGDStake that would be counted behind a participant's vote is his lockedDGDStake when this function is called

inputs0bytes32_proposalId

ID of the proposal

inputs1bool_vote

Boolean, true if voted for, false if voted against

inputs2bytes32_salt

Random bytes used to commit vote

function

voteOnDraft 610af570

Function to vote on draft proposal (only Moderators can vote)

inputs0bytes32_proposalId

ID of the proposal

inputs1bool_vote

Boolean, true if voting for, false if voting against