[Deployment] Cannot deploy and initialize a Contract in Mainnet: Hash code not known #733
-
Team or ProjectNo response EnvironmentMainnet L2 block numberNo response zkSolc Versionlatest zksync-ethers Version@matterlabs/hardhat-zksync-ethers 1.2.1 Minimal Reproducible Code or Repo LinkIssueWe are trying to deploy 3 contracts to the zkSync Mainnet Network. The deployment of the three contracts worked but when I call the "factoryContract.initialize(controllerAddress, collateralAddress) Hardhat config
Deployment task in hardhat
Does this work on other EVMs? (If yes, please list at least 1 of them)Yes. Ethereum, Polygon, Optimism Description of What Your Contract DoesFactory Contract Code
Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
The error message Given that your deployment works on the zkSync Sepolia but not on the zkSync Mainnet, here are a few steps you can consider:
If these steps do not resolve the issue, you might want to consider redeploying the contracts or reaching out for more specific support through the zkSync developer community or support channels. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
@jpreciadom It looks like a similar issue was discussed and resolved in this thread. tldr: You will need to provide the preimage (full bytecode) in the dependency for it to work properly. Could you check it out and see if the solution works for you? If not, feel free to follow up here, and we’ll dig deeper. |
Beta Was this translation helpful? Give feedback.
I was able to deploy and initialize the contracts using the project generated by zksync-cli npm package but not using the hardhat-zksync dependencies and using the generated utils by
zksync-cli create
liek this: