Conventions
Linting and Formatting
Our linting and formatting rules are handled through configuration files which can be copy/pasted into every repo.
They are meant to be living - so if there are new features or changes to existing features, please do feel comfortable updating them.
These are the following config files worth re-using:
.vscode/settings.json.eslintrc.js.eslintignore.prettierrc.js.prettierignore.solhint.json.solhintignore
Code Regions
We use Code Regions to seperate solidity code for ease of reading, for example:
// ------------------------------------------------------ Solidity Overrides
// ------------------------------------------------------ View Functions
// ------------------------------------------------------ Structs
These are arbitrary and use whatever regions are appropriate for the contract you are writing.
.env files
Always ensure .env is included in .gitignore so that it is not checked in - and then create a .env.template with the required environment values and keep that up to date in source control.