Maybe we should add checks to prevent:
0x0 addressWhy do you think this would be beneficial @maraoz ?
I tend to dislike deviations from standard ERC20 functions gas costs. Do you think those edge cases justify the sum of every agent losing a bit more gas in every transaction?
(Genuinely interested in getting everyone's opinion, these are not rhetorical questions 馃槃 )
Agree with your gas concerns @GNSPS.
The design direction we're taking is making StandardToken super secure and gas-intensive, and later we want to add a gas-optimized version with less security precautions.
I just realized the phrase "Agree with your gas concerns" can be very funny if taken out of context ^^
Laughed hard! 馃槀
Actually it depends on the case, sometimes it makes sense to spend ~8k gas for the above checks, however the StandardToken is definitely not the case.
Just for the record, a single require of a comparison between a state variable and a constant costs about 60 gas.
@maraoz we have been reviewing this issue, and while I agree on preventing sends to 0x0, I can think of some scenarios where the StandardToken is extended with additional functionality and is expected to hold some of its own tokens. WDYT about adding that restriction into a SaferToken (see https://github.com/OpenZeppelin/zeppelin-solidity/pull/447/), instead of on the Standard Token?
+1
Most helpful comment
I just realized the phrase "Agree with your gas concerns" can be very funny if taken out of context ^^