From f7204387e1cb121e635e8c91e2d0a4c3fbdec8d3 Mon Sep 17 00:00:00 2001 From: PacificYield <173040337+PacificYield@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:54:42 +0200 Subject: [PATCH] docs(common): updates operator overload --- docs/solidity-guides/operations.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/solidity-guides/operations.md b/docs/solidity-guides/operations.md index 4df62dda95..cf33c5f20f 100644 --- a/docs/solidity-guides/operations.md +++ b/docs/solidity-guides/operations.md @@ -67,22 +67,6 @@ You can generate cryptographically secure random numbers fully on-chain: For more details, refer to the [Random Encrypted Numbers](random.md) document. -## Overload operators - -The `FHE` library supports operator overloading for encrypted integers (e.g., `+`, `-`, `*`, `&`) using the Solidity [`using for`](https://docs.soliditylang.org/en/v0.8.24/contracts.html#using-for) syntax. These overloaded operators currently perform unchecked operations, meaning they do not include overflow checks. - -**Example**\ -Overloaded operators make code more concise: - -```solidity -using { - add as + -} for FHE global; -euint64 a = FHE.asEuint64(42); -euint64 b = FHE.asEuint64(58); -euint64 sum = a + b; /// @dev Calls FHE.add under the hood -``` - ## Best Practices Here are some best practices to follow when using encrypted operations in your smart contracts: