Created
January 28, 2022 14:33
-
-
Save SwizzSamuel/12ec3a65af9565cf1408ec0d84b155c1 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 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