-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
63 lines (60 loc) · 2.06 KB
/
hardhat.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require("dotenv").config();
require("@nomiclabs/hardhat-waffle");
require("hardhat-gas-reporter");
require('@typechain/hardhat')
require('@nomiclabs/hardhat-ethers')
require('@nomiclabs/hardhat-waffle')
require("@nomiclabs/hardhat-etherscan")
require('@openzeppelin/hardhat-upgrades')
require('solidity-coverage')
// Go to https://www.alchemyapi.io, sign up, create
// a new App in its dashboard, and replace "KEY" with its key
const ALCHEMY_API_KEY_ETHEREUM = process.env.ALCHEMY_API_KEY_ETHEREUM
const ALCHEMY_API_KEY_POLYGON = process.env.ALCHEMY_API_KEY_POLYGON
const ALCHEMY_API_KEY_POLYGON_MAINNET = process.env.ALCHEMY_API_KEY_POLYGON_MAINNET
// Replace this private key with your Ropsten account private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Be aware of NEVER putting real Ether into testing accounts
const WALLET_PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY
const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: "0.8.12",
networks: {
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY_ETHEREUM}`,
accounts: [`0x${WALLET_PRIVATE_KEY}`],
gasMultiplier: 1.5,
},
mumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY_POLYGON}`,
accounts: [`0x${WALLET_PRIVATE_KEY}`],
gasMultiplier: 1.5,
},
polygon_mainnet: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY_POLYGON_MAINNET}`,
accounts: [`0x${WALLET_PRIVATE_KEY}`],
gasMultiplier: 1.5,
}
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: {
goerli: ETHERSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
polygon: POLYGONSCAN_API_KEY
}
},
gasReporter: {
currency: 'EUR',
gasPrice: 40,
coinmarketcap: process.env.COINMARKETCAP_KEY,
token: 'MATIC'
},
plugins: ["solidity-coverage"]
};