Repository navigation
Expand file tree
/
Copy pathtruffle.js
More file actions
69 lines (67 loc) · 1.47 KB
/
Copy pathtruffle.js
File metadata and controls
69 lines (67 loc) · 1.47 KB
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
const HDWalletProvider = require("@truffle/hdwallet-provider");
const PRIVATE_KEY = process.env.PRIVATE_KEY
const INFURA_KEY = process.env.INFURA_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY
if (!PRIVATE_KEY || !INFURA_KEY) {
console.error("Please set a PRIVATE_KEY and infura key.")
return
}
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
gas: 4600000,
network_id: "*" // Match any network id
},
rinkeby: {
provider: function() {
return new HDWalletProvider(
PRIVATE_KEY,
"https://rinkeby.infura.io/v3/" + INFURA_KEY
);
},
network_id: "4",
gas: 4000000
},
live: {
network_id: 1,
provider: function() {
return new HDWalletProvider(
PRIVATE_KEY,
"https://mainnet.infura.io/v3/" + INFURA_KEY
);
},
gas: 4000000,
gasPrice: 5000000000
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions : {
currency: 'USD',
gasPrice: 2
}
},
compilers: {
solc: {
version: "0.5.12"
}
},
},
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: ETHERSCAN_API_KEY
},
verify: {
preamble:
`
Author: Chris Piatt (@chpiatt)\n
Email: chris@blocklytics.org\n
Organization: Blocklytics (@blocklytics)\n
Version: 1.0\n
Learn More: https://blocklytics.org/blog/fyi-tokens-nfts-digital-ads
`
}
};