You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feel free to add more networks in `hardhat.config.ts` file.
70
70
71
-
## Hardhat Shorthand
71
+
## Common Hardhat Commands
72
72
73
-
We recommend installing `hh autocomplete` so you can use `hh` shorthand globally.
74
-
75
-
```shell
76
-
npm i -g hardhat-shorthand
77
-
```
78
-
79
-
https://hardhat.org/guides/shorthand.html
80
-
81
-
### Common Shorthand Commands
82
-
83
-
-`hh compile` - to compile smart contract and generate typechain ts bindings
84
-
-`hh test` - to run tests
85
-
-`hh igntion` - to deploy smart contracts
86
-
-`hh node` - to run a localhost node
87
-
-`hh help` - to see all available commands
88
-
-`hh TABTAB` - to use autocomplete
73
+
-`npx hardhat compile` - to compile smart contract and generate typechain ts bindings
74
+
-`npx hardhat test` - to run tests
75
+
-`npx hardhat ignition` - to deploy smart contracts
76
+
-`npx hardhat node` - to run a localhost node
77
+
-`npx hardhat help` - to see all available commands
89
78
90
79
## Usage
91
80
@@ -105,11 +94,32 @@ npm run compile
105
94
106
95
#### 3. Environment Setup
107
96
108
-
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.
98
+
99
+
**Set your private key**
100
+
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)
109
113
110
-
If you are going to use public network, make sure you include the right RPC provider for that network.
114
+
```shell
115
+
npx hardhat keystore set ETHERSCAN_API_KEY
116
+
```
117
+
118
+
**List stored variables**
111
119
112
-
Make sure you include either `MNEMONIC` or `PRIVATE_KEY` in your `.env` file.
120
+
```shell
121
+
npx hardhat keystore list
122
+
```
113
123
114
124
### Example Flow - Deploy ERC721 Token
115
125
@@ -118,34 +128,34 @@ Make sure you include either `MNEMONIC` or `PRIVATE_KEY` in your `.env` file.
0 commit comments