solmate icon indicating copy to clipboard operation
solmate copied to clipboard

⚡ CREATE3 deployment optimizations

Open Vectorized opened this issue 3 years ago • 0 comments

Description

Some simple gas optimizations.

The avoidance of 32-byte constants is deliberate for balancing between deployment size of the parent contract and runtime costs.

Gas before: CREATE3Test:testDeployERC20() (gas: 852410)

Gas after: CREATE3Test:testDeployERC20() (gas: 840585)

Checklist

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

  • [x] Ran forge snapshot?
  • [x] Ran npm run lint?
  • [x] Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

Vectorized avatar Aug 10 '22 07:08 Vectorized