From ca715e527f9adb71978f9c0e7730181d8549aa9c Mon Sep 17 00:00:00 2001 From: Eshel Date: Sun, 22 Sep 2024 23:21:11 +0300 Subject: [PATCH] trying to visualize colors + added monospace on some solidity types --- .../Types-and-Operators.md | 27 ++++++++----------- src/css/custom.css | 3 +++ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md b/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md index bd68d84c..fc9c858d 100644 --- a/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md +++ b/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md @@ -21,16 +21,16 @@ In the back-end, encrypted integers are FHE ciphertexts. The library abstracts a Supported types -| name | Bit Size | Usage | -|----------|----------| ------- | -| euint8 | 8 | Compute | -| euint16 | 16 | Compute | -| euint32 | 32 | Compute | -| euint64 | 64 | Compute | -| euint128 | 128 | Compute | -| euint256 | 256 | Compute | -| ebool | 8 | Compute | -| eaddress | 160 | Compute | +| name | Bit Size | Usage | +|------------|----------| ------- | +| `euint8` | 8 | Compute | +| `euint16` | 16 | Compute | +| `euint32` | 32 | Compute | +| `euint64` | 64 | Compute | +| `euint128` | 128 | Compute | +| `euint256` | 256 | Compute | +| `ebool` | 8 | Compute | +| `eaddress` | 160 | Compute | | name | Bit Size | Usage | @@ -71,7 +71,7 @@ In this example, lhs.add(rhs) performs the addition, using the library function ### Utilizing Operator Overloading -For an even more intuitive approach, FHE.sol supports operator overloading. This means you can use standard arithmetic operators like +, -, \*, etc., directly on encrypted types. Here's how you can use it for adding two euint8 values: +For an even more intuitive approach, FHE.sol supports operator overloading. This means you can use standard arithmetic operators like `+`, `-`, `*`, etc., directly on encrypted types. Here's how you can use it for adding two `euint8` values: ```javascript euint8 result = lhs + rhs; @@ -104,11 +104,6 @@ Please refer to the table below for a comprehensive list of supported operations Note that all functions are supported in both direct function calls and library bindings. However, operator overloading is only supported for the operations listed in the table (solidity please support operator overloading for boolean return types!). - | Name | FHE.sol function | Operator | euint8 | euint16 | euint32 | euint64 | euint128 | euint256 | ebool | eaddress | |-----------------------|------------------|:--------:|:---------:|:--------:|:--------:|:---------:|:-----------:|:-------------:|:--------:|:-----------:| diff --git a/src/css/custom.css b/src/css/custom.css index 43f34428..3dd32888 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -502,3 +502,6 @@ html[data-theme='light'] .page-cover-image { /* filter: invert(100%);*/ } +r { color: FireBrick } +o { color: Orange } +g { color: LightGreen }