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

Gas Optimizations #87

Open
code423n4 opened this issue Jun 18, 2022 · 1 comment
Open

Gas Optimizations #87

code423n4 opened this issue Jun 18, 2022 · 1 comment
Assignees
Labels

Comments

@code423n4
Copy link
Contributor

[Gas - 01] Use Custom Errors

Instead of using error strings, to reduce deployment and runtime cost, you should use Custom Errors: see https://blog.soliditylang.org/2021/04/21/custom-errors/. This would save both deployment and runtime cost, and increase readability !

Examples:
https://github.com/code-423n4/2022-06-nested/blob/b4a153c943d54755711a2f7b80cbbf3a5bb49d76/contracts/operators/Paraswap/ParaswapOperator.sol#L39
https://github.com/code-423n4/2022-06-nested/blob/b4a153c943d54755711a2f7b80cbbf3a5bb49d76/contracts/operators/ZeroEx/ZeroExOperator.sol#L33
And many others !

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Jun 18, 2022
code423n4 added a commit that referenced this issue Jun 18, 2022
@obatirou obatirou self-assigned this Jun 21, 2022
@maximebrugel
Copy link
Collaborator

[Gas - 01] Use Custom Errors (Duplicated)

#6 (see comment)

@maximebrugel maximebrugel added the duplicate This issue or pull request already exists label Jun 24, 2022
@JeeberC4 JeeberC4 removed the duplicate This issue or pull request already exists label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants