Skip to content

Instantly share code, notes, and snippets.

@anataliocs
Created May 2, 2022 20:54
Show Gist options
  • Save anataliocs/1b28c215ff9b33fbb1a9d084e49aaea9 to your computer and use it in GitHub Desktop.
Save anataliocs/1b28c215ff9b33fbb1a9d084e49aaea9 to your computer and use it in GitHub Desktop.
truffle-config.js
const path = require("path");
const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonic = "";
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: {
host: "127.0.0.1",
port: 8545,
network_id: "*", // match any network
websockets: true,
},
rinkeby: {
provider: function () {
return new HDWalletProvider(
mnemonic,
"https://rinkeby.infura.io/v3/YOUR_PROJECT_ID"
);
},
network_id: 4,
},
},
compilers: {
solc: {
version: "^0.6.0", // A version or constraint - Ex. "^0.5.0"
// Can also be set to "native" to use a native solc
parser: "solcjs", // Leverages solc-js purely for speedy parsing
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment