Skip to content

Commit c62faa3

Browse files
authored
Merge pull request #851 from acashmoney/patch-3
Update hardhat.md
2 parents 1b8a6dc + cdc9765 commit c62faa3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/develop/hardhat.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,15 @@ The sample project will ask you to install hardhat-waffle and hardhat-ethers.You
3737
require('dotenv').config();
3838
require("@nomiclabs/hardhat-ethers");
3939
require("@nomiclabs/hardhat-etherscan");
40-
const fs = require('fs');
41-
const privateKey = fs.readFileSync(".secret").toString().trim();
40+
4241
module.exports = {
4342
defaultNetwork: "matic",
4443
networks: {
4544
hardhat: {
4645
},
4746
matic: {
4847
url: "https://rpc-mumbai.maticvigil.com",
49-
accounts: [privateKey]
48+
accounts: [process.env.PRIVATE_KEY]
5049
}
5150
},
5251
etherscan: {
@@ -64,6 +63,8 @@ module.exports = {
6463
}
6564
```
6665

66+
> Make sure to update the Solidity compiler version here based on what is required in your contract(s).
67+
6768
## **Compile Smart contract file**
6869

6970
```bash
@@ -91,7 +92,7 @@ You can check the deployment status here: https://mumbai.polygonscan.com/
9192

9293
## **Verifying contract on Polygonscan**
9394

94-
Run the following commands to quickly verify your contract on Polygonscan. This makes it easy for anyone to see the source code of your deployed contract.
95+
Run the following commands to quickly verify your contract on Polygonscan. This makes it easy for anyone to see the source code of your deployed contract. For contracts that have a constructor with a complex argument list, see [here](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html).
9596

9697
```bash
9798
$ npm install --save-dev @nomiclabs/hardhat-etherscan

0 commit comments

Comments
 (0)