-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtruffle-config.js
44 lines (42 loc) · 1.08 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
require('dotenv').config();
const HDWalletProvider = require("@truffle/hdwallet-provider");
const Web3 = require('web3');
web3 = new Web3();
const gasPrice = process.env.GAS_PRICE_GWEI ? web3.utils.toWei(process.env.GAS_PRICE_GWEI, 'gwei') : undefined;
module.exports = {
plugins: ["solidity-coverage"],
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*",
gas: 12000000,
gasPrice: 20000000000,
},
mainnet: { // truffle deploy --network mainnet --reset
provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, process.env.RPC_URL),
network_id: 1,
gasPrice,
gas: 6000000,
skipDryRun: true,
},
bsc: { // truffle deploy --network bsc --reset
provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, process.env.RPC_URL),
network_id: 56,
gasPrice,
gas: 6000000,
skipDryRun: true,
},
},
compilers: {
solc: {
version: "0.7.4",
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
},
},
},
};