-
Notifications
You must be signed in to change notification settings - Fork 375
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
fix: solidity coding style #843
fix: solidity coding style #843
Conversation
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
…ations # Conflicts: # contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json # contracts/src/core/AlignedLayerServiceManager.sol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to be working fine, and read it over for quite some time, but we should talk about this PR because it is pretty big and potentially dangerous.
I used to like a lot the require
statements, but custom errors are pretty powerful, mainly because of accepting parameters. More info on this: https://soliditylang.org/blog/2021/04/21/custom-errors/
It looks like it should be compatible with an upgrade, with no need of changing the GAP, but this should be tested more in detail just in case.
Also, should errors be declared in the Interface? While we're at it, Events could also be declared in the Interface.
Also I believe this PR should require at least 3 or even 4 approves.
Finally, a make
target to run solhint should come in pretty handy.
…ations # Conflicts: # contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json # contracts/src/core/AlignedLayerServiceManagerStorage.sol
…ations # Conflicts: # contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm, worked in my machine
…ations # Conflicts: # contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json # contracts/src/core/BatcherPaymentService.sol
…ations # Conflicts: # contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
…ations # Conflicts: # contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json # contracts/src/core/AlignedLayerServiceManager.sol # contracts/src/core/BatcherPaymentService.sol
Description
solhint
linter to the CI. To runsolhint
locally, go tocontracts
, runnpm install
and thennpm run lint:sol
. The CI will run the linter but won't stop the user from pushing to main, it just lists the warnings.make lint_contracts
to makefileTo Test