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

[Hacken 2022-12-21 Low #04] Style Guide Violation #75

Open
zlace0x opened this issue Dec 22, 2022 · 1 comment
Open

[Hacken 2022-12-21 Low #04] Style Guide Violation #75

zlace0x opened this issue Dec 22, 2022 · 1 comment
Labels
status:wontfix This will not be worked on

Comments

@zlace0x
Copy link
Contributor

zlace0x commented Dec 22, 2022

The project should follow the official code style guidelines.

Inside each contract, library, or interface, use the following order:

  • Type declarations
  • Statevariables
  • Events
  • Modifiers
  • Functions

Path:
./src/Funnel.sol

Functions should be grouped according to their visibility and
ordered:

  • constructor
  • receive function (if exists)
  • fallback function (if exists)
  • external
  • public
  • internal
  • private

Within a grouping, place the view and pure functions at the end.
Some contracts are not formatted correctly.

Paths:
./src/Funnel.sol
./src/FunnelFactory.sol

Solidity style guidance defines a naming convention that should be followed. Some state variables are not in the mixed case.

Path:
./src/Funnel.sol: INITIAL_CHAIN_ID, INITIAL_DOMAIN_SEPARATOR

Recommendation: The official Solidity style guidelines should be followed.

Status: Reported (There are still minor style guide violations)

@zlace0x
Copy link
Contributor Author

zlace0x commented Dec 22, 2022

Status: Wont-fix
Reason: INITIAL_CHAIN_ID, INITIAL_DOMAIN_SEPARATOR both semantically mean a constant, we adhere our style choice to their semantic meaning. Due to the use of initializer, we cannot set these variables to be a constant or immutable.

@zlace0x zlace0x added the status:wontfix This will not be worked on label Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant