Skip to content

[Deployment] Cannot deploy and initialize a Contract in Mainnet: Hash code not known #733

Closed Answered by jpreciadom
jpreciadom asked this question in Deployments
Discussion options

You must be logged in to vote

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:

import {Deployer} from "@matterlabs/hardhat-zksync";
import dotenv from "dotenv";
import {ethers} from "ethers";
import * as hre from "hardhat";
import {Provider, Wallet} from "zksync-ethers";

import "@matterlabs/hardhat-zksync-node/dist/type-extensions";
import "@matterlabs/hardhat-zksync-verify/dist/src/type-extensions";

// Load env file
dotenv.config();

export const getProvider = () => {
  const rpcUrl = hre.network.config.url;
  if (!rpcUrl) throw `⛔️ RPC URL wasn't found i…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@kaymomin
Comment options

@jpreciadom
Comment options

@gleenai
Comment options

Comment options

You must be logged in to vote
2 replies
@jpreciadom
Comment options

Answer selected by uF4No
@uF4No
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Questions for deployment
3 participants