Created
November 5, 2018 01:39
-
-
Save atvanguard/1d5b4145015860f43ebe2f07d0f3bcbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vote(uint proposal) public isValidVoter { | |
require( | |
proposal < proposals.length, | |
'Invalid proposal id' | |
); | |
Voter storage voter = voters[msg.sender]; | |
voter.vote = proposal; | |
voter.state = State.Voted; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment