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(OwnerToken)!: use custom error in setMaxSupply #57

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

0x-r4bbit
Copy link
Member

@0x-r4bbit 0x-r4bbit commented Feb 28, 2024

This changes the usage of a string error message to a custom error for slight gas improvements.

BREAKING CHANGE:

OwnerToken.setMaxSupply(uint256) now emits
OwnerToken.OwnerToken_MaxSupplyLocked.selector instead of "max supply locked"

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?
  • Ran pnpm verify?

@0x-r4bbit 0x-r4bbit requested a review from 0xb337r007 February 28, 2024 08:17
This changes the usage of a string error message to a custom error for
slight gas improvements.

BREAKING CHANGE:

`OwnerToken.setMaxSupply(uint256)` now emits
`OwnerToken.OwnerToken_MaxSupplyLocked.selector` instead of `"max supply
locked"`
@0x-r4bbit 0x-r4bbit force-pushed the refactor/owner-token-max-supply-error branch from 1744e76 to 69be478 Compare February 28, 2024 08:17
@0x-r4bbit 0x-r4bbit merged commit fcf30cd into main Feb 28, 2024
7 checks passed
@0x-r4bbit 0x-r4bbit deleted the refactor/owner-token-max-supply-error branch February 28, 2024 10:44
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.

2 participants