Skip to content

Commit 640021f

Browse files
committed
docs: Update README to include Hardhat Keystore usage for managing secrets
1 parent 63a6a49 commit 640021f

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,32 @@ npm run compile
9494

9595
#### 3. Environment Setup
9696

97-
Create `.env` file and add your environment variables. You can use `.env.example` as a template.
97+
This project uses [Hardhat Keystore](https://hardhat.org/plugins/nomicfoundation-hardhat-keystore) to securely manage sensitive configuration variables like private keys and RPC URLs. Secrets are stored encrypted and never committed to disk in plain text.
9898

99-
If you are going to use public network, make sure you include the right RPC provider for that network.
99+
**Set your private key**
100100

101-
Make sure you include either `MNEMONIC` or `PRIVATE_KEY` in your `.env` file.
101+
```shell
102+
npx hardhat keystore set PRIVATE_KEY
103+
```
104+
105+
**Set your RPC URLs** (for the networks you plan to use)
106+
107+
```shell
108+
npx hardhat keystore set SEPOLIA_RPC_URL
109+
npx hardhat keystore set MAINNET_RPC_URL
110+
```
111+
112+
**Set your Etherscan API key** (for contract verification)
113+
114+
```shell
115+
npx hardhat keystore set ETHERSCAN_API_KEY
116+
```
117+
118+
**List stored variables**
119+
120+
```shell
121+
npx hardhat keystore list
122+
```
102123

103124
### Example Flow - Deploy ERC721 Token
104125

@@ -113,7 +134,7 @@ npx hardhat ignition deploy ignition/modules/BasicERC721Module.ts --network sepo
113134
**Verify contract**
114135

115136
```shell
116-
npx hardhat ignition verify chain-11155111
137+
npx hardhat ignition verify chain-11155111 --network sepolia
117138
```
118139

119140
#### 1.2 Deploy and Verify
@@ -134,7 +155,7 @@ npx hardhat ignition deploy ignition/modules/BasicERC721Module.ts --network sepo
134155

135156
```shell
136157
npx hardhat erc721-mint \
137-
--contract 0x1FEB5675Be6F256c4680BE447D6C353E02e04fb9 \
158+
--contract 0x3fCB912bfb67B78121C5F326C24fBb0D2ca146dD \
138159
--recipient 0x73faDd7E476a9Bc2dA6D1512A528366A3E50c3cF \
139160
--network sepolia
140161
```

0 commit comments

Comments
 (0)