Skip to content

Commit 339ebaf

Browse files
committed
docs(common): add links to HH template
1 parent 0c67caf commit 339ebaf

File tree

9 files changed

+45
-501
lines changed

9 files changed

+45
-501
lines changed

docs/solidity-guides/SUMMARY.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
- [Quick Start - Hardhat](hardhat/README.md)
66
- [Prerequisites](hardhat/prerequisites.md)
77
- [1. Setting up Hardhat](hardhat/1.-setting-up-hardhat.md)
8-
- [2. Writing contracts](hardhat/2.-writing-contracts.md)
9-
- [3. Testing in mocked mode](hardhat/3.-testing-in-mocked-mode.md)
10-
- [4. Deploying the contract](hardhat/4.-deploying-the-contract.md)
11-
- [5. Interacting with the contract](hardhat/5.-interacting-with-the-contract.md)
8+
- [2. Quick start](hardhat/2.-quickstart.md)
129

1310
## Encrypted Types & Operations
1411

docs/solidity-guides/hardhat/1.-setting-up-hardhat.md

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,57 @@ git clone <your-new-repo-url>
1515
cd <your-new-repo-name>
1616
```
1717

18-
{% embed url="https://scribehow.com/embed/Step_1__M1Gjr6SAQuOsPyT7luekmw?removeLogo=true&skipIntro=true" %}
19-
2018
## Step 2: Configure the environment
2119

22-
1. Copy the environment configuration template:
20+
# Install
21+
22+
#### ✅ 1. Install bun.
23+
24+
The FHEVM Hardhat Template requires the popular [Bun](https://bun.sh) runtime to be installed.
25+
26+
[Bun](https://bun.sh) is a modern and ultra-fast all-in-one JavaScript runtime — an alternative to Node.js + npm.
27+
28+
Visit [https://bun.sh](https://bun.sh) for installation instructions.
29+
30+
> [!Note]
31+
>
32+
> You can also use **npm** instead of Bun. In that case, replace commands like `bun <cmd>` with `npm <cmd>` and
33+
> `bunx <cmd>` with `npx <cmd>`.
34+
35+
#### ✅ 2. Install the template dependencies.
2336

24-
```sh
25-
cp .env.example .env
26-
```
37+
```sh
38+
bun install
39+
```
2740

28-
2. Install project dependencies: Depending on your package manager, run one of the following:
41+
#### ✅ 3. Set up the `MNEMONIC` [Hardhat Configuration Variables](https://hardhat.org/hardhat-runner/docs/guides/configuration-variables).
2942

30-
```sh
31-
# Using npm
32-
npm install
43+
```sh
44+
bunx hardhat vars set MNEMONIC
45+
? Enter value: ‣ #here is where your twelve words mnemonic should be put
46+
```
3347

34-
# Using yarn
35-
yarn install
48+
- 🔐 Don’t have a `MNEMONIC`? Generate one at using Metamask or your favorite generator.
49+
- 📘 What is a `MNEMONIC`:
50+
[https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki)
3651

37-
# Using pnpm
38-
pnpm install
39-
```
52+
#### ✅ 4. Set up the `INFURA-PRIVATE-KEY` [Hardhat Configuration Variables](https://hardhat.org/hardhat-runner/docs/guides/configuration-variables).
53+
54+
```sh
55+
bunx hardhat vars set INFURA-PRIVATE-KEY
56+
? Enter value: ‣ #here is where your private key should be put
57+
```
4058

41-
{% embed url="https://scribehow.com/embed/Step_2_Copy__dIIvxIkrTPWTMD-A9s3Twg?removeLogo=true&skipIntro=true" %}
59+
- 🔐 Don’t have an `INFURA_PRIVATE_KEY`? You can get one at https://docs.metamask.io/services/get-started/infura/.
4260

43-
## Project structure overview
61+
> [!IMPORTANT]
62+
>
63+
> You can enter `zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz` if you prefer not to set your `INFURA_PRIVATE_KEY`. If you choose to
64+
> do so, you will not be able to deploy & test on Sepolia Ethereum Testnet.
4465
45-
- **`contracts/`**: Write your Solidity smart contracts here.
46-
- **`test/`**: Place your test scripts for smart contract testing.
47-
- **`deploy/`**: Deployment scripts for deploying your contracts.
48-
- **`hardhat.config.js`**: The pre-configured Hardhat setup file for deploying on Sepolia.
49-
- **`.env`:** The environment file that stores sensitive or environment-specific variables such as private keys and API keys.
66+
#### ❌ Hardhat Error Message
5067

51-
To learn more about Hardhat, refer to the [official Hardhat documentation](https://hardhat.org/hardhat-runner/docs/getting-started#overview).
68+
If any of the requested Hardhat Configuration Variables is missing, you'll get an error message like this one:
5269

53-
---
70+
`Error HH1201: Cannot find a value for the configuration variable 'MNEMONIC'. Use 'npx hardhat vars set MNEMONIC' to set it or 'npx hardhat vars setup' to list all the configuration variables used by this project.`
5471

55-
You are now ready to start building your confidential smart contracts with fhevm!
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Readme
2+
Go to [FHEVM Hardhat Template Quickstart](https://github.com/zama-ai/fhevm-hardhat-template/blob/main/QUICKSTART.md)

docs/solidity-guides/hardhat/2.-writing-contracts.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

docs/solidity-guides/hardhat/3.-testing-in-mocked-mode.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

docs/solidity-guides/hardhat/4.-deploying-the-contract.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)