Login
React developers unite!
Login
React developers unite!
jQuery.trim
This is the only thing about this block of JS that requires JS. I wonder if this an attempt to get jQuery users to write JS? LOL.
Just replace jQuery.trim(cookies[i])
with cookies[i].trim()
!
0.25 ether
This is approximately $75 as of today (29-June-2017). That's a bit rich for a single contract call!
onlyowner
Violates recommended style
onlyowner
Violates recommended style
onlyowner
Violates recommended style
onlyowner
Violates recommended style
onlyowner
Violates recommended style
onlyowner
Violates recommended style
Strings should be quoted with double-quotes instead of single-quotes. Yes: str = "foo"; str = "Hamlet says, 'To be or not to be...'"; No: str = 'bar'; str = '"Be yourself; everyone else is already taken." -Oscar Wilde';
I cannot agree with this recommendation. We're basically saying that we should change the literal string––grammar be damned––to suit a programming style.
Tips and Tricks
Review this list periodically while developing.
Pitfalls
This whole section would be good to review frequently while writing code.
Using random numbers in smart contracts is quite tricky if you do not want miners to be able to cheat.
I feel like this warrants a lot more explanation!
A literal number can take a suffix of wei, finney, szabo or ether to convert between the subdenominations of Ether, where Ether currency numbers without a postfix are assumed to be Wei, e.g. 2 ether == 2000 finney evaluates to true.
1 ether = 1,000 Finney = 1,000,000 Szabo = 1,000,000,000 GWei = 1,000,000,000,000 MWei = 1,000,000,000,000,000 KWei = 1,000,000,000,000,000,000 Wei
Test annotation.