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

✨ LibBitmap toggle function and tests #250

Open
wants to merge 2 commits into
base: v7
Choose a base branch
from

Conversation

Vectorized
Copy link
Contributor

Description

Added a toggle(uint256 index) function to flip the bit at index.

Also added the tests for unset and toggle.

Ignore the gas increase in testBitmapSetTo.
I've checked with the original code with branches, and it adds back 44 gas.

Checklist

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

  • Ran forge snapshot?
  • Ran npm run lint?
  • Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

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.

1 participant