const HDWalletProvider = require('@truffle/hdwallet-provider'); require('dotenv').config();
module.exports = {
networks: {
live: {
provider: () =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}
),
network_id: 1, // Ethereum Mainnet
gas: 6721975, // Gas limit
gasPrice: 230000000000, // Gas price: 230 Gwei
confirmations: 2, // Confirmations before deployment
timeoutBlocks: 200,
skipDryRun: true,
},
},
compilers: {
solc: {
version: '0.8.20',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
};
truffle compile