-
Function arguments should use mixedCase. Examples:
initialSupply
,account
,recipientAddress
,senderAddress
,newOwner
. -
Local and state variables names should use mixedCase. Examples:
totalSupply
,remainingSupply
,balancesOf
,creatorAddress
,isPreSale
,tokenExchangeRate
. -
Constants should be named with all capital letters with underscores separating words. Examples:
MAX_BLOCKS
,TOKEN_NAME
,TOKEN_TICKER
,CONTRACT_VERSION
. -
Modifier names should use mixedCase. Examples:
onlyBy
,onlyAfter
,onlyDuringThePreSale
. -
Enums, in the style of simple type declarations, should be named using the CapWords style. Examples:
TokenGroup
,Frame
,HashStyle
,CharacterLocation
. -
Avoiding Naming Collisions:
single_trailing_underscore_
. This convention is suggested when the desired name collides with that of a built-in or otherwise reserved name.
- Function Arg -> mC
- Local/State Var -> mC
- Constant -> U_C
- Modifier -> mC
- Enum -> CW
- Collision -> built-in
- Security: Readability & Maintainability