-
Notifications
You must be signed in to change notification settings - Fork 112
/
hardhat.config.ts
97 lines (92 loc) · 2.41 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "hardhat-deploy";
import "solidity-coverage";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import { HardhatUserConfig } from "hardhat/types";
import { task } from "hardhat/config";
const importToml = require("import-toml");
const foundryConfig = importToml.sync("foundry.toml");
const accounts = process.env.PRIVATE_KEY
? [`0x${process.env.PRIVATE_KEY}`]
: [];
task("exit-proof", "Generates exit proof for the given burn transaction hash")
.addParam("tx", "burn transaction hash")
.addOptionalParam(
"sig",
"log event hex signature (defaults to 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036 for `MessageSent(bytes)`)"
)
.setAction(async (args, hre) => {
const { buildPayloadForExit } = require("./hardhat/tunnel/payload/payload");
console.log(
(await buildPayloadForExit(args.tx, hre.ethers.provider, args.sig))
.burnProof
);
});
/**
* @type import('hardhat/config').HardhatUserConfig
*/
export default {
defaultNetwork: "hardhat",
networks: {
hardhat: {
// accounts: [secret],
allowUnlimitedContractSize: true,
gas: 120000000000000,
blockGasLimit: 0x1fffffffffffff,
},
mainnet: {
url: process.env.MAINNET_RPC || "https://main-light.eth.linkpool.io",
accounts,
},
goerli: {
url: process.env.GOERLI_RPC || "https://goerli-light.eth.linkpool.io",
accounts,
},
polygon: {
url: process.env.POLYGON_RPC || "https://polygon-rpc.com",
accounts,
},
mumbai: {
url: process.env.MUMBAI_RPC || "https://rpc-mumbai.maticvigil.com",
accounts,
},
},
solidity: {
version: foundryConfig.profile.default.solc_version,
settings: {
viaIR: foundryConfig.profile.default.via_ir,
optimizer: {
enabled: true,
runs: foundryConfig.profile.default.optimizer_runs,
},
metadata: {
bytecodeHash: "none",
},
},
},
paths: {
tests: "hardhat",
},
typechain: {
outDir: "types/",
target: "ethers-v5",
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
gasReporter: {
currency: "USD",
gasPrice: 5,
},
namedAccounts: {
deployer: 0,
},
} as HardhatUserConfig;