wavevote
wavevote copied to clipboard
Update condition checking and functions modifiers.
There are two changes in the commit
- Use
require()andassert()instead ofthrowfor condition checking
- use require() and assert() instead of
throw. These two function will refunds gas in case of an error occurs whilethrowdon't refunds. Ref: http://solidity.readthedocs.io/en/develop/control-structures.html#error-handling-assert-require-revert-and-exceptions
- Change functions modifiers 'view' and pure instead of constant
- use
viewandpuremodifier which has more clear leading word thanconstant. Ref: http://solidity.readthedocs.io/en/develop/miscellaneous.html#modifiers
Thanks for this commit.
I won't merge atm, because I didn't manage to compile with Ethereum Wallet with a compiler higher than 0.8.10. Indeed, with all compiler higher than 0.8.10, there is a warning due to the jump instructions which denies me to compile and push the contracts.
And in 0.8.10 version, the key word "pure" doesn't exist. I keep this pull request to merge, when this issue will be resolved.