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

Use Custom Errors To Save Gas #179

Closed
nmlinaric opened this issue Apr 13, 2023 · 0 comments · Fixed by #187
Closed

Use Custom Errors To Save Gas #179

nmlinaric opened this issue Apr 13, 2023 · 0 comments · Fixed by #187
Assignees

Comments

@nmlinaric
Copy link
Contributor

The smart contracts currently use require and revert string messages for error handling. However,
using a revert with a custom Error, instead of a string error message, considerably reduces the smart
contract size and optimizes gas costs on deployment. Contracts:
Bridge -> _onlyAllowed
ERC20Safe -> _safeCall

Implementation details

Use a revert with a custom Error to handle errors.

Testing details

unit tests

Acceptance Criteria

existing unit tests passing with new implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants