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

refactor: contract size cuts #444

Merged
merged 15 commits into from
Oct 28, 2024
Merged

refactor: contract size cuts #444

merged 15 commits into from
Oct 28, 2024

Conversation

BenSparksCode
Copy link
Contributor

@BenSparksCode BenSparksCode commented Oct 21, 2024

Changes (detailed changes in each sub-PR below):

Size Diffs

Contract Before After Diff
Atlas.sol 25,526 24,188 -1,338

The net effect on contract size is that Atlas.sol is 388 bytes under the limit, which should be enough room for the additional logic needed in the Arbitrum version.

Gas Diffs

Test Before After Diff
Atlas Swap Intent with Basic RFQ 382,733 384,088 +1,355
Ex Post Ordering 1,287,743 1,289,789 +2,046
Chainlink OEV Standard Version 434,115 436,573 +2,458
Treble Swap Metacall ERC20 to ERC20 with One Solver 677,597 681,346 +3,749
Treble Swap Metacall ETH to ERC20 with One Solver 543,766 546,031 +2,265

Gas costs increased slightly (~0.5%), mostly due to the delegatecall overhead needed any time a Factory.sol function is called.

@BenSparksCode BenSparksCode marked this pull request as ready for review October 21, 2024 19:30
@BenSparksCode BenSparksCode changed the title chore: contract size cuts refactor: contract size cuts Oct 21, 2024
@BenSparksCode BenSparksCode merged commit d24c7ae into atlas-v1.1 Oct 28, 2024
2 of 3 checks passed
@BenSparksCode BenSparksCode deleted the size-cuts branch October 28, 2024 05:50
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.

2 participants