Skip to content

Instantly share code, notes, and snippets.

@sameepsi
Created June 14, 2020 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sameepsi/59a3b9cab0af9b530d035d5d43a4b865 to your computer and use it in GitHub Desktop.
Save sameepsi/59a3b9cab0af9b530d035d5d43a4b865 to your computer and use it in GitHub Desktop.
const HDWalletProvider = require("truffle-hdwallet-provider");
require('dotenv').config(); // Store environment-specific variable from '.env' to process.env
module.exports = {
/**
* Networks define how you connect to your ethereum client and let you set the
* defaults web3 uses to send transactions. If you don't specify one truffle
* will spin up a development blockchain for you on port 9545 when you
* run `develop` or `test`. You can ask a truffle command to use a specific
* network from the command line, e.g
*
* $ truffle test --network <network-name>
*/
networks: {
matic: {
provider: () => new HDWalletProvider(process.env.PK, `https://testnetv3.matic.network`),
network_id: 15001,
gasPrice: '1000000000',
confirmations: 5,
timeoutBlocks: 200,
skipDryRun: true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment