Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing typo + other things I see in the doc #676

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Master `fhEVM` and build smart contracts using these resources:
- 📘 [**Comprehensive fhEVM Documentation**](https://docs.zama.ai/fhevm)
Dive deep into Zama's detailed guide for utilizing the full potential of fhEVM.

- 🤖 [**ZAMA Solidity Developer (Modified ChatGPT Model)**](https://chatgpt.com/g/g-67518aee3c708191b9f08d077a7d6fa1-zama-solidity-developer)
- 🤖 [**Zama Solidity Developer (Modified ChatGPT Model)**](https://chatgpt.com/g/g-67518aee3c708191b9f08d077a7d6fa1-zama-solidity-developer)
Accelerate your smart contract development with AI-powered assistance.

### **Development templates**
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/decryption/decrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ contract TestAsyncDecrypt is SepoliaZamaFHEVMConfig, SepoliaZamaGatewayConfig, G

Remember our [**Encrypted Counter**](../../getting_started/first_smart_contract.md) contract from before? Here’s an improved version of it, upgraded to support decryption:

```
```solidity
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less sure, you'll fix me if needed

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

Expand Down Expand Up @@ -169,7 +169,7 @@ describe("EncryptedCounter3", function () {
// Wait for decryption to complete
await awaitAllDecryptionResults();

// Check decrypted value (should be 3: initial 0 + three increments)
// Check decrypted value (should be 5: initial 0 + an increment of 5)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less sure, you'll fix me if needed

const decryptedValue = await this.counterContract.getDecryptedCounter();
expect(decryptedValue).to.equal(5);
});
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ This example demonstrates a function that performs multiple encrypted operations
}
```

### Example validation in the `encyrptedERC20.sol` smart contract
### Example validation in the `encryptedERC20.sol` smart contract

Here’s an example of a smart contract function that verifies an encrypted input before proceeding:

Expand Down Expand Up @@ -179,7 +179,7 @@ contract EncryptedCounter2 is SepoliaZamaFHEVMConfig {
}
```

### Tests of for the Counter contract
### Tests of the Counter contract

```ts
import { createInstance } from "../instance";
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide explains how to use the [fhEVM Contracts standard library](https://gi

## Overview

The **fhEVM Contracts standard library** streamlines the development of confidential smart contracts by providing templates and utilities for tokens, governance, and error management. These contracts have been rigorously tested by ZAMA's engineers and are designed to accelerate development while enhancing security.
The **fhEVM Contracts standard library** streamlines the development of confidential smart contracts by providing templates and utilities for tokens, governance, and error management. These contracts have been rigorously tested by Zama's engineers and are designed to accelerate development while enhancing security.

## Installation

Expand Down
15 changes: 9 additions & 6 deletions docs/guides/debug_decrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

This guide explains how to use the `debug.decrypt[XX]` functions for debugging encrypted data in mocked environments during development with fhEVM.

> [!WARNING]
> The `debug.decrypt[XX]` functions should not be used in production as they rely on private keys.
{% hint style="warning" %}
The `debug.decrypt[XX]` functions should not be used in production as they rely on private keys.
{% endhint %}

## Overview

Expand Down Expand Up @@ -71,8 +72,9 @@ const plaintextValue: bigint = await debug.decrypt64(handle64);
console.log("Decrypted Balance:", plaintextValue);
```

> [!NOTE]
> To utilize the debug functions, import the [utils.ts](https://github.com/zama-ai/fhevm-hardhat-template/blob/main/test/utils.ts) file.
{% hint style="info" %}
To utilize the debug functions, import the [utils.ts](https://github.com/zama-ai/fhevm-hardhat-template/blob/main/test/utils.ts) file.
{% endhint %}

For a more complete example, refer to the [ConfidentialERC20 test file](https://github.com/zama-ai/fhevm-hardhat-template/blob/f9505a67db31c988f49b6f4210df47ca3ce97841/test/confidentialERC20/ConfidentialERC20.ts#L181-L205).

Expand Down Expand Up @@ -102,8 +104,9 @@ function verifyType(handle: bigint, expectedType: number) {

### Environment checks

> [!CAUTION]
> The functions only work in the `hardhat` network. Attempting to use them in a production environment will result in an error.
{% hint style="danger" %}
The functions only work in the `hardhat` network. Attempting to use them in a production environment will result in an error.
{% endhint %}

```typescript
if (network.name !== "hardhat") {
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/frontend/webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can also use [this template](https://github.com/zama-ai/fhevmjs-vue-template

You can also use [this template](https://github.com/zama-ai/fhevmjs-next-template) to start an application with fhevmjs, using Next + TypeScript.

## Using the mocked coprocessor for front end
## Using the mocked coprocessor for frontend

As an alternative to use the real coprocessor deployed on Sepolia to help you develop your dApp faster and without needing testnet tokens, you can use a mocked fhevm. Currently, we recommend you to use the `ConfidentialERC20` dApp example available on the `mockedFrontend` branch of the [React template](https://github.com/zama-ai/fhevm-react-template/tree/mockedFrontend). Follow the README on this branch, and you will be able to deploy exactly the same dApp both on Sepolia as well as on the mocked coprocessor seamlessly.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ However, this is sometimes not enough. Enhancing the privacy of smart contracts

For example, if implementing a simple AMM for two encrypted ERC20 tokens based on a linear constant function, it is recommended to not only hide the amounts being swapped, but also the token which is swapped in a pair.

✅ Here is a very simplified example implementations, we suppose here that the the rate between tokenA and tokenB is constant and equals to 1:
✅ Here is a very simplified example implementations, we suppose here that the rate between tokenA and tokenB is constant and equals to 1:

```solidity
// typically either encryptedAmountAIn or encryptedAmountBIn is an encrypted null value
Expand Down
Loading