This commit is contained in:
Roman Storm 2021-02-10 21:37:18 -08:00
parent 77af0c5bdd
commit 3c4def1e64
No known key found for this signature in database
GPG key ID: 522F2A785F34E71F
12 changed files with 6724 additions and 78 deletions

View file

@ -1,6 +1,6 @@
require('dotenv').config()
const HDWalletProvider = require('@truffle/hdwallet-provider')
const utils = require('web3-utils')
require("dotenv").config();
const HDWalletProvider = require("@truffle/hdwallet-provider");
const utils = require("web3-utils");
// const infuraKey = "fj4jll3k.....";
//
// const fs = require('fs');
@ -25,9 +25,9 @@ module.exports = {
// options below to some value.
development: {
host: '127.0.0.1', // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: '*', // Any network (default: none)
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
// Another network with more advanced options...
@ -43,31 +43,56 @@ module.exports = {
// Useful for deploying to a public network.
// NB: It's important to wrap the provider as a function.
kovan: {
provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, 'https://kovan.infura.io/v3/97c8bf358b9942a9853fab1ba93dc5b3'),
provider: () =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
"https://kovan.infura.io/v3/97c8bf358b9942a9853fab1ba93dc5b3"
),
network_id: 42,
gas: 6000000,
gasPrice: utils.toWei('1', 'gwei'),
gasPrice: utils.toWei("1", "gwei"),
// confirmations: 0,
// timeoutBlocks: 200,
skipDryRun: true
skipDryRun: true,
},
goerli: {
provider: () =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
"https://goerli.infura.io/v3/d34c08f2cb7c4111b645d06ac7e35ba8"
),
network_id: 5,
gas: 6000000,
gasPrice: utils.toWei("1", "gwei"),
// confirmations: 0,
// timeoutBlocks: 200,
skipDryRun: true,
},
rinkeby: {
provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, 'https://rinkeby.infura.io/v3/97c8bf358b9942a9853fab1ba93dc5b3'),
provider: () =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
"https://rinkeby.infura.io/v3/97c8bf358b9942a9853fab1ba93dc5b3"
),
network_id: 4,
gas: 6000000,
gasPrice: utils.toWei('1', 'gwei'),
gasPrice: utils.toWei("1", "gwei"),
// confirmations: 0,
// timeoutBlocks: 200,
skipDryRun: true
skipDryRun: true,
},
mainnet: {
provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, 'http://ethereum-rpc.trustwalletapp.com'),
provider: () =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
"http://ethereum-rpc.trustwalletapp.com"
),
network_id: 1,
gas: 6000000,
gasPrice: utils.toWei('2', 'gwei'),
gasPrice: utils.toWei("2", "gwei"),
// confirmations: 0,
// timeoutBlocks: 200,
skipDryRun: true
skipDryRun: true,
},
// Useful for private networks
@ -86,21 +111,24 @@ module.exports = {
// Configure your compilers
compilers: {
solc: {
version: '0.5.17', // Fetch exact version from solc-bin (default: truffle's version)
version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
settings: { // See the solidity docs for advice about optimization and evmVersion
settings: {
// See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: true,
runs: 200
runs: 200,
},
// evmVersion: "byzantium"
}
},
},
external: {
command: 'node ./compileHasher.js',
targets: [{
path: './build/Hasher.json'
}]
}
}
}
command: "node ./compileHasher.js",
targets: [
{
path: "./build/Hasher.json",
},
],
},
},
};