Skip to main content Link Search Menu Expand Document (external link)

Name conventions

  • Pascal case:- HelloWorld
  • Camel case:- helloWorld
  • Kabab case - hello-world

Contract and Library Names

Pascal case

Contract and library names should also match their filenames.
If the contract name is Congress and the library name is Owned, then their associated filenames should be Congress.sol and Owned.sol.

Struct names, Event names, enums

Pascal case

Function name, function argument names, modifier names, local and state variables

Camel case

Constants

All caps

Underscore Prefix for Non-external Functions and Variables

example:- _singleLeadingUnderscore