-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
49 lines (48 loc) · 1.31 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
48
49
require('dotenv').config();
const HDWalletProvider = require("@truffle/hdwallet-provider");
const path = require("path");
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks: {
develop: {
host: "localhost",
port: 8545,
network_id: 1337,
},
development: {
host: "localhost",
port: 8545,
network_id: 1337,
},
rinkeby:{
provider: function() {
return new HDWalletProvider({
privateKeys: [ process.env['PRIVATE_KEY'], ],
providerOrUrl: process.env['INFURA_PROJECT_ID'],
addressIndex: 0 // Deploy/Migrate from first account (it is zero-based)
});
},
network_id: 4, // Rinkeby Network Id
},
},
// Configure your compilers
compilers: {
solc: {
version: "0.8.9",
settings: { // See the solidity docs for advice about optimization and evmVersion
optimizer: {
// enabled: false,
// runs: 200
enabled: true,
runs: 75,
},
}
}
},
plugins: ["truffle-contract-size", "truffle-plugin-verify"],
api_keys: {
etherscan: process.env['ETHERSCAN_API_KEY']
}
};