vote
- used when the wallet/address has no active vote nor EGLs locked or uncollectedreVote
- used to either change an existing votes parameters (gas target, lockup duration and/or number of EGL's voted with), or to submit a new vote if the existing vote has elapsed (exceeded the lockup duration) without first withdrawing the EGLs to a wallet addressvote()
allowance
to spend that amount of EGL's for the vote on your behalf. If the allowance is set high enough, this only had to be done once_eglAmount
parameter must be passed in as the wei value, i.e. the EGL token uses 18 decimal places so 1 EGL = 1000000000000000000 weitallyVotes()
if the current voting period (epoch) has elapsed and the vote for the previous period has not yet been tallied. See Tally Votes​_gasTarget
uint256
_eglAmount
uint256
_lockupDuration
uint8
_eglAmount >= 1 ether
_eglAmount <= eglToken.balanceOf(msg.sender)
eglToken.allowance(msg.sender, address(this)) >= _eglAmount
VotesTallied
(Conditional) Transfer
Vote
reVote()
_lockupDuration
will not allow locked EGL's to be released sooner. For example, if a vote was entered with an original _lockupDuration
of 6 weeks, and 1 week later a reVote()
was entered with a new lockup duration of 2 weeks, the EGL's will still only be unlocked 6 weeks from the original vote date, i.e. the unlock/release date is set to themax(originalLockupDuration, reVoteLockupDuration)
_eglAmount
parameter must be passed in as the wei value, i.e. the EGL token uses 18 decimal places so 1 EGL = 1000000000000000000 weitallyVotes()
if the current voting period (epoch) has elapsed and the vote for the previous period has not yet been tallied. See Tally Votes​_gasTarget
uint256
_eglAmount
uint256
_lockupDuration
uint8
voters[msg.sender].tokensLocked > 0
reVote()
_eglAmount >= 1 ether
_eglAmount > 0
, the amount being voted with must be greater than 10000000000000000000 (1 EGL)_eglAmount <= eglToken.balanceOf(msg.sender)
_eglAmount > 0
, the voting address must have a balance that is at least equal to the amount being voted witheglToken.allowance(msg.sender, address(this)) >= _eglAmount
_eglAmount > 0
, the voting contract must a have an allowance from the voter of at least the voting amountVotesTallied
(Conditional) Transfer
(Conditional)Withdraw
Vote
ReVote