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

refactor: use custom error type instead of error strings #18

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

0x-r4bbit
Copy link
Contributor

The onlyBridge modifier uses strings as error messages which are expensive in gas.

This commit refactors this to use a custom error type instead and also introduces some basic tests to ensure the errors are emitted properly.

It also adds some sanity tests for minting and burning bridge tokens.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran forge snapshot?
  • Ran pnpm lint?
  • Ran forge test?

Base automatically changed from feat/deploy-script to master October 6, 2023 06:27
The `onlyBridge` modifier uses strings as error messages which are
expensive in gas.

This commit refactors this to use a custom error type instead and also
introduces some basic tests to ensure the errors are emitted properly.

It also adds some sanity tests for minting and burning bridge tokens.
@0x-r4bbit 0x-r4bbit merged commit fe1a4e9 into master Oct 6, 2023
6 checks passed
@0x-r4bbit 0x-r4bbit deleted the refactor/custom-error branch October 6, 2023 06:37
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.

None yet

2 participants