17 Commits

Author SHA1 Message Date
Petar Ivanov
7c19b2b426 feat: introduce the ACL and TFHEExecutor contracts
Purpose of this commit is to establish a baseline for a working fhEVM
using the ACL and TFHEExecutor contracts. More tests and a rewrite of
examples will come in a future commit.

The ACL contract manages ciphertext permissions, removing the need for
privileged storage and memory in fhEVM.

The TFHEExecutor contract checks ciphertext permissions in the ACL
contract. Only TFHEExecutor is allowed to call FHE precompiles in the
fhEVM.

Not all tests are passing at that point. Only the Rand and the
EncryptedERC20 ones work.

Tests don't use the KMS for decryption. Instead, we load the secret FHE
key and pass it to fhevmjs for decryption.

Update to fhevmjs 0.5.0-1 and tfhe-rs 0.6.1
2024-06-12 11:30:52 +03:00
Clément 'birdy' Danjou
cb8e44d246 fix: use encrypt64 for identity 2024-02-09 11:15:46 +01:00
Clément 'birdy' Danjou
2e426011c3 fix: correct encryption (32 => 64) 2024-02-09 10:58:48 +01:00
Clément 'birdy' Danjou
4e9f5c8823 deps() update to fhevmjs 0.3.1 2024-01-18 11:12:20 +01:00
Joseph-André Turk
297c5a563f Added name and symbol parameters in constructor of EncryptedERC20 and CompliantERC20 2024-01-11 16:59:24 +01:00
Joseph-André Turk
db547ce395 fixed bugs in CompliantERC20 and ERC20Rules and made CompliantERC20 inherit from EncryptedERC20 for cleaner code 2024-01-10 15:32:13 +01:00
Joseph-André Turk
d711a11d23 Mocked version of TFHE.sol for coverage and faster tests
Mocked version of TFHE.sol for faster tests and coverage

renamed lib_mock to mocks and added documentation

prettier
2024-01-02 14:29:19 +01:00
Clément 'birdy' Danjou
ffc8b4de6a feat() add deploy task 2023-11-13 12:57:06 +01:00
Clément 'birdy' Danjou
a79963b394 feat() remove balanceOf to have one function for both 2023-11-12 03:53:01 +01:00
Clément 'birdy' Danjou
ab3bf8e00a feat() grantAccess take an array of identifiers 2023-11-12 03:38:49 +01:00
Clément 'birdy' Danjou
17372cfd33 feat() rename identified with compliant 2023-11-10 16:06:46 +01:00
Clément 'birdy' Danjou
6dd601ea68 feat() add feature for government to access balance of their citizen 2023-11-10 14:47:19 +01:00
Clément 'birdy' Danjou
3fb4719494 feat() remove possibility for registrar to see user aset 2023-11-09 16:35:52 +01:00
Clément 'birdy' Danjou
8d5adb4981 feat() change model from country registrar to independent registrar 2023-11-09 16:10:14 +01:00
Clément 'birdy' Danjou
e5c50b5568 feat() Implement feature explained in the article 2023-11-08 16:33:10 +01:00
Clément 'birdy' Danjou
1332f0b1aa fix() fix case 2023-10-20 14:27:12 +02:00
Clément 'birdy' Danjou
31215d4006 contracts() add identity 2023-10-20 14:27:12 +02:00