Page Not Found | Fhenix
-
+
diff --git a/assets/js/0ba8c2c3.7326ac45.js b/assets/js/0ba8c2c3.7326ac45.js
new file mode 100644
index 00000000..6de893eb
--- /dev/null
+++ b/assets/js/0ba8c2c3.7326ac45.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[7775],{414:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>l});var o=t(4848),i=t(8453);const r={sidebar_position:1,title:"Overview",description:"Different ways to set up your development environment for Fhenix"},s="Overview",d={id:"devdocs/Setting Up Your Environment/intro",title:"Overview",description:"Different ways to set up your development environment for Fhenix",source:"@site/docs/devdocs/Setting Up Your Environment/intro.md",sourceDirName:"devdocs/Setting Up Your Environment",slug:"/devdocs/Setting Up Your Environment/intro",permalink:"/docs/nitrogen/devdocs/Setting Up Your Environment/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Setting Up Your Environment/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Overview",description:"Different ways to set up your development environment for Fhenix"},sidebar:"docsSidebar",previous:{title:"\ud83d\udd25 Gas and Benchmarks",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Gas-and-Benchmarks"},next:{title:"\u2601\ufe0f Gitpod",permalink:"/docs/nitrogen/devdocs/Setting Up Your Environment/Gitpod"}},c={},l=[];function a(e){const n={a:"a",admonition:"admonition",h1:"h1",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(n.p,{children:"There are a few different ways to set up an environment for development on Fhenix. All the tools you know from Solidity are mostly supported, though the addition of FHE means that a few custom tools are helpful. Here we'll describe the different ways you can set up your development environment."}),"\n",(0,o.jsx)(n.p,{children:"The following environments are recommended for development on Fhenix:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Hardhat",children:"Fhenix Hardhat Example"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Remix",children:"Fhenix with Remix"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Gitpod",children:"Gitpod Environment"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Foundry",children:"Foundry"})}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Note",type:"note",children:(0,o.jsx)(n.p,{children:"The main developer tools are all based on Javascript & Solidity, but we have open bounties to add support for Python & Vyper!"})}),"\n",(0,o.jsx)(n.p,{children:"If you just want to utilize one of the tools in your own environment, take a look at:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Tools%20and%20Utilities/Fhenix-Remix-Plugin",children:"Fhenix-Remix-Plugin"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Tools%20and%20Utilities/Fhenix-Encryption-UI",children:"Fhenix-Encryption-UI"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Tools%20and%20Utilities/Fhenix-Hardhat-Plugin",children:"Hardhat-Plugin"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>d});var o=t(6540);const i={},r=o.createContext(i);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/0ba8c2c3.8db90f2c.js b/assets/js/0ba8c2c3.8db90f2c.js
deleted file mode 100644
index 5ce1a325..00000000
--- a/assets/js/0ba8c2c3.8db90f2c.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[7775],{414:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>l});var o=t(4848),i=t(8453);const r={sidebar_position:1,title:"Overview",description:"Different ways to set up your development environment for Fhenix"},s="Overview",d={id:"devdocs/Setting Up Your Environment/intro",title:"Overview",description:"Different ways to set up your development environment for Fhenix",source:"@site/docs/devdocs/Setting Up Your Environment/intro.md",sourceDirName:"devdocs/Setting Up Your Environment",slug:"/devdocs/Setting Up Your Environment/intro",permalink:"/docs/nitrogen/devdocs/Setting Up Your Environment/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Setting Up Your Environment/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Overview",description:"Different ways to set up your development environment for Fhenix"},sidebar:"docsSidebar",previous:{title:"Randomness",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness"},next:{title:"\u2601\ufe0f Gitpod",permalink:"/docs/nitrogen/devdocs/Setting Up Your Environment/Gitpod"}},c={},l=[];function a(e){const n={a:"a",admonition:"admonition",h1:"h1",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(n.p,{children:"There are a few different ways to set up an environment for development on Fhenix. All the tools you know from Solidity are mostly supported, though the addition of FHE means that a few custom tools are helpful. Here we'll describe the different ways you can set up your development environment."}),"\n",(0,o.jsx)(n.p,{children:"The following environments are recommended for development on Fhenix:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Hardhat",children:"Fhenix Hardhat Example"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Remix",children:"Fhenix with Remix"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Gitpod",children:"Gitpod Environment"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Setting%20Up%20Your%20Environment/Foundry",children:"Foundry"})}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Note",type:"note",children:(0,o.jsx)(n.p,{children:"The main developer tools are all based on Javascript & Solidity, but we have open bounties to add support for Python & Vyper!"})}),"\n",(0,o.jsx)(n.p,{children:"If you just want to utilize one of the tools in your own environment, take a look at:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Tools%20and%20Utilities/Fhenix-Remix-Plugin",children:"Fhenix-Remix-Plugin"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Tools%20and%20Utilities/Fhenix-Encryption-UI",children:"Fhenix-Encryption-UI"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/nitrogen/devdocs/Tools%20and%20Utilities/Fhenix-Hardhat-Plugin",children:"Hardhat-Plugin"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>d});var o=t(6540);const i={},r=o.createContext(i);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/44625589.b1926fdd.js b/assets/js/44625589.b1926fdd.js
deleted file mode 100644
index a59af10a..00000000
--- a/assets/js/44625589.b1926fdd.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[2192],{9091:(d,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>j,frontMatter:()=>r,metadata:()=>c,toc:()=>l});var e=t(4848),s=t(8453);const r={},i="\ud83d\udd25 Gas and Benchmarks",c={id:"devdocs/Writing Smart Contracts/Gas-and-Benchmarks",title:"\ud83d\udd25 Gas and Benchmarks",description:"This section will list the gas costs for every operation based on its inputs.",source:"@site/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Gas-and-Benchmarks",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Gas-and-Benchmarks",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83d\udcaf Useful Tips",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Useful-Tips"},next:{title:"Randomness",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness"}},h={},l=[];function x(d){const n={admonition:"admonition",h1:"h1",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...d.components};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.h1,{id:"-gas-and-benchmarks",children:"\ud83d\udd25 Gas and Benchmarks"}),"\n",(0,e.jsx)(n.p,{children:"This section will list the gas costs for every operation based on its inputs.\nThe gas prices are subject to change based on usage and performance."}),"\n",(0,e.jsx)(n.admonition,{type:"tip",children:(0,e.jsx)(n.p,{children:"The current gas limit for a transaction is set to be 50 million"})}),"\n",(0,e.jsx)(n.p,{children:"New for Fhenix Kimchi Testnet we changed the calculation of TX data, which previously was heavily discounted artificially.\nThe new calculation should be similar to default EVM for most transactions."}),"\n",(0,e.jsx)(n.p,{children:"The new formula offers a discount of 75% for any data over 64KB, with default EVM costs per byte otherwise (64 gas units per non-zero byte, or 4 gas for zero)."}),"\n",(0,e.jsx)(n.p,{children:"The gas costs for the FHE operations are as follows:"}),"\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"FHE.sol function"}),(0,e.jsx)(n.th,{children:"euint8"}),(0,e.jsx)(n.th,{children:"euint16"}),(0,e.jsx)(n.th,{children:"euint32"}),(0,e.jsx)(n.th,{children:"euint64"}),(0,e.jsx)(n.th,{children:"euint128"}),(0,e.jsx)(n.th,{children:"euint256"}),(0,e.jsx)(n.th,{children:"ebool"}),(0,e.jsx)(n.th,{children:"eaddress"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"add, sub"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"175,000"}),(0,e.jsx)(n.td,{children:"290,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"asEuint (inEuint)"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"300,000"}),(0,e.jsx)(n.td,{children:"300,000"}),(0,e.jsx)(n.td,{children:"300,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"300,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"asEuint (euint)"}),(0,e.jsx)(n.td,{children:"75,000"}),(0,e.jsx)(n.td,{children:"85,000"}),(0,e.jsx)(n.td,{children:"105,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"140,000"}),(0,e.jsx)(n.td,{children:"175,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"asEuint (uint)"}),(0,e.jsx)(n.td,{children:"20,000"}),(0,e.jsx)(n.td,{children:"20,000"}),(0,e.jsx)(n.td,{children:"30,000"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"70,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"70,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"sealOutput"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"decrypt"}),(0,e.jsx)(n.td,{children:"25,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"mul, square"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"70,000"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"280,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"lt, lte, gt, gte"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"75,000"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"190,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"select"}),(0,e.jsx)(n.td,{children:"55,000"}),(0,e.jsx)(n.td,{children:"55,000"}),(0,e.jsx)(n.td,{children:"85,000"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"225,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"require"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"div, rem"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"335,000"}),(0,e.jsx)(n.td,{children:"1,003,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"and, or, xor"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"70,000"}),(0,e.jsx)(n.td,{children:"130,000"}),(0,e.jsx)(n.td,{children:"200,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"ne, eq"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"180,000"}),(0,e.jsx)(n.td,{children:"260,000"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"210,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"min, max"}),(0,e.jsx)(n.td,{children:"45,000"}),(0,e.jsx)(n.td,{children:"55,000"}),(0,e.jsx)(n.td,{children:"100,000"}),(0,e.jsx)(n.td,{children:"145,000"}),(0,e.jsx)(n.td,{children:"250,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"shl, shr, rol, ror"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"90,000"}),(0,e.jsx)(n.td,{children:"130,000"}),(0,e.jsx)(n.td,{children:"210,000"}),(0,e.jsx)(n.td,{children:"355,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"not"}),(0,e.jsx)(n.td,{children:"42,000"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"49,000"}),(0,e.jsx)(n.td,{children:"85,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"28,000"}),(0,e.jsx)(n.td,{children:"n/a"})]})]})]})]})}function j(d={}){const{wrapper:n}={...(0,s.R)(),...d.components};return n?(0,e.jsx)(n,{...d,children:(0,e.jsx)(x,{...d})}):x(d)}},8453:(d,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var e=t(6540);const s={},r=e.createContext(s);function i(d){const n=e.useContext(r);return e.useMemo((function(){return"function"==typeof d?d(n):{...n,...d}}),[n,d])}function c(d){let n;return n=d.disableParentContext?"function"==typeof d.components?d.components(s):d.components||s:i(d.components),e.createElement(r.Provider,{value:n},d.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/44625589.cdaefde3.js b/assets/js/44625589.cdaefde3.js
new file mode 100644
index 00000000..f4de2fed
--- /dev/null
+++ b/assets/js/44625589.cdaefde3.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[2192],{9091:(d,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>j,frontMatter:()=>r,metadata:()=>c,toc:()=>l});var e=t(4848),s=t(8453);const r={sidebar_position:901,title:"\ud83d\udd25 Gas and Benchmarks",description:"Gas costs for FHE operations"},i="\ud83d\udd25 Gas and Benchmarks",c={id:"devdocs/Writing Smart Contracts/Gas-and-Benchmarks",title:"\ud83d\udd25 Gas and Benchmarks",description:"Gas costs for FHE operations",source:"@site/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Gas-and-Benchmarks",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Gas-and-Benchmarks",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.md",tags:[],version:"current",sidebarPosition:901,frontMatter:{sidebar_position:901,title:"\ud83d\udd25 Gas and Benchmarks",description:"Gas costs for FHE operations"},sidebar:"docsSidebar",previous:{title:"\ud83d\udcaf Useful Tips",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Useful-Tips"},next:{title:"Overview",permalink:"/docs/nitrogen/devdocs/Setting Up Your Environment/intro"}},h={},l=[];function x(d){const n={admonition:"admonition",h1:"h1",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...d.components};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.h1,{id:"-gas-and-benchmarks",children:"\ud83d\udd25 Gas and Benchmarks"}),"\n",(0,e.jsx)(n.p,{children:"This section will list the gas costs for every operation based on its inputs.\nThe gas prices are subject to change based on usage and performance."}),"\n",(0,e.jsx)(n.admonition,{type:"tip",children:(0,e.jsx)(n.p,{children:"The current gas limit for a transaction is set to be 50 million"})}),"\n",(0,e.jsx)(n.p,{children:"New for Fhenix Kimchi Testnet we changed the calculation of TX data, which previously was heavily discounted artificially.\nThe new calculation should be similar to default EVM for most transactions."}),"\n",(0,e.jsx)(n.p,{children:"The new formula offers a discount of 75% for any data over 64KB, with default EVM costs per byte otherwise (64 gas units per non-zero byte, or 4 gas for zero)."}),"\n",(0,e.jsx)(n.p,{children:"The gas costs for the FHE operations are as follows:"}),"\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"FHE.sol function"}),(0,e.jsx)(n.th,{children:"euint8"}),(0,e.jsx)(n.th,{children:"euint16"}),(0,e.jsx)(n.th,{children:"euint32"}),(0,e.jsx)(n.th,{children:"euint64"}),(0,e.jsx)(n.th,{children:"euint128"}),(0,e.jsx)(n.th,{children:"euint256"}),(0,e.jsx)(n.th,{children:"ebool"}),(0,e.jsx)(n.th,{children:"eaddress"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"add, sub"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"175,000"}),(0,e.jsx)(n.td,{children:"290,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"asEuint (inEuint)"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"300,000"}),(0,e.jsx)(n.td,{children:"300,000"}),(0,e.jsx)(n.td,{children:"300,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"300,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"asEuint (euint)"}),(0,e.jsx)(n.td,{children:"75,000"}),(0,e.jsx)(n.td,{children:"85,000"}),(0,e.jsx)(n.td,{children:"105,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"140,000"}),(0,e.jsx)(n.td,{children:"175,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"asEuint (uint)"}),(0,e.jsx)(n.td,{children:"20,000"}),(0,e.jsx)(n.td,{children:"20,000"}),(0,e.jsx)(n.td,{children:"30,000"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"70,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"70,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"sealOutput"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"decrypt"}),(0,e.jsx)(n.td,{children:"25,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"mul, square"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"70,000"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"280,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"lt, lte, gt, gte"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"75,000"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"190,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"select"}),(0,e.jsx)(n.td,{children:"55,000"}),(0,e.jsx)(n.td,{children:"55,000"}),(0,e.jsx)(n.td,{children:"85,000"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"225,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"require"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"}),(0,e.jsx)(n.td,{children:"150,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"div, rem"}),(0,e.jsx)(n.td,{children:"125,000"}),(0,e.jsx)(n.td,{children:"335,000"}),(0,e.jsx)(n.td,{children:"1,003,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"and, or, xor"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"70,000"}),(0,e.jsx)(n.td,{children:"130,000"}),(0,e.jsx)(n.td,{children:"200,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"ne, eq"}),(0,e.jsx)(n.td,{children:"40,000"}),(0,e.jsx)(n.td,{children:"50,000"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"180,000"}),(0,e.jsx)(n.td,{children:"260,000"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"210,000"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"min, max"}),(0,e.jsx)(n.td,{children:"45,000"}),(0,e.jsx)(n.td,{children:"55,000"}),(0,e.jsx)(n.td,{children:"100,000"}),(0,e.jsx)(n.td,{children:"145,000"}),(0,e.jsx)(n.td,{children:"250,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"shl, shr, rol, ror"}),(0,e.jsx)(n.td,{children:"65,000"}),(0,e.jsx)(n.td,{children:"90,000"}),(0,e.jsx)(n.td,{children:"130,000"}),(0,e.jsx)(n.td,{children:"210,000"}),(0,e.jsx)(n.td,{children:"355,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"n/a"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:"not"}),(0,e.jsx)(n.td,{children:"42,000"}),(0,e.jsx)(n.td,{children:"35,000"}),(0,e.jsx)(n.td,{children:"49,000"}),(0,e.jsx)(n.td,{children:"85,000"}),(0,e.jsx)(n.td,{children:"120,000"}),(0,e.jsx)(n.td,{children:"n/a"}),(0,e.jsx)(n.td,{children:"28,000"}),(0,e.jsx)(n.td,{children:"n/a"})]})]})]})]})}function j(d={}){const{wrapper:n}={...(0,s.R)(),...d.components};return n?(0,e.jsx)(n,{...d,children:(0,e.jsx)(x,{...d})}):x(d)}},8453:(d,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var e=t(6540);const s={},r=e.createContext(s);function i(d){const n=e.useContext(r);return e.useMemo((function(){return"function"==typeof d?d(n):{...n,...d}}),[n,d])}function c(d){let n;return n=d.disableParentContext?"function"==typeof d.components?d.components(s):d.components||s:i(d.components),e.createElement(r.Provider,{value:n},d.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/61c022b5.04ffe688.js b/assets/js/61c022b5.04ffe688.js
new file mode 100644
index 00000000..e7c12d52
--- /dev/null
+++ b/assets/js/61c022b5.04ffe688.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[502],{9826:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Nitrogen","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Overview","href":"/docs/nitrogen/devdocs/intro","docId":"devdocs/intro","unlisted":false},{"type":"category","label":"Fhenix Nitrogen Testnet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\u2728 Fhenix & FHE","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Fhenix-T-FHE","docId":"devdocs/Fhenix Testnet/Fhenix-T-FHE","unlisted":false},{"type":"link","label":"\ud83d\udd17 Connecting to Fhenix Nitrogen Testnet","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Connecting-To","docId":"devdocs/Fhenix Testnet/Connecting-To","unlisted":false},{"type":"link","label":"\ud83e\udd32 3rd party Integrations","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Integration","docId":"devdocs/Fhenix Testnet/Integration","unlisted":false},{"type":"link","label":"\ud83e\uddee FHE Schemes Overview","href":"/docs/nitrogen/devdocs/Fhenix Testnet/FHE-Overview","docId":"devdocs/Fhenix Testnet/FHE-Overview","unlisted":false},{"type":"category","label":"Details","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd0 Fhenix Architecture","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Architecture","docId":"devdocs/Fhenix Testnet/Details/Architecture","unlisted":false},{"type":"link","label":"\ud83c\udd95 Changelog","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Changelog","docId":"devdocs/Fhenix Testnet/Details/Changelog","unlisted":false},{"type":"link","label":"\ud83d\uded1 Limitations","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Limitations","docId":"devdocs/Fhenix Testnet/Details/Limitations","unlisted":false},{"type":"link","label":"\ud83d\udd00 Fhenix Differences For Developers","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Fhenix-Differences","docId":"devdocs/Fhenix Testnet/Details/Fhenix-Differences","unlisted":false}],"href":"/docs/nitrogen/category/details"}],"href":"/docs/nitrogen/category/fhenix-nitrogen-testnet"},{"type":"category","label":"FHE Contracts","collapsible":true,"collapsed":true,"customProps":{"description":"This description can be used in the swizzled DocCard"},"className":"red","items":[{"type":"link","label":"\ud83d\udc24 Getting Started","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/FHE-sol","docId":"devdocs/Writing Smart Contracts/FHE-sol","unlisted":false},{"type":"link","label":"\ud83d\udc49 Inputs","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/User-Inputs","docId":"devdocs/Writing Smart Contracts/User-Inputs","unlisted":false},{"type":"link","label":"\ud83d\udc48 Outputs","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Returning-Data","docId":"devdocs/Writing Smart Contracts/Returning-Data","unlisted":false},{"type":"link","label":"\ud83c\udf34 Select vs If...else","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Select","docId":"devdocs/Writing Smart Contracts/Select","unlisted":false},{"type":"link","label":"\ud83d\udea6Require Statements","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Requires","docId":"devdocs/Writing Smart Contracts/Requires","unlisted":false},{"type":"link","label":"\ud83d\udd75\ufe0f Permissions","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Permissions","docId":"devdocs/Writing Smart Contracts/Permissions","unlisted":false},{"type":"link","label":"\ud83e\uddd9 Type Conversions","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Converting-between-Types","docId":"devdocs/Writing Smart Contracts/Converting-between-Types","unlisted":false},{"type":"link","label":"\ud83e\udeb5 Console.log","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Debug-Logging","docId":"devdocs/Writing Smart Contracts/Debug-Logging","unlisted":false},{"type":"link","label":"\ud83c\udfb2 Randomness","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness","docId":"devdocs/Writing Smart Contracts/Randomness","unlisted":false},{"type":"link","label":"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Types-and-Operators","docId":"devdocs/Writing Smart Contracts/Types-and-Operators","unlisted":false},{"type":"link","label":"\ud83d\udcaf Useful Tips","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Useful-Tips","docId":"devdocs/Writing Smart Contracts/Useful-Tips","unlisted":false},{"type":"link","label":"\ud83d\udd25 Gas and Benchmarks","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Gas-and-Benchmarks","docId":"devdocs/Writing Smart Contracts/Gas-and-Benchmarks","unlisted":false}],"href":"/docs/nitrogen/category/fhe-contracts"},{"type":"category","label":"Setting Up Your Environment","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Overview","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/intro","docId":"devdocs/Setting Up Your Environment/intro","unlisted":false},{"type":"link","label":"\u2601\ufe0f Gitpod","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Gitpod","docId":"devdocs/Setting Up Your Environment/Gitpod","unlisted":false},{"type":"link","label":"\ud83d\udee0\ufe0f Foundry","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Foundry","docId":"devdocs/Setting Up Your Environment/Foundry","unlisted":false},{"type":"link","label":"\ud83d\udc77 Hardhat","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Hardhat","docId":"devdocs/Setting Up Your Environment/Hardhat","unlisted":false},{"type":"link","label":"\ud83c\udfa7 Remix","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Remix","docId":"devdocs/Setting Up Your Environment/Remix","unlisted":false}]},{"type":"category","label":"Fhenix.JS","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation & Basics","href":"/docs/nitrogen/devdocs/FhenixJS/Fhenix-JS","docId":"devdocs/FhenixJS/Fhenix-JS","unlisted":false},{"type":"link","label":"Encryption","href":"/docs/nitrogen/devdocs/FhenixJS/Encryption","docId":"devdocs/FhenixJS/Encryption","unlisted":false},{"type":"link","label":"(Un)Sealing","href":"/docs/nitrogen/devdocs/FhenixJS/Decryption","docId":"devdocs/FhenixJS/Decryption","unlisted":false},{"type":"link","label":"Permits","href":"/docs/nitrogen/devdocs/FhenixJS/Permits","docId":"devdocs/FhenixJS/Permits","unlisted":false},{"type":"link","label":"End-to-End Example","href":"/docs/nitrogen/devdocs/FhenixJS/Sending-a-Transaction","docId":"devdocs/FhenixJS/Sending-a-Transaction","unlisted":false},{"type":"link","label":"Network Keys","href":"/docs/nitrogen/devdocs/FhenixJS/Network Keys","docId":"devdocs/FhenixJS/Network Keys","unlisted":false},{"type":"link","label":"Catching Errors","href":"/docs/nitrogen/devdocs/FhenixJS/Catching Errors","docId":"devdocs/FhenixJS/Catching Errors","unlisted":false}],"href":"/docs/nitrogen/category/fhenixjs"},{"type":"category","label":"Examples and References","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Templates","href":"/docs/nitrogen/devdocs/Examples and References/Templates","docId":"devdocs/Examples and References/Templates","unlisted":false},{"type":"link","label":"Examples & fheDapps","href":"/docs/nitrogen/devdocs/Examples and References/Examples-fheDapps","docId":"devdocs/Examples and References/Examples-fheDapps","unlisted":false}]},{"type":"category","label":"Encryption and Privacy","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udd0e Encrypted Variables - Preventing Exposure","href":"/docs/nitrogen/devdocs/Encryption and Privacy/Exposed-Encrypted-Variables","docId":"devdocs/Encryption and Privacy/Exposed-Encrypted-Variables","unlisted":false},{"type":"link","label":"\ud83d\udcdc Permits & Access Control","href":"/docs/nitrogen/devdocs/Encryption and Privacy/Permits-Access-Control","docId":"devdocs/Encryption and Privacy/Permits-Access-Control","unlisted":false},{"type":"link","label":"\ud83e\udd2b Development Tips \u2013 Ensuring Privacy","href":"/docs/nitrogen/devdocs/Encryption and Privacy/Privacy-Web3","docId":"devdocs/Encryption and Privacy/Privacy-Web3","unlisted":false}]},{"type":"category","label":"Tutorials","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Your First FHE Contract","href":"/docs/nitrogen/devdocs/Tutorials/Your-First-FHE-Contract","docId":"devdocs/Tutorials/Your-First-FHE-Contract","unlisted":false},{"type":"category","label":"Shielded ERC20 Token","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Overview","href":"/docs/nitrogen/devdocs/Tutorials/Basic/intro","docId":"devdocs/Tutorials/Basic/intro","unlisted":false},{"type":"link","label":"Setting Up","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Setting Up","docId":"devdocs/Tutorials/Basic/Setting Up","unlisted":false},{"type":"link","label":"Exploring the Template","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Exploring the Template","docId":"devdocs/Tutorials/Basic/Exploring the Template","unlisted":false},{"type":"link","label":"Writing the Contract","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Writing-The-Contract","docId":"devdocs/Tutorials/Basic/Writing-The-Contract","unlisted":false},{"type":"link","label":"Adding View Functions","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Adding View Functions","docId":"devdocs/Tutorials/Basic/Adding View Functions","unlisted":false},{"type":"link","label":"Deploying","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Deploying","docId":"devdocs/Tutorials/Basic/Deploying","unlisted":false},{"type":"link","label":"Testing on Fhenix","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Testing","docId":"devdocs/Tutorials/Basic/Testing","unlisted":false}],"href":"/docs/nitrogen/category/shielded-erc20-token"}],"href":"/docs/nitrogen/category/tutorials"},{"type":"category","label":"Solidity API","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Experimental","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"FHERC20","href":"/docs/nitrogen/devdocs/Solidity API/Experimental/FHERC20","docId":"devdocs/Solidity API/Experimental/FHERC20","unlisted":false},{"type":"link","label":"IFHERC20","href":"/docs/nitrogen/devdocs/Solidity API/Experimental/IFHERC20","docId":"devdocs/Solidity API/Experimental/IFHERC20","unlisted":false}]},{"type":"link","label":"FHE.sol","href":"/docs/nitrogen/devdocs/Solidity API/FHE","docId":"devdocs/Solidity API/FHE","unlisted":false},{"type":"link","label":"Permissioned.Sol","href":"/docs/nitrogen/devdocs/Solidity API/Permissioned","docId":"devdocs/Solidity API/Permissioned","unlisted":false}]},{"type":"category","label":"Tools and Utilities","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udd10 Fhenix Encryption UI","href":"/docs/nitrogen/devdocs/Tools and Utilities/Fhenix-Encryption-UI","docId":"devdocs/Tools and Utilities/Fhenix-Encryption-UI","unlisted":false},{"type":"link","label":"\ud83d\udc77 Fhenix Hardhat Plugin","href":"/docs/nitrogen/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin","docId":"devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin","unlisted":false},{"type":"link","label":"\ud83c\udfa7 Fhenix Remix Plugin","href":"/docs/nitrogen/devdocs/Tools and Utilities/Fhenix-Remix-Plugin","docId":"devdocs/Tools and Utilities/Fhenix-Remix-Plugin","unlisted":false}]}]},"docs":{"devdocs/Encryption and Privacy/Exposed-Encrypted-Variables":{"id":"devdocs/Encryption and Privacy/Exposed-Encrypted-Variables","title":"\ud83d\udd0e Encrypted Variables - Preventing Exposure","description":"Ensuring that encrypted data and variables are not leaked is important when working with Fhenix. A common oversight when working with encrypted variables is revealing them to other contracts. Lets take a look at a scenario that leaks encrypted data:","sidebar":"docsSidebar"},"devdocs/Encryption and Privacy/Permits-Access-Control":{"id":"devdocs/Encryption and Privacy/Permits-Access-Control","title":"\ud83d\udcdc Permits & Access Control","description":"In a Fully Homomorphic Encryption (FHE) framework, all data stored in a contract\'s storage is encrypted. Access control involves granting selective access to data by authorized parties while restricting access to unauthorized users.","sidebar":"docsSidebar"},"devdocs/Encryption and Privacy/Privacy-Web3":{"id":"devdocs/Encryption and Privacy/Privacy-Web3","title":"\ud83e\udd2b Development Tips \u2013 Ensuring Privacy","description":"Fhenix provides a secure and decentralized way to execute smart contracts on encrypted data; transactions and computations are fully encrypted. As such, Fhenix offers superior on-chain privacy. However, developers still need to be vigilant, because all blockchain privacy platforms have their idiosyncrasies and potential privacy risks.","sidebar":"docsSidebar"},"devdocs/Examples and References/Examples-fheDapps":{"id":"devdocs/Examples and References/Examples-fheDapps","title":"Examples & fheDapps","description":"Here you can find a list of some cool apps that you can use as a reference","sidebar":"docsSidebar"},"devdocs/Examples and References/Templates":{"id":"devdocs/Examples and References/Templates","title":"Templates","description":"We compiled a list of a few templates that you can use as a reference to build your own dApp.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Connecting-To":{"id":"devdocs/Fhenix Testnet/Connecting-To","title":"\ud83d\udd17 Connecting to Fhenix Nitrogen Testnet","description":"Fhenix Nitrogen is the first publicly available FHE-based blockchain, and it is now live! Follow the instructions to connect to Fhenix Nitrogen Testnet.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Architecture":{"id":"devdocs/Fhenix Testnet/Details/Architecture","title":"\ud83d\udcd0 Fhenix Architecture","description":"Our goal with Fhenix is not only to provide the first FHE-based L2 solution, but also to create a platform that is modular, flexible, and can easily be changed, extended or improved as we see","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Changelog":{"id":"devdocs/Fhenix Testnet/Details/Changelog","title":"\ud83c\udd95 Changelog","description":"Here you can find a list of changes between different versions of the Fhenix Testnet(s) as we evolve and grow.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Fhenix-Differences":{"id":"devdocs/Fhenix Testnet/Details/Fhenix-Differences","title":"\ud83d\udd00 Fhenix Differences For Developers","description":"You might be familiar with fhevm, which is a fork of the Ethereum Virtual Machine that supports homomorphic encryption by Zama.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Limitations":{"id":"devdocs/Fhenix Testnet/Details/Limitations","title":"\ud83d\uded1 Limitations","description":"Decryption Key","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/FHE-Overview":{"id":"devdocs/Fhenix Testnet/FHE-Overview","title":"\ud83e\uddee FHE Schemes Overview","description":"Fully Homomorphic Encryption (FHE) schemes are divided into three generations, each designed for different types of applications.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Fhenix-T-FHE":{"id":"devdocs/Fhenix Testnet/Fhenix-T-FHE","title":"\u2728 Fhenix & FHE","description":"Fhenix is revolutionizing the blockchain space by utilizing Fully Homomorphic Encryption (FHE) for confidential smart contracts on public blockchains. An urgent blockchain challenge is ensuring privacy, and FHE is a promising solution. By leveraging FHE\'s ability to process encrypted data, privacy concerns are effectively addressed, thereby creating a safer environment for Web3 applications.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Integration":{"id":"devdocs/Fhenix Testnet/Integration","title":"\ud83e\udd32 3rd party Integrations","description":"Are you a developer looking to integrate Fhenix into your project, or support Fhenix with your app? This section is for you!","sidebar":"docsSidebar"},"devdocs/FhenixJS/Catching Errors":{"id":"devdocs/FhenixJS/Catching Errors","title":"Catching Errors","description":"Catching Errors in Hardhat","sidebar":"docsSidebar"},"devdocs/FhenixJS/Decryption":{"id":"devdocs/FhenixJS/Decryption","title":"(Un)Sealing","description":"When an app wants to read some piece of encrypted data from a Fhenix smart contract, that data must be converted from its encrypted form on chain to an encryption that the app or user can read.","sidebar":"docsSidebar"},"devdocs/FhenixJS/Encryption":{"id":"devdocs/FhenixJS/Encryption","title":"Encryption","description":"fhenix.js provides an easy-to-use function to encrypt your inputs before sending them to the Fhenix blockchain.","sidebar":"docsSidebar"},"devdocs/FhenixJS/Fhenix-JS":{"id":"devdocs/FhenixJS/Fhenix-JS","title":"Installation & Basics","description":"Overview","sidebar":"docsSidebar"},"devdocs/FhenixJS/Network Keys":{"id":"devdocs/FhenixJS/Network Keys","title":"Network Keys","description":"Network Encryption Key","sidebar":"docsSidebar"},"devdocs/FhenixJS/Permits":{"id":"devdocs/FhenixJS/Permits","title":"Permits","description":"Overview","sidebar":"docsSidebar"},"devdocs/FhenixJS/Sending-a-Transaction":{"id":"devdocs/FhenixJS/Sending-a-Transaction","title":"End-to-End Example","description":"In this section, we\'ll explore how to use fhenix.js to send transactions on the Fhenix blockchain.","sidebar":"docsSidebar"},"devdocs/intro":{"id":"devdocs/intro","title":"Overview","description":"Welcome to the Fhenix documentation! These docs should have everything you need to get started and create smart contracts that use FHE with encrypted data! ","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Foundry":{"id":"devdocs/Setting Up Your Environment/Foundry","title":"\ud83d\udee0\ufe0f Foundry","description":"This tool will allow you to simulate development on the Fhenix network including Solidity native testing.","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Gitpod":{"id":"devdocs/Setting Up Your Environment/Gitpod","title":"\u2601\ufe0f Gitpod","description":"If you\'re more of a cloud-based developer, you can skip all the installation steps and work directly with our Gitpod environment. This environment includes a LocalFhenix instance and all the tools you need to dive in.","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Hardhat":{"id":"devdocs/Setting Up Your Environment/Hardhat","title":"\ud83d\udc77 Hardhat","description":"Prerequisites","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/intro":{"id":"devdocs/Setting Up Your Environment/intro","title":"Overview","description":"Different ways to set up your development environment for Fhenix","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Remix":{"id":"devdocs/Setting Up Your Environment/Remix","title":"\ud83c\udfa7 Remix","description":"To get up and running with Remix, you should follow a few easy steps:","sidebar":"docsSidebar"},"devdocs/Solidity API/Experimental/FHERC20":{"id":"devdocs/Solidity API/Experimental/FHERC20","title":"FHERC20","description":"FHERC20","sidebar":"docsSidebar"},"devdocs/Solidity API/Experimental/IFHERC20":{"id":"devdocs/Solidity API/Experimental/IFHERC20","title":"IFHERC20","description":"IFHERC20","sidebar":"docsSidebar"},"devdocs/Solidity API/FHE":{"id":"devdocs/Solidity API/FHE","title":"FHE.sol","description":"isInitialized","sidebar":"docsSidebar"},"devdocs/Solidity API/Permissioned":{"id":"devdocs/Solidity API/Permissioned","title":"Permissioned.Sol","description":"Permission","sidebar":"docsSidebar"},"devdocs/Tools and Utilities/Fhenix-Encryption-UI":{"id":"devdocs/Tools and Utilities/Fhenix-Encryption-UI","title":"\ud83d\udd10 Fhenix Encryption UI","description":"Fhenix encryption UI can be found in the following link","sidebar":"docsSidebar"},"devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin":{"id":"devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin","title":"\ud83d\udc77 Fhenix Hardhat Plugin","description":"Fhenix Hardhat Plugin is designed to extend your Hardhat environment with additional capabilities focused on Fhenix. It integrates seamlessly with your Hardhat projects to provide a local Fhenix environment, including customized network configuration and utilities for managing funds and permits within your blockchain applications.","sidebar":"docsSidebar"},"devdocs/Tools and Utilities/Fhenix-Remix-Plugin":{"id":"devdocs/Tools and Utilities/Fhenix-Remix-Plugin","title":"\ud83c\udfa7 Fhenix Remix Plugin","description":"Fhenix created a plugin to ease the interaction with the contracts.","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Adding View Functions":{"id":"devdocs/Tutorials/Basic/Adding View Functions","title":"Adding View Functions","description":"Adding Encrypted Balance Retrieval","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Deploying":{"id":"devdocs/Tutorials/Basic/Deploying","title":"Deploying","description":"Now that we have our completed WrappingERC20 token, the next step is to see if our code actually works!","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Exploring the Template":{"id":"devdocs/Tutorials/Basic/Exploring the Template","title":"Exploring the Template","description":"The directory resembles a standard hardhat project. If we look into the contracts folder,","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/intro":{"id":"devdocs/Tutorials/Basic/intro","title":"Overview","description":"In this guide, we\'ll be creating a shielded ERC20 token using Solidity. Our token will be unique in that it will offer encrypted token balances, thereby enhancing privacy for token holders.","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Setting Up":{"id":"devdocs/Tutorials/Basic/Setting Up","title":"Setting Up","description":"Dependencies","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Testing":{"id":"devdocs/Tutorials/Basic/Testing","title":"Testing on Fhenix","description":"During this phase, we will focus on deploying the contract, wrapping tokens, and executing transactions using the FhenixJS library and Hardhat.","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Writing-The-Contract":{"id":"devdocs/Tutorials/Basic/Writing-The-Contract","title":"Writing the Contract","description":"Let\'s get started with writing our first FHE powered contract.","sidebar":"docsSidebar"},"devdocs/Tutorials/Your-First-FHE-Contract":{"id":"devdocs/Tutorials/Your-First-FHE-Contract","title":"Your First FHE Contract","description":"In this short guide, we\'ll demonstrate how simple it is to enable confidentiality in your smart contracts using Fhenix.","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Converting-between-Types":{"id":"devdocs/Writing Smart Contracts/Converting-between-Types","title":"\ud83e\uddd9 Type Conversions","description":"Converting between different FHE types","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Debug-Logging":{"id":"devdocs/Writing Smart Contracts/Debug-Logging","title":"\ud83e\udeb5 Console.log","description":"How to debug your contracts using Console.log","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/FHE-sol":{"id":"devdocs/Writing Smart Contracts/FHE-sol","title":"\ud83d\udc24 Getting Started","description":"Installation of contracts and creation of a basic contract","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Gas-and-Benchmarks":{"id":"devdocs/Writing Smart Contracts/Gas-and-Benchmarks","title":"\ud83d\udd25 Gas and Benchmarks","description":"Gas costs for FHE operations","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Permissions":{"id":"devdocs/Writing Smart Contracts/Permissions","title":"\ud83d\udd75\ufe0f Permissions","description":"Managing access to sensitive data & Permissioned contracts","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Randomness":{"id":"devdocs/Writing Smart Contracts/Randomness","title":"\ud83c\udfb2 Randomness","description":"How to generate random numbers in Fhenix","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Requires":{"id":"devdocs/Writing Smart Contracts/Requires","title":"\ud83d\udea6Require Statements","description":"How to perform assertions on Encrypted data","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Returning-Data":{"id":"devdocs/Writing Smart Contracts/Returning-Data","title":"\ud83d\udc48 Outputs","description":"Sealing & Decryption - how data from a contract is returned","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Select":{"id":"devdocs/Writing Smart Contracts/Select","title":"\ud83c\udf34 Select vs If...else","description":"Why if..else is not possible and what are the alternatives","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Types-and-Operators":{"id":"devdocs/Writing Smart Contracts/Types-and-Operators","title":"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations","description":"List of supported types and different operations","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Useful-Tips":{"id":"devdocs/Writing Smart Contracts/Useful-Tips","title":"\ud83d\udcaf Useful Tips","description":"Tidbits of wisdom for working with FHE","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/User-Inputs":{"id":"devdocs/Writing Smart Contracts/User-Inputs","title":"\ud83d\udc49 Inputs","description":"How to handle encrypted data coming from the user","sidebar":"docsSidebar"}}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/61c022b5.0f1923b0.js b/assets/js/61c022b5.0f1923b0.js
deleted file mode 100644
index 6dcdc719..00000000
--- a/assets/js/61c022b5.0f1923b0.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[502],{9826:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Nitrogen","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Overview","href":"/docs/nitrogen/devdocs/intro","docId":"devdocs/intro","unlisted":false},{"type":"category","label":"Fhenix Nitrogen Testnet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\u2728 Fhenix & FHE","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Fhenix-T-FHE","docId":"devdocs/Fhenix Testnet/Fhenix-T-FHE","unlisted":false},{"type":"link","label":"\ud83d\udd17 Connecting to Fhenix Nitrogen Testnet","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Connecting-To","docId":"devdocs/Fhenix Testnet/Connecting-To","unlisted":false},{"type":"link","label":"\ud83e\udd32 3rd party Integrations","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Integration","docId":"devdocs/Fhenix Testnet/Integration","unlisted":false},{"type":"link","label":"\ud83e\uddee FHE Schemes Overview","href":"/docs/nitrogen/devdocs/Fhenix Testnet/FHE-Overview","docId":"devdocs/Fhenix Testnet/FHE-Overview","unlisted":false},{"type":"category","label":"Details","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd0 Fhenix Architecture","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Architecture","docId":"devdocs/Fhenix Testnet/Details/Architecture","unlisted":false},{"type":"link","label":"\ud83c\udd95 Changelog","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Changelog","docId":"devdocs/Fhenix Testnet/Details/Changelog","unlisted":false},{"type":"link","label":"\ud83d\uded1 Limitations","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Limitations","docId":"devdocs/Fhenix Testnet/Details/Limitations","unlisted":false},{"type":"link","label":"\ud83d\udd00 Fhenix Differences For Developers","href":"/docs/nitrogen/devdocs/Fhenix Testnet/Details/Fhenix-Differences","docId":"devdocs/Fhenix Testnet/Details/Fhenix-Differences","unlisted":false}],"href":"/docs/nitrogen/category/details"}],"href":"/docs/nitrogen/category/fhenix-nitrogen-testnet"},{"type":"category","label":"FHE Contracts","collapsible":true,"collapsed":true,"customProps":{"description":"This description can be used in the swizzled DocCard"},"className":"red","items":[{"type":"link","label":"\ud83d\udc24 Getting Started","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/FHE-sol","docId":"devdocs/Writing Smart Contracts/FHE-sol","unlisted":false},{"type":"link","label":"\ud83d\udc49 Inputs","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/User-Inputs","docId":"devdocs/Writing Smart Contracts/User-Inputs","unlisted":false},{"type":"link","label":"\ud83d\udc48 Outputs","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Returning-Data","docId":"devdocs/Writing Smart Contracts/Returning-Data","unlisted":false},{"type":"link","label":"\ud83c\udf34 Select vs If...else","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Select","docId":"devdocs/Writing Smart Contracts/Select","unlisted":false},{"type":"link","label":"\ud83d\udea6Require Statements","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Requires","docId":"devdocs/Writing Smart Contracts/Requires","unlisted":false},{"type":"link","label":"\ud83d\udd75\ufe0f Permissions","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Permissions","docId":"devdocs/Writing Smart Contracts/Permissions","unlisted":false},{"type":"link","label":"\ud83e\uddd9 Type Conversions","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Converting-between-Types","docId":"devdocs/Writing Smart Contracts/Converting-between-Types","unlisted":false},{"type":"link","label":"\ud83e\udeb5 Console.log","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Debug-Logging","docId":"devdocs/Writing Smart Contracts/Debug-Logging","unlisted":false},{"type":"link","label":"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Types-and-Operators","docId":"devdocs/Writing Smart Contracts/Types-and-Operators","unlisted":false},{"type":"link","label":"\ud83d\udcaf Useful Tips","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Useful-Tips","docId":"devdocs/Writing Smart Contracts/Useful-Tips","unlisted":false},{"type":"link","label":"\ud83d\udd25 Gas and Benchmarks","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Gas-and-Benchmarks","docId":"devdocs/Writing Smart Contracts/Gas-and-Benchmarks","unlisted":false},{"type":"link","label":"Randomness","href":"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness","docId":"devdocs/Writing Smart Contracts/Randomness","unlisted":false}],"href":"/docs/nitrogen/category/fhe-contracts"},{"type":"category","label":"Setting Up Your Environment","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Overview","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/intro","docId":"devdocs/Setting Up Your Environment/intro","unlisted":false},{"type":"link","label":"\u2601\ufe0f Gitpod","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Gitpod","docId":"devdocs/Setting Up Your Environment/Gitpod","unlisted":false},{"type":"link","label":"\ud83d\udee0\ufe0f Foundry","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Foundry","docId":"devdocs/Setting Up Your Environment/Foundry","unlisted":false},{"type":"link","label":"\ud83d\udc77 Hardhat","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Hardhat","docId":"devdocs/Setting Up Your Environment/Hardhat","unlisted":false},{"type":"link","label":"\ud83c\udfa7 Remix","href":"/docs/nitrogen/devdocs/Setting Up Your Environment/Remix","docId":"devdocs/Setting Up Your Environment/Remix","unlisted":false}]},{"type":"category","label":"Fhenix.JS","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation & Basics","href":"/docs/nitrogen/devdocs/FhenixJS/Fhenix-JS","docId":"devdocs/FhenixJS/Fhenix-JS","unlisted":false},{"type":"link","label":"Encryption","href":"/docs/nitrogen/devdocs/FhenixJS/Encryption","docId":"devdocs/FhenixJS/Encryption","unlisted":false},{"type":"link","label":"(Un)Sealing","href":"/docs/nitrogen/devdocs/FhenixJS/Decryption","docId":"devdocs/FhenixJS/Decryption","unlisted":false},{"type":"link","label":"Permits","href":"/docs/nitrogen/devdocs/FhenixJS/Permits","docId":"devdocs/FhenixJS/Permits","unlisted":false},{"type":"link","label":"End-to-End Example","href":"/docs/nitrogen/devdocs/FhenixJS/Sending-a-Transaction","docId":"devdocs/FhenixJS/Sending-a-Transaction","unlisted":false},{"type":"link","label":"Network Keys","href":"/docs/nitrogen/devdocs/FhenixJS/Network Keys","docId":"devdocs/FhenixJS/Network Keys","unlisted":false},{"type":"link","label":"Catching Errors","href":"/docs/nitrogen/devdocs/FhenixJS/Catching Errors","docId":"devdocs/FhenixJS/Catching Errors","unlisted":false}],"href":"/docs/nitrogen/category/fhenixjs"},{"type":"category","label":"Examples and References","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Templates","href":"/docs/nitrogen/devdocs/Examples and References/Templates","docId":"devdocs/Examples and References/Templates","unlisted":false},{"type":"link","label":"Examples & fheDapps","href":"/docs/nitrogen/devdocs/Examples and References/Examples-fheDapps","docId":"devdocs/Examples and References/Examples-fheDapps","unlisted":false}]},{"type":"category","label":"Encryption and Privacy","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udd0e Encrypted Variables - Preventing Exposure","href":"/docs/nitrogen/devdocs/Encryption and Privacy/Exposed-Encrypted-Variables","docId":"devdocs/Encryption and Privacy/Exposed-Encrypted-Variables","unlisted":false},{"type":"link","label":"\ud83d\udcdc Permits & Access Control","href":"/docs/nitrogen/devdocs/Encryption and Privacy/Permits-Access-Control","docId":"devdocs/Encryption and Privacy/Permits-Access-Control","unlisted":false},{"type":"link","label":"\ud83e\udd2b Development Tips \u2013 Ensuring Privacy","href":"/docs/nitrogen/devdocs/Encryption and Privacy/Privacy-Web3","docId":"devdocs/Encryption and Privacy/Privacy-Web3","unlisted":false}]},{"type":"category","label":"Tutorials","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Your First FHE Contract","href":"/docs/nitrogen/devdocs/Tutorials/Your-First-FHE-Contract","docId":"devdocs/Tutorials/Your-First-FHE-Contract","unlisted":false},{"type":"category","label":"Shielded ERC20 Token","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Overview","href":"/docs/nitrogen/devdocs/Tutorials/Basic/intro","docId":"devdocs/Tutorials/Basic/intro","unlisted":false},{"type":"link","label":"Setting Up","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Setting Up","docId":"devdocs/Tutorials/Basic/Setting Up","unlisted":false},{"type":"link","label":"Exploring the Template","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Exploring the Template","docId":"devdocs/Tutorials/Basic/Exploring the Template","unlisted":false},{"type":"link","label":"Writing the Contract","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Writing-The-Contract","docId":"devdocs/Tutorials/Basic/Writing-The-Contract","unlisted":false},{"type":"link","label":"Adding View Functions","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Adding View Functions","docId":"devdocs/Tutorials/Basic/Adding View Functions","unlisted":false},{"type":"link","label":"Deploying","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Deploying","docId":"devdocs/Tutorials/Basic/Deploying","unlisted":false},{"type":"link","label":"Testing on Fhenix","href":"/docs/nitrogen/devdocs/Tutorials/Basic/Testing","docId":"devdocs/Tutorials/Basic/Testing","unlisted":false}],"href":"/docs/nitrogen/category/shielded-erc20-token"}],"href":"/docs/nitrogen/category/tutorials"},{"type":"category","label":"Solidity API","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Experimental","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"FHERC20","href":"/docs/nitrogen/devdocs/Solidity API/Experimental/FHERC20","docId":"devdocs/Solidity API/Experimental/FHERC20","unlisted":false},{"type":"link","label":"IFHERC20","href":"/docs/nitrogen/devdocs/Solidity API/Experimental/IFHERC20","docId":"devdocs/Solidity API/Experimental/IFHERC20","unlisted":false}]},{"type":"link","label":"FHE.sol","href":"/docs/nitrogen/devdocs/Solidity API/FHE","docId":"devdocs/Solidity API/FHE","unlisted":false},{"type":"link","label":"Permissioned.Sol","href":"/docs/nitrogen/devdocs/Solidity API/Permissioned","docId":"devdocs/Solidity API/Permissioned","unlisted":false}]},{"type":"category","label":"Tools and Utilities","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udd10 Fhenix Encryption UI","href":"/docs/nitrogen/devdocs/Tools and Utilities/Fhenix-Encryption-UI","docId":"devdocs/Tools and Utilities/Fhenix-Encryption-UI","unlisted":false},{"type":"link","label":"\ud83d\udc77 Fhenix Hardhat Plugin","href":"/docs/nitrogen/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin","docId":"devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin","unlisted":false},{"type":"link","label":"\ud83c\udfa7 Fhenix Remix Plugin","href":"/docs/nitrogen/devdocs/Tools and Utilities/Fhenix-Remix-Plugin","docId":"devdocs/Tools and Utilities/Fhenix-Remix-Plugin","unlisted":false}]}]},"docs":{"devdocs/Encryption and Privacy/Exposed-Encrypted-Variables":{"id":"devdocs/Encryption and Privacy/Exposed-Encrypted-Variables","title":"\ud83d\udd0e Encrypted Variables - Preventing Exposure","description":"Ensuring that encrypted data and variables are not leaked is important when working with Fhenix. A common oversight when working with encrypted variables is revealing them to other contracts. Lets take a look at a scenario that leaks encrypted data:","sidebar":"docsSidebar"},"devdocs/Encryption and Privacy/Permits-Access-Control":{"id":"devdocs/Encryption and Privacy/Permits-Access-Control","title":"\ud83d\udcdc Permits & Access Control","description":"In a Fully Homomorphic Encryption (FHE) framework, all data stored in a contract\'s storage is encrypted. Access control involves granting selective access to data by authorized parties while restricting access to unauthorized users.","sidebar":"docsSidebar"},"devdocs/Encryption and Privacy/Privacy-Web3":{"id":"devdocs/Encryption and Privacy/Privacy-Web3","title":"\ud83e\udd2b Development Tips \u2013 Ensuring Privacy","description":"Fhenix provides a secure and decentralized way to execute smart contracts on encrypted data; transactions and computations are fully encrypted. As such, Fhenix offers superior on-chain privacy. However, developers still need to be vigilant, because all blockchain privacy platforms have their idiosyncrasies and potential privacy risks.","sidebar":"docsSidebar"},"devdocs/Examples and References/Examples-fheDapps":{"id":"devdocs/Examples and References/Examples-fheDapps","title":"Examples & fheDapps","description":"Here you can find a list of some cool apps that you can use as a reference","sidebar":"docsSidebar"},"devdocs/Examples and References/Templates":{"id":"devdocs/Examples and References/Templates","title":"Templates","description":"We compiled a list of a few templates that you can use as a reference to build your own dApp.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Connecting-To":{"id":"devdocs/Fhenix Testnet/Connecting-To","title":"\ud83d\udd17 Connecting to Fhenix Nitrogen Testnet","description":"Fhenix Nitrogen is the first publicly available FHE-based blockchain, and it is now live! Follow the instructions to connect to Fhenix Nitrogen Testnet.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Architecture":{"id":"devdocs/Fhenix Testnet/Details/Architecture","title":"\ud83d\udcd0 Fhenix Architecture","description":"Our goal with Fhenix is not only to provide the first FHE-based L2 solution, but also to create a platform that is modular, flexible, and can easily be changed, extended or improved as we see","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Changelog":{"id":"devdocs/Fhenix Testnet/Details/Changelog","title":"\ud83c\udd95 Changelog","description":"Here you can find a list of changes between different versions of the Fhenix Testnet(s) as we evolve and grow.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Fhenix-Differences":{"id":"devdocs/Fhenix Testnet/Details/Fhenix-Differences","title":"\ud83d\udd00 Fhenix Differences For Developers","description":"You might be familiar with fhevm, which is a fork of the Ethereum Virtual Machine that supports homomorphic encryption by Zama.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Details/Limitations":{"id":"devdocs/Fhenix Testnet/Details/Limitations","title":"\ud83d\uded1 Limitations","description":"Decryption Key","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/FHE-Overview":{"id":"devdocs/Fhenix Testnet/FHE-Overview","title":"\ud83e\uddee FHE Schemes Overview","description":"Fully Homomorphic Encryption (FHE) schemes are divided into three generations, each designed for different types of applications.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Fhenix-T-FHE":{"id":"devdocs/Fhenix Testnet/Fhenix-T-FHE","title":"\u2728 Fhenix & FHE","description":"Fhenix is revolutionizing the blockchain space by utilizing Fully Homomorphic Encryption (FHE) for confidential smart contracts on public blockchains. An urgent blockchain challenge is ensuring privacy, and FHE is a promising solution. By leveraging FHE\'s ability to process encrypted data, privacy concerns are effectively addressed, thereby creating a safer environment for Web3 applications.","sidebar":"docsSidebar"},"devdocs/Fhenix Testnet/Integration":{"id":"devdocs/Fhenix Testnet/Integration","title":"\ud83e\udd32 3rd party Integrations","description":"Are you a developer looking to integrate Fhenix into your project, or support Fhenix with your app? This section is for you!","sidebar":"docsSidebar"},"devdocs/FhenixJS/Catching Errors":{"id":"devdocs/FhenixJS/Catching Errors","title":"Catching Errors","description":"Catching Errors in Hardhat","sidebar":"docsSidebar"},"devdocs/FhenixJS/Decryption":{"id":"devdocs/FhenixJS/Decryption","title":"(Un)Sealing","description":"When an app wants to read some piece of encrypted data from a Fhenix smart contract, that data must be converted from its encrypted form on chain to an encryption that the app or user can read.","sidebar":"docsSidebar"},"devdocs/FhenixJS/Encryption":{"id":"devdocs/FhenixJS/Encryption","title":"Encryption","description":"fhenix.js provides an easy-to-use function to encrypt your inputs before sending them to the Fhenix blockchain.","sidebar":"docsSidebar"},"devdocs/FhenixJS/Fhenix-JS":{"id":"devdocs/FhenixJS/Fhenix-JS","title":"Installation & Basics","description":"Overview","sidebar":"docsSidebar"},"devdocs/FhenixJS/Network Keys":{"id":"devdocs/FhenixJS/Network Keys","title":"Network Keys","description":"Network Encryption Key","sidebar":"docsSidebar"},"devdocs/FhenixJS/Permits":{"id":"devdocs/FhenixJS/Permits","title":"Permits","description":"Overview","sidebar":"docsSidebar"},"devdocs/FhenixJS/Sending-a-Transaction":{"id":"devdocs/FhenixJS/Sending-a-Transaction","title":"End-to-End Example","description":"In this section, we\'ll explore how to use fhenix.js to send transactions on the Fhenix blockchain.","sidebar":"docsSidebar"},"devdocs/intro":{"id":"devdocs/intro","title":"Overview","description":"Welcome to the Fhenix documentation! These docs should have everything you need to get started and create smart contracts that use FHE with encrypted data! ","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Foundry":{"id":"devdocs/Setting Up Your Environment/Foundry","title":"\ud83d\udee0\ufe0f Foundry","description":"This tool will allow you to simulate development on the Fhenix network including Solidity native testing.","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Gitpod":{"id":"devdocs/Setting Up Your Environment/Gitpod","title":"\u2601\ufe0f Gitpod","description":"If you\'re more of a cloud-based developer, you can skip all the installation steps and work directly with our Gitpod environment. This environment includes a LocalFhenix instance and all the tools you need to dive in.","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Hardhat":{"id":"devdocs/Setting Up Your Environment/Hardhat","title":"\ud83d\udc77 Hardhat","description":"Prerequisites","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/intro":{"id":"devdocs/Setting Up Your Environment/intro","title":"Overview","description":"Different ways to set up your development environment for Fhenix","sidebar":"docsSidebar"},"devdocs/Setting Up Your Environment/Remix":{"id":"devdocs/Setting Up Your Environment/Remix","title":"\ud83c\udfa7 Remix","description":"To get up and running with Remix, you should follow a few easy steps:","sidebar":"docsSidebar"},"devdocs/Solidity API/Experimental/FHERC20":{"id":"devdocs/Solidity API/Experimental/FHERC20","title":"FHERC20","description":"FHERC20","sidebar":"docsSidebar"},"devdocs/Solidity API/Experimental/IFHERC20":{"id":"devdocs/Solidity API/Experimental/IFHERC20","title":"IFHERC20","description":"IFHERC20","sidebar":"docsSidebar"},"devdocs/Solidity API/FHE":{"id":"devdocs/Solidity API/FHE","title":"FHE.sol","description":"isInitialized","sidebar":"docsSidebar"},"devdocs/Solidity API/Permissioned":{"id":"devdocs/Solidity API/Permissioned","title":"Permissioned.Sol","description":"Permission","sidebar":"docsSidebar"},"devdocs/Tools and Utilities/Fhenix-Encryption-UI":{"id":"devdocs/Tools and Utilities/Fhenix-Encryption-UI","title":"\ud83d\udd10 Fhenix Encryption UI","description":"Fhenix encryption UI can be found in the following link","sidebar":"docsSidebar"},"devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin":{"id":"devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin","title":"\ud83d\udc77 Fhenix Hardhat Plugin","description":"Fhenix Hardhat Plugin is designed to extend your Hardhat environment with additional capabilities focused on Fhenix. It integrates seamlessly with your Hardhat projects to provide a local Fhenix environment, including customized network configuration and utilities for managing funds and permits within your blockchain applications.","sidebar":"docsSidebar"},"devdocs/Tools and Utilities/Fhenix-Remix-Plugin":{"id":"devdocs/Tools and Utilities/Fhenix-Remix-Plugin","title":"\ud83c\udfa7 Fhenix Remix Plugin","description":"Fhenix created a plugin to ease the interaction with the contracts.","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Adding View Functions":{"id":"devdocs/Tutorials/Basic/Adding View Functions","title":"Adding View Functions","description":"Adding Encrypted Balance Retrieval","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Deploying":{"id":"devdocs/Tutorials/Basic/Deploying","title":"Deploying","description":"Now that we have our completed WrappingERC20 token, the next step is to see if our code actually works!","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Exploring the Template":{"id":"devdocs/Tutorials/Basic/Exploring the Template","title":"Exploring the Template","description":"The directory resembles a standard hardhat project. If we look into the contracts folder,","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/intro":{"id":"devdocs/Tutorials/Basic/intro","title":"Overview","description":"In this guide, we\'ll be creating a shielded ERC20 token using Solidity. Our token will be unique in that it will offer encrypted token balances, thereby enhancing privacy for token holders.","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Setting Up":{"id":"devdocs/Tutorials/Basic/Setting Up","title":"Setting Up","description":"Dependencies","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Testing":{"id":"devdocs/Tutorials/Basic/Testing","title":"Testing on Fhenix","description":"During this phase, we will focus on deploying the contract, wrapping tokens, and executing transactions using the FhenixJS library and Hardhat.","sidebar":"docsSidebar"},"devdocs/Tutorials/Basic/Writing-The-Contract":{"id":"devdocs/Tutorials/Basic/Writing-The-Contract","title":"Writing the Contract","description":"Let\'s get started with writing our first FHE powered contract.","sidebar":"docsSidebar"},"devdocs/Tutorials/Your-First-FHE-Contract":{"id":"devdocs/Tutorials/Your-First-FHE-Contract","title":"Your First FHE Contract","description":"In this short guide, we\'ll demonstrate how simple it is to enable confidentiality in your smart contracts using Fhenix.","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Converting-between-Types":{"id":"devdocs/Writing Smart Contracts/Converting-between-Types","title":"\ud83e\uddd9 Type Conversions","description":"Converting between different FHE types","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Debug-Logging":{"id":"devdocs/Writing Smart Contracts/Debug-Logging","title":"\ud83e\udeb5 Console.log","description":"How to debug your contracts using Console.log","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/FHE-sol":{"id":"devdocs/Writing Smart Contracts/FHE-sol","title":"\ud83d\udc24 Getting Started","description":"Installation of contracts and creation of a basic contract","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Gas-and-Benchmarks":{"id":"devdocs/Writing Smart Contracts/Gas-and-Benchmarks","title":"\ud83d\udd25 Gas and Benchmarks","description":"This section will list the gas costs for every operation based on its inputs.","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Permissions":{"id":"devdocs/Writing Smart Contracts/Permissions","title":"\ud83d\udd75\ufe0f Permissions","description":"Managing access to sensitive data & Permissioned contracts","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Randomness":{"id":"devdocs/Writing Smart Contracts/Randomness","title":"Randomness","description":"Randomness was introduced in the Nitrogen testnet.","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Requires":{"id":"devdocs/Writing Smart Contracts/Requires","title":"\ud83d\udea6Require Statements","description":"How to perform assertions on Encrypted data","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Returning-Data":{"id":"devdocs/Writing Smart Contracts/Returning-Data","title":"\ud83d\udc48 Outputs","description":"Sealing & Decryption - how data from a contract is returned","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Select":{"id":"devdocs/Writing Smart Contracts/Select","title":"\ud83c\udf34 Select vs If...else","description":"Why if..else is not possible and what are the alternatives","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Types-and-Operators":{"id":"devdocs/Writing Smart Contracts/Types-and-Operators","title":"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations","description":"List of supported types and different operations","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/Useful-Tips":{"id":"devdocs/Writing Smart Contracts/Useful-Tips","title":"\ud83d\udcaf Useful Tips","description":"Tidbits of wisdom for working with FHE","sidebar":"docsSidebar"},"devdocs/Writing Smart Contracts/User-Inputs":{"id":"devdocs/Writing Smart Contracts/User-Inputs","title":"\ud83d\udc49 Inputs","description":"How to handle encrypted data coming from the user","sidebar":"docsSidebar"}}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/63ad909b.c1a845ca.js b/assets/js/63ad909b.c1a845ca.js
deleted file mode 100644
index 76d39f45..00000000
--- a/assets/js/63ad909b.c1a845ca.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[923],{7223:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var a=t(4848),r=t(8453);const o={},s="Randomness",i={id:"devdocs/Writing Smart Contracts/Randomness",title:"Randomness",description:"Randomness was introduced in the Nitrogen testnet.",source:"@site/docs/devdocs/Writing Smart Contracts/Randomness.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Randomness",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Randomness.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83d\udd25 Gas and Benchmarks",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Gas-and-Benchmarks"},next:{title:"Overview",permalink:"/docs/nitrogen/devdocs/Setting Up Your Environment/intro"}},c={},d=[{value:"Best practice: Ensure caller is not a Contract",id:"best-practice-ensure-caller-is-not-a-contract",level:3},{value:"Randomness in View functions",id:"randomness-in-view-functions",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h3:"h3",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"randomness",children:"Randomness"}),"\n",(0,a.jsxs)(n.p,{children:["Randomness was introduced in the Nitrogen testnet.\nContracts in Fhenix can get random numbers by calling one of the randomness functions in ",(0,a.jsx)(n.code,{children:"FHE.sol"}),".\nThese functions are:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'import {\n FHE, euint8, euint16, euint32, euint64, euint128, euint256\n} from "@fhenixprotocol/contracts/FHE.sol";\n\neuint8 randomValue = FHE.randomEuint8();\neuint16 randomValue = FHE.randomEuint16();\neuint32 randomValue = FHE.randomEuint32();\neuint64 randomValue = FHE.randomEuint64();\neuint128 randomValue = FHE.randomEuint128();\neuint256 randomValue = FHE.randomEuint256();\n'})}),"\n",(0,a.jsx)(n.p,{children:"Note that the random values are returned as encrypted values.\nThis is a fundamental quality of randomness generation, because if the returned value\nwas plaintext, then it would be possible to simulate the execution and predict the random value."}),"\n",(0,a.jsxs)(n.p,{children:["To see the randomness functions as part of a full example take a look at the ",(0,a.jsx)(n.a,{href:"https://github.com/FhenixProtocol/rng-binary-guessing-game-demo",children:"rng-binary-guessing-game"})," example repo."]}),"\n",(0,a.jsx)(n.h3,{id:"best-practice-ensure-caller-is-not-a-contract",children:"Best practice: Ensure caller is not a Contract"}),"\n",(0,a.jsx)(n.p,{children:"When acting upon the resulting random numbers, it is important to keep the following\nscenario in mind."}),"\n",(0,a.jsxs)(n.p,{children:["Suppose we have a simple game contract that you can send funds to, and with a probability of ",(0,a.jsx)(n.code,{children:"P=0.5"})," (or, 50% chance),\nyou will receive double the funds back."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'contract RandomLucky {\n function play() external payable {\n require(msg.value > 0, "You need to send some FHE");\n\n // Generate a random encrypted number\n euint8 outcome = FHE.randomEuint8();\n uint8 outcomeDecrypted = outcome.decrypt();\n\n // If the outcome is even, send double the value back to the sender\n if (outcomeDecrypted % 2 == 0) {\n uint prize = msg.value * 2;\n require(address(this).balance >= prize, "Contract does not have enough balance");\n payable(msg.sender).transfer(prize);\n }\n // If the outcome is odd, the contract keeps the value\n }\n\n // Fallback function to receive FHE\n receive() external payable {}\n}\n'})}),"\n",(0,a.jsx)(n.p,{children:"An adversary could could call the randomness consumer function, check the result of the random,\nand revert the transaction if that result were not favorable."}),"\n",(0,a.jsx)(n.p,{children:"In this case:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'contract Adversary {\n RandomLucky game;\n\n constructor(address gameAddress) {\n game = RandomLucky(gameAddress);\n }\n\n // Function to attack the RandomLucky contract\n function attack() public payable {\n require(msg.value > 0, "Must send some FHE to attack");\n\n // Store the initial balance of the contract\n uint256 initialBalance = address(this).balance;\n\n // Call the play function of the RandomLucky contract\n game.play{value: msg.value}();\n\n // Check if the balance did not increase\n if (address(this).balance <= initialBalance) {\n revert("Did not win, reverting transaction");\n }\n }\n}\n'})}),"\n",(0,a.jsx)(n.p,{children:"To prevent this kind of attacks, it is recommended to not allow contracts\nto call functions that act upon random numbers, like so:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'modifier callerIsUser() {\n require(tx.origin == msg.sender, "The caller is another contract");\n _;\n}\n\nfunction play() callerIsUser {\n ...\n}\n'})}),"\n",(0,a.jsxs)(n.p,{children:["If your randomness consumer function ",(0,a.jsx)(n.em,{children:"must"})," be callable by another contract, it is recommended to split the consumption and reveal into separate functions:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'struct UserData {\n uint256 amount;\n euint8 outcome;\n uint256 block;\n bool revealed;\n}\n\nmapping (address => UserData) private userData;\n\nfunction play() external payable {\n require(msg.value > 0, "You need to send some FHE");\n require(userData[msg.sender].amount == 0, "Already playing")\n\n // Store the amount played and the outcome to be revealed later\n userData[msg.sender] = UserData({\n amount: msg.value,\n outcome: FHE.randomEuint8(),\n block: block.number,\n revealed: false\n });\n}\n\nfunction reveal() external {\n UserData storage data = userData[msg.sender];\n\n // Ensure that random number cannot be consumed and revealed in the same block\n require(block.number > data.block, "Cannot reveal in same block");\n require(!data.revealed, "Already revealed");\n\n uint8 outcomeDecrypted = data.outcome.decrypt();\n if (outcomeDecrypted % 2 == 0) {\n uint256 prize = data.amount * 2;\n require(address(this).balance >= (prize), "Contract does not have enough balance");\n payable(msg.sender).transfer(prize);\n }\n\n data.amount = 0;\n data.revealed = true;\n}\n'})}),"\n",(0,a.jsxs)(n.admonition,{title:"Warning",type:"danger",children:[(0,a.jsx)(n.h3,{id:"randomness-in-view-functions",children:"Randomness in View functions"}),(0,a.jsxs)(n.p,{children:["Randomness is guaranteed to be unique for each transaction, but not for each ",(0,a.jsx)(n.code,{children:"eth_call"}),".\nSpecifically, two eth_calls to the same contract, on the same block may receive the same random value (more on this below)."]})]}),"\n",(0,a.jsxs)(n.admonition,{title:"How does it work?",type:"info",children:[(0,a.jsx)(n.p,{children:"Random generation takes as input a seed, and returns a random number which is unique for each seed and key sets."}),(0,a.jsx)(n.p,{children:"To cause each random to be different for each transaction, the seed is created from a) the contract address,\nb) the transaction hash, and c) a counter that gets incremented each transaction."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"seed = hash(contract_address, tx_hash, counter)\n"})}),(0,a.jsx)(n.p,{children:"For eth calls, which don't have a tx_hash nor can use a counter, we use the block hash instead, that's why two quick subsequent\ncalls to the same contract may return the same random number."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"seed = hash(contract_address, block_hash)\n"})})]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(6540);const r={},o=a.createContext(r);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/63ad909b.c2060077.js b/assets/js/63ad909b.c2060077.js
new file mode 100644
index 00000000..cc875b5a
--- /dev/null
+++ b/assets/js/63ad909b.c2060077.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[923],{7223:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var a=t(4848),o=t(8453);const r={sidebar_position:9,title:"\ud83c\udfb2 Randomness",description:"How to generate random numbers in Fhenix"},s="\ud83c\udfb2 Randomness",i={id:"devdocs/Writing Smart Contracts/Randomness",title:"\ud83c\udfb2 Randomness",description:"How to generate random numbers in Fhenix",source:"@site/docs/devdocs/Writing Smart Contracts/Randomness.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Randomness",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Randomness.md",tags:[],version:"current",sidebarPosition:9,frontMatter:{sidebar_position:9,title:"\ud83c\udfb2 Randomness",description:"How to generate random numbers in Fhenix"},sidebar:"docsSidebar",previous:{title:"\ud83e\udeb5 Console.log",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Debug-Logging"},next:{title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Types-and-Operators"}},c={},d=[{value:"Best practice: Ensure caller is not a Contract",id:"best-practice-ensure-caller-is-not-a-contract",level:3},{value:"Randomness in View functions",id:"randomness-in-view-functions",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h3:"h3",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"-randomness",children:"\ud83c\udfb2 Randomness"}),"\n",(0,a.jsxs)(n.p,{children:["Randomness was introduced in the Nitrogen testnet.\nContracts in Fhenix can get random numbers by calling one of the randomness functions in ",(0,a.jsx)(n.code,{children:"FHE.sol"}),".\nThese functions are:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'import {\n FHE, euint8, euint16, euint32, euint64, euint128, euint256\n} from "@fhenixprotocol/contracts/FHE.sol";\n\neuint8 randomValue = FHE.randomEuint8();\neuint16 randomValue = FHE.randomEuint16();\neuint32 randomValue = FHE.randomEuint32();\neuint64 randomValue = FHE.randomEuint64();\neuint128 randomValue = FHE.randomEuint128();\neuint256 randomValue = FHE.randomEuint256();\n'})}),"\n",(0,a.jsx)(n.p,{children:"Note that the random values are returned as encrypted values.\nThis is a fundamental quality of randomness generation, because if the returned value\nwas plaintext, then it would be possible to simulate the execution and predict the random value."}),"\n",(0,a.jsxs)(n.p,{children:["To see the randomness functions as part of a full example take a look at the ",(0,a.jsx)(n.a,{href:"https://github.com/FhenixProtocol/rng-binary-guessing-game-demo",children:"rng-binary-guessing-game"})," example repo."]}),"\n",(0,a.jsx)(n.h3,{id:"best-practice-ensure-caller-is-not-a-contract",children:"Best practice: Ensure caller is not a Contract"}),"\n",(0,a.jsx)(n.p,{children:"When acting upon the resulting random numbers, it is important to keep the following\nscenario in mind."}),"\n",(0,a.jsxs)(n.p,{children:["Suppose we have a simple game contract that you can send funds to, and with a probability of ",(0,a.jsx)(n.code,{children:"P=0.5"})," (or, 50% chance),\nyou will receive double the funds back."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'contract RandomLucky {\n function play() external payable {\n require(msg.value > 0, "You need to send some FHE");\n\n // Generate a random encrypted number\n euint8 outcome = FHE.randomEuint8();\n uint8 outcomeDecrypted = outcome.decrypt();\n\n // If the outcome is even, send double the value back to the sender\n if (outcomeDecrypted % 2 == 0) {\n uint prize = msg.value * 2;\n require(address(this).balance >= prize, "Contract does not have enough balance");\n payable(msg.sender).transfer(prize);\n }\n // If the outcome is odd, the contract keeps the value\n }\n\n // Fallback function to receive FHE\n receive() external payable {}\n}\n'})}),"\n",(0,a.jsx)(n.p,{children:"An adversary could could call the randomness consumer function, check the result of the random,\nand revert the transaction if that result were not favorable."}),"\n",(0,a.jsx)(n.p,{children:"In this case:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'contract Adversary {\n RandomLucky game;\n\n constructor(address gameAddress) {\n game = RandomLucky(gameAddress);\n }\n\n // Function to attack the RandomLucky contract\n function attack() public payable {\n require(msg.value > 0, "Must send some FHE to attack");\n\n // Store the initial balance of the contract\n uint256 initialBalance = address(this).balance;\n\n // Call the play function of the RandomLucky contract\n game.play{value: msg.value}();\n\n // Check if the balance did not increase\n if (address(this).balance <= initialBalance) {\n revert("Did not win, reverting transaction");\n }\n }\n}\n'})}),"\n",(0,a.jsx)(n.p,{children:"To prevent this kind of attacks, it is recommended to not allow contracts\nto call functions that act upon random numbers, like so:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'modifier callerIsUser() {\n require(tx.origin == msg.sender, "The caller is another contract");\n _;\n}\n\nfunction play() callerIsUser {\n ...\n}\n'})}),"\n",(0,a.jsxs)(n.p,{children:["If your randomness consumer function ",(0,a.jsx)(n.em,{children:"must"})," be callable by another contract, it is recommended to split the consumption and reveal into separate functions:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-solidity",children:'struct UserData {\n uint256 amount;\n euint8 outcome;\n uint256 block;\n bool revealed;\n}\n\nmapping (address => UserData) private userData;\n\nfunction play() external payable {\n require(msg.value > 0, "You need to send some FHE");\n require(userData[msg.sender].amount == 0, "Already playing")\n\n // Store the amount played and the outcome to be revealed later\n userData[msg.sender] = UserData({\n amount: msg.value,\n outcome: FHE.randomEuint8(),\n block: block.number,\n revealed: false\n });\n}\n\nfunction reveal() external {\n UserData storage data = userData[msg.sender];\n\n // Ensure that random number cannot be consumed and revealed in the same block\n require(block.number > data.block, "Cannot reveal in same block");\n require(!data.revealed, "Already revealed");\n\n uint8 outcomeDecrypted = data.outcome.decrypt();\n if (outcomeDecrypted % 2 == 0) {\n uint256 prize = data.amount * 2;\n require(address(this).balance >= (prize), "Contract does not have enough balance");\n payable(msg.sender).transfer(prize);\n }\n\n data.amount = 0;\n data.revealed = true;\n}\n'})}),"\n",(0,a.jsxs)(n.admonition,{title:"Warning",type:"danger",children:[(0,a.jsx)(n.h3,{id:"randomness-in-view-functions",children:"Randomness in View functions"}),(0,a.jsxs)(n.p,{children:["Randomness is guaranteed to be unique for each transaction, but not for each ",(0,a.jsx)(n.code,{children:"eth_call"}),".\nSpecifically, two eth_calls to the same contract, on the same block may receive the same random value (more on this below)."]})]}),"\n",(0,a.jsxs)(n.admonition,{title:"How does it work?",type:"info",children:[(0,a.jsx)(n.p,{children:"Random generation takes as input a seed, and returns a random number which is unique for each seed and key sets."}),(0,a.jsx)(n.p,{children:"To cause each random to be different for each transaction, the seed is created from a) the contract address,\nb) the transaction hash, and c) a counter that gets incremented each transaction."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"seed = hash(contract_address, tx_hash, counter)\n"})}),(0,a.jsx)(n.p,{children:"For eth calls, which don't have a tx_hash nor can use a counter, we use the block hash instead, that's why two quick subsequent\ncalls to the same contract may return the same random number."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"seed = hash(contract_address, block_hash)\n"})})]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(6540);const o={},r=a.createContext(o);function s(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/65be5726.ef6d7a60.js b/assets/js/65be5726.ef6d7a60.js
deleted file mode 100644
index fcb25dbf..00000000
--- a/assets/js/65be5726.ef6d7a60.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[7499],{42:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>j,frontMatter:()=>s,metadata:()=>d,toc:()=>x});var r=n(4848),l=n(8453);const s={sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},i="Supported Types and Operations",d={id:"devdocs/Writing Smart Contracts/Types-and-Operators",title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations",source:"@site/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Types-and-Operators",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Types-and-Operators",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",tags:[],version:"current",sidebarPosition:100,frontMatter:{sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},sidebar:"docsSidebar",previous:{title:"\ud83e\udeb5 Console.log",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Debug-Logging"},next:{title:"\ud83d\udcaf Useful Tips",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Useful-Tips"}},c={},x=[{value:"Types",id:"types",level:2},{value:"Operations",id:"operations",level:2},{value:"Using Direct Function Calls",id:"using-direct-function-calls",level:3},{value:"Using Library Bindings",id:"using-library-bindings",level:3},{value:"Utilizing Operator Overloading",id:"utilizing-operator-overloading",level:3},{value:"Comparisons",id:"comparisons",level:2},{value:"Supported Operations",id:"supported-operations",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"supported-types-and-operations",children:"Supported Types and Operations"}),"\n",(0,r.jsx)(t.p,{children:"The library exposes utility functions for FHE operations. The goal of the library is to provide a seamless developer experience for writing smart contracts that can operate on confidential data."}),"\n",(0,r.jsx)(t.h2,{id:"types",children:"Types"}),"\n",(0,r.jsx)(t.p,{children:"The library provides a type system that is checked both at compile time and at run time. The structure and operations related to these types are described in this sections."}),"\n",(0,r.jsxs)(t.p,{children:["We currently support encrypted integers of bit length up to 256 bits and special types such as ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:['The encrypted integers behave as much as possible as Solidity\'s integer types. However, behavior such as "revert on overflow" is not supported as this would leak some information of the encrypted integers. Therefore, arithmetic on ',(0,r.jsx)(t.code,{children:"euint"})," types is ",(0,r.jsx)(t.a,{href:"https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic",children:"unchecked"}),", i.e. there is wrap-around on overlow."]}),"\n",(0,r.jsxs)(t.p,{children:["In the back-end, encrypted integers are FHE ciphertexts. The library abstracts away the ciphertexts and presents pointers to ciphertexts, or ciphertext handles, to the smart contract developer. The ",(0,r.jsx)(t.code,{children:"euint"}),", ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"})," types are ",(0,r.jsx)(t.em,{children:"wrappers"})," over these handles."]}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colspan:"2",children:" Supported types "})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ebool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Compute"})]})]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEbool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Input"})]})]})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"operations",children:"Operations"}),"\n",(0,r.jsx)(t.p,{children:"There are three ways to perform operations with FHE.sol:"}),"\n",(0,r.jsx)(t.h3,{id:"using-direct-function-calls",children:"Using Direct Function Calls"}),"\n",(0,r.jsx)(t.p,{children:"Direct function calls are the most straightforward way to perform operations with FHE.sol. For example, if you want to add two encrypted 8-bit integers (euint8), you can do so as follows:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = FHE.add(lhs, rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"Here, lhs and rhs are your euint8 variables, and result will store the outcome of the addition."}),"\n",(0,r.jsx)(t.h3,{id:"using-library-bindings",children:"Using Library Bindings"}),"\n",(0,r.jsx)(t.p,{children:"FHE.sol also provides library bindings, allowing for a more natural syntax. To use this, you first need to include the library for your specific data type. For euint8, the usage would look like this:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs.add(rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"In this example, lhs.add(rhs) performs the addition, using the library function implicitly."}),"\n",(0,r.jsx)(t.h3,{id:"utilizing-operator-overloading",children:"Utilizing Operator Overloading"}),"\n",(0,r.jsxs)(t.p,{children:["For an even more intuitive approach, FHE.sol supports operator overloading. This means you can use standard arithmetic operators like ",(0,r.jsx)(t.code,{children:"+"}),", ",(0,r.jsx)(t.code,{children:"-"}),", ",(0,r.jsx)(t.code,{children:"*"}),", etc., directly on encrypted types. Here's how you can use it for adding two ",(0,r.jsx)(t.code,{children:"euint8"})," values:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs + rhs;\n"})}),"\n",(0,r.jsx)(t.p,{children:"With operator overloading, lhs + rhs performs the addition seamlessly."}),"\n",(0,r.jsx)(t.h2,{id:"comparisons",children:"Comparisons"}),"\n",(0,r.jsxs)(t.p,{children:["Unlike other operations in FHE.sol, comparison operations do not support their respective operators (e.g. ",(0,r.jsx)(t.code,{children:">"}),", ",(0,r.jsx)(t.code,{children:"<"})," etc.).\nThis is because solidity expects these operators to return a boolean value, which is not possible with FHE.\nIntuitively, this is because returning a boolean value would leak information about the encrypted data."]}),"\n",(0,r.jsxs)(t.p,{children:["Instead, comparison operations are implemented as functions that return an ",(0,r.jsx)(t.code,{children:"ebool"})," type."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"ebool"})," type is not a real boolean type. It is implemented as a ",(0,r.jsx)(t.code,{children:"euint8"})]})}),"\n",(0,r.jsx)(t.h2,{id:"supported-operations",children:"Supported Operations"}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["A documentation of every function in FHE.sol (including inputs and outputs) can be found in ",(0,r.jsx)(t.a,{href:"/docs/nitrogen/devdocs/Solidity%20API/FHE",children:"FHE.sol"})]})}),"\n",(0,r.jsx)(t.p,{children:"All operations supported by FHE.sol are listed in the table below. For performance reasons, not all operations are supported for all types."}),"\n",(0,r.jsx)(t.p,{children:"Please refer to the table below for a comprehensive list of supported operations. This list will evolve as the network matures."}),"\n",(0,r.jsx)(t.p,{children:"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!)."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"FHE.sol function"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"Operator"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint8"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint16"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint32"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint64"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint128"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint256"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"ebool"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"eaddress"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Addition"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"add"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"+"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Subtraction"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sub"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"-"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Multiplication"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"mul"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"*"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise And"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"and"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"&"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Or"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"or"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"|"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Xor"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"xor"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"^"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Division"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"div"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"/"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Remainder"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rem"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"%"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Square"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"square"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Right"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shr"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Left"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shl"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rotate Right"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ror"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rotate Left"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rol"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eq"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ne"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Min"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"min"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Max"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"max"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"not"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"select"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Require"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"req"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Decrypt"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"decrypt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Seal Output"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sealOutput"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]})]})]}),"\n",(0,r.jsx)(t.admonition,{title:"Caveat",type:"danger",children:(0,r.jsxs)(t.p,{children:["At the moment it is not possible to do ",(0,r.jsx)(t.code,{children:"ebool result = (lhs == rhs)"})," and others that return a boolean result. This is because FHE.sol expects a ",(0,r.jsx)(t.code,{children:"ebool"}),", while Solidity only allows overloading to return a regular boolean.\nInstead, we recommend ",(0,r.jsx)(t.code,{children:"ebool result = lhs.eq(rhs)"}),"."]})}),"\n",(0,r.jsx)(t.admonition,{type:"danger",children:(0,r.jsxs)(t.p,{children:["Using require and decrypt in a TX is dangerous as it can break the confidentiality of the data. Please refer to ",(0,r.jsx)(t.a,{href:"/docs/nitrogen/devdocs/Writing%20Smart%20Contracts/Useful-Tips",children:"Useful-Tips"})," to read some more"]})}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Division and Remainder by ",(0,r.jsx)(t.code,{children:"0"})," will output with an encrypted representation of the maximal value of the uint that is used (Ex. encrypted 255 for euint8)"]})})]})}function j(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>d});var r=n(6540);const l={},s=r.createContext(l);function i(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/65be5726.f9f49bad.js b/assets/js/65be5726.f9f49bad.js
new file mode 100644
index 00000000..66abecba
--- /dev/null
+++ b/assets/js/65be5726.f9f49bad.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[7499],{42:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>j,frontMatter:()=>s,metadata:()=>d,toc:()=>x});var r=n(4848),l=n(8453);const s={sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},i="Supported Types and Operations",d={id:"devdocs/Writing Smart Contracts/Types-and-Operators",title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations",source:"@site/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Types-and-Operators",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Types-and-Operators",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",tags:[],version:"current",sidebarPosition:100,frontMatter:{sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},sidebar:"docsSidebar",previous:{title:"\ud83c\udfb2 Randomness",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness"},next:{title:"\ud83d\udcaf Useful Tips",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Useful-Tips"}},c={},x=[{value:"Types",id:"types",level:2},{value:"Operations",id:"operations",level:2},{value:"Using Direct Function Calls",id:"using-direct-function-calls",level:3},{value:"Using Library Bindings",id:"using-library-bindings",level:3},{value:"Utilizing Operator Overloading",id:"utilizing-operator-overloading",level:3},{value:"Comparisons",id:"comparisons",level:2},{value:"Supported Operations",id:"supported-operations",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"supported-types-and-operations",children:"Supported Types and Operations"}),"\n",(0,r.jsx)(t.p,{children:"The library exposes utility functions for FHE operations. The goal of the library is to provide a seamless developer experience for writing smart contracts that can operate on confidential data."}),"\n",(0,r.jsx)(t.h2,{id:"types",children:"Types"}),"\n",(0,r.jsx)(t.p,{children:"The library provides a type system that is checked both at compile time and at run time. The structure and operations related to these types are described in this sections."}),"\n",(0,r.jsxs)(t.p,{children:["We currently support encrypted integers of bit length up to 256 bits and special types such as ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:['The encrypted integers behave as much as possible as Solidity\'s integer types. However, behavior such as "revert on overflow" is not supported as this would leak some information of the encrypted integers. Therefore, arithmetic on ',(0,r.jsx)(t.code,{children:"euint"})," types is ",(0,r.jsx)(t.a,{href:"https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic",children:"unchecked"}),", i.e. there is wrap-around on overlow."]}),"\n",(0,r.jsxs)(t.p,{children:["In the back-end, encrypted integers are FHE ciphertexts. The library abstracts away the ciphertexts and presents pointers to ciphertexts, or ciphertext handles, to the smart contract developer. The ",(0,r.jsx)(t.code,{children:"euint"}),", ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"})," types are ",(0,r.jsx)(t.em,{children:"wrappers"})," over these handles."]}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colspan:"2",children:" Supported types "})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ebool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Compute"})]})]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEbool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Input"})]})]})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"operations",children:"Operations"}),"\n",(0,r.jsx)(t.p,{children:"There are three ways to perform operations with FHE.sol:"}),"\n",(0,r.jsx)(t.h3,{id:"using-direct-function-calls",children:"Using Direct Function Calls"}),"\n",(0,r.jsx)(t.p,{children:"Direct function calls are the most straightforward way to perform operations with FHE.sol. For example, if you want to add two encrypted 8-bit integers (euint8), you can do so as follows:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = FHE.add(lhs, rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"Here, lhs and rhs are your euint8 variables, and result will store the outcome of the addition."}),"\n",(0,r.jsx)(t.h3,{id:"using-library-bindings",children:"Using Library Bindings"}),"\n",(0,r.jsx)(t.p,{children:"FHE.sol also provides library bindings, allowing for a more natural syntax. To use this, you first need to include the library for your specific data type. For euint8, the usage would look like this:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs.add(rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"In this example, lhs.add(rhs) performs the addition, using the library function implicitly."}),"\n",(0,r.jsx)(t.h3,{id:"utilizing-operator-overloading",children:"Utilizing Operator Overloading"}),"\n",(0,r.jsxs)(t.p,{children:["For an even more intuitive approach, FHE.sol supports operator overloading. This means you can use standard arithmetic operators like ",(0,r.jsx)(t.code,{children:"+"}),", ",(0,r.jsx)(t.code,{children:"-"}),", ",(0,r.jsx)(t.code,{children:"*"}),", etc., directly on encrypted types. Here's how you can use it for adding two ",(0,r.jsx)(t.code,{children:"euint8"})," values:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs + rhs;\n"})}),"\n",(0,r.jsx)(t.p,{children:"With operator overloading, lhs + rhs performs the addition seamlessly."}),"\n",(0,r.jsx)(t.h2,{id:"comparisons",children:"Comparisons"}),"\n",(0,r.jsxs)(t.p,{children:["Unlike other operations in FHE.sol, comparison operations do not support their respective operators (e.g. ",(0,r.jsx)(t.code,{children:">"}),", ",(0,r.jsx)(t.code,{children:"<"})," etc.).\nThis is because solidity expects these operators to return a boolean value, which is not possible with FHE.\nIntuitively, this is because returning a boolean value would leak information about the encrypted data."]}),"\n",(0,r.jsxs)(t.p,{children:["Instead, comparison operations are implemented as functions that return an ",(0,r.jsx)(t.code,{children:"ebool"})," type."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"ebool"})," type is not a real boolean type. It is implemented as a ",(0,r.jsx)(t.code,{children:"euint8"})]})}),"\n",(0,r.jsx)(t.h2,{id:"supported-operations",children:"Supported Operations"}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["A documentation of every function in FHE.sol (including inputs and outputs) can be found in ",(0,r.jsx)(t.a,{href:"/docs/nitrogen/devdocs/Solidity%20API/FHE",children:"FHE.sol"})]})}),"\n",(0,r.jsx)(t.p,{children:"All operations supported by FHE.sol are listed in the table below. For performance reasons, not all operations are supported for all types."}),"\n",(0,r.jsx)(t.p,{children:"Please refer to the table below for a comprehensive list of supported operations. This list will evolve as the network matures."}),"\n",(0,r.jsx)(t.p,{children:"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!)."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"FHE.sol function"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"Operator"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint8"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint16"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint32"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint64"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint128"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint256"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"ebool"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"eaddress"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Addition"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"add"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"+"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Subtraction"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sub"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"-"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Multiplication"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"mul"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"*"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise And"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"and"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"&"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Or"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"or"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"|"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Xor"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"xor"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"^"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Division"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"div"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"/"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Remainder"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rem"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"%"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Square"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"square"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Right"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shr"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Left"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shl"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rotate Right"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ror"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rotate Left"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rol"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eq"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ne"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Min"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"min"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Max"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"max"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"not"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"select"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Require"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"req"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Decrypt"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"decrypt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Seal Output"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sealOutput"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]})]})]}),"\n",(0,r.jsx)(t.admonition,{title:"Caveat",type:"danger",children:(0,r.jsxs)(t.p,{children:["At the moment it is not possible to do ",(0,r.jsx)(t.code,{children:"ebool result = (lhs == rhs)"})," and others that return a boolean result. This is because FHE.sol expects a ",(0,r.jsx)(t.code,{children:"ebool"}),", while Solidity only allows overloading to return a regular boolean.\nInstead, we recommend ",(0,r.jsx)(t.code,{children:"ebool result = lhs.eq(rhs)"}),"."]})}),"\n",(0,r.jsx)(t.admonition,{type:"danger",children:(0,r.jsxs)(t.p,{children:["Using require and decrypt in a TX is dangerous as it can break the confidentiality of the data. Please refer to ",(0,r.jsx)(t.a,{href:"/docs/nitrogen/devdocs/Writing%20Smart%20Contracts/Useful-Tips",children:"Useful-Tips"})," to read some more"]})}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Division and Remainder by ",(0,r.jsx)(t.code,{children:"0"})," will output with an encrypted representation of the maximal value of the uint that is used (Ex. encrypted 255 for euint8)"]})})]})}function j(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>d});var r=n(6540);const l={},s=r.createContext(l);function i(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/a7e0b53d.68ada29a.js b/assets/js/a7e0b53d.68ada29a.js
deleted file mode 100644
index 61f2d6eb..00000000
--- a/assets/js/a7e0b53d.68ada29a.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[3046],{5652:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>g,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var t=o(4848),i=o(8453);const r={sidebar_position:8,title:"\ud83e\udeb5 Console.log",description:"How to debug your contracts using Console.log"},s=void 0,l={id:"devdocs/Writing Smart Contracts/Debug-Logging",title:"\ud83e\udeb5 Console.log",description:"How to debug your contracts using Console.log",source:"@site/docs/devdocs/Writing Smart Contracts/Debug-Logging.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Debug-Logging",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Debug-Logging",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Debug-Logging.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8,title:"\ud83e\udeb5 Console.log",description:"How to debug your contracts using Console.log"},sidebar:"docsSidebar",previous:{title:"\ud83e\uddd9 Type Conversions",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Converting-between-Types"},next:{title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Types-and-Operators"}},c={},a=[{value:"Console.log in Fhenix's Localfhenix Environment",id:"consolelog-in-fhenixs-localfhenix-environment",level:3},{value:"Public Functions",id:"public-functions",level:4},{value:"Usage Examples",id:"usage-examples",level:4},{value:"Usefulness in Encrypted Number Handling",id:"usefulness-in-encrypted-number-handling",level:3},{value:"Viewing Logs in the Localfhenix Docker Container",id:"viewing-logs-in-the-localfhenix-docker-container",level:3}];function d(n){const e={admonition:"admonition",code:"code",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h3,{id:"consolelog-in-fhenixs-localfhenix-environment",children:"Console.log in Fhenix's Localfhenix Environment"}),"\n",(0,t.jsxs)(e.p,{children:["In Fhenix's Localfhenix environment, the ",(0,t.jsx)(e.code,{children:"Console.log"})," function and its variants serve as essential debugging tools for Solidity developers. These logs are directed to the Docker log output, aiding in monitoring and troubleshooting smart contract execution in real-time."]}),"\n",(0,t.jsx)(e.h4,{id:"public-functions",children:"Public Functions"}),"\n",(0,t.jsxs)(e.p,{children:["The ",(0,t.jsx)(e.code,{children:"Console"})," library provides two primary public logging functions:"]}),"\n",(0,t.jsxs)(e.ol,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:"log(int256 p0)"}),": Logs an integer value."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:"logBytes(bytes memory p0)"}),": Logs a byte array."]}),"\n"]}),"\n",(0,t.jsx)(e.h4,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,t.jsx)(e.p,{children:"Here is how you can use these logging functions in your smart contracts:"}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Logging an Integer:"})}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-solidity",children:'import { Console } from "@fhenixprotocol/contracts/utils/debug/Console.sol";\n\ncontract ExampleContract {\n function logIntExample() public pure {\n Console.log(123); // Contract Log: 123\n }\n}\n'})}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Logging a Byte Array:"})}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-solidity",children:'import { Console } from "@fhenixprotocol/contracts/utils/debug/Console.sol";\n\ncontract ExampleContract {\n function logBytesExample() public pure {\n bytes memory data = "Hello, Fhenix!";\n Console.logBytes(data); // Contract Log: Hello, Fhenix!\n }\n}\n'})}),"\n",(0,t.jsx)(e.h3,{id:"usefulness-in-encrypted-number-handling",children:"Usefulness in Encrypted Number Handling"}),"\n",(0,t.jsxs)(e.p,{children:["When working with encrypted numbers in smart contracts, having robust logging mechanisms is indispensable. Encrypted computations can be complex and opaque, making it difficult to trace issues or verify the correctness of computations. Here's how the logging functions provided by the ",(0,t.jsx)(e.code,{children:"Console"})," library can be particularly useful:"]}),"\n",(0,t.jsxs)(e.ol,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Transparency and Debugging:"}),"\nEncrypted numbers typically undergo various transformations and operations. Logging these values at different stages helps verify that transformations are accurate and that no data corruption occurs. For instance, if an encrypted number is not decrypting correctly, logs can help trace back to the point where an issue might have arisen."]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Validation:"}),"\nSmart contracts that operate with encryption often involve sensitive data and critical operations. Logging intermediate values ensures that all operations are performed correctly, and their outcomes match expected results, providing an additional layer of validation."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(e.p,{children:"Here's an example demonstrating how logging might be used in the context of encrypted number operations:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-solidity",children:'import "@fhenixprotocol/contracts/utils/debug/Console.sol";\nimport { FHE } from "@fhenixprotocol/contracts/FHE.sol";\n\ncontract EncryptedNumberContract {\n using EncryptedNumberLibrary for EncryptedNumber;\n\n function computeWithEncryptedNumbers(inEuint64 encryptedA, inEuint64 encryptedB) public {\n\n // Perform some operations\n euint64 result = FHE.asEuint64(encryptedA) + FHE.asEuint64(encryptedB);\n\n // DEBUG: Log the intermediate result\n uint256 debug_Result = FHE.decrypt(result);\n // Log the result\n Console.log(result);\n\n // Perform more operations\n euint64 finalResult = result * FHE.asEuint64(encryptedA);\n \n return finalResult;\n }\n}\n'})}),"\n",(0,t.jsx)(e.p,{children:"By strategically placing logs, developers can gain insights into the operations and transformations performed on encrypted numbers, greatly simplifying debugging and ensuring the integrity of computations."}),"\n",(0,t.jsx)(e.h3,{id:"viewing-logs-in-the-localfhenix-docker-container",children:"Viewing Logs in the Localfhenix Docker Container"}),"\n",(0,t.jsx)(e.p,{children:"Logging in the Localfhenix environment is directed to the Docker log output. To view these logs, follow these steps:"}),"\n",(0,t.jsx)(e.admonition,{type:"note",children:(0,t.jsx)(e.p,{children:"Logging is not available on the Fhenix Testnet or Mainnet. It is only available in the Localfhenix development environment."})}),"\n",(0,t.jsx)(e.p,{children:"If you are running Localfhenix using the Hardhat plugin, you can view the logs by running the following command:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-sh",children:'docker logs localfhenix_hh_plugin -f 2>&1 | grep "Contract Log:"\n'})}),"\n",(0,t.jsxs)(e.p,{children:["If you are running LocalFhenix using the Docker image directly, you must first identify the container name using the ",(0,t.jsx)(e.code,{children:"docker ps"})," command and then view the logs:"]}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-sh",children:'docker logs -f 2>&1 | grep "Contract Log:"\n'})})]})}function g(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(d,{...n})}):d(n)}},8453:(n,e,o)=>{o.d(e,{R:()=>s,x:()=>l});var t=o(6540);const i={},r=t.createContext(i);function s(n){const e=t.useContext(r);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function l(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:s(n.components),t.createElement(r.Provider,{value:e},n.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/a7e0b53d.e6e36910.js b/assets/js/a7e0b53d.e6e36910.js
new file mode 100644
index 00000000..13d14e55
--- /dev/null
+++ b/assets/js/a7e0b53d.e6e36910.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[3046],{5652:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>g,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var t=o(4848),i=o(8453);const r={sidebar_position:8,title:"\ud83e\udeb5 Console.log",description:"How to debug your contracts using Console.log"},s=void 0,l={id:"devdocs/Writing Smart Contracts/Debug-Logging",title:"\ud83e\udeb5 Console.log",description:"How to debug your contracts using Console.log",source:"@site/docs/devdocs/Writing Smart Contracts/Debug-Logging.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Debug-Logging",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Debug-Logging",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Debug-Logging.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8,title:"\ud83e\udeb5 Console.log",description:"How to debug your contracts using Console.log"},sidebar:"docsSidebar",previous:{title:"\ud83e\uddd9 Type Conversions",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Converting-between-Types"},next:{title:"\ud83c\udfb2 Randomness",permalink:"/docs/nitrogen/devdocs/Writing Smart Contracts/Randomness"}},c={},a=[{value:"Console.log in Fhenix's Localfhenix Environment",id:"consolelog-in-fhenixs-localfhenix-environment",level:3},{value:"Public Functions",id:"public-functions",level:4},{value:"Usage Examples",id:"usage-examples",level:4},{value:"Usefulness in Encrypted Number Handling",id:"usefulness-in-encrypted-number-handling",level:3},{value:"Viewing Logs in the Localfhenix Docker Container",id:"viewing-logs-in-the-localfhenix-docker-container",level:3}];function d(n){const e={admonition:"admonition",code:"code",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h3,{id:"consolelog-in-fhenixs-localfhenix-environment",children:"Console.log in Fhenix's Localfhenix Environment"}),"\n",(0,t.jsxs)(e.p,{children:["In Fhenix's Localfhenix environment, the ",(0,t.jsx)(e.code,{children:"Console.log"})," function and its variants serve as essential debugging tools for Solidity developers. These logs are directed to the Docker log output, aiding in monitoring and troubleshooting smart contract execution in real-time."]}),"\n",(0,t.jsx)(e.h4,{id:"public-functions",children:"Public Functions"}),"\n",(0,t.jsxs)(e.p,{children:["The ",(0,t.jsx)(e.code,{children:"Console"})," library provides two primary public logging functions:"]}),"\n",(0,t.jsxs)(e.ol,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:"log(int256 p0)"}),": Logs an integer value."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.code,{children:"logBytes(bytes memory p0)"}),": Logs a byte array."]}),"\n"]}),"\n",(0,t.jsx)(e.h4,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,t.jsx)(e.p,{children:"Here is how you can use these logging functions in your smart contracts:"}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Logging an Integer:"})}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-solidity",children:'import { Console } from "@fhenixprotocol/contracts/utils/debug/Console.sol";\n\ncontract ExampleContract {\n function logIntExample() public pure {\n Console.log(123); // Contract Log: 123\n }\n}\n'})}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Logging a Byte Array:"})}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-solidity",children:'import { Console } from "@fhenixprotocol/contracts/utils/debug/Console.sol";\n\ncontract ExampleContract {\n function logBytesExample() public pure {\n bytes memory data = "Hello, Fhenix!";\n Console.logBytes(data); // Contract Log: Hello, Fhenix!\n }\n}\n'})}),"\n",(0,t.jsx)(e.h3,{id:"usefulness-in-encrypted-number-handling",children:"Usefulness in Encrypted Number Handling"}),"\n",(0,t.jsxs)(e.p,{children:["When working with encrypted numbers in smart contracts, having robust logging mechanisms is indispensable. Encrypted computations can be complex and opaque, making it difficult to trace issues or verify the correctness of computations. Here's how the logging functions provided by the ",(0,t.jsx)(e.code,{children:"Console"})," library can be particularly useful:"]}),"\n",(0,t.jsxs)(e.ol,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Transparency and Debugging:"}),"\nEncrypted numbers typically undergo various transformations and operations. Logging these values at different stages helps verify that transformations are accurate and that no data corruption occurs. For instance, if an encrypted number is not decrypting correctly, logs can help trace back to the point where an issue might have arisen."]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.strong,{children:"Validation:"}),"\nSmart contracts that operate with encryption often involve sensitive data and critical operations. Logging intermediate values ensures that all operations are performed correctly, and their outcomes match expected results, providing an additional layer of validation."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(e.p,{children:"Here's an example demonstrating how logging might be used in the context of encrypted number operations:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-solidity",children:'import "@fhenixprotocol/contracts/utils/debug/Console.sol";\nimport { FHE } from "@fhenixprotocol/contracts/FHE.sol";\n\ncontract EncryptedNumberContract {\n using EncryptedNumberLibrary for EncryptedNumber;\n\n function computeWithEncryptedNumbers(inEuint64 encryptedA, inEuint64 encryptedB) public {\n\n // Perform some operations\n euint64 result = FHE.asEuint64(encryptedA) + FHE.asEuint64(encryptedB);\n\n // DEBUG: Log the intermediate result\n uint256 debug_Result = FHE.decrypt(result);\n // Log the result\n Console.log(result);\n\n // Perform more operations\n euint64 finalResult = result * FHE.asEuint64(encryptedA);\n \n return finalResult;\n }\n}\n'})}),"\n",(0,t.jsx)(e.p,{children:"By strategically placing logs, developers can gain insights into the operations and transformations performed on encrypted numbers, greatly simplifying debugging and ensuring the integrity of computations."}),"\n",(0,t.jsx)(e.h3,{id:"viewing-logs-in-the-localfhenix-docker-container",children:"Viewing Logs in the Localfhenix Docker Container"}),"\n",(0,t.jsx)(e.p,{children:"Logging in the Localfhenix environment is directed to the Docker log output. To view these logs, follow these steps:"}),"\n",(0,t.jsx)(e.admonition,{type:"note",children:(0,t.jsx)(e.p,{children:"Logging is not available on the Fhenix Testnet or Mainnet. It is only available in the Localfhenix development environment."})}),"\n",(0,t.jsx)(e.p,{children:"If you are running Localfhenix using the Hardhat plugin, you can view the logs by running the following command:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-sh",children:'docker logs localfhenix_hh_plugin -f 2>&1 | grep "Contract Log:"\n'})}),"\n",(0,t.jsxs)(e.p,{children:["If you are running LocalFhenix using the Docker image directly, you must first identify the container name using the ",(0,t.jsx)(e.code,{children:"docker ps"})," command and then view the logs:"]}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-sh",children:'docker logs -f 2>&1 | grep "Contract Log:"\n'})})]})}function g(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(d,{...n})}):d(n)}},8453:(n,e,o)=>{o.d(e,{R:()=>s,x:()=>l});var t=o(6540);const i={},r=t.createContext(i);function s(n){const e=t.useContext(r);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function l(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:s(n.components),t.createElement(r.Provider,{value:e},n.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/runtime~main.762aebb9.js b/assets/js/runtime~main.22674da5.js
similarity index 77%
rename from assets/js/runtime~main.762aebb9.js
rename to assets/js/runtime~main.22674da5.js
index dfeb1f13..6f677e00 100644
--- a/assets/js/runtime~main.762aebb9.js
+++ b/assets/js/runtime~main.22674da5.js
@@ -1 +1 @@
-(()=>{"use strict";var e,a,b,f,c,d={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={exports:{}};return d[e].call(b.exports,b,b.exports,r),b.exports}r.m=d,e=[],r.O=(a,b,f,c)=>{if(!b){var d=1/0;for(i=0;i=c)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[b,f,c]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var c=Object.create(null);r.r(c);var d={};a=a||[null,b({}),b([]),b(b)];for(var t=2&f&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,r.d(c,d),c},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({42:"7c00667b",169:"6ebc6907",292:"2f529342",502:"61c022b5",609:"d9ab9a35",643:"ccba1d6d",923:"63ad909b",957:"c141421f",1231:"99174024",1232:"1fe64db5",1235:"a7456010",1434:"7ec24e7b",1512:"00afa580",1588:"57ea0922",1624:"be55c8c2",1875:"a739edad",1913:"548b4f8e",2005:"5cc6e2f6",2138:"1a4e3797",2142:"8dfb72aa",2176:"834753a0",2192:"44625589",2214:"e4d6daf3",2305:"c11ae9aa",2329:"6b8bf644",2388:"6aab3ca4",2485:"f2e2dc26",2487:"bb6bd963",2518:"7b18d337",2535:"48d608ee",2576:"f4b774c8",2607:"8a3abca3",2649:"9a0ff0ce",2698:"2c44c319",2953:"07f4335f",3031:"63dd6a68",3046:"a7e0b53d",3127:"dfbb1b1d",3164:"fc128ddc",3187:"40c8d1c5",3215:"41a4e207",3307:"a74d882b",3313:"86adb74f",3370:"9cc604ee",3376:"3847f788",3386:"d3836e8b",3416:"14662712",3520:"87c0125c",3631:"79fe8b70",3664:"7bfbc29d",3912:"24da45cd",3915:"6c36c959",3925:"1e5cdb82",3959:"ffa92196",4027:"b677db35",4055:"34645dc1",4134:"393be207",4177:"31f76593",4214:"f75917f4",4500:"00f5830c",4519:"1ad947e3",4552:"c35c524d",4583:"1df93b7f",4606:"b22c9ac7",4736:"f60bfdad",4972:"cfa1f075",5016:"f4bf702b",5081:"8e2a4e2c",5112:"f978f6d9",5182:"1dea5faf",5210:"35aed986",5274:"56de1d11",5343:"c9623b07",5430:"69eebc34",5742:"aba21aa0",5877:"3cdf1dab",5901:"41f39c68",5914:"efe9b862",5921:"5b396e44",6061:"1f391b9e",6297:"ab0b140b",6509:"52b9fcd1",6512:"b72b8402",6654:"3c4ddc80",6674:"35a9bd78",6682:"82093744",6717:"09235513",6723:"9fe41e62",6782:"3a1f197c",6897:"b63e8afa",6969:"14eb3368",7036:"adb31473",7064:"42246441",7073:"d947cca9",7098:"a7bd4aaa",7146:"5502e32c",7336:"4091a161",7409:"ff68a461",7456:"6deb773c",7491:"1e140d0e",7499:"65be5726",7562:"65fe27ff",7768:"7c323151",7775:"0ba8c2c3",7788:"33035a53",7946:"1059f392",8097:"978597a0",8114:"951026e7",8172:"6403d4e9",8223:"fe47fcd9",8284:"fd76e1b6",8352:"264701c0",8375:"597dd8b5",8401:"17896441",8439:"399804c2",8543:"2b1dc6dd",8696:"d88fff1b",8709:"5555e52f",8737:"b2ae20a9",8780:"7073baf1",8867:"3653402a",8935:"c1ee0fbb",9048:"a94703ab",9070:"3d6c9eb5",9207:"e7912bf4",9352:"baea39d2",9529:"fe357ca8",9647:"5e95c892",9648:"c29eeca1",9861:"4f7734c6",9922:"2b741ebd"}[e]||e)+"."+{42:"8553f8fe",169:"f0428b89",292:"87a44a70",416:"b4fc881a",502:"0f1923b0",609:"89394178",643:"8d9cf1b6",923:"c1a845ca",957:"ba74c4db",1231:"ff1abcf4",1232:"6695e2d5",1235:"e494e8e1",1434:"1532e810",1512:"4fdb59df",1588:"6b4b5cf1",1624:"c53e5678",1875:"1db672ab",1913:"1934196e",2005:"0f457792",2138:"9416fdf7",2142:"23e953d2",2176:"6c65098b",2192:"b1926fdd",2214:"4635594e",2237:"c2740f3d",2305:"90f4f676",2329:"cdbe0e78",2388:"d45b46ad",2485:"7ca42ca5",2487:"8fc53aa0",2490:"edd93e89",2518:"de9384ad",2535:"03e2d4d5",2576:"cf694c86",2607:"3beae2e8",2649:"30515cf7",2698:"51e4584a",2953:"6a6f74f1",3031:"57956e12",3046:"68ada29a",3127:"ccf0e6a7",3164:"9f526ecb",3187:"ea1b27cf",3215:"585490cc",3307:"04f41acf",3313:"b364a645",3370:"4fa95e90",3376:"a07e7686",3386:"0451b027",3416:"3cc33743",3520:"4d58d463",3631:"483edca8",3664:"ff253869",3912:"99d6bbde",3915:"a6ad0c85",3925:"6c05d8c1",3959:"ba86c055",4027:"fc821e52",4055:"722c90a3",4134:"d7fb7c7e",4177:"c6c4d89f",4214:"84bb3752",4500:"e9848132",4519:"e7be850a",4552:"c234bc93",4583:"80ad2fb1",4606:"da572f1d",4736:"9c820c02",4972:"4c8a5e61",5016:"67888113",5081:"a1bbc286",5112:"7112cca4",5182:"b0c72150",5210:"ce35a0d8",5274:"b48e56df",5343:"fe4cb680",5430:"2a37d365",5742:"77409faf",5877:"98bbcac2",5901:"e34e5040",5914:"a746405e",5921:"6fbfcee5",6061:"b8a13666",6297:"da50aa7f",6509:"bad4a4d1",6512:"d24b2b7e",6654:"49fcf307",6674:"57dbc054",6682:"ff277812",6717:"344e1527",6723:"05aec872",6782:"c7d7746a",6897:"09982196",6969:"7d928f65",7036:"8908c09d",7064:"a180ad23",7073:"baece094",7098:"fa18e033",7146:"898da998",7336:"197ec2bc",7409:"98ce82c8",7456:"4d494d5c",7491:"60af16d0",7499:"ef6d7a60",7562:"9ae460f2",7768:"49326124",7775:"8db90f2c",7788:"2a3d8122",7946:"fc4c7ff1",8097:"0d65186a",8114:"7b5e653f",8172:"ade16a89",8223:"1bc5cef5",8284:"1e9a410d",8352:"b63388c4",8375:"8dfea20c",8401:"2e155ba7",8439:"a2d46132",8543:"c8159c86",8696:"22481f08",8709:"843321b5",8737:"29264d95",8780:"002cdbcb",8867:"019e56f7",8913:"f5ec71cd",8935:"94903a89",9048:"c72de6cb",9070:"d441d366",9207:"e8a0d628",9352:"f3324ef1",9412:"b062857e",9462:"f0f17b38",9529:"ba748814",9647:"150cca41",9648:"99736539",9861:"94886385",9922:"bccf929a"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},c="fhenix-docs:",r.l=(e,a,b,d)=>{if(f[e])f[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var c=f[e];if(delete f[e],t.parentNode&&t.parentNode.removeChild(t),c&&c.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={14662712:"3416",17896441:"8401",42246441:"7064",44625589:"2192",82093744:"6682",99174024:"1231","7c00667b":"42","6ebc6907":"169","2f529342":"292","61c022b5":"502",d9ab9a35:"609",ccba1d6d:"643","63ad909b":"923",c141421f:"957","1fe64db5":"1232",a7456010:"1235","7ec24e7b":"1434","00afa580":"1512","57ea0922":"1588",be55c8c2:"1624",a739edad:"1875","548b4f8e":"1913","5cc6e2f6":"2005","1a4e3797":"2138","8dfb72aa":"2142","834753a0":"2176",e4d6daf3:"2214",c11ae9aa:"2305","6b8bf644":"2329","6aab3ca4":"2388",f2e2dc26:"2485",bb6bd963:"2487","7b18d337":"2518","48d608ee":"2535",f4b774c8:"2576","8a3abca3":"2607","9a0ff0ce":"2649","2c44c319":"2698","07f4335f":"2953","63dd6a68":"3031",a7e0b53d:"3046",dfbb1b1d:"3127",fc128ddc:"3164","40c8d1c5":"3187","41a4e207":"3215",a74d882b:"3307","86adb74f":"3313","9cc604ee":"3370","3847f788":"3376",d3836e8b:"3386","87c0125c":"3520","79fe8b70":"3631","7bfbc29d":"3664","24da45cd":"3912","6c36c959":"3915","1e5cdb82":"3925",ffa92196:"3959",b677db35:"4027","34645dc1":"4055","393be207":"4134","31f76593":"4177",f75917f4:"4214","00f5830c":"4500","1ad947e3":"4519",c35c524d:"4552","1df93b7f":"4583",b22c9ac7:"4606",f60bfdad:"4736",cfa1f075:"4972",f4bf702b:"5016","8e2a4e2c":"5081",f978f6d9:"5112","1dea5faf":"5182","35aed986":"5210","56de1d11":"5274",c9623b07:"5343","69eebc34":"5430",aba21aa0:"5742","3cdf1dab":"5877","41f39c68":"5901",efe9b862:"5914","5b396e44":"5921","1f391b9e":"6061",ab0b140b:"6297","52b9fcd1":"6509",b72b8402:"6512","3c4ddc80":"6654","35a9bd78":"6674","09235513":"6717","9fe41e62":"6723","3a1f197c":"6782",b63e8afa:"6897","14eb3368":"6969",adb31473:"7036",d947cca9:"7073",a7bd4aaa:"7098","5502e32c":"7146","4091a161":"7336",ff68a461:"7409","6deb773c":"7456","1e140d0e":"7491","65be5726":"7499","65fe27ff":"7562","7c323151":"7768","0ba8c2c3":"7775","33035a53":"7788","1059f392":"7946","978597a0":"8097","951026e7":"8114","6403d4e9":"8172",fe47fcd9:"8223",fd76e1b6:"8284","264701c0":"8352","597dd8b5":"8375","399804c2":"8439","2b1dc6dd":"8543",d88fff1b:"8696","5555e52f":"8709",b2ae20a9:"8737","7073baf1":"8780","3653402a":"8867",c1ee0fbb:"8935",a94703ab:"9048","3d6c9eb5":"9070",e7912bf4:"9207",baea39d2:"9352",fe357ca8:"9529","5e95c892":"9647",c29eeca1:"9648","4f7734c6":"9861","2b741ebd":"9922"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,b)=>{var f=r.o(e,a)?e[a]:void 0;if(0!==f)if(f)b.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var c=new Promise(((b,c)=>f=e[a]=[b,c]));b.push(f[2]=c);var d=r.p+r.u(a),t=new Error;r.l(d,(b=>{if(r.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var c=b&&("load"===b.type?"missing":b.type),d=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+c+": "+d+")",t.name="ChunkLoadError",t.type=c,t.request=d,f[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var f,c,d=b[0],t=b[1],o=b[2],n=0;if(d.some((a=>0!==e[a]))){for(f in t)r.o(t,f)&&(r.m[f]=t[f]);if(o)var i=o(r)}for(a&&a(b);n{"use strict";var e,a,b,c,f,d={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={exports:{}};return d[e].call(b.exports,b,b.exports,r),b.exports}r.m=d,e=[],r.O=(a,b,c,f)=>{if(!b){var d=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[b,c,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var d={};a=a||[null,b({}),b([]),b(b)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,r.d(f,d),f},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({42:"7c00667b",169:"6ebc6907",292:"2f529342",502:"61c022b5",609:"d9ab9a35",643:"ccba1d6d",923:"63ad909b",957:"c141421f",1231:"99174024",1232:"1fe64db5",1235:"a7456010",1434:"7ec24e7b",1512:"00afa580",1588:"57ea0922",1624:"be55c8c2",1875:"a739edad",1913:"548b4f8e",2005:"5cc6e2f6",2138:"1a4e3797",2142:"8dfb72aa",2176:"834753a0",2192:"44625589",2214:"e4d6daf3",2305:"c11ae9aa",2329:"6b8bf644",2388:"6aab3ca4",2485:"f2e2dc26",2487:"bb6bd963",2518:"7b18d337",2535:"48d608ee",2576:"f4b774c8",2607:"8a3abca3",2649:"9a0ff0ce",2698:"2c44c319",2953:"07f4335f",3031:"63dd6a68",3046:"a7e0b53d",3127:"dfbb1b1d",3164:"fc128ddc",3187:"40c8d1c5",3215:"41a4e207",3307:"a74d882b",3313:"86adb74f",3370:"9cc604ee",3376:"3847f788",3386:"d3836e8b",3416:"14662712",3520:"87c0125c",3631:"79fe8b70",3664:"7bfbc29d",3912:"24da45cd",3915:"6c36c959",3925:"1e5cdb82",3959:"ffa92196",4027:"b677db35",4055:"34645dc1",4134:"393be207",4177:"31f76593",4214:"f75917f4",4500:"00f5830c",4519:"1ad947e3",4552:"c35c524d",4583:"1df93b7f",4606:"b22c9ac7",4736:"f60bfdad",4972:"cfa1f075",5016:"f4bf702b",5081:"8e2a4e2c",5112:"f978f6d9",5182:"1dea5faf",5210:"35aed986",5274:"56de1d11",5343:"c9623b07",5430:"69eebc34",5742:"aba21aa0",5877:"3cdf1dab",5901:"41f39c68",5914:"efe9b862",5921:"5b396e44",6061:"1f391b9e",6297:"ab0b140b",6509:"52b9fcd1",6512:"b72b8402",6654:"3c4ddc80",6674:"35a9bd78",6682:"82093744",6717:"09235513",6723:"9fe41e62",6782:"3a1f197c",6897:"b63e8afa",6969:"14eb3368",7036:"adb31473",7064:"42246441",7073:"d947cca9",7098:"a7bd4aaa",7146:"5502e32c",7336:"4091a161",7409:"ff68a461",7456:"6deb773c",7491:"1e140d0e",7499:"65be5726",7562:"65fe27ff",7768:"7c323151",7775:"0ba8c2c3",7788:"33035a53",7946:"1059f392",8097:"978597a0",8114:"951026e7",8172:"6403d4e9",8223:"fe47fcd9",8284:"fd76e1b6",8352:"264701c0",8375:"597dd8b5",8401:"17896441",8439:"399804c2",8543:"2b1dc6dd",8696:"d88fff1b",8709:"5555e52f",8737:"b2ae20a9",8780:"7073baf1",8867:"3653402a",8935:"c1ee0fbb",9048:"a94703ab",9070:"3d6c9eb5",9207:"e7912bf4",9352:"baea39d2",9529:"fe357ca8",9647:"5e95c892",9648:"c29eeca1",9861:"4f7734c6",9922:"2b741ebd"}[e]||e)+"."+{42:"8553f8fe",169:"f0428b89",292:"87a44a70",416:"b4fc881a",502:"04ffe688",609:"89394178",643:"8d9cf1b6",923:"c2060077",957:"ba74c4db",1231:"ff1abcf4",1232:"6695e2d5",1235:"e494e8e1",1434:"1532e810",1512:"4fdb59df",1588:"6b4b5cf1",1624:"c53e5678",1875:"1db672ab",1913:"1934196e",2005:"0f457792",2138:"9416fdf7",2142:"23e953d2",2176:"6c65098b",2192:"cdaefde3",2214:"4635594e",2237:"c2740f3d",2305:"90f4f676",2329:"cdbe0e78",2388:"d45b46ad",2485:"7ca42ca5",2487:"8fc53aa0",2490:"edd93e89",2518:"de9384ad",2535:"03e2d4d5",2576:"cf694c86",2607:"3beae2e8",2649:"30515cf7",2698:"51e4584a",2953:"6a6f74f1",3031:"57956e12",3046:"e6e36910",3127:"ccf0e6a7",3164:"9f526ecb",3187:"ea1b27cf",3215:"585490cc",3307:"04f41acf",3313:"b364a645",3370:"4fa95e90",3376:"a07e7686",3386:"0451b027",3416:"3cc33743",3520:"4d58d463",3631:"483edca8",3664:"ff253869",3912:"99d6bbde",3915:"a6ad0c85",3925:"6c05d8c1",3959:"ba86c055",4027:"fc821e52",4055:"722c90a3",4134:"d7fb7c7e",4177:"c6c4d89f",4214:"84bb3752",4500:"e9848132",4519:"e7be850a",4552:"c234bc93",4583:"80ad2fb1",4606:"da572f1d",4736:"9c820c02",4972:"4c8a5e61",5016:"67888113",5081:"a1bbc286",5112:"7112cca4",5182:"b0c72150",5210:"ce35a0d8",5274:"b48e56df",5343:"fe4cb680",5430:"2a37d365",5742:"77409faf",5877:"98bbcac2",5901:"e34e5040",5914:"a746405e",5921:"6fbfcee5",6061:"b8a13666",6297:"da50aa7f",6509:"bad4a4d1",6512:"d24b2b7e",6654:"49fcf307",6674:"57dbc054",6682:"ff277812",6717:"344e1527",6723:"05aec872",6782:"c7d7746a",6897:"09982196",6969:"7d928f65",7036:"8908c09d",7064:"a180ad23",7073:"baece094",7098:"fa18e033",7146:"898da998",7336:"197ec2bc",7409:"98ce82c8",7456:"4d494d5c",7491:"60af16d0",7499:"f9f49bad",7562:"9ae460f2",7768:"49326124",7775:"7326ac45",7788:"2a3d8122",7946:"fc4c7ff1",8097:"0d65186a",8114:"7b5e653f",8172:"ade16a89",8223:"1bc5cef5",8284:"1e9a410d",8352:"b63388c4",8375:"8dfea20c",8401:"2e155ba7",8439:"a2d46132",8543:"c8159c86",8696:"22481f08",8709:"843321b5",8737:"29264d95",8780:"002cdbcb",8867:"019e56f7",8913:"f5ec71cd",8935:"94903a89",9048:"c72de6cb",9070:"d441d366",9207:"e8a0d628",9352:"f3324ef1",9412:"b062857e",9462:"f0f17b38",9529:"ba748814",9647:"150cca41",9648:"99736539",9861:"94886385",9922:"bccf929a"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},f="fhenix-docs:",r.l=(e,a,b,d)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var f=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={14662712:"3416",17896441:"8401",42246441:"7064",44625589:"2192",82093744:"6682",99174024:"1231","7c00667b":"42","6ebc6907":"169","2f529342":"292","61c022b5":"502",d9ab9a35:"609",ccba1d6d:"643","63ad909b":"923",c141421f:"957","1fe64db5":"1232",a7456010:"1235","7ec24e7b":"1434","00afa580":"1512","57ea0922":"1588",be55c8c2:"1624",a739edad:"1875","548b4f8e":"1913","5cc6e2f6":"2005","1a4e3797":"2138","8dfb72aa":"2142","834753a0":"2176",e4d6daf3:"2214",c11ae9aa:"2305","6b8bf644":"2329","6aab3ca4":"2388",f2e2dc26:"2485",bb6bd963:"2487","7b18d337":"2518","48d608ee":"2535",f4b774c8:"2576","8a3abca3":"2607","9a0ff0ce":"2649","2c44c319":"2698","07f4335f":"2953","63dd6a68":"3031",a7e0b53d:"3046",dfbb1b1d:"3127",fc128ddc:"3164","40c8d1c5":"3187","41a4e207":"3215",a74d882b:"3307","86adb74f":"3313","9cc604ee":"3370","3847f788":"3376",d3836e8b:"3386","87c0125c":"3520","79fe8b70":"3631","7bfbc29d":"3664","24da45cd":"3912","6c36c959":"3915","1e5cdb82":"3925",ffa92196:"3959",b677db35:"4027","34645dc1":"4055","393be207":"4134","31f76593":"4177",f75917f4:"4214","00f5830c":"4500","1ad947e3":"4519",c35c524d:"4552","1df93b7f":"4583",b22c9ac7:"4606",f60bfdad:"4736",cfa1f075:"4972",f4bf702b:"5016","8e2a4e2c":"5081",f978f6d9:"5112","1dea5faf":"5182","35aed986":"5210","56de1d11":"5274",c9623b07:"5343","69eebc34":"5430",aba21aa0:"5742","3cdf1dab":"5877","41f39c68":"5901",efe9b862:"5914","5b396e44":"5921","1f391b9e":"6061",ab0b140b:"6297","52b9fcd1":"6509",b72b8402:"6512","3c4ddc80":"6654","35a9bd78":"6674","09235513":"6717","9fe41e62":"6723","3a1f197c":"6782",b63e8afa:"6897","14eb3368":"6969",adb31473:"7036",d947cca9:"7073",a7bd4aaa:"7098","5502e32c":"7146","4091a161":"7336",ff68a461:"7409","6deb773c":"7456","1e140d0e":"7491","65be5726":"7499","65fe27ff":"7562","7c323151":"7768","0ba8c2c3":"7775","33035a53":"7788","1059f392":"7946","978597a0":"8097","951026e7":"8114","6403d4e9":"8172",fe47fcd9:"8223",fd76e1b6:"8284","264701c0":"8352","597dd8b5":"8375","399804c2":"8439","2b1dc6dd":"8543",d88fff1b:"8696","5555e52f":"8709",b2ae20a9:"8737","7073baf1":"8780","3653402a":"8867",c1ee0fbb:"8935",a94703ab:"9048","3d6c9eb5":"9070",e7912bf4:"9207",baea39d2:"9352",fe357ca8:"9529","5e95c892":"9647",c29eeca1:"9648","4f7734c6":"9861","2b741ebd":"9922"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,b)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)b.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var f=new Promise(((b,f)=>c=e[a]=[b,f]));b.push(c[2]=f);var d=r.p+r.u(a),t=new Error;r.l(d,(b=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var f=b&&("load"===b.type?"missing":b.type),d=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+d+")",t.name="ChunkLoadError",t.type=f,t.request=d,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var c,f,d=b[0],t=b[1],o=b[2],n=0;if(d.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(b);nDetails | Fhenix
-
+
diff --git a/docs/Helium/category/fhe-contracts.html b/docs/Helium/category/fhe-contracts.html
index e341397b..54ffb319 100644
--- a/docs/Helium/category/fhe-contracts.html
+++ b/docs/Helium/category/fhe-contracts.html
@@ -4,7 +4,7 @@
FHE Contracts | Fhenix
-
+
diff --git a/docs/Helium/category/fhenix-helium-testnet.html b/docs/Helium/category/fhenix-helium-testnet.html
index 06ba4e9b..60632628 100644
--- a/docs/Helium/category/fhenix-helium-testnet.html
+++ b/docs/Helium/category/fhenix-helium-testnet.html
@@ -4,7 +4,7 @@
Fhenix Helium Testnet | Fhenix
-
+
diff --git a/docs/Helium/category/fhenixjs.html b/docs/Helium/category/fhenixjs.html
index b72c792d..ebd58911 100644
--- a/docs/Helium/category/fhenixjs.html
+++ b/docs/Helium/category/fhenixjs.html
@@ -4,7 +4,7 @@
Fhenix.JS | Fhenix
-
+
diff --git a/docs/Helium/category/shielded-erc20-token.html b/docs/Helium/category/shielded-erc20-token.html
index 0b981d7d..69d0358e 100644
--- a/docs/Helium/category/shielded-erc20-token.html
+++ b/docs/Helium/category/shielded-erc20-token.html
@@ -4,7 +4,7 @@
Shielded ERC20 Token | Fhenix
-
+
diff --git a/docs/Helium/category/tutorials.html b/docs/Helium/category/tutorials.html
index 43a8d44a..5da1606b 100644
--- a/docs/Helium/category/tutorials.html
+++ b/docs/Helium/category/tutorials.html
@@ -4,7 +4,7 @@
Tutorials | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Encryption and Privacy/Permits-Access-Control.html b/docs/Helium/devdocs/Encryption and Privacy/Permits-Access-Control.html
index 87327e83..af2db51d 100644
--- a/docs/Helium/devdocs/Encryption and Privacy/Permits-Access-Control.html
+++ b/docs/Helium/devdocs/Encryption and Privacy/Permits-Access-Control.html
@@ -4,7 +4,7 @@
📜 Permits & Access Control | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Encryption and Privacy/Privacy-Web3.html b/docs/Helium/devdocs/Encryption and Privacy/Privacy-Web3.html
index 3ec1e440..2711b820 100644
--- a/docs/Helium/devdocs/Encryption and Privacy/Privacy-Web3.html
+++ b/docs/Helium/devdocs/Encryption and Privacy/Privacy-Web3.html
@@ -4,7 +4,7 @@
🤫 Development Tips – Ensuring Privacy | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Examples and References/Examples-fheDapps.html b/docs/Helium/devdocs/Examples and References/Examples-fheDapps.html
index f0f24126..1cf6a431 100644
--- a/docs/Helium/devdocs/Examples and References/Examples-fheDapps.html
+++ b/docs/Helium/devdocs/Examples and References/Examples-fheDapps.html
@@ -4,7 +4,7 @@
Examples & fheDapps | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Examples and References/Templates.html b/docs/Helium/devdocs/Examples and References/Templates.html
index 3627f673..e71a5e18 100644
--- a/docs/Helium/devdocs/Examples and References/Templates.html
+++ b/docs/Helium/devdocs/Examples and References/Templates.html
@@ -4,7 +4,7 @@
Templates | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Connecting-To.html b/docs/Helium/devdocs/Fhenix Testnet/Connecting-To.html
index c5b6c101..68f6d8b1 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Connecting-To.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Connecting-To.html
@@ -4,7 +4,7 @@
🔗 Connecting to Fhenix Helium Testnet | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Details/Architecture.html b/docs/Helium/devdocs/Fhenix Testnet/Details/Architecture.html
index c4b7d3c4..e863f654 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Details/Architecture.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Details/Architecture.html
@@ -4,7 +4,7 @@
📐 Fhenix Architecture | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Details/Changelog.html b/docs/Helium/devdocs/Fhenix Testnet/Details/Changelog.html
index 121e3ed1..2bc2e962 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Details/Changelog.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Details/Changelog.html
@@ -4,7 +4,7 @@
🆕 Changelog | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html b/docs/Helium/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html
index 5b799f8e..f0f12012 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html
@@ -4,7 +4,7 @@
🔀 Fhenix Differences For Developers | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Details/Limitations.html b/docs/Helium/devdocs/Fhenix Testnet/Details/Limitations.html
index 1c890a6e..a00bcdf9 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Details/Limitations.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Details/Limitations.html
@@ -4,7 +4,7 @@
🛑 Limitations | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/FHE-Overview.html b/docs/Helium/devdocs/Fhenix Testnet/FHE-Overview.html
index fa6008df..f5fa5ee8 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/FHE-Overview.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/FHE-Overview.html
@@ -4,7 +4,7 @@
🧮 FHE Schemes Overview | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Fhenix-T-FHE.html b/docs/Helium/devdocs/Fhenix Testnet/Fhenix-T-FHE.html
index a277cfe4..79f5f29e 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Fhenix-T-FHE.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Fhenix-T-FHE.html
@@ -4,7 +4,7 @@
✨ Fhenix & FHE | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Fhenix Testnet/Integration.html b/docs/Helium/devdocs/Fhenix Testnet/Integration.html
index a29c4270..35ca2758 100644
--- a/docs/Helium/devdocs/Fhenix Testnet/Integration.html
+++ b/docs/Helium/devdocs/Fhenix Testnet/Integration.html
@@ -4,7 +4,7 @@
🤲 3rd party Integrations | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Catching Errors.html b/docs/Helium/devdocs/FhenixJS/Catching Errors.html
index e9560e4e..7152cb49 100644
--- a/docs/Helium/devdocs/FhenixJS/Catching Errors.html
+++ b/docs/Helium/devdocs/FhenixJS/Catching Errors.html
@@ -4,7 +4,7 @@
Catching Errors | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Decryption.html b/docs/Helium/devdocs/FhenixJS/Decryption.html
index 79eb99a0..6eb5dd9e 100644
--- a/docs/Helium/devdocs/FhenixJS/Decryption.html
+++ b/docs/Helium/devdocs/FhenixJS/Decryption.html
@@ -4,7 +4,7 @@
(Un)Sealing | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Encryption.html b/docs/Helium/devdocs/FhenixJS/Encryption.html
index 9f9e0e20..ae53767d 100644
--- a/docs/Helium/devdocs/FhenixJS/Encryption.html
+++ b/docs/Helium/devdocs/FhenixJS/Encryption.html
@@ -4,7 +4,7 @@
Encryption | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Fhenix-JS.html b/docs/Helium/devdocs/FhenixJS/Fhenix-JS.html
index 4dea3de3..0106184b 100644
--- a/docs/Helium/devdocs/FhenixJS/Fhenix-JS.html
+++ b/docs/Helium/devdocs/FhenixJS/Fhenix-JS.html
@@ -4,7 +4,7 @@
Installation & Basics | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Network Keys.html b/docs/Helium/devdocs/FhenixJS/Network Keys.html
index 28061b3e..f9f28560 100644
--- a/docs/Helium/devdocs/FhenixJS/Network Keys.html
+++ b/docs/Helium/devdocs/FhenixJS/Network Keys.html
@@ -4,7 +4,7 @@
Network Keys | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Permits.html b/docs/Helium/devdocs/FhenixJS/Permits.html
index 5d553e2e..5a133246 100644
--- a/docs/Helium/devdocs/FhenixJS/Permits.html
+++ b/docs/Helium/devdocs/FhenixJS/Permits.html
@@ -4,7 +4,7 @@
Permits | Fhenix
-
+
diff --git a/docs/Helium/devdocs/FhenixJS/Sending-a-Transaction.html b/docs/Helium/devdocs/FhenixJS/Sending-a-Transaction.html
index 65b0ef64..24134e6d 100644
--- a/docs/Helium/devdocs/FhenixJS/Sending-a-Transaction.html
+++ b/docs/Helium/devdocs/FhenixJS/Sending-a-Transaction.html
@@ -4,7 +4,7 @@
End-to-End Example | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Setting Up Your Environment/Foundry.html b/docs/Helium/devdocs/Setting Up Your Environment/Foundry.html
index 438e0231..5fbae12d 100644
--- a/docs/Helium/devdocs/Setting Up Your Environment/Foundry.html
+++ b/docs/Helium/devdocs/Setting Up Your Environment/Foundry.html
@@ -4,7 +4,7 @@
🛠️ Foundry | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Setting Up Your Environment/Gitpod.html b/docs/Helium/devdocs/Setting Up Your Environment/Gitpod.html
index 037fdb3f..5259f07f 100644
--- a/docs/Helium/devdocs/Setting Up Your Environment/Gitpod.html
+++ b/docs/Helium/devdocs/Setting Up Your Environment/Gitpod.html
@@ -4,7 +4,7 @@
☁️ Gitpod | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Setting Up Your Environment/Hardhat.html b/docs/Helium/devdocs/Setting Up Your Environment/Hardhat.html
index dc862897..e7a5886c 100644
--- a/docs/Helium/devdocs/Setting Up Your Environment/Hardhat.html
+++ b/docs/Helium/devdocs/Setting Up Your Environment/Hardhat.html
@@ -4,7 +4,7 @@
👷 Hardhat | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Setting Up Your Environment/Remix.html b/docs/Helium/devdocs/Setting Up Your Environment/Remix.html
index 73ec47c6..66ff1532 100644
--- a/docs/Helium/devdocs/Setting Up Your Environment/Remix.html
+++ b/docs/Helium/devdocs/Setting Up Your Environment/Remix.html
@@ -4,7 +4,7 @@
🎧 Remix | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Setting Up Your Environment/intro.html b/docs/Helium/devdocs/Setting Up Your Environment/intro.html
index 9f01b9a7..61dac77f 100644
--- a/docs/Helium/devdocs/Setting Up Your Environment/intro.html
+++ b/docs/Helium/devdocs/Setting Up Your Environment/intro.html
@@ -4,7 +4,7 @@
Overview | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Solidity API/Experimental/FHERC20.html b/docs/Helium/devdocs/Solidity API/Experimental/FHERC20.html
index f973d481..3692adbd 100644
--- a/docs/Helium/devdocs/Solidity API/Experimental/FHERC20.html
+++ b/docs/Helium/devdocs/Solidity API/Experimental/FHERC20.html
@@ -4,7 +4,7 @@
FHERC20 | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Solidity API/Experimental/IFHERC20.html b/docs/Helium/devdocs/Solidity API/Experimental/IFHERC20.html
index ff8c64cc..de7a1c45 100644
--- a/docs/Helium/devdocs/Solidity API/Experimental/IFHERC20.html
+++ b/docs/Helium/devdocs/Solidity API/Experimental/IFHERC20.html
@@ -4,7 +4,7 @@
IFHERC20 | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Solidity API/FHE.html b/docs/Helium/devdocs/Solidity API/FHE.html
index e21e4d3c..75f1970f 100644
--- a/docs/Helium/devdocs/Solidity API/FHE.html
+++ b/docs/Helium/devdocs/Solidity API/FHE.html
@@ -4,7 +4,7 @@
FHE.sol | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Solidity API/Permissioned.html b/docs/Helium/devdocs/Solidity API/Permissioned.html
index ccd48fb1..505dae5f 100644
--- a/docs/Helium/devdocs/Solidity API/Permissioned.html
+++ b/docs/Helium/devdocs/Solidity API/Permissioned.html
@@ -4,7 +4,7 @@
Permissioned.Sol | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html b/docs/Helium/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html
index cfb37647..ee33ba32 100644
--- a/docs/Helium/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html
+++ b/docs/Helium/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html
@@ -4,7 +4,7 @@
🔐 Fhenix Encryption UI | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html b/docs/Helium/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html
index 398cde12..e07f800b 100644
--- a/docs/Helium/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html
+++ b/docs/Helium/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html
@@ -4,7 +4,7 @@
👷 Fhenix Hardhat Plugin | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html b/docs/Helium/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html
index 284f711d..0c8281c7 100644
--- a/docs/Helium/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html
+++ b/docs/Helium/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html
@@ -4,7 +4,7 @@
🎧 Fhenix Remix Plugin | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/Adding View Functions.html b/docs/Helium/devdocs/Tutorials/Basic/Adding View Functions.html
index d48d3a63..e51e1ad8 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/Adding View Functions.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/Adding View Functions.html
@@ -4,7 +4,7 @@
Adding View Functions | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/Deploying.html b/docs/Helium/devdocs/Tutorials/Basic/Deploying.html
index 236a94fd..751e9d24 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/Deploying.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/Deploying.html
@@ -4,7 +4,7 @@
Deploying | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/Exploring the Template.html b/docs/Helium/devdocs/Tutorials/Basic/Exploring the Template.html
index 572a745c..8a204381 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/Exploring the Template.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/Exploring the Template.html
@@ -4,7 +4,7 @@
Exploring the Template | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/Setting Up.html b/docs/Helium/devdocs/Tutorials/Basic/Setting Up.html
index bbf979eb..bc2bbbf8 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/Setting Up.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/Setting Up.html
@@ -4,7 +4,7 @@
Setting Up | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/Testing.html b/docs/Helium/devdocs/Tutorials/Basic/Testing.html
index 54750b3c..85b5e4ad 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/Testing.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/Testing.html
@@ -4,7 +4,7 @@
Testing on Fhenix | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/Writing-The-Contract.html b/docs/Helium/devdocs/Tutorials/Basic/Writing-The-Contract.html
index 8a856126..e223938e 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/Writing-The-Contract.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/Writing-The-Contract.html
@@ -4,7 +4,7 @@
Writing the Contract | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Basic/intro.html b/docs/Helium/devdocs/Tutorials/Basic/intro.html
index 992be016..3a2e7ddd 100644
--- a/docs/Helium/devdocs/Tutorials/Basic/intro.html
+++ b/docs/Helium/devdocs/Tutorials/Basic/intro.html
@@ -4,7 +4,7 @@
Overview | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Tutorials/Your-First-FHE-Contract.html b/docs/Helium/devdocs/Tutorials/Your-First-FHE-Contract.html
index 435b4c3e..f30e39e4 100644
--- a/docs/Helium/devdocs/Tutorials/Your-First-FHE-Contract.html
+++ b/docs/Helium/devdocs/Tutorials/Your-First-FHE-Contract.html
@@ -4,7 +4,7 @@
Your First FHE Contract | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Converting-between-Types.html b/docs/Helium/devdocs/Writing Smart Contracts/Converting-between-Types.html
index e217dd68..4ab714f7 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Converting-between-Types.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Converting-between-Types.html
@@ -4,7 +4,7 @@
🧙 Type Conversions | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Debug-Logging.html b/docs/Helium/devdocs/Writing Smart Contracts/Debug-Logging.html
index e6863335..612ce40f 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Debug-Logging.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Debug-Logging.html
@@ -4,7 +4,7 @@
🪵 Console.log | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/FHE-sol.html b/docs/Helium/devdocs/Writing Smart Contracts/FHE-sol.html
index 1d21561b..4058cf41 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/FHE-sol.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/FHE-sol.html
@@ -4,7 +4,7 @@
🐤 Getting Started | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html b/docs/Helium/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html
index 86f333a8..b66fb0e1 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html
@@ -4,7 +4,7 @@
🔥 Gas and Benchmarks | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Permissions.html b/docs/Helium/devdocs/Writing Smart Contracts/Permissions.html
index 59e63d15..ff249e2c 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Permissions.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Permissions.html
@@ -4,7 +4,7 @@
🕵️ Permissions | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Requires.html b/docs/Helium/devdocs/Writing Smart Contracts/Requires.html
index 6b1c2924..56bc7388 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Requires.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Requires.html
@@ -4,7 +4,7 @@
🚦Require Statements | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Returning-Data.html b/docs/Helium/devdocs/Writing Smart Contracts/Returning-Data.html
index f99a3e66..22726391 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Returning-Data.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Returning-Data.html
@@ -4,7 +4,7 @@
👈 Outputs | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Select.html b/docs/Helium/devdocs/Writing Smart Contracts/Select.html
index 5f05dcec..6f01d359 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Select.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Select.html
@@ -4,7 +4,7 @@
🌴 Select vs If...else | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Types-and-Operators.html b/docs/Helium/devdocs/Writing Smart Contracts/Types-and-Operators.html
index 450e1e98..20a987c5 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Types-and-Operators.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Types-and-Operators.html
@@ -4,7 +4,7 @@
🧑⚕️ Types and Operations | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/Useful-Tips.html b/docs/Helium/devdocs/Writing Smart Contracts/Useful-Tips.html
index 2e1bd5f3..2d5b2360 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/Useful-Tips.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/Useful-Tips.html
@@ -4,7 +4,7 @@
💯 Useful Tips | Fhenix
-
+
diff --git a/docs/Helium/devdocs/Writing Smart Contracts/User-Inputs.html b/docs/Helium/devdocs/Writing Smart Contracts/User-Inputs.html
index 7e9fc12b..5b188526 100644
--- a/docs/Helium/devdocs/Writing Smart Contracts/User-Inputs.html
+++ b/docs/Helium/devdocs/Writing Smart Contracts/User-Inputs.html
@@ -4,7 +4,7 @@
👉 Inputs | Fhenix
-
+
diff --git a/docs/Helium/devdocs/intro.html b/docs/Helium/devdocs/intro.html
index 2c7d45e7..a30b157c 100644
--- a/docs/Helium/devdocs/intro.html
+++ b/docs/Helium/devdocs/intro.html
@@ -4,7 +4,7 @@
Overview | Fhenix
-
+
diff --git a/docs/nitrogen/category/details.html b/docs/nitrogen/category/details.html
index 263de23d..27d85163 100644
--- a/docs/nitrogen/category/details.html
+++ b/docs/nitrogen/category/details.html
@@ -4,7 +4,7 @@
Details | Fhenix
-
+
diff --git a/docs/nitrogen/category/fhe-contracts.html b/docs/nitrogen/category/fhe-contracts.html
index f7cf2a5a..e1830105 100644
--- a/docs/nitrogen/category/fhe-contracts.html
+++ b/docs/nitrogen/category/fhe-contracts.html
@@ -4,10 +4,10 @@
FHE Contracts | Fhenix
-
+
-