Typefully
@PaulRBerg
Log in
Paul Berg's Solidity Tips
Share
•
2 years ago
•
View on X
Here's a thread with all the Solidity tips I shared on Twitter over the years. Some of you will find these obvious, but I think that a greater majority will find them useful. 1/12
You can call Solidity functions with explicit arguments, e.g. "foo({ x: 1, y: 2})". 2/12
twitter.com/PaulRBerg/status/1574071928544976896
ASCII box-drawing characters for struct members. 3/12
twitter.com/PaulRBerg/status/1586106649550671872
Scientific notation. 4/12
twitter.com/PaulRBerg/status/1566786525379043328
"bytes.concat" is a stricter version of "abi.encodePacked". 5/12
twitter.com/PaulRBerg/status/1561317691675353088
Time units. 6/12
twitter.com/PaulRBerg/status/1511977904170803203
Free functions. 7/12
twitter.com/PaulRBerg/status/1450444297925431301
Underscore in numerical literals. 8/12
twitter.com/PaulRBerg/status/1447201033764093953
Gas golfing divisions in Solidity v0.8. 9/12
twitter.com/PaulRBerg/status/1378313956293500931
Miscellaneous 10/12
twitter.com/PaulRBerg/status/1352403834430255109
Miscellaneous 11/12
twitter.com/PaulRBerg/status/1266504674569568258
Finally - don't forget to be paranoid! 12/12
twitter.com/PaulRBerg/status/1539238349923295235