Open marcelomorgado opened 2 years ago
Good idea, would need to have a create3 factory a la : https://github.com/Arachnid/deterministic-deployment-proxy and then we you could even use it for determinsitic deployment already via : https://github.com/wighawag/hardhat-deploy#4-deterministicdeployment-ability-to-specify-a-deployment-factory
+1 this would be great!
+1
hey @wighawag you mentioned using a create3 factory should even already be possible through the deterministic deployment options. This factory could e.g. be used: https://github.com/ZeframLou/create3-factory/blob/main/src/CREATE3Factory.sol#L14
But I think with current available options it is not possible to use it. As far as I understand, there would need to be changes to existing code to call the deploy()
method on this CREATE3 Factory instead of building the deployTransaction like this: https://github.com/wighawag/hardhat-deploy/blob/192d6119c7e594c4e4c5e96eeb41de1fdaa71afc/src/helpers.ts#L586?
Edit: Workaround for this for now is to interact with the CREATE3 factory yourself and then use deployments.save()
to manually log deployment data
thanks @bergben for this, I see zefram's factory require the use of a function call It will indeed require extra wiring (it just need the deploy's bytes4 prefixed), or the look for an alternative factory
what's the status of this issue? unfortunately many chains do not support shanghai
so the address cannot be the same
Unlike
create2
thecreate3
allows deterministic addresses by using onlymsg.sender
+salt
that is useful when want to have the same address among chains even if the contracts' codes aren't equal.Refs: https://github.com/0xsequence/create3