Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a few gas optimizations (#246)
* perf: use a bitmap instead of storage mapping for storing claimed epochs feat: replace "claimedEpochs" storage var with a view function implementation * perf: batch token transfers and state updates in "claimMany" function refactor: remove superfluous assignment of uint256 to 0 in "claimMany" function docs: add TODO in "claimMany" function * fix: bug in "claimEpoch" function * refactor: use "claimedEpochs" function call instead of "_claimedEpochsBitMap" storage mapping refactor: rename "claimedEpochs" function to "claimedEpoch" docs: remove TODO at "claimMany" function test: rename "testClaimMultipleClaims" test function to "testClaimFourIndividualClaims" test: rename "testClaimMany" test function to "testClaimManyOnce" * feat: change state mutability of "_claimedEpochsBitMap" from "private" to "internal" * test: add Foundry unit test for "claimedEpoch" function test: add balance assertions for "testClaimManyOnce" test chore: re-generate gas snapshot * chore: re-generate gas snapshot
- Loading branch information