forked from pot4e/FHE-contract-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
68 lines (66 loc) · 1.61 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
62
63
64
65
66
67
68
import "@nomicfoundation/hardhat-toolbox";
import { config as dotenvConfig } from "dotenv";
import "hardhat-deploy";
import type { HardhatUserConfig } from "hardhat/config";
import type { NetworkUserConfig } from "hardhat/types";
import { get } from "http";
const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || "./.env";
import { resolve } from "path";
dotenvConfig({ path: resolve(__dirname, dotenvConfigPath) });
export function getChainConfig(): NetworkUserConfig {
return {
accounts: [
process.env.PRIVATE_KEY_1 as string,
process.env.PRIVATE_KEY_2 as string
],
chainId: 9090,
url: "https://testnet.inco.org",
}
}
const config: HardhatUserConfig = {
solidity: {
version: "0.8.22",
settings: {
metadata: {
// Not including the metadata hash
// https://github.com/paulrberg/hardhat-template/issues/31
bytecodeHash: "none",
},
// Disable the optimizer when debugging
// https://hardhat.org/hardhat-network/#solidity-optimizer-support
optimizer: {
enabled: true,
runs: 800,
},
},
},
paths: {
artifacts: "./artifacts",
cache: "./cache",
sources: "./contracts",
tests: "./test",
},
namedAccounts: {
deployer: 0,
},
mocha: {
timeout: 180000,
},
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS ? true : false,
excludeContracts: [],
src: "./contracts",
},
networks: {
hardhat: {
chainId: 31337,
},
inco: getChainConfig(),
},
typechain: {
outDir: "types",
target: "ethers-v6",
},
};
export default config;