-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
64 lines (57 loc) · 1.36 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
58
59
60
61
62
63
64
const HDWalletProvider = require("@truffle/hdwallet-provider");
require("dotenv").config();
const RPC_URL_Alchemy_SEPOLIA = process.env.RPC_URL_Alchemy_SEPOLIA;
const Private_Key = process.env.GANACHE_PRIVATE_KEY;
const Etherscan_API_KEY = process.env.Etherscan_API_KEY;
const Coinmarketcap_API_KEY = process.env.Coinmarketcap_API_KEY;
module.exports = {
networks: {
development: {
host: "172.28.128.1",
port: 7545,
network_id: "*",
},
hardhat: {
chainId: 31337,
},
sepolia: {
provider: () =>
new HDWalletProvider(Private_Key, RPC_URL_Alchemy_SEPOLIA),
network_id: 11155111,
confirmations: 6,
timeoutBlocks: 200,
skipDryRun: true,
},
},
migrations_directory: "./deploy",
// Configure compiler
compilers: {
solc: {
version: "0.8.27",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
// Mocha testing configuration
mocha: {
timeout: 1000000,
},
// Etherscan verification plugin configuration
plugins: ["truffle-plugin-verify"],
api_keys: {
etherscan: Etherscan_API_KEY,
},
// Optional: Gas reporter configuration
gasReporter: {
enabled: true,
currency: "USD",
coinmarketcap: Coinmarketcap_API_KEY,
token: "ETH",
outputFile: "gas-reporter.txt",
noColors: true,
},
};