Skip to content

Commit c10308d

Browse files
authored
chore: fixing a few typos (#676)
1 parent aaf32d5 commit c10308d

File tree

8 files changed

+58
-56
lines changed

8 files changed

+58
-56
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Master `fhEVM` and build smart contracts using these resources:
158158
- 📘 [**Comprehensive fhEVM Documentation**](https://docs.zama.ai/fhevm)
159159
Dive deep into Zama's detailed guide for utilizing the full potential of fhEVM.
160160

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

164164
### **Development templates**
@@ -264,7 +264,7 @@ There are two ways to contribute to the Zama fhEVM:
264264
- [Open issues](https://github.com/zama-ai/fhevm/issues/new/choose) to report bugs and typos, or to suggest new ideas
265265
- Request to become an official contributor by emailing [email protected].
266266

267-
Becoming an approved contributor involves signing our Contributor License Agreement (CLA)). Only approved contributors can send pull requests, so please make sure to get in touch before you do!
267+
Becoming an approved contributor involves signing our Contributor License Agreement (CLA). Only approved contributors can send pull requests, so please make sure to get in touch before you do!
268268
<br></br>
269269

270270
### License

docs/developer/contribute.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ There are two ways to contribute to the Zama fhEVM:
55
- [Open issues](https://github.com/zama-ai/fhevm/issues/new/choose) to report bugs and typos, or to suggest new ideas
66
- Request to become an official contributor by emailing [[email protected]](mailto:[email protected]).
77

8-
Becoming an approved contributor involves signing our Contributor License Agreement (CLA)). Only approved contributors can send pull requests, so please make sure to get in touch before you do!
8+
Becoming an approved contributor involves signing our Contributor License Agreement (CLA). Only approved contributors can send pull requests, so please make sure to get in touch before you do!
99

1010
## Zama Bounty Program
1111

docs/fundamentals/decryption/decrypt.md

+41-42
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ contract TestAsyncDecrypt is SepoliaZamaFHEVMConfig, SepoliaZamaGatewayConfig, G
7070
7171
Remember our [**Encrypted Counter**](../../getting_started/first_smart_contract.md) contract from before? Here’s an improved version of it, upgraded to support decryption:
7272
73-
```
73+
```solidity
7474
// SPDX-License-Identifier: MIT
7575
pragma solidity ^0.8.24;
7676
@@ -84,47 +84,46 @@ import "fhevm/gateway/GatewayCaller.sol";
8484
/// @dev Uses TFHE library for fully homomorphic encryption operations and Gateway for decryption
8585
/// @custom:experimental This contract is experimental and uses FHE technology with decryption capabilities
8686
contract EncryptedCounter3 is SepoliaZamaFHEVMConfig, SepoliaZamaGatewayConfig, GatewayCaller {
87-
/// @dev Decrypted state variable
88-
euint8 internal counter;
89-
uint8 public decryptedCounter;
90-
91-
constructor() {
92-
Gateway.setGateway(Gateway.defaultGatewayAddress());
93-
94-
// Initialize counter with an encrypted zero value
95-
counter = TFHE.asEuint8(0);
96-
TFHE.allowThis(counter);
97-
}
98-
99-
function incrementBy(einput amount, bytes calldata inputProof) public {
100-
// Convert input to euint8 and add to counter
101-
euint8 incrementAmount = TFHE.asEuint8(amount, inputProof);
102-
counter = TFHE.add(counter, incrementAmount);
103-
TFHE.allowThis(counter);
104-
}
105-
106-
/// @notice Request decryption of the counter value
107-
function requestDecryptCounter() public {
108-
uint256[] memory cts = new uint256[](1);
109-
cts[0] = Gateway.toUint256(counter);
110-
Gateway.requestDecryption(cts, this.callbackCounter.selector, 0, block.timestamp + 100, false);
111-
}
112-
113-
/// @notice Callback function for counter decryption
114-
/// @param decryptedInput The decrypted counter value
115-
/// @return The decrypted value
116-
function callbackCounter(uint256, uint8 decryptedInput) public onlyGateway returns (uint8) {
117-
decryptedCounter = decryptedInput;
118-
return decryptedInput;
119-
}
120-
121-
/// @notice Get the decrypted counter value
122-
/// @return The decrypted counter value
123-
function getDecryptedCounter() public view returns (uint8) {
124-
return decryptedCounter;
125-
}
126-
}
87+
/// @dev Decrypted state variable
88+
euint8 internal counter;
89+
uint8 public decryptedCounter;
90+
91+
constructor() {
92+
Gateway.setGateway(Gateway.defaultGatewayAddress());
93+
94+
// Initialize counter with an encrypted zero value
95+
counter = TFHE.asEuint8(0);
96+
TFHE.allowThis(counter);
97+
}
98+
99+
function incrementBy(einput amount, bytes calldata inputProof) public {
100+
// Convert input to euint8 and add to counter
101+
euint8 incrementAmount = TFHE.asEuint8(amount, inputProof);
102+
counter = TFHE.add(counter, incrementAmount);
103+
TFHE.allowThis(counter);
104+
}
105+
106+
/// @notice Request decryption of the counter value
107+
function requestDecryptCounter() public {
108+
uint256[] memory cts = new uint256[](1);
109+
cts[0] = Gateway.toUint256(counter);
110+
Gateway.requestDecryption(cts, this.callbackCounter.selector, 0, block.timestamp + 100, false);
111+
}
127112
113+
/// @notice Callback function for counter decryption
114+
/// @param decryptedInput The decrypted counter value
115+
/// @return The decrypted value
116+
function callbackCounter(uint256, uint8 decryptedInput) public onlyGateway returns (uint8) {
117+
decryptedCounter = decryptedInput;
118+
return decryptedInput;
119+
}
120+
121+
/// @notice Get the decrypted counter value
122+
/// @return The decrypted counter value
123+
function getDecryptedCounter() public view returns (uint8) {
124+
return decryptedCounter;
125+
}
126+
}
128127
```
129128

130129
### Tests for `EncryptedCounter3`
@@ -169,7 +168,7 @@ describe("EncryptedCounter3", function () {
169168
// Wait for decryption to complete
170169
await awaitAllDecryptionResults();
171170

172-
// Check decrypted value (should be 3: initial 0 + three increments)
171+
// Check decrypted value (should be 5: initial 0 + an increment of 5)
173172
const decryptedValue = await this.counterContract.getDecryptedCounter();
174173
expect(decryptedValue).to.equal(5);
175174
});

docs/fundamentals/inputs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ This example demonstrates a function that performs multiple encrypted operations
113113
}
114114
```
115115

116-
### Example validation in the `encyrptedERC20.sol` smart contract
116+
### Example validation in the `encryptedERC20.sol` smart contract
117117

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

@@ -179,7 +179,7 @@ contract EncryptedCounter2 is SepoliaZamaFHEVMConfig {
179179
}
180180
```
181181

182-
### Tests of for the Counter contract
182+
### Tests of the Counter contract
183183

184184
```ts
185185
import { createInstance } from "../instance";

docs/guides/contracts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This guide explains how to use the [fhEVM Contracts standard library](https://gi
44

55
## Overview
66

7-
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.
7+
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.
88

99
## Installation
1010

docs/guides/debug_decrypt.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

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

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

89
## Overview
910

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

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

7779
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).
7880

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

103105
### Environment checks
104106

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

108111
```typescript
109112
if (network.name !== "hardhat") {

docs/guides/frontend/webapp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You can also use [this template](https://github.com/zama-ai/fhevmjs-vue-template
1818

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

21-
## Using the mocked coprocessor for front end
21+
## Using the mocked coprocessor for frontend
2222

2323
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.
2424

docs/guides/loop.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ However, this is sometimes not enough. Enhancing the privacy of smart contracts
4343

4444
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.
4545

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

4848
```solidity
4949
// typically either encryptedAmountAIn or encryptedAmountBIn is an encrypted null value

0 commit comments

Comments
 (0)