-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
87 lines (82 loc) · 2.33 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-ethers";
// import "@nomiclabs/hardhat-waffle";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
let real_accounts = undefined;
if (process.env.DEPLOYER_KEY && process.env.OWNER_KEY) {
real_accounts = [process.env.OWNER_KEY, process.env.DEPLOYER_KEY];
}
const gatewayUrl = 'https://comet-ens-serve.onrender.com/{sender}/{data}.json';
let devGatewayUrl = 'http://localhost:8080/{sender}/{data}.json';
if (process.env.REMOTE_GATEWAY) {
devGatewayUrl =
`${process.env.REMOTE_GATEWAY}/{sender}/{data}.json`;
}
const config: HardhatUserConfig = {
solidity: "0.8.10",
networks: {
hardhat: {
throwOnCallFailures: false,
// @ts-ignore
gatewayUrl: devGatewayUrl,
},
sepolia: {
url: `https://sepolia.infura.io/v3/${'9ebd8833fbb643bb9edb66487d06f546' || process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 11155111,
accounts: real_accounts,
// @ts-ignore
gatewayUrl,
},
opSepolia: {
url: `https://optimism-sepolia.infura.io/v3/${'9ebd8833fbb643bb9edb66487d06f546' || process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 11155420,
accounts: real_accounts,
// @ts-ignore
gatewayUrl,
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 3,
accounts: real_accounts,
// gatewayurl,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 4,
accounts: real_accounts,
// gatewayurl,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 5,
accounts: real_accounts,
// gatewayurl,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['demo'],
chainId: 1,
accounts: real_accounts,
// gatewayurl,
},
},
etherscan: {
apiKey: 'Q9DZBIZYGE36XNX5UFQR64S1X1H34YUZY4' || process.env.ETHERSCAN_API_KEY,
},
namedAccounts: {
signer: {
default: '0xC9A6a1eBfB39BDd16c48f105c4b2A653E30acfD8',
},
deployer: {
default: 1,
},
},
};
export default config;