-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.ts
55 lines (52 loc) · 1.62 KB
/
hardhat.config.ts
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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomiclabs/hardhat-ethers";
import "@openzeppelin/hardhat-upgrades";
import * as dotenv from "dotenv";
import "./task/swap_redeem"
import "./task/grant_roles"
dotenv.config();
const ALCHEMY_PROJECT_ID = process.env.ALCHEMY_PROJECT_ID || '';
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || '';
const POLYSCAN_API_KEY = process.env.POLYSCAN_API_KEY || '';
const BSCSCAN_API_KEY = process.env.BSCSCAN_API_KEY || '';
const MNEMONIC = process.env.MNEMONIC || '';;
const GOERLI_URL = process.env.ALCHEMY_PROJECT_ID ? `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_PROJECT_ID}` : '';
const BSC_TEST_URL = `https://data-seed-prebsc-1-s1.binance.org:8545/`;
const MATIC_TEST_URL = `https://polygon-mumbai.g.alchemy.com/v2/${POLYSCAN_API_KEY}`;
const config: HardhatUserConfig = {
solidity: "0.8.17",
networks: {
goerli: {
url: GOERLI_URL,
allowUnlimitedContractSize: true,
accounts: { mnemonic: MNEMONIC }
},
bscTestnet: {
url: BSC_TEST_URL || "",
allowUnlimitedContractSize: true,
chainId: 97,
gasPrice: 20000000000,
accounts: { mnemonic: MNEMONIC }
},
polygonMumbai: {
url: MATIC_TEST_URL,
chainId: 80001,
gasPrice: 20000000000,
accounts: { mnemonic: MNEMONIC }
},
},
gasReporter: {
enabled: false,
currency: "USD",
},
etherscan: {
apiKey: {
goerli: ETHERSCAN_API_KEY,
bscTestnet: BSCSCAN_API_KEY,
polygonMumbai: POLYSCAN_API_KEY
}
}
};
export default config;