forked from kingwel-xie/kuggamax-contracts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.js
90 lines (77 loc) · 2.65 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
require("@nomiclabs/hardhat-waffle");
require('dotenv').config();
require("./tasks/kuggamax-tasks");
require("./tasks/kuggamax-tasks-permit");
const ACCOUNT_PRIVATE_KEY = process.env.ACCOUNT_PRIVATE_KEY;
const NODE_API_KEY = process.env.INFURA_API_KEY || process.env.ALCHEMY_API_KEY;
const isInfura = !!process.env.INFURA_API_KEY;
if ((!ACCOUNT_PRIVATE_KEY || !NODE_API_KEY)) {
console.error("Please set a ACCOUNT_PRIVATE_KEY and ALCHEMY_API_KEY or INFURA_API_KEY.");
process.exit(0);
}
const polygonMainetNodeUrl = isInfura
? "https://polygon-mainnet.infura.io/v3/" + NODE_API_KEY
: "https://polygon-mainnet.g.alchemy.com/v2/" + NODE_API_KEY;
const polygonNumbaiNodeUrl = isInfura
? "https://polygon-mumbai.infura.io/v3/" + NODE_API_KEY
: "https://polygon-mumbai.g.alchemy.com/v2/" + NODE_API_KEY;
// 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 = "KEY";
// // 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 ROPSTEN_PRIVATE_KEY = "fac50ba7eb2bcbf8c80abd07732abee20d8b0d30a4099cfe065e010d4cd212d7";
// const MATIC_PRIVATE_KEY = "fac50ba7eb2bcbf8c80abd07732abee20d8b0d30a4099cfe065e010d4cd212d7"
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
//defaultNetwork: 'maticmum',
defaultNetwork: 'localhost',
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 2000,
details: {
yul: true,
yulDetails: {
stackAllocation: true,
optimizerSteps: "dhfoDgvulfnTUtnIf"
}
}
}
}
},
networks: {
localhost: {
deployedContracts: {
kuggamax: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512'
}
},
// ropsten: {
// url: `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
// accounts: [`0x${ROPSTEN_PRIVATE_KEY}`]
// },
// mumbai: {
// url: `https://rpc-mumbai.maticvigil.com/`,
// accounts: [`0x${MATIC_PRIVATE_KEY}`],
// deployedContracts: {
// kuggamax: '0xdf6B79624a2fc9C84ca7029e677ab482cF4BE2A0',
// }
// },
matic: {
url: polygonMainetNodeUrl,
accounts: [`0x${ACCOUNT_PRIVATE_KEY}`]
},
maticmum: {
url: polygonNumbaiNodeUrl,
gasLimit:46000000,
accounts: [`0x${ACCOUNT_PRIVATE_KEY}`],
deployedContracts:{
kuggamax: '0x2F7B9cAdBDf555F035201BBa9F48784472e1F312'
}
}
}
};