IAUT_EXT_VotingRoles_v1.sol
Last updated
Last updated
The maximum voting duration.
Returns
<none>
uint256
The maximum voting duration.
The minimum voting duration.
Returns
<none>
uint256
The minimum voting duration.
Checks whether an address is a voter.
Parameters
who
address
The address to check.
Returns
<none>
bool
Whether the address is a voter.
Adds a voter.
Parameters
who
address
The address to add.
Adds a voter and updates the threshold.
Parameters
who
address
The address to add.
newThreshold
uint256
The new threshold.
Removes a voter.
Parameters
who
address
The address to remove.
Removes a voter and updates the threshold.
Parameters
who
address
The address to remove.
newThreshold
uint256
The new threshold.
Gets the motion data.
Parameters
motionId
bytes32
The ID of the motion.
Returns
<none>
address
target The address of the contract to execute the action on.
<none>
bytes
action The action data to execute on the target contract.
<none>
uint256
startTimestamp The timestamp at which the motion starts.
<none>
uint256
endTimestamp The timestamp at which the motion ends.
<none>
uint256
requiredThreshold The required threshold of votes to pass the motion.
<none>
uint256
forVotes The number of votes in favor of the motion.
<none>
uint256
againstVotes The number of votes against the motion.
<none>
uint256
abstainVotes The number of votes abstaining from the motion.
<none>
uint256
executedAt The timestamp at which the motion was executed.
<none>
bool
executionResult The result of the execution.
<none>
bytes
executionReturnData The return data of the execution.
Gets the number of motions.
Returns
<none>
uint256
The number of motions.
Gets the number of voters.
Returns
<none>
uint256
The number of voters.
Gets the threshold.
Returns
<none>
uint256
The threshold.
Gets the receipt of a voter for a motion.
Parameters
_ID
bytes32
The ID of the motion.
voter
address
The address of the voter.
Returns
<none>
Receipt
The receipt of the voter.
Gets the voting duration.
Returns
<none>
uint256
The voting duration.
Sets the threshold.
Parameters
newThreshold
uint256
The new threshold.
Sets the voting duration.
Parameters
newVoteDuration
uint256
The new voting duration.
Creates a motion.
Parameters
target
address
The address of the contract to execute the action on.
action
bytes
The action data to execute on the target contract.
Returns
<none>
bytes32
The ID of the created motion.
Casts a vote for a motion.
Parameters
motionId
bytes32
The ID of the motion.
support
uint8
The value that indicates wether the voter supports the motion.
Executes a motion.
Parameters
motionId
bytes32
The ID of the motion.
Event emitted when a new voter address gets added.
Parameters
who
address
The added address.
Event emitted when a voter address gets removed.
Parameters
who
address
The removed address.
Event emitted when the required threshold changes.
Parameters
oldThreshold
uint256
The old threshold.
newThreshold
uint256
The new threshold.
Event emitted when the voting duration changes.
Parameters
oldVotingDuration
uint256
The old voting duration.
newVotingDuration
uint256
The new voting duration.
Event emitted when a motion is created.
Parameters
motionId
bytes32
The motion ID.
Event emitted when a vote is cast for a motion.
Parameters
motionId
bytes32
The motion ID.
voter
address
The address of a voter.
support
uint8
Event emitted when a motion is executed.
Parameters
motionId
bytes32
The motion ID.
The action would leave an empty voter list.
The supplied voter address is invalid.
The threshold cannot exceed the amount of voters. or be too low to be considered safe.
The supplied voting duration is invalid.
The function can only be called by a voter.
The address is already a voter.
The value given as vote is invalid.
The supplied ID is referencing a motion that doesn't exist.
A user cannot vote twice.
A motion cannot be executed if the voting duration hasn't passed.
A motion cannot be voted on if the duration has been exceeded.
A motion cannot be executed twice.
A motion cannot be executed if it didn't reach the threshold.
A motion is a proposal to execute an action on a target contract.
Properties
target
address
The address of the contract to execute the action on.
action
bytes
The action data to execute on the target contract.
startTimestamp
uint256
The timestamp at which the motion starts.
endTimestamp
uint256
The timestamp at which the motion ends.
requiredThreshold
uint256
The required threshold of votes to pass the motion.
forVotes
uint256
The number of votes in favor of the motion.
againstVotes
uint256
The number of votes against the motion.
abstainVotes
uint256
The number of votes abstaining from the motion.
receipts
mapping(address => Receipt)
The receipts of votes for the motion address => Receipt
executedAt
uint256
The timestamp at which the motion was executed.
executionResult
bool
The result of the execution.
executionReturnData
bytes
The return data of the execution.
A receipt is a vote cast for a motion.
Properties
hasVoted
bool
Whether the voter has already voted.
support
uint8
The value that indicates wether the voter supports the motion.