-
Notifications
You must be signed in to change notification settings - Fork 3
/
truffle-config.js
57 lines (55 loc) · 1.32 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
//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, "src/abis"),
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: () => new HDWalletProvider(mnemonic, url),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
rinkeby: {
provider: () => {
return new HDWalletProvider(mnemonic, url);
},
network_id: "4",
skipDryRun: true,
},
ganache: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
},
kovan: {
provider: () => {
return new HDWalletProvider(mnemonic, url);
},
network_id: "42",
skipDryRun: true,
},
},
compilers: {
solc: {
version: "0.6.6",
optimizer: {
enabled: true,
runs: 200,
},
},
},
api_keys: {
polygonscan: process.env.POLYGONSCAN_API_KEY,
},
plugins: ["truffle-plugin-verify"],
};