-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: add support in forge script for create2 contracts to have an extra call argument #2104
Comments
I have a similar use case of needing to initialize a proxy's implementation contract after deploying it with create2, and it'd be ideal to do that in the same tx. Suggested implementation path for this issue:
Last part is figuring out the UX. Some options:
|
This looks good, missing the |
Fixed, thanks! |
In case you are interested in an existing, preset |
Thanks for the heads up! The current create2 deployer is deployed on many chains and can be deployed elsewhere by anyone with Nick's method, so IMO the only reason to switch to a new deployer would be if the new one can batch an initialization call in the same creation tx. |
and if you want to have a vanity address ;-) - can you quickly elaborate on what you mean with Nick's method here because if you want to replay the deployment transactions for my deployer it won't work since the |
EIP-1820 has a good section on explaining nick's method, and the repo for Nick's deployer that foundry currently uses contains the transaction info. But yes to your point the transaction cannot use EIP-155 for this to work. |
Ah thx, now I can follow you. Wasn't aware that foundry uses Nick's deployer as basis. |
@joshieDo Is this supported now? |
No because AFAIK the current create2 deployer doesn't support it. IMO we can close this since #2638 will resolve it (whether that's letting users specify their deployer or creating a new canonical one, both would resolve this) |
closing in favor of #2638 |
Component
Forge
Describe the feature you would like
Currently
forge
script supportscreate2
contract creation with the following syntaxnew MyContract{salt: mySalt}()
Would be great to also add the option for doing an extra call after contract creation in the same transaction for certain use cases like deploying proxy templates and factories you may need to initialize in the same transaction.
Additional context
No response
The text was updated successfully, but these errors were encountered: