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

[WIP] Shrink Contract Size #42

Closed
wants to merge 1 commit into from

Conversation

dylandesrosier
Copy link
Contributor

@dylandesrosier dylandesrosier commented Jul 1, 2023

THIS IS A WIP.

Rather than precomputing constants and accessing them through a giant switch case; generate a bunch of functions and access them programmatically by generating function selectors that match.

It'll bring the size down significantly but will increase gas per claim. I haven't been able to test it out yet to get concrete numbers. Looks like it doesn't really bring the size down once you have all of the necessary methods to dynamically select them.

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

LCOV of commit bc7d868 during Tests with 100% Coverage #235

Summary coverage rate:
  lines......: 60.0% (328 of 547 lines)
  functions..: 30.5% (71 of 233 functions)
  branches...: no data found

Files changed coverage rate:
                                             |Lines       |Functions  |Branches    
  Filename                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================
  src/PrizePool.sol                          |64.5%    138|83.8%    37|    -      0
  src/abstract/TieredLiquidityDistributor.sol|43.7%    286|12.6%   174|    -      0

⛔ The code coverage is too low. Expected at least 100.

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