Created
July 23, 2020 07:33
-
-
Save rahuldamodar94/5eb7dc19303378e6dcf09b11116a00ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HDWalletProvider = require("@truffle/hdwallet-provider"); | |
// | |
// const fs = require('fs'); | |
// const mnemonic = fs.readFileSync(".secret").toString().trim(); | |
const MNEMONIC = | |
process.env.MNEMONIC || | |
""; | |
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: { | |
root: { | |
provider: () => | |
new HDWalletProvider( | |
MNEMONIC, | |
`https://goerli.infura.io/v3/5687b932e64441e5a297a0bfba8895cd` | |
), | |
network_id: 5, | |
gas: 7000000, | |
gasPrice: 10000000000, // 10 gwei | |
skipDryRun: true, | |
}, | |
child: { | |
provider: () => | |
new HDWalletProvider(MNEMONIC, "https://rpc-mumbai.matic.today"), | |
network_id: 80001, | |
gas: 7000000, | |
gasPrice: 10000000000, // 10 gwei | |
skipDryRun: true, | |
}, | |
}, | |
// Configure your compilers | |
compilers: { | |
solc: { | |
version: "0.6.6", // Fetch exact version from solc-bin (default: truffle's version) | |
docker: true, // Use "0.5.1" you've installed locally with docker (default: false) | |
parser: "solcjs", | |
settings: { | |
// See the solidity docs for advice about optimization and evmVersion | |
// optimizer: { | |
// enabled: false, | |
// runs: 200 | |
// } | |
evmVersion: "constantinople", | |
}, | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment