-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
55 lines (54 loc) · 1.41 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
//jshint esversion:8
const path = require('path');
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
const mnemonic = process.env.MNEMONIC;
const url = process.env.ALCHEMY_POLYGON_MUMBAI_RPC_URL;
module.exports = {
contracts_build_directory: path.join(__dirname, 'truffle/abis'),
contracts_directory: path.join(__dirname, 'truffle/contracts'),
migrations_directory: path.join(__dirname, 'truffle/migrations'),
networks: {
development: {
host: '127.0.0.1', // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: '*', // Any network (default: none)
},
matic: {
provider: () => {
return new HDWalletProvider(mnemonic, url);
},
network_id: '80001',
},
binance: {
provider: () =>
new HDWalletProvider(
mnemonic,
'https://data-seed-prebsc-1-s1.binance.org:8545'
),
network_id: 97,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true,
},
rinkeby: {
provider: () => {
return new HDWalletProvider(
mnemonic,
`https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161`
);
},
network_id: '4',
skipDryRun: true,
},
},
compilers: {
solc: {
version: '0.8.4',
optimizer: {
enabled: true,
runs: 200,
},
},
},
};