Delegator
Contract that when deployed sets all of it's voting power to the delegatee, only the Delegator Factory(TODO: Link) creator can use it. Uses Open Zeppelin Ownable Library.
Code
Address
As there are one Delegator per user that wants to engange in DAO politics you can see the list of deployed Delegators here (TBD)
Public Variables
Address of the staking governance token.
Tracks the amount of staked tokens per user.
Read-Only Functions
delegatee
Returns the delegatee of this contract.
State-Changing Functions
constructor
Called once the contract it's deployed, delegates all it's power to delegatee_ and can't be changed later. Sets delegator factory as owner.
stake
Increases the balance of the staker. Only DelegatorFactory which is the owner can call it. After the balance is updated the amount is transferred from the user to this contract using the DelegatorFactory stake (TODO: add link) function.
removeStake
Decreases the balance of the staker. Only DelegatorFactory which is the owner can call it. After the balance is updated the amount is transferred back to the user from this contract.