-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
61 lines (57 loc) · 2.2 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import "@matterlabs/hardhat-zksync-deploy"
import "@matterlabs/hardhat-zksync-solc"
import "@matterlabs/hardhat-zksync-upgradable"
import "tsconfig-paths/register"
import dotenv from "dotenv"
dotenv.config()
const INFURA_TOKEN = process.env.INFURA_TOKEN || ""
module.exports = {
zksolc: {
version: "1.3.7", // upgradable plugin currently supports zksolc 1.3.7
compilerSource: "binary",
settings: {
//compilerPath: "zksolc", // optional. Ignored for compilerSource "docker". Can be used if compiler is located in a specific folder
experimental: {
dockerImage: "matterlabs/zksolc", // Deprecated! use, compilerSource: "binary"
tag: "latest", // Deprecated: used for compilerSource: "docker"
},
libraries: {}, // optional. References to non-inlinable libraries
isSystem: true, // optional. Enables Yul instructions available only for zkSync system contracts and libraries
forceEvmla: false, // optional. Falls back to EVM legacy assembly if there is a bug with Yul
optimizer: {
enabled: true, // optional. True by default
mode: "3", // optional. 3 by default, z to optimize bytecode size
},
},
},
defaultNetwork: "zkSyncLocal",
networks: {
// which will be specified with the --netowrk tag
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_TOKEN}`, // The Ethereum Web3 RPC URL (optional).
zksync: false, // Set to false to target other networks.
},
zkSyncEraTestnet: {
url: "https://testnet.era.zksync.dev", // you should use the URL of the zkSync network RPC
ethNetwork: "goerli",
zksync: true,
},
zkSyncLocal: {
// you should run the "matter-labs/local-setup" first
url: "http://localhost:3050",
ethNetwork: "http://localhost:8545",
zksync: true,
},
hardhat: {
zksync: true,
},
},
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
},
},
},
}