-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtruffle-config.js
46 lines (43 loc) · 1.29 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
const HDWalletProvider = require("@truffle/hdwallet-provider");
const dotenv = require('dotenv');
// Load environment variables from a .env file
dotenv.config();
const mnemonic = process.env.MNEMONIC;
const bscTestnetRpc = process.env.BSC_TESTNET_RPC;
const bscMainnetRpc = process.env.BSC_MAINNET_RPC;
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*", // Match any network id
},
bscTestnet: {
provider: () =>
new HDWalletProvider(mnemonic, bscTestnetRpc),
network_id: "97", // Binance Smart Chain Testnet
gas: 5500000, // Gas limit
confirmations: 10, // Number of confirmations to wait for
timeoutBlocks: 200, // # of blocks before a deployment times out
},
bscMainnet: {
provider: () =>
new HDWalletProvider(mnemonic, bscMainnetRpc),
network_id: "56", // Binance Smart Chain Mainnet
gas: 5500000, // Gas limit
confirmations: 10, // Number of confirmations to wait for
timeoutBlocks: 200, // # of blocks before a deployment times out
},
},
compilers: {
solc: {
version: "0.8.0", // Specify the Solidity version
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
};