Skip to content

Instantly share code, notes, and snippets.

@SwizzSamuel
Created January 28, 2022 14:33
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 SwizzSamuel/12ec3a65af9565cf1408ec0d84b155c1 to your computer and use it in GitHub Desktop.
Save SwizzSamuel/12ec3a65af9565cf1408ec0d84b155c1 to your computer and use it in GitHub Desktop.
const path = require("path");
require('dotenv').config({ path: './.env'});
const HDWalletProvider = require("@truffle/hdwallet-provider");
const AccountIndex = 0;
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks: {
develop: {
port: 7545,
host: "127.0.0.1",
network_id: 5777
},
ganache_local: {
provider: function() {
return new HDWalletProvider(process.env.MNEMONIC, "http://127.0.0.1:7545", AccountIndex)
},
network_id: 5777
},
goerli_infura: {
provider: function() {
return new HDWalletProvider(process.env.MNEMONIC, "https://goerli.infura.io/v3/fee8917ab09e4e409ada6f602b288672", AccountIndex)
},
network_id: 5
},
ropsten_infura: {
provider: function() {
return new HDWalletProvider(process.env.MNEMONIC, "https://ropsten.infura.io/v3/fee8917ab09e4e409ada6f602b288672", AccountIndex)
},
network_id: 3
}
},
compilers: {
solc: {
version: "0.6.2"
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment