Deployment revert when using CREATE2 OPCode #873
-
Team or ProjectDeBridge EnvironmentMainnet L2 block numberNo response zkSolc Versionv1.5.8 zksync-ethers Versionv6.15.3 Minimal Reproducible Code or Repo Link
Does this work on other EVMs? (If yes, please list at least 1 of them)No Description of What Your Contract DoesDeploying bridge contracts Additional DetailsHello, Trying to deploy contract using the CREATE2 OP Code as specified in the snippet but the contract reverts the entire transaction. I think it may be related on how zksync stores and uses contract code but I dont have any clue how to overcome this limitation. Do you have any insights? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
It might be failing if the compiler doesn't know the bytecode for the contract ahead of time. is |
Beta Was this translation helpful? Give feedback.
-
Hi @bxpana You are correct, since era does not store deploymentCode but only a hash of it, we need to store the deploymentCode of the aforementioned DeBridgeTokenProxy, either by deploying it explicitly, or by registering it in the L1. Do you know how to register the bytecode? |
Beta Was this translation helpful? Give feedback.
-
I think that the issue stems from the fact that constructor parameters are passed differently from L1, so Could you try deploying it using salted syntax? e.g.
|
Beta Was this translation helpful? Give feedback.
I think that the issue stems from the fact that constructor parameters are passed differently from L1, so
abi.encodePacked
doesn't work as intended here.Could you try deploying it using salted syntax? e.g.