Add support for deployement using create2 without the Defender requirement
It's currently impossible to deploy using create2 without the assistance of the Defender; it's a bummer as it seems this could be a low-hanging fruit to support this by passing the salt arg and calling create2 below if there is a salt.
About Create2 https://docs.openzeppelin.com/cli/2.8/deploying-with-create2
Deploying with create2 requires a factory contract. It doesn't seem possible to just broadcast a create2 call directly from a script.
Using create2 with Defender is recommended because Defender keeps track of the factory addresses on each chain.
To support this request, we could consider one of the following:
- Use the default deterministic deployer suggested by Foundry at the address described in https://book.getfoundry.sh/tutorials/create2-tutorial
- Use CreateX at the address described in https://github.com/pcaversaccio/createx/tree/main?tab=readme-ov-file#createx-deployments
@Magicking, Hey, I ran into the same issue. Here's a little PoC on how you can do it yourself while keeping all other functionality.
https://github.com/pimlicolabs/magic-spend/blob/main/src/MagicSpendFactory.sol#L16
@pavlovdog i have the same issue! the repo you shared seems to be private. do you mind making it public or sharing the code snippet? Thanks!