You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: protocol-contracts/fhevm-cli/README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,15 @@ This CLI tool contains tools for common useful tasks needed to interact with FHE
4
4
5
5
# Initial setup
6
6
7
-
Install dependencies via:
7
+
Install dependencies via:
8
+
8
9
```
9
10
npm i
10
11
```
11
12
12
13
And enter all needed values in a `.env` file (see available variables in [`.env.example`](./.env.example)).
13
14
14
-
If you want to interact with Ethereum mainnet, do not forget to get an API key and set it via:
15
+
If you want to interact with Ethereum mainnet, do not forget to get an API key and set it via:
15
16
16
17
```
17
18
npx hardhat vars set ZAMA_FHEVM_API_KEY <your-api-key>
@@ -21,34 +22,34 @@ npx hardhat vars set ZAMA_FHEVM_API_KEY <your-api-key>
21
22
22
23
Before running this command, ensure you have filled needed environement variables values inside your `.env` file: i.e `PRIVATE_KEY` for the user's private key requesting the user decryption, as well as `MAINNET_RPC_URL` (for mainnet) or `TESTNET_RPC_URL` (for testnet).
23
24
24
-
To request a user decryption, use a command similar to this example:
25
+
To request a user decryption, use a command similar to this example:
Replace the `handle` flag value from previous command by a handle you are allowed for, and the `contract-address` value with a contract address which is also allowed for this handle. Make sure to use the correct value for `encrypted-type` (e.g `euint64`, `ebool` , `eaddress`, `euint8`, etc), and to chose correct `network`, ie `mainnet` or `testnet`.
31
+
Replace the `handle` flag value from previous command by a handle you are allowed for, and the `contract-address` value with a contract address which is also allowed for this handle. Make sure to use the correct value for `encrypted-type` (e.g `euint64`, `ebool` , `eaddress`, `euint8`, etc), and to chose correct `network`, ie `mainnet` or `testnet`.
31
32
32
33
# Request an encryption
33
34
34
35
Before running this command, ensure you have filled needed environement variables values inside your `.env` file: i.e just `MAINNET_RPC_URL` (for mainnet) or `TESTNET_RPC_URL` (for testnet).
35
36
36
-
To request an input encryption, use a command similar to this example:
37
+
To request an input encryption, use a command similar to this example:
Replace the `input-value` flag value from previous command by the custom value you want to encrypt, and the `user-address` and `contract-address` values with a user address and a contract address respectively, which are expected to get access to the encrypted value. Make sure to use the correct value for `encrypted-type` (e.g `euint64`, `ebool` , `eaddress`, `euint8`, etc), and to chose correct `network`, ie `mainnet` or `testnet`.
43
+
Replace the `input-value` flag value from previous command by the custom value you want to encrypt, and the `user-address` and `contract-address` values with a user address and a contract address respectively, which are expected to get access to the encrypted value. Make sure to use the correct value for `encrypted-type` (e.g `euint64`, `ebool` , `eaddress`, `euint8`, etc), and to chose correct `network`, ie `mainnet` or `testnet`.
43
44
44
45
# Request a public decryption
45
46
46
47
Before running this command, ensure you have filled needed environement variables values inside your `.env` file: i.e just `MAINNET_RPC_URL` (for mainnet) or `TESTNET_RPC_URL` (for testnet).
47
48
48
-
To request a public decryption, use a command similar to this example:
49
+
To request a public decryption, use a command similar to this example:
Replace the `handle` flag value from previous command by the handle you which to public decrypt, after making sure that this handle was made publicly decryptable onchain. Make sure to use the correct value for `network`, ie `mainnet` or `testnet`.
55
+
Replace the `handle` flag value from previous command by the handle you which to public decrypt, after making sure that this handle was made publicly decryptable onchain. Make sure to use the correct value for `network`, ie `mainnet` or `testnet`.
0 commit comments