-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
42 lines (38 loc) · 981 Bytes
/
truffle-config.js
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
const dotenv = require('dotenv');
const HDWalletProvider = require('@truffle/hdwallet-provider');
// Load environment variables
dotenv.config();
// Get mnemonic and infura URL
const mnemonic = process.env.MNEMONIC;
const projectId = process.env.INFURA_PROJECT_ID;
const infuraUrl = 'https://kovan.infura.io/v3/' + projectId;
// Get development network host and port
const developmentHost = process.env.DEVELOPMENT_HOST;
const developmentPort = process.env.DEVELOPMENT_PORT;
// Configure networks and the compiler
module.exports = {
networks: {
development: {
host: developmentHost,
port: developmentPort,
network_id: '*',
},
kovan: {
provider: () => (
new HDWalletProvider({
mnemonic: {
phrase: mnemonic,
},
providerOrUrl: infuraUrl,
})
),
network_id: 42,
networkCheckTimeout: 999999,
},
},
compilers: {
solc: {
version: '0.8.10',
}
},
};