-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
32 lines (28 loc) · 976 Bytes
/
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
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config(); // Load environment variables from .env file
const mnemonic = process.env.MNEMONIC;
const alchemyUrl = process.env.ALCHEMY_URL;
module.exports = {
networks: {
mumbai: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: mnemonic,
},
providerOrUrl: alchemyUrl,
}),
network_id: 80001, // Polygon mumbai network id
gasPrice: 20, // Adjust the gas price as needed
gas: 80000, // Gas limit
confirmations: 2, // Number of confirmations to wait before deployment is considered successful
timeoutBlocks: 200, // Number of blocks to wait before deployment times out
skipDryRun: true, // Skip the dry run before deployment
},
},
compilers: {
solc: {
version: '0.8.0', // Use the Solidity compiler version that your contract was developed with
},
},
};