Skip to content

Conversation

@Saw-mon-and-Natalie
Copy link

Description

This PR rewrites most of the write functionality for SSTORE2 contract in assembly. Besides the shorter creation code for the storage contract, these changes also avoid the memory expansion costs that came with using abi.encodePacked saving a few hundred gas.

Also, custom errors are used instead of the previously used require patterns.

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