-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.js
More file actions
37 lines (34 loc) · 805 Bytes
/
Copy pathhardhat.config.js
File metadata and controls
37 lines (34 loc) · 805 Bytes
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
require("@nomicfoundation/hardhat-toolbox");
const fs = require('fs');
const projectId = 'd37642168d0242199b8fd0a17eddf6bb';
// @TODO improve how private key is provided
const keyData = fs.readFileSync('./p-key.txt', {
encoding: 'utf8',
flag: 'r',
});
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {
chainId: 1337 // configuration standard
},
mumbai: {
url: `https://polygon-mainnet.infura.io/v3/${projectId}`,
accounts: [ keyData ],
},
mainnet: {
url: `https://mainnet.infura.io/v3/${projectId}`,
accounts: [ keyData ],
}
},
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 200,
}
}
},
};