Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix private constants with underscore #13

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Prefix private constants with underscore #13

merged 1 commit into from
Apr 4, 2024

Conversation

xenoliss
Copy link
Collaborator

@xenoliss xenoliss commented Mar 13, 2024

This PR prefixes private constants with _.

A few notes on the adopted style guide

We are most likely aligned with the Solidity style guide:

  1. For contracts, all private and internal symbols should be prefixed with an _.
  2. For libraries:
    1. All private symbols should also be prefixed with an _.
    2. All internal symbols should NOT be prefixed with an _. This is because we consider that the library internal symbols are part of its publicly exposed API. This seems to be a generally accepted convention, as library internals are often used instead of public ones to avoid performing an expensive additional DELEGATECALL.

@wbnns
Copy link
Member

wbnns commented Mar 22, 2024

@xenoliss

Thanks for taking the time to open this PR! We've added this to our backlog, pending to be reviewed.

@wilsoncusack wilsoncusack merged commit 4bd90b9 into main Apr 4, 2024
3 checks passed
@wilsoncusack wilsoncusack deleted the cleaning branch April 4, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants