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: use modern Solidity instead of assembly for create2 #20

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

transmissions11
Copy link
Contributor

No description provided.

@transmissions11
Copy link
Contributor Author

transmissions11 commented Oct 18, 2021

i think this saves a bit of gas as we're not storing the whole bytecode in memory?

@PaulRBerg
Copy link
Owner

This is amazing! I can't believe I haven't seen this documented anywhere.

@PaulRBerg
Copy link
Owner

PaulRBerg commented Oct 19, 2021

i think this saves a bit of gas as we're not storing the whole bytecode in memory?

  • Gas cost with assembly: 586,354.
  • Gas cost with modern Solidity: 586,299.

55 gas saved. Nice!

@transmissions11
Copy link
Contributor Author

transmissions11 commented Oct 19, 2021

This is amazing! I can't believe I haven't seen this documented anywhere.

yeah its really flown under the radar. still see most ppl use the assembly syntax even tho this was introduced in 0.6.2!

@PaulRBerg PaulRBerg changed the base branch from main to staging March 10, 2022 12:01
@PaulRBerg PaulRBerg merged commit 41d92d1 into PaulRBerg:staging Mar 10, 2022
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