Skip to content

Instantly share code, notes, and snippets.

@ilovelili
Created October 12, 2020 14:48
Show Gist options
  • Save ilovelili/895fa92f9fe80b2805814413b6676f76 to your computer and use it in GitHub Desktop.
Save ilovelili/895fa92f9fe80b2805814413b6676f76 to your computer and use it in GitHub Desktop.
require("dotenv").config();
const {ethers} = require("ethers");
const HDWalletProvider = require("@truffle/hdwallet-provider");
const infuraUri = process.env.INFURA_URI || "";
const infuraTestnetUri = process.env.INFURA_TESTNET_URI || "";
const privKey = process.env.PRIVATE_KEY || "";
module.exports = {
networks: {
mainnet: {
networkCheckTimeout: 10000,
provider: () => new HDWalletProvider(privKey, infuraUri),
network_id: 1,
gasPrice: ethers.utils.parseUnits("50", "gwei").toString(),
gas: 6000000,
},
testnet: {
networkCheckTimeout: 10000,
provider: () => new HDWalletProvider(privKey, infuraTestnetUri),
network_id: 42, // kovan
gasPrice: ethers.utils.parseUnits("70", "gwei").toString(),
gas: 6000000,
},
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
},
mainnetFork: {
host: "127.0.0.1",
port: 8545,
network_id: 1,
skipDryRun: true,
},
tenderly: {
host: "127.0.0.1",
port: 9545,
network_id: "*",
gasPrice: 0,
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment