Skip to content

Commit

Permalink
various fixes + incorrect link
Browse files Browse the repository at this point in the history
  • Loading branch information
eshelB committed Sep 22, 2024
1 parent 0d600cd commit 963757a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/devdocs/FhenixJS/Decryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The data is returned to the user using [sealed box encryption ](https://bitbeans

:::tip[Don't Want to Seal?]
Fhenix supports standard decryption as well. Mostly suited for public data, an unsealed plaintext value can be returned from a contract.
You can read more about how to do this [here](#../).
You can read more about how to do this [here](../Writing%20Smart%20Contracts/FHE-sol#decrypt---decrypt-encrypted-data).
:::

### Encrypted Values & Permits
Expand Down
2 changes: 1 addition & 1 deletion docs/devdocs/FhenixJS/Encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Encryption in Fhenix is done using the global chain key. This key is loaded when

When we perform encryption, we specify the type of `euint` (Encrypted Integer) we want to create. This should match the expected type in the Solidity contract we are working with.

First, initialize the library -
First, initialize the library:

```Typescript
import { FhenixClient } from 'fhenixjs';
Expand Down
5 changes: 2 additions & 3 deletions docs/devdocs/Setting Up Your Environment/Foundry.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ If this is your first time using Foundry, refer to the
- Simulated FHE Operations: All FHE operations, including encryption, decryption, and encrypted data handling, are
simulated to replicate their behavior in a network environment. This approach facilitates seamless development and
testing without requiring a fully operational FHE network.
- Permissions: The template includes utilities (PermissionHelper.sol) for creating permissions related to FHE
- Permissions: The template includes utilities (`PermissionHelper.sol`) for creating permissions related to FHE
operations. These utilities enable users to test and verify that contracts correctly implement access-controlled
actions, such as viewing balances of encrypted tokens. For more about permissions, see the [Fhenix Documentation](../Writing%20Smart%20Contracts/Permissions.md)
section.
actions, such as viewing balances of encrypted tokens. For more about permissions, see [here](../Writing%20Smart%20Contracts/Permissions.md).

## Writing Tests

Expand Down
2 changes: 1 addition & 1 deletion docs/devdocs/Writing Smart Contracts/Returning-Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This means that we can consume sealed data directly from Metamask, which provide

Fetch an address's public key using the `eth_getEncryptionPublicKey` method, seal the data for that specific public key (either as a permit or by using the public key directly), and then use Metamask's `eth_decrypt` call to provide a guided decryption experience.

:::danger[Warning]
:::warning[Warning]
Metamask's `eth_getEncryptionPublicKey` and `eth_decrypt` methods are deprecated. We provide these examples to demonstrate compatibility with native wallet encryption/decryption procedures. We aim to maintain compatibility as new standards emerge for encryption on Ethereum.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Note that all functions are supported in both direct function calls and library
| Decrypt | `decrypt` | n/a | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> |
| Seal Output | `sealOutput` | n/a | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> | <g>✔</g> |

:::danger
:::danger[Caveat]
At the moment it is not possible to do `ebool result = (lhs == rhs)` and others that return a boolean result. This is because FHE.sol expects a `ebool`, while Solidity only allows overloading to return a regular boolean.
Instead, we recommend `ebool result = lhs.eq(rhs)`.
:::
Expand Down

0 comments on commit 963757a

Please sign in to comment.