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
Copy file name to clipboardExpand all lines: docs/solidity-guides/acl/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The ACL is a permission management system designed to control who can access, co
8
8
9
9
## Why is the ACL important?
10
10
11
-
Encrypted data in fhevm is entirely confidential, meaning that without proper access control, even the contract holding the ciphertext cannot interact with it. The ACL enables:
11
+
Encrypted data in FHEVM is entirely confidential, meaning that without proper access control, even the contract holding the ciphertext cannot interact with it. The ACL enables:
12
12
13
13
-**Granular permissions**: Define specific access rules for individual accounts or contracts.
14
14
-**Secure computations**: Ensure that only authorized entities can manipulate or decrypt encrypted data.
@@ -145,4 +148,4 @@ function transfer(address to, euint64 encryptedAmount) public {
145
148
146
149
---
147
150
148
-
By understanding how to grant and verify permissions, you can effectively manage access to encrypted data in your fhevm smart contracts. For additional context, see the [ACL overview](./).
151
+
By understanding how to grant and verify permissions, you can effectively manage access to encrypted data in your FHEVM smart contracts. For additional context, see the [ACL overview](./).
Copy file name to clipboardExpand all lines: docs/solidity-guides/asEXXoperators.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# asEbool, asEuintXX, and asEaddress operations
2
2
3
-
This documentation covers the `asEbool`, `asEuintXX`, and `asEaddress` operations provided by the FHE library for working with encrypted data in the fhevm. These operations are essential for converting between plaintext and encrypted types, as well as handling encrypted inputs.
3
+
This documentation covers the `asEbool`, `asEuintXX`, and `asEaddress` operations provided by the FHE library for working with encrypted data in the FHEVM. These operations are essential for converting between plaintext and encrypted types, as well as handling encrypted inputs.
4
4
5
5
The operations can be categorized into three main use cases:
Copy file name to clipboardExpand all lines: docs/solidity-guides/conditions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Branching in FHE
2
2
3
-
This document explains how to implement conditional logic (if/else branching) when working with encrypted values in fhevm. Unlike typical Solidity programming, working with Fully Homomorphic Encryption (FHE) requires specialized methods to handle conditions on encrypted data.
3
+
This document explains how to implement conditional logic (if/else branching) when working with encrypted values in FHEVM. Unlike typical Solidity programming, working with Fully Homomorphic Encryption (FHE) requires specialized methods to handle conditions on encrypted data.
4
4
5
5
## **Overview**
6
6
7
-
In fhevm, when you perform [comparison operations](../references/functions.md#comparison-operation-eq-ne-ge-gt-le-lt), the result is an encrypted boolean (`ebool`). Since encrypted booleans do not support standard boolean operations like `if` statements or logical operators, conditional logic must be implemented using specialized methods.
7
+
In FHEVM, when you perform [comparison operations](../references/functions.md#comparison-operation-eq-ne-ge-gt-le-lt), the result is an encrypted boolean (`ebool`). Since encrypted booleans do not support standard boolean operations like `if` statements or logical operators, conditional logic must be implemented using specialized methods.
8
8
9
-
To facilitate conditional assignments, fhevm provides the `FHE.select` function, which acts as a ternary operator for encrypted values.
9
+
To facilitate conditional assignments, FHEVM provides the `FHE.select` function, which acts as a ternary operator for encrypted values.
Copy file name to clipboardExpand all lines: docs/solidity-guides/contracts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# fhevm-contracts
2
2
3
-
This guide explains how to use the [fhevm Contracts standard library](https://github.com/zama-ai/fhevm-contracts/tree/main). This library provides secure, extensible, and pre-tested Solidity templates designed for developing smart contracts on fhevm using the FHE library.
3
+
This guide explains how to use the [fhevm Contracts standard library](https://github.com/zama-ai/fhevm-contracts/tree/main). This library provides secure, extensible, and pre-tested Solidity templates designed for developing smart contracts on FHEVM using the FHE library.
Copy file name to clipboardExpand all lines: docs/solidity-guides/decryption/decrypt.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ To learn how decryption works see [Encryption, Decryption, Re-encryption, and Co
15
15
16
16
## Overview
17
17
18
-
Decryption in fhevm is an asynchronous process that involves the Gateway and Key Management System (KMS). Contracts requiring decryption must extend the GatewayCaller contract, which imports the necessary libraries and provides access to the Gateway.
18
+
Decryption in FHEVM is an asynchronous process that involves the Gateway and Key Management System (KMS). Contracts requiring decryption must extend the GatewayCaller contract, which imports the necessary libraries and provides access to the Gateway.
19
19
20
20
Here’s an example of how to request decryption in a contract:
21
21
@@ -52,7 +52,7 @@ contract TestAsyncDecrypt is SepoliaZamaFHEVMConfig, SepoliaZamaGatewayConfig, G
52
52
53
53
#### Key additions to the code
54
54
55
-
1.**Configuration imports**: The configuration contracts are imported to set up the fhevm environment and Gateway.
55
+
1.**Configuration imports**: The configuration contracts are imported to set up the FHEVM environment and Gateway.
56
56
57
57
```solidity
58
58
import { SepoliaZamaFHEVMConfig } from "fhevm/config/ZamaFHEVMConfig.sol";
Copy file name to clipboardExpand all lines: docs/solidity-guides/decryption/decrypt_details.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# Decryption in depth
2
2
3
-
This document provides a detailed guide on implementing decryption in your smart contracts using the `GatewayContract` in fhevm. It covers the setup, usage of the `Gateway.requestDecryption` function, and testing with Hardhat.
3
+
This document provides a detailed guide on implementing decryption in your smart contracts using the `DecryptionOracle` in fhevm. It covers the setup, usage of the `FHE.requestDecryption` function, and testing with Hardhat.
4
4
5
-
## `GatewayContract` set up
5
+
## `DecryptionOracle` set up
6
6
7
-
The `GatewayContract` is pre-deployed on the fhevm testnet. It uses a default relayer account specified in the `PRIVATE_KEY_GATEWAY_RELAYER` or `ADDRESS_GATEWAY_RELAYER` environment variable in the `.env` file.
7
+
The `DecryptionOracle` is pre-deployed on the FHEVM testnet. It uses a default relayer account specified in the `PRIVATE_KEY_GATEWAY_RELAYER` or `ADDRESS_GATEWAY_RELAYER` environment variable in the `.env` file.
8
8
9
9
Relayers are the only accounts authorized to fulfill decryption requests. The role of the `DecryptionORacle`, however, is to independently verify the KMS signature during execution. This ensures that the relayers cannot manipulate or send fraudulent decryption results, even if compromised. However, the relayers are still trusted to forward decryption requests on time.
10
10
11
-
## `IDecryptionOracle.requestDecryption` function
11
+
## `FHE.requestDecryption` function
12
12
13
-
The interface of the `IDecryptionOracle.requestDecryption`function from previous snippet is the following:
13
+
You can call the function `FHE.requestDecryption`as such:
14
14
15
15
```solidity
16
16
function requestDecryption(uint256 requestID, bytes32[] calldata ctsHandles, bytes4 callbackSelector) external payable;
The first argument is the `requestID` of the corresponding decryption request, `success` is a boolean assessing if the call to the callback succeeded, and `result` is the bytes array corresponding to the return data from the callback.
146
146
147
-
In your hardhat tests, if you sent some transactions which are requesting one or several decryptions and you wish to await the fulfillment of those decryptions, you should import the two helper methods `initGateway` and `awaitAllDecryptionResults` from the `asyncDecrypt.ts` utility file. This would work both when testing on a fhevm node or in mocked mode. Here is a simple hardhat test for the previous `TestAsyncDecrypt` contract (more examples can be seen [here](https://github.com/zama-ai/fhevm-solidity/tree/v0.6.2/test/gatewayDecrypt/testAsyncDecrypt.ts)):
147
+
In your hardhat tests, if you sent some transactions which are requesting one or several decryptions and you wish to await the fulfillment of those decryptions, you should import the two helper methods `initGateway` and `awaitAllDecryptionResults` from the `asyncDecrypt.ts` utility file. This would work both when testing on a FHEVM node or in mocked mode. Here is a simple hardhat test for the previous `TestAsyncDecrypt` contract (more examples can be seen [here](https://github.com/zama-ai/fhevm-solidity/tree/v0.6.2/test/gatewayDecrypt/testAsyncDecrypt.ts)):
Copy file name to clipboardExpand all lines: docs/solidity-guides/decryption/reencryption.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This document explains how to perform user decryption. User decryption required when you want a user to access their private data without it being exposed to the blockchain.
4
4
5
-
Re-encryption in fhevm enables the secure sharing or reuse of encrypted data under a new public key without exposing the plaintext. This feature is essential for scenarios where encrypted data must be transferred between contracts, dApps, or users while maintaining its confidentiality.
5
+
Re-encryption in FHEVM enables the secure sharing or reuse of encrypted data under a new public key without exposing the plaintext. This feature is essential for scenarios where encrypted data must be transferred between contracts, dApps, or users while maintaining its confidentiality.
6
6
7
7
{% hint style="info" %}
8
8
Before implementing re-encryption, ensure you are familiar with the foundational concepts of encryption, re-encryption and computation. Refer to [Encryption, Decryption, Re-encryption, and Computation](../d_re_ecrypt_compute.md).
Copy file name to clipboardExpand all lines: docs/solidity-guides/error_handling.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Error handling
2
2
3
-
This document explains how to handle errors effectively in fhevm smart contracts. Since transactions involving encrypted data do not automatically revert when conditions are not met, developers need alternative mechanisms to communicate errors to users.
3
+
This document explains how to handle errors effectively in FHEVM smart contracts. Since transactions involving encrypted data do not automatically revert when conditions are not met, developers need alternative mechanisms to communicate errors to users.
0 commit comments