From 97c7dd3cf8e32d8dbfa9520e6aab3705846a296a Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 26 Dec 2024 14:56:14 +0100 Subject: [PATCH 1/6] chore: fixing a typo --- docs/fundamentals/inputs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/fundamentals/inputs.md b/docs/fundamentals/inputs.md index 2ee85526..5c0f98b4 100644 --- a/docs/fundamentals/inputs.md +++ b/docs/fundamentals/inputs.md @@ -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: @@ -179,7 +179,7 @@ contract EncryptedCounter2 is SepoliaZamaFHEVMConfig { } ``` -### Tests of for the Counter contract +### Tests of the Counter contract ```ts import { createInstance } from "../instance"; From 2d5ae4b01f28497f6fb7f4dec6001900d1cc438e Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 26 Dec 2024 15:07:10 +0100 Subject: [PATCH 2/6] chore: fixing other doc things --- docs/fundamentals/decryption/decrypt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/fundamentals/decryption/decrypt.md b/docs/fundamentals/decryption/decrypt.md index a64764f5..f0ef66ef 100644 --- a/docs/fundamentals/decryption/decrypt.md +++ b/docs/fundamentals/decryption/decrypt.md @@ -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 // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; @@ -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) const decryptedValue = await this.counterContract.getDecryptedCounter(); expect(decryptedValue).to.equal(5); }); From 874be9c83a4915932d084fbf807fb55b60e173d9 Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 26 Dec 2024 15:14:00 +0100 Subject: [PATCH 3/6] chore: spell Zama --- README.md | 2 +- docs/guides/contracts.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af6c177f..94c26df7 100644 --- a/README.md +++ b/README.md @@ -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** diff --git a/docs/guides/contracts.md b/docs/guides/contracts.md index 3106b6a2..f11e5bcc 100644 --- a/docs/guides/contracts.md +++ b/docs/guides/contracts.md @@ -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 From d36a9a49f8934ef46cdeee6e0cdc881b63f31c0c Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 26 Dec 2024 15:20:55 +0100 Subject: [PATCH 4/6] chore: fixing a typo --- docs/guides/loop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/loop.md b/docs/guides/loop.md index 48d8a154..291685a6 100644 --- a/docs/guides/loop.md +++ b/docs/guides/loop.md @@ -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 From a49fd28109a5e516a0c00d131801d9eb15be4a8e Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 26 Dec 2024 15:34:45 +0100 Subject: [PATCH 5/6] chore: enforce our gitbook style --- docs/guides/debug_decrypt.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/guides/debug_decrypt.md b/docs/guides/debug_decrypt.md index 01a4c1b4..176098e4 100644 --- a/docs/guides/debug_decrypt.md +++ b/docs/guides/debug_decrypt.md @@ -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 @@ -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). @@ -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") { From e917d13bc6cddea6df1d852d30f5b8331293d457 Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 26 Dec 2024 15:43:06 +0100 Subject: [PATCH 6/6] chore: typo --- docs/guides/frontend/webapp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/frontend/webapp.md b/docs/guides/frontend/webapp.md index 93728117..ac340815 100644 --- a/docs/guides/frontend/webapp.md +++ b/docs/guides/frontend/webapp.md @@ -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.