pcaversaccio / createx

Factory smart contract to make easier and safer usage of the `CREATE` and `CREATE2` EVM opcodes as well as of `CREATE3`-based (i.e. without an initcode factor) contract creations.
https://createx.rocks
GNU Affero General Public License v3.0
304 stars 18 forks source link

➕ Add zkSync Mainnet #73

Closed shelchin2023 closed 8 months ago

shelchin2023 commented 8 months ago

Chain Name

zkSync Mainnet

Chain ID

324

RPC URL

https://mainnet.era.zksync.io

Block Explorer URL

https://era.zksync.network/

Deployment Funds

No

pcaversaccio commented 8 months ago

@shelchin2023 thanks for opening this deployment request. The unfortunate truth with zkSync is that it's not EVM equivalent and we don't plan to deploy on zkSync until their CREATE and CREATE2 opcodes behave the same as on Ethereum (see my thread here on the differences). If we were to deploy CreateX on zkSync, the deployed address would differ, meaning all CreateX deployment addresses would also differ from all other EVM-based network deployments, as well as the view and pure functions that return the computed CREATE and CREATE2 addresses are not correct on zkSync either (I therefore strongly recommend that you not deploy CreateX on zkSync yourself either!). I'm aware that they plan to make it eventually EVM equivalent, but we don't want to waste our deployer nonce on non-future-proof CreateX deployment right now. I will close this issue as "not planned". @mds1 please feel free to re-open if you disagree.

mds1 commented 8 months ago

Agree with not deploying from the official deployer account for now.

One stopgap is to deploy from another account and provide the addresses for an "unofficial" deploy, like I did with Multicall3, that way users can at least standardize on a canonical deployment for that chain.

image
pcaversaccio commented 8 months ago

For anyone who goes that route and deploys CreateX themselves, I would like to highlight that the view and pure functions that return the computed CREATE and CREATE2 addresses are not correct on zkSync! Thus, if you want to deploy CreateX on zkSync, you should rewrite that logic to match zkSync's behaviour. For CREATE2 you can have a look at my Vyper snippet here.