-
Notifications
You must be signed in to change notification settings - Fork 359
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
Generic contract deployment middleware / Cross-chain create2 factory #2232
Comments
I would like to work on this. I have experience in this. I worked on something very similar in ScalingETH hackathon for my custom solution. Can you please assign me? |
Go for it! |
Probably blocked by #2512 |
Unblocked now |
Hi @nambrot, I'm Lisandro from @BootNodeDev
|
Thanks @lmcorbalan for researching this one. I would say the bounty is still pretty applicable as it stands. It has become easier due to the lack of message limit now. You can also check out @Destiner who has build this at Ethglobal london this year https://github.com/Destiner/hyperdeploy-contracts/blob/main/src/BytecodeRouter.sol This work doesn't have to be added to this repo and is probably easier to do standalone. I would say that part of the bounty completion should be some basic script to deploy it on any Hyperlane chain (and allow contracts to be initiated from any other Hyperlane chain). For that, like we had mentioned on the description, we need a way to prevent squatting. IMO the easiest way to do that is to add the origin domain, the origin chain sender, as well as the ISM as part of the salt, the referenced solution imo sounds more complex than that |
Hey @nambrot I already have a simple version of a router working, Could you please take a look at https://github.com/BootNodeDev/hyperlane-create2-factory-router/tree/feat/create2-factory and let me know what you think? Once it is finished I'll be adding some scripts for deploying and using the router, also some more doc about how to use. |
Thanks for the update @lmcorbalan! On first look, it looks quite good, but I'm wondering if there is any way to have the key files in a PR somehow so that we can have PR comments on specific lines? I'm also wondering if you were able to test this remotely or the unit tests the main testing so far? |
@nambrot There is a PR submitted where you could make you comments, this one BootNodeDev/hyperlane-create2-factory-router#1 Regarding testing this remotely, I have deployed the routers on Sepolia and Op Sepolia and tested deploying a contract on Sepolia from Op Sepolia, here are the txs links
And the deployed contract https://sepolia.etherscan.io/address/0xa546323EAA93eB4bA2484C3f789AA86A2260DFF0#code |
Thank you for your patience again, left 2 small comments on the PR (sorry for missing that the first time around). Should be very close! |
hey @nambrot wondering if you have any feedback on the changes based on your feedback. thanks! |
I think that is, approved, and happy to close this bounty! |
To deploy contracts on multiple chains today, developers need a funded EOA on all chain. For example the Router abstraction tooling as well as hyperlane-deploy itself require that as well. For applications building on top of Hyperlane, you could imagine a generic contract deployment middleware to be useful. Thus the scope of this issue is to create a simple Router application looking somewhat similar to this:
On the sending side, it would just dispatch a message to the remote router whose handle basically just deploys a contract via a Create2Factory like this one (The create2 part of it is not strictly necessary, tho also follow foundry-rs/foundry#2638.) It would probably be secured by a RoutingISM similar to interchain accounts to allow senders to specify the ISM to be used (which allows them to not have attackers squat the address it wants if using Create2)
This allows developers to just have a balance on one chain but deploy contracts on multiple chains.
The text was updated successfully, but these errors were encountered: