pancakeswap / pancake-v4-periphery-deprecated

GNU General Public License v2.0
13 stars 6 forks source link

[Deployment] use create2 in the deployment script #58

Open ChefMist opened 4 months ago

ChefMist commented 4 months ago

ref: https://github.com/pancakeswap/pancake-v4-periphery-deprecated/pull/57#pullrequestreview-2157766974

chef-omelette commented 4 months ago

can ref this https://0xfoobar.substack.com/i/95943893/create-the-solution to use create2 factory for consistent msg.sender cross-chain furthermore, we can even use create3 https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol so that the address will not be affected by the initcode, that is, not affected by the constructor arguments.