AUT_EXT_VotingRoles_v1.sol
Last updated
Last updated
Inherits: IAUT_EXT_VotingRoles_v1, Module_v1
Author: Inverter Network
Facilitates voting and motion management within the Inverter Network, allowing designated voters to participate in governance through proposals, voting, and execution of decisions.
Supports setting thresholds for decision-making, managing voter lists, creating motions, casting votes, and executing actions based on collective decisions. This structure enhances governance transparency and efficacy.
The maximum voting duration.
The minimum voting duration.
Checks whether an address is a voter.
Gets the motion data.
Gets the number of motions.
Gets the number of voters.
Gets the threshold.
Gets the voting duration.
Storage gap for future upgrades.
See {IERC165-supportsInterface}.
Reverts if caller is not the module itself.
Reverts if caller is not a voter.
Reverts if voter address is invalid.
Parameters
voter
address
The address to check.
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.
Sets the threshold.
Parameters
newThreshold
uint256
The new threshold.
Sets the voting duration.
Parameters
newVoteDuration
uint256
The new voting duration.
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.
Removes a voter from the list of voters.
Parameters
who
address
The address of the voter to remove.
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.
Internal function to validate the threshold.
Parameters
_voters
uint256
The number of voters.
_threshold
uint256
The threshold.