-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtruffle-config.js
70 lines (68 loc) · 1.36 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
require('ts-node/register')
require('dotenv').config()
const HDWalletProvider = require('@truffle/hdwallet-provider')
const {
ETHEREUM_PROVIDERS_MAINNET,
ETHEREUM_PROVIDERS_ROPSTEN,
ETHEREUM_PROVIDERS_AZURE,
ETHEREUM_WALLET_MNEMONIC,
ETHEREUM_MOCK_HOST,
ETHEREUM_MOCK_PORT,
ETHEREUM_ETHERSCAN_API_KEY,
} = process.env
module.exports = {
test_file_extension_regexp: /.*\.ts$/,
compilers: {
solc: {
version: '^0.5.16',
settings: {
optimizer: {
enabled: true,
},
},
},
},
networks: {
mainnet: {
provider: () =>
new HDWalletProvider(
ETHEREUM_WALLET_MNEMONIC,
ETHEREUM_PROVIDERS_MAINNET
),
network_id: 1,
gas: 4000000,
gasPrice: 10000000000,
},
ropsten: {
provider: () =>
new HDWalletProvider(
ETHEREUM_WALLET_MNEMONIC,
ETHEREUM_PROVIDERS_ROPSTEN
),
network_id: 3,
gas: 4000000,
gasPrice: 10000000000,
},
mock: {
host: ETHEREUM_MOCK_HOST,
port: ETHEREUM_MOCK_PORT,
network_id: '*',
},
azure: {
provider: () =>
new HDWalletProvider(
ETHEREUM_WALLET_MNEMONIC,
ETHEREUM_PROVIDERS_AZURE
),
network_id: '*',
gas: 0,
gasPrice: 0,
},
},
plugins: ['truffle-plugin-verify'],
api_keys: {
etherscan: ETHEREUM_ETHERSCAN_API_KEY,
},
}