Skip to content

Commit

Permalink
2.0 reset
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanquera committed Mar 6, 2022
1 parent b13c8ff commit 120917d
Show file tree
Hide file tree
Showing 19 changed files with 2,541 additions and 13,106 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 42 additions & 16 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-waffle");
require("hardhat-contract-sizer");
require("hardhat-gas-reporter");
require('dotenv').config();

const PRIVATE_KEY = process.env.PRIVATE_KEY;
const CMC_KEY = process.env.CMC_KEY;

// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async () => {
Expand All @@ -22,21 +21,40 @@ task("accounts", "Prints the list of accounts", async () => {
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
defaultNetwork: "hardhat",
defaultNetwork: process.env.BLOCKCHAIN_NETWORK,
networks: {
hardhat: {
chainId: 1337,
mining: {
//set this to false if you want localhost to mimick a real blockchain
auto: true,
interval: 5000
}
},
matic: {
url: "https://rpc-mumbai.maticvigil.com",
accounts: [PRIVATE_KEY]
localhost: {
url: "http://127.0.0.1:8545",
accounts: [process.env.BLOCKCHAIN_LOCALHOST_PRIVATE_KEY],
contracts: [
process.env.BLOCKCHAIN_LOCALHOST_CONTRACT_ADDRESS
]
},
testnet: {
url: "https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
accounts: [process.env.BLOCKCHAIN_TESTNET_PRIVATE_KEY],
contracts: [
process.env.BLOCKCHAIN_TESTNET_CONTRACT_ADDRESS
]
},
mainnet: {
url: "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
accounts: [process.env.BLOCKCHAIN_MAINNET_PRIVATE_KEY],
contracts: [
process.env.BLOCKCHAIN_MAINNET_CONTRACT_ADDRESS
]
},
ropsten: {
url: "https://eth-ropsten.alchemyapi.io/v2/YoNVLItXnYnhbJkzY9PMEAyOYn5dDGpn",
accounts: [PRIVATE_KEY]
}
},
solidity: {
version: "0.8.4",
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
Expand All @@ -46,7 +64,7 @@ module.exports = {
},
paths: {
sources: "./contracts",
tests: "./test",
tests: "./tests",
cache: "./cache",
artifacts: "./artifacts"
},
Expand All @@ -55,8 +73,16 @@ module.exports = {
},
gasReporter: {
currency: 'USD',
token: 'MATIC', //comment this out if you want ETH
coinmarketcap: CMC_KEY,
gasPrice: 200,
coinmarketcap: process.env.BLOCKCHAIN_CMC_KEY,
gasPrice: 200
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.BLOCKCHAIN_SCANNER_KEY
},
contractSizer: {
//see: https://www.npmjs.com/package/hardhat-contract-sizer
runOnCompile: true
}
};
Loading

0 comments on commit 120917d

Please sign in to comment.