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

rewrite ZeroEx in Yul #23

Merged
merged 4 commits into from
Nov 7, 2020
Merged

rewrite ZeroEx in Yul #23

merged 4 commits into from
Nov 7, 2020

Conversation

smarx
Copy link
Contributor

@smarx smarx commented Oct 29, 2020

Description

This is a Yul rewrite of the ZeroEx contract. This saves about 1,000 gas as compared to the Solidity implementation.

The function getFunctionImplementation(bytes4) has been moved out into SimpleFunctionRegistryFeature.

Testing instructions

From contracts/zero-ex, yarn build && yarn test.

There are no new tests. No functionality should change from the previous implementation except the removal of getFunctionImplementation(bytes4).

Types of changes

  • Gas golfing

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

Copy link
Contributor

@moodlezoup moodlezoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff, just a couple of nits

contracts/zero-ex/contracts/src/ZeroEx.sol Outdated Show resolved Hide resolved
contracts/zero-ex/contracts/src/ZeroEx.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@dorothy-zbornak dorothy-zbornak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One sugg, but looks good.

contracts/zero-ex/contracts/src/ZeroEx.sol Outdated Show resolved Hide resolved
contracts/zero-ex/contracts/src/ZeroEx.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@hysz hysz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarx smarx merged commit afd4805 into development Nov 7, 2020
@smarx smarx deleted the golf/zeroex branch November 7, 2020 03:03
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.

4 participants