I am setting up a project using zkSync
and I am seeing that, in the hardhat.config.ts
file, the supported network is zkSyncTestnet
.
hardhat.config.ts
import "@matterlabs/hardhat-zksync-deploy";
import "@matterlabs/hardhat-zksync-solc";
module.exports = {
zksolc: {
version: "1.3.1",
compilerSource: "binary",
settings: {},
},
defaultNetwork: "zkSyncTestnet",
networks: {
zkSyncTestnet: {
url: "https://zksync2-testnet.zksync.dev",
ethNetwork: "goerli", // Can also be the RPC URL of the network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
zksync: true,
},
},
solidity: {
version: "0.8.17",
},
};
Is it possible to use Polygon Mumbai for this?
Best Answer
Actually, yes you can have a project configured for zkSync and other blockchains. You just have to include the attribute
zksync: true
orzksync: false
to all the networks in your project.This is how your config would be for both zkSync and Polygon Mumbai: