-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
49 lines (43 loc) · 1.42 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
require("hardhat/config");
require("@nomicfoundation/hardhat-toolbox");
require("solidity-coverage");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-ethers");
require("@nomicfoundation/hardhat-chai-matchers");
/* const config: HardhatUserConfig = {
solidity: "0.8.0",
};
export default config; */
module.exports = {
solidity: {
version: "0.8.1",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
rinkeby: {
url: "https://rinkeby.infura.io/v3/cbd7a030c41f474ead18fed833b6acab",
accounts: ['b8d0a4e0592db1c3e01de62ffc39915de38acc4d41b2e2331dcd4eb733d4973f']
}
},
etherscan: {
apiKey: "ZP5RNZM5HNIMDKYX2QYAAXS8CSU3644CPK"
},
};
task("deploy", "Deploys contract on a provided network")
.setAction(async () => {
const deployNftMarketplaceContract = require("./scripts/deploy");
await deployNftMarketplaceContract();
});
subtask("print", "Prints useful information after deployment")
.addParam("marketPlaceAddress", "The address of the MarketPlace contract after deployment")
.addParam("marketItemAddress", "The address of the MarketItem contract after deployment")
.setAction(async (taskArgs) => {
console.log(`MarketPlace address: ${taskArgs.marketPlaceAddress}`);
console.log(`MarketItem address: ${taskArgs.marketItemAddress}`);
console.log('Deployment successfull!');
});