-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
47 lines (43 loc) · 1.17 KB
/
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
43
44
45
46
47
const path = require("path");
const HDWalletProvider = require('@truffle/hdwallet-provider')
require('dotenv').config();
const mnemonic = process.env.MNEMONIC;
const kovan_url = process.env.RPC_URL_KOVAN;
const ropsten_url = process.env.RPC_URL_ROPSTEN;
const eth_key = process.env.ETHERSCAN_API_KEY;
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, "app/src/contracts"),
networks: {
develop: { // default with truffle unbox is 7545, but we can use develop to test changes, ex. truffle migrate --network develop
host: "127.0.0.1",
port: 8545,
network_id: "*"
},
kovan: {
provider: () => {
return new HDWalletProvider(mnemonic, kovan_url);
},
network_id: '42',
gas: 4700000
},
ropsten:{
provider: ()=>{
return new HDWalletProvider(mnemonic, ropsten_url);
},
network_id:'3',
}
},
compilers: {
solc: {
version: '0.6.12',
},
},
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
plugins: [
'truffle-plugin-verify'
]
};