This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
truffle.js
87 lines (83 loc) · 2.72 KB
/
truffle.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
75
76
77
78
79
80
81
82
83
84
85
86
87
require('dotenv').config();
const { INFURA_TOKEN, MNEMONIC, PRIV_KEY, ETH_HOST, ETH_PORT } = process.env;
const HDWalletProvider = require('truffle-hdwallet-provider');
const PrivateKeyProvider = require('./private-provider');
module.exports = {
plugins: ["truffle-security, solidity-coverage"],
networks: {
development: {
host: ETH_HOST || '127.0.0.1',
port: ETH_PORT || 8545,
network_id: '*',
},
live: {
provider: () => new HDWalletProvider(MNEMONIC, `https://mainnet.infura.io/v3/${INFURA_TOKEN}`, 0, 10),
network_id: '1',
},
kovan: {
provider: () => new HDWalletProvider(MNEMONIC, `https://kovan.infura.io/v3/${INFURA_TOKEN}`, 0, 10),
network_id: '2',
},
ropsten: {
provider: () => new HDWalletProvider(MNEMONIC, `https://ropsten.infura.io/v3/${INFURA_TOKEN}`, 0, 10),
network_id: '3',
},
rinkeby: {
provider: () => new HDWalletProvider(MNEMONIC, `https://rinkeby.infura.io/v3/${INFURA_TOKEN}`, 0, 10),
network_id: '4',
networkCheckTimeout: '100000',
gas: 0x989680,
gasPrice: 200000000000,
},
moonbase: {
provider: () => new PrivateKeyProvider(PRIV_KEY, 'https://rpc.testnet.moonbeam.network', 1287),
network_id: '1287',
},
skale: {
provider: () => new HDWalletProvider(MNEMONIC, 'https://humanprotocol-integration.skale.network', 0, 10),
network_id: '344435',
},
mumbai: {
provider: () => new HDWalletProvider(MNEMONIC, `https://polygon-mumbai.infura.io/v3/${INFURA_TOKEN}`),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
polygon: {
provider: () => new HDWalletProvider(MNEMONIC, `https://polygon-mainnet.infura.io/v3/${INFURA_TOKEN}`),
network_id: 137,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
// check gasPrice here https://polygonscan.com/gastracker for deployment
},
bsc: {
provider: () => new HDWalletProvider(MNEMONIC, 'https://bsc-dataseed1.binance.org', 0, 10),
network_id: 56,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true,
},
bscTestnet: {
provider: () => new HDWalletProvider(MNEMONIC, 'https://data-seed-prebsc-1-s1.binance.org:8545', 0, 10),
network_id: 97,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true,
},
},
compilers: {
solc: {
version: "0.6.2", // Fetch exact version from solc-bin (default: truffle's version)
settings: {
// See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "constantinople",
},
},
},
};