Skip to content

Instantly share code, notes, and snippets.

@eerkaijun
Last active January 4, 2021 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eerkaijun/da9c8c32aa30db121ae7bee92e57ecb1 to your computer and use it in GitHub Desktop.
Save eerkaijun/da9c8c32aa30db121ae7bee92e57ecb1 to your computer and use it in GitHub Desktop.
const HDWalletProvider = require('@truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
ropsten: {
provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/<ID>`),
network_id: 3, // Ropsten's id
gas: 5500000, // Ropsten has a lower block limit than mainnet
confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
},
// Configure your compilers
compilers: {
solc: {
version: "0.6.4", // Fetch exact version from solc-bin (default: truffle's version)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment