forked from matter-labs/test-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
50 lines (47 loc) · 1.47 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
import '@typechain/hardhat';
import "@matterlabs/hardhat-zksync-node";
import '@matterlabs/hardhat-zksync-solc';
// This version of system contracts requires a pre release of the compiler
const COMPILER_VERSION = "1.5.0";
const PRE_RELEASE_VERSION = "prerelease-a167aa3-code4rena";
function getZksolcUrl(): string {
// @ts-ignore
const platform = { darwin: "macosx", linux: "linux", win32: "windows" }[process.platform];
// @ts-ignore
const toolchain = { linux: "-musl", win32: "-gnu", darwin: "" }[process.platform];
const arch = process.arch === "x64" ? "amd64" : process.arch;
const ext = process.platform === "win32" ? ".exe" : "";
return `https://github.com/matter-labs/era-compiler-solidity/releases/download/${PRE_RELEASE_VERSION}/zksolc-${platform}-${arch}${toolchain}-v${COMPILER_VERSION}${ext}`;
}
export default {
zksolc: {
compilerSource: "binary",
settings: {
compilerPath: getZksolcUrl(),
isSystem: true,
},
},
zkSyncDeploy: {
zkSyncNetwork: "http://localhost:3050",
ethNetwork: "http://localhost:8545",
},
solidity: {
version: '0.8.24',
settings: {
evmVersion: 'cancun'
}
},
paths: {
sources: './contracts'
},
networks: {
hardhat: {
zksync: true
},
zkSyncTestNode: {
url: "http://127.0.0.1:8011",
ethNetwork: "localhost",
zksync: true,
},
}
};