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

Open
wants to merge 15 commits into
base: atlas-v1.1
Choose a base branch
from
Open

refactor: contract size cuts #444

wants to merge 15 commits into from

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 382733 384088 +1355
Ex Post Ordering 1287743 1289789 +2046
Chainlink OEV Standard Version 434115 436573 +2458
Treble Swap Metacall ERC20 to ERC20 with One Solver 677597 681346 +3749
Treble Swap Metacall ETH to ERC20 with One Solver 543766 546031 +2265

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
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