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

Save gas and clean the upper bits of computed pool address properly #291

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on May 6, 2023

  1. Refactor _v2Swap to resolve stack too deep error

    saving 100~200 gas
    shuhuiluo committed May 6, 2023
    Configuration menu
    Copy the full SHA
    e3bf4ea View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. Compute pair address using inline assembly in `UniswapV2Library.pairF…

    …orPreSorted` and clean the upper bits explicitly saving 500~1000 gas
    shuhuiluo committed May 7, 2023
    Configuration menu
    Copy the full SHA
    2b2ea49 View commit details
    Browse the repository at this point in the history
  2. Rewrite V3SwapRouter.computePoolAddress using inline assembly and c…

    …lean the upper bits at the same gas
    shuhuiluo committed May 7, 2023
    Configuration menu
    Copy the full SHA
    8deab37 View commit details
    Browse the repository at this point in the history
  3. Run Hardhat gas snapshot to demonstrate computePoolAddress optimiza…

    …tion since there weren't V3 Foundry tests
    
    Rewritten `computePoolAddress` saves ~500 gas
    shuhuiluo committed May 7, 2023
    Configuration menu
    Copy the full SHA
    d16a6d9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b3bfe32 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bade844 View commit details
    Browse the repository at this point in the history
  6. Uncheck loop index

    shuhuiluo committed May 7, 2023
    Configuration menu
    Copy the full SHA
    bc568ac View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. Configuration menu
    Copy the full SHA
    65cad3d View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Improve readability

    shuhuiluo committed May 10, 2023
    Configuration menu
    Copy the full SHA
    68baa9c View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    1ff67ff View commit details
    Browse the repository at this point in the history