-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtruffle-config.js
74 lines (71 loc) · 1.64 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
71
72
73
74
require('dotenv').config();
const { testnets } = require('./config.json');
const { endpoint,
networkId,
mnemonic,
projectId,
projectSecret } = testnets[process.env.TESTNET];
const HDWalletProvider = require('@truffle/hdwallet-provider');
const privateKeyDev =
'99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342';
require('babel-register');
require('babel-polyfill');
require('dotenv').config();
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
gas: 5500000,
gasPrice: 1000000000,
network_id: "*" // Match any network id
},
testnet: {
provider: () => new HDWalletProvider(mnemonic, endpoint),
network_id: networkId,
gas: 5500000,
gasPrice: 1000000000,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: false
},
moonbase_dev: {
provider: () => {
//...
return new HDWalletProvider(
privateKeyDev,
'http://localhost:9933/'
);
},
network_id: 1281,
},
moonbase: {
provider: () => {
//...
return new HDWalletProvider(
mnemonic,
endpoint
);
},
network_id: networkId,
}
},
contracts_directory: './contracts/',
contracts_build_directory: './abis/',
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
compilers: {
solc: {
version: "0.8.0",
optimizer: {
enabled: true,
runs: 200
}
}
},
plugins: ['moonbeam-truffle-plugin'],
};