diff options
author | Chris Ward <chriswhward@gmail.com> | 2018-09-17 23:50:45 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-09-18 21:37:16 +0800 |
commit | 98bc9ac32628b9f9d8d8cef5e266a785d71a11dd (patch) | |
tree | 6af61975053846a0203505e6596b399536e963b5 /docs | |
parent | 06ffcd0502c1c06788bec9b1e1e4db3f7c42ed4d (diff) | |
download | dexon-solidity-98bc9ac32628b9f9d8d8cef5e266a785d71a11dd.tar.gz dexon-solidity-98bc9ac32628b9f9d8d8cef5e266a785d71a11dd.tar.zst dexon-solidity-98bc9ac32628b9f9d8d8cef5e266a785d71a11dd.zip |
Added order of layout to style guide
Diffstat (limited to 'docs')
-rw-r--r-- | docs/style-guide.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/style-guide.rst b/docs/style-guide.rst index d2de5287..511236b9 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -874,6 +874,28 @@ No:: x = y+z; x +=1; +*************** +Order of Layout +*************** + +Layout contract elements in the following order: + +1. Import statements +2. Interfaces +3. Libraries +4. Contracts + +Inside each contract, library or interface, use the following order: + +1. Type declarations +2. State variables +3. Events +4. Functions + +.. note:: + + It might be clearer to declare types close to their use in events or state + variables. ****************** Naming Conventions |