-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtruffle-config.js
More file actions
93 lines (91 loc) · 2.84 KB
/
truffle-config.js
File metadata and controls
93 lines (91 loc) · 2.84 KB
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
88
89
90
91
92
93
require("dotenv").config()
const HDWalletProvider = require("@truffle/hdwallet-provider")
const TestRPC = require("ganache-cli")
const {
ETH_PKEY_TESTNET,
ETH_PKEY_MAINNET,
INFURA_PROJECT_ID,
ETHERSCAN_API,
} = process.env
module.exports = {
networks: {
development: {
provider: TestRPC.provider({
mnemonic: "myth like bonus scare over problem client lizard pioneer submit female collect",
gasPrice: "0x4A817C800",
}),
network_id: "*", // Any network (default: none)
},
// truffle develop console
develop: {
host: "127.0.0.1",
port: 8545,
network_id: "*",
defaultEtherBalance: 500,
},
goerli: {
provider: () =>
new HDWalletProvider({
privateKeys: [ETH_PKEY_TESTNET],
providerOrUrl: `https://goerli.infura.io/v3/${INFURA_PROJECT_ID}`,
}),
network_id: "5",
gas: 10000000,
gasPrice: 2000000000,
skipDryRun: true,
},
sepolia: {
provider: () =>
new HDWalletProvider({
privateKeys: [ETH_PKEY_TESTNET],
providerOrUrl: `https://sepolia.infura.io/v3/${INFURA_PROJECT_ID}`,
}),
network_id: "11155111",
gas: 10000000,
gasPrice: 5000000000,
skipDryRun: true,
},
mainnet: {
provider: () =>
new HDWalletProvider({
privateKeys: [ETH_PKEY_MAINNET],
providerOrUrl: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
}),
network_id: "1",
gasPrice: 40000000000,
},
polygon: {
provider: () =>
new HDWalletProvider({
privateKeys: [ETH_PKEY_MAINNET],
providerOrUrl: `https://polygon-mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
}),
network_id: "137",
gasPrice: 40000000000,
},
polygon_mumbai: {
provider: () =>
new HDWalletProvider({
privateKeys: [ETH_PKEY_TESTNET],
providerOrUrl: `https://polygon-mumbai.infura.io/v3/${INFURA_PROJECT_ID}`,
}),
network_id: "80001",
gasPrice: 3000000000,
},
},
plugins: ["truffle-plugin-verify", "solidity-coverage", "@chainsafe/truffle-plugin-abigen"],
api_keys: {
etherscan: ETHERSCAN_API,
},
compilers: {
solc: {
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
}
}
}
}
}