We follow the solidity style guide. Complementary conventions are listed below. They will evolve with time.
Write contracts like independent services (e.g. voting contracts should not know about token contracts). This has multiple obvious advantages:
- Team organization - starting to contribute is much easier, contracts may evolve independently...
- Security conscious - scopes/access rights are more clearly defined, auditing code is easier.
- Write in English,
- Use doxygen tags for documentation,
- File introduction & function documentation comments should use
/* ... */
style (/** ... */
for doxygen), - To make code sections explicit, write headers such as
/* EVENTS */
.