From fb3cd45a0f7274e1f32e5d6f253b920cedd2407d Mon Sep 17 00:00:00 2001 From: Regis Graptin Date: Tue, 9 Sep 2025 14:21:11 +0200 Subject: [PATCH 01/10] chore: install fhevm 0.8.0 --- contracts/mocks/docs/SwapERC7984ToERC20.sol | 5 +- .../VestingWalletConfidentialFactoryMock.sol | 1 - contracts/package.json | 2 +- contracts/token/ERC7984/ERC7984.sol | 7 +- .../extensions/ERC7984ERC20Wrapper.sol | 5 +- package-lock.json | 75 +++++++++++++------ package.json | 8 +- 7 files changed, 66 insertions(+), 37 deletions(-) diff --git a/contracts/mocks/docs/SwapERC7984ToERC20.sol b/contracts/mocks/docs/SwapERC7984ToERC20.sol index 62f4d1b7..8d066a4f 100644 --- a/contracts/mocks/docs/SwapERC7984ToERC20.sol +++ b/contracts/mocks/docs/SwapERC7984ToERC20.sol @@ -34,8 +34,9 @@ contract SwapConfidentialToERC20 { _receivers[requestID] = msg.sender; } - function finalizeSwap(uint256 requestID, uint64 amount, bytes[] memory signatures) public virtual { - FHE.checkSignatures(requestID, signatures); + function finalizeSwap(uint256 requestID, bytes memory cleartexts, bytes memory signatures) public virtual { + FHE.checkSignatures(requestID, cleartexts, signatures); + uint64 amount = abi.decode(cleartexts, (uint64)); address to = _receivers[requestID]; require(to != address(0), SwapConfidentialToERC20InvalidGatewayRequest(requestID)); delete _receivers[requestID]; diff --git a/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol b/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol index 71bd97f8..f19b7994 100644 --- a/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol +++ b/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol @@ -62,6 +62,5 @@ contract VestingWalletCliffExecutorConfidential is VestingWalletCliffConfidentia __ERC7821WithExecutor_init(executor); FHE.setCoprocessor(ZamaConfig.getSepoliaConfig()); - FHE.setDecryptionOracle(ZamaConfig.getSepoliaOracleAddress()); } } diff --git a/contracts/package.json b/contracts/package.json index e16e9917..8aeeffa4 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -32,7 +32,7 @@ }, "homepage": "https://openzeppelin.com/contracts/", "peerDependencies": { - "@fhevm/solidity": "0.7.0", + "@fhevm/solidity": "0.8.0", "@openzeppelin/contracts": "^5.4.0", "@openzeppelin/contracts-upgradeable": "^5.4.0" } diff --git a/contracts/token/ERC7984/ERC7984.sol b/contracts/token/ERC7984/ERC7984.sol index 1d93756f..8283484b 100644 --- a/contracts/token/ERC7984/ERC7984.sol +++ b/contracts/token/ERC7984/ERC7984.sol @@ -219,10 +219,11 @@ abstract contract ERC7984 is IERC7984 { */ function finalizeDiscloseEncryptedAmount( uint256 requestId, - uint64 amount, - bytes[] memory signatures + bytes memory cleartexts, + bytes memory signatures ) public virtual { - FHE.checkSignatures(requestId, signatures); + FHE.checkSignatures(requestId, cleartexts, signatures); + uint64 amount = abi.decode(cleartexts, (uint64)); euint64 requestHandle = euint64.wrap(FHE.loadRequestedHandles(requestId)[0]); emit AmountDisclosed(requestHandle, amount); diff --git a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol index 3d7609c7..b9d2eaf6 100644 --- a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol +++ b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol @@ -127,8 +127,9 @@ abstract contract ERC7984ERC20Wrapper is ERC7984, IERC1363Receiver { /** * @dev Fills an unwrap request for a given request id related to a decrypted unwrap amount. */ - function finalizeUnwrap(uint256 requestID, uint64 amount, bytes[] memory signatures) public virtual { - FHE.checkSignatures(requestID, signatures); + function finalizeUnwrap(uint256 requestID, bytes memory cleartexts, bytes memory signatures) public virtual { + FHE.checkSignatures(requestID, cleartexts, signatures); + uint64 amount = abi.decode(cleartexts, (uint64)); address to = _receivers[requestID]; require(to != address(0), ERC7984InvalidGatewayRequest(requestID)); delete _receivers[requestID]; diff --git a/package-lock.json b/package-lock.json index ed7daf15..870362cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,9 @@ "@changesets/read": "^0.6.0", "@eslint/compat": "^1.2.8", "@eslint/js": "^9.9.0", - "@fhevm/core-contracts": "0.7.0-12", - "@fhevm/hardhat-plugin": "0.0.1-3", - "@fhevm/solidity": "0.7.0", + "@fhevm/core-contracts": "0.8.0", + "@fhevm/hardhat-plugin": "0.1.0-0", + "@fhevm/solidity": "0.8.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", @@ -34,7 +34,7 @@ "@types/node": "^18.19.59", "@typescript-eslint/eslint-plugin": "^8.0.1", "@typescript-eslint/parser": "^8.0.1", - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0", "chai": "^4.3.7", "cross-env": "^7.0.3", "dotenv": "^16.0.3", @@ -1976,7 +1976,9 @@ } }, "node_modules/@fhevm/core-contracts": { - "version": "0.7.0-12", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@fhevm/core-contracts/-/core-contracts-0.8.0.tgz", + "integrity": "sha512-jQ2gyoTH0DZfOyOCQKLfV11agOVqrwZ7YfpLKdHDVjjXSO9gWIrXrvmUS6eV6zhED+PDHAcX0vfGGfLmsEBMTA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1988,11 +1990,13 @@ } }, "node_modules/@fhevm/hardhat-plugin": { - "version": "0.0.1-3", + "version": "0.1.0-0", + "resolved": "https://registry.npmjs.org/@fhevm/hardhat-plugin/-/hardhat-plugin-0.1.0-0.tgz", + "integrity": "sha512-4V3DDnZX5xZOv4HgiYQCxQfrN14MglMA0IHrKk9RuU3hCPWXAKtz0UcL0RnNn60dQKQTTpcd34yr9jzVszZpcw==", "dev": true, "license": "BSD-3-Clause-Clear", "dependencies": { - "@fhevm/core-contracts": "0.7.0-12", + "@fhevm/core-contracts": "0.8.0", "debug": "^4.1.1", "dotenv": "^16.5.0", "picocolors": "^1.1.1", @@ -2003,22 +2007,25 @@ "npm": ">=7.0.0" }, "peerDependencies": { - "@fhevm/mock-utils": "0.0.1-3", - "@fhevm/solidity": "^0.7.0", + "@fhevm/mock-utils": "0.1.0-0", + "@fhevm/solidity": "^0.8.0", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@zama-fhe/oracle-solidity": "^0.1.0", - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0-6", + "encrypted-types": "^0.0.4", "ethers": "^6.1.0", "hardhat": "^2.0.0" } }, "node_modules/@fhevm/mock-utils": { - "version": "0.0.1-3", + "version": "0.1.0-0", + "resolved": "https://registry.npmjs.org/@fhevm/mock-utils/-/mock-utils-0.1.0-0.tgz", + "integrity": "sha512-gBbXXQyzcD5dOGTD004E4o8vDZoQ4Gyad5fQ9FJp5QJPLX0c1KE6YNBdfpDdnoqaju/YlaAF/V+NYMkB133H8g==", "dev": true, "license": "BSD-3-Clause-Clear", "peer": true, "peerDependencies": { - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0-6", "ethers": "^6.1.0", "typescript": ">=5.0.4" }, @@ -2029,7 +2036,9 @@ } }, "node_modules/@fhevm/solidity": { - "version": "0.7.0", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@fhevm/solidity/-/solidity-0.8.0.tgz", + "integrity": "sha512-+jpjPcJbwE+eNRhCn4IwQ2mcH11W9TW0GepwJh0aWm/oN1pmvmapHkj3WiLtG+PorQ8LDMgaq7+LO8hyVYKEzA==", "dev": true, "license": "BSD-3-Clause-Clear", "dependencies": { @@ -3670,18 +3679,20 @@ } }, "node_modules/@zama-fhe/relayer-sdk": { - "version": "0.1.0-9", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@zama-fhe/relayer-sdk/-/relayer-sdk-0.2.0.tgz", + "integrity": "sha512-phgpQgqdpIDYKihNdBt3JQtvkKjZpG5a2l+bwh5JJvvUuLG1jkoHbd1LGWvtxd7rF54TIAyupIEIMM0C1Qj1xw==", "dev": true, "license": "BSD-3-Clause-Clear", "dependencies": { "commander": "^14.0.0", - "ethers": "^6.13.4", + "ethers": "^6.15.0", "fetch-retry": "^6.0.0", "keccak": "^3.0.4", - "node-tfhe": "^1.1.3", - "node-tkms": "0.11.0-rc17", - "tfhe": "^1.1.3", - "tkms": "0.11.0-rc17", + "node-tfhe": "1.3.0", + "node-tkms": "^0.11.0", + "tfhe": "1.3.0", + "tkms": "^0.11.0", "wasm-feature-detect": "^1.8.0" }, "bin": { @@ -3693,6 +3704,8 @@ }, "node_modules/@zama-fhe/relayer-sdk/node_modules/commander": { "version": "14.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.0.tgz", + "integrity": "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==", "dev": true, "license": "MIT", "engines": { @@ -5836,7 +5849,9 @@ } }, "node_modules/ethers": { - "version": "6.14.4", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.15.0.tgz", + "integrity": "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ==", "dev": true, "funding": [ { @@ -6042,6 +6057,8 @@ }, "node_modules/fetch-retry": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-6.0.0.tgz", + "integrity": "sha512-BUFj1aMubgib37I3v4q78fYo63Po7t4HUPTpQ6/QE6yK6cIQrP+W43FYToeTEyg5m2Y7eFUtijUuAv/PDlWuag==", "dev": true, "license": "MIT" }, @@ -9180,12 +9197,16 @@ } }, "node_modules/node-tfhe": { - "version": "1.2.0", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-1.3.0.tgz", + "integrity": "sha512-BhqHFH1sFp9bziPfar2MqtZI1NT+fsqt6w+q6l1bUFn7ENTwGbjZqZIPGuPKxgnWF6iqMhwVG5IYpKpAwil6oA==", "dev": true, "license": "BSD-3-Clause-Clear" }, "node_modules/node-tkms": { - "version": "0.11.0-rc17", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/node-tkms/-/node-tkms-0.11.0.tgz", + "integrity": "sha512-Wxm0ZWZBEPzdjfjEPYwRZXX8jFMi3gZ03vQB4GretEaH3lZWZt5eUiWh5yjIhg5BdEyg/ikGs8CSR87mMhKSAw==", "dev": true, "license": "BSD-3-Clause-Clear" }, @@ -11756,7 +11777,9 @@ "license": "MIT" }, "node_modules/tfhe": { - "version": "1.2.0", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-1.3.0.tgz", + "integrity": "sha512-SYySiMB/hCPJmy3K8RliVYCN4mV/p5+EJozaYfXTS0UEl3aS+1b71XqGfI1KDucYHelVS1iWgF7+uO2wNqQQ/g==", "dev": true, "license": "BSD-3-Clause-Clear" }, @@ -11800,7 +11823,9 @@ } }, "node_modules/tkms": { - "version": "0.11.0-rc17", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/tkms/-/tkms-0.11.0.tgz", + "integrity": "sha512-mDXsbg80Z4mTuZIlxbiw6UmklEYSajlWwGxtLqOeBuzSekPG2coDOq8RKM80g/REk1r78ocRk9YuctbG3PjJgw==", "dev": true, "license": "BSD-3-Clause-Clear" }, @@ -12430,6 +12455,8 @@ }, "node_modules/wasm-feature-detect": { "version": "1.8.0", + "resolved": "https://registry.npmjs.org/wasm-feature-detect/-/wasm-feature-detect-1.8.0.tgz", + "integrity": "sha512-zksaLKM2fVlnB5jQQDqKXXwYHLQUVH9es+5TOOHwGOVJOCeRBCiPjwSg+3tN2AdTCzjgli4jijCH290kXb/zWQ==", "dev": true, "license": "Apache-2.0" }, diff --git a/package.json b/package.json index 1687b67e..63a4504d 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,9 @@ "@changesets/read": "^0.6.0", "@eslint/compat": "^1.2.8", "@eslint/js": "^9.9.0", - "@fhevm/core-contracts": "0.7.0-12", - "@fhevm/hardhat-plugin": "0.0.1-3", - "@fhevm/solidity": "0.7.0", + "@fhevm/core-contracts": "0.8.0", + "@fhevm/hardhat-plugin": "0.1.0-0", + "@fhevm/solidity": "0.8.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", @@ -63,7 +63,7 @@ "@types/node": "^18.19.59", "@typescript-eslint/eslint-plugin": "^8.0.1", "@typescript-eslint/parser": "^8.0.1", - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0", "chai": "^4.3.7", "cross-env": "^7.0.3", "dotenv": "^16.0.3", From efc87133ffad51340d71e2a73f063a14e2992442 Mon Sep 17 00:00:00 2001 From: Regis Graptin Date: Tue, 9 Sep 2025 16:30:40 +0200 Subject: [PATCH 02/10] fix: update how to retrieve acl address in tests --- test/helpers/accounts.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/helpers/accounts.ts b/test/helpers/accounts.ts index f63fc36e..6fdd0c06 100644 --- a/test/helpers/accounts.ts +++ b/test/helpers/accounts.ts @@ -1,10 +1,8 @@ -import constants from '../../node_modules/@fhevm/hardhat-plugin/src/constants'; import { impersonateAccount, setBalance } from '@nomicfoundation/hardhat-network-helpers'; import { Addressable, Signer, ethers } from 'ethers'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; - -export const ACL_ADDRESS = constants.ACL_CONTRACT_ADDRESS; +import { fhevm } from 'hardhat'; const DEFAULT_BALANCE: bigint = 10000n * ethers.WeiPerEther; @@ -18,7 +16,8 @@ export async function allowHandle(hre: HardhatRuntimeEnvironment, from: Signer, const acl_abi = JSON.parse( fs.readFileSync('node_modules/@fhevm/core-contracts/artifacts/contracts/ACL.sol/ACL.json', 'utf8'), ).abi; - const aclContract = await hre.ethers.getContractAt(acl_abi, ACL_ADDRESS); + const aclAddress = (await fhevm.getRelayerMetadata()).ACLAddress; + const aclContract = await hre.ethers.getContractAt(acl_abi, aclAddress); await aclContract.connect(from).allow(handle, to); } From bba11a7679fbca4e5c85a2a21666d5c25de84455 Mon Sep 17 00:00:00 2001 From: Regis Graptin Date: Tue, 9 Sep 2025 18:15:49 +0200 Subject: [PATCH 03/10] fix: lint & handle ACL address --- test/helpers/accounts.ts | 2 +- test/token/ERC7984/extensions/ERC7984Freezable.test.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/helpers/accounts.ts b/test/helpers/accounts.ts index 6fdd0c06..c4d266ef 100644 --- a/test/helpers/accounts.ts +++ b/test/helpers/accounts.ts @@ -1,8 +1,8 @@ import { impersonateAccount, setBalance } from '@nomicfoundation/hardhat-network-helpers'; import { Addressable, Signer, ethers } from 'ethers'; import fs from 'fs'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { fhevm } from 'hardhat'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; const DEFAULT_BALANCE: bigint = 10000n * ethers.WeiPerEther; diff --git a/test/token/ERC7984/extensions/ERC7984Freezable.test.ts b/test/token/ERC7984/extensions/ERC7984Freezable.test.ts index 6bef4f42..ce6034ae 100644 --- a/test/token/ERC7984/extensions/ERC7984Freezable.test.ts +++ b/test/token/ERC7984/extensions/ERC7984Freezable.test.ts @@ -1,6 +1,5 @@ import { IACL__factory } from '../../../../types'; import { $ERC7984FreezableMock } from '../../../../types/contracts-exposed/mocks/token/ERC7984FreezableMock.sol/$ERC7984FreezableMock'; -import { ACL_ADDRESS } from '../../../helpers/accounts'; import { FhevmType } from '@fhevm/hardhat-plugin'; import { expect } from 'chai'; import { AddressLike, BytesLike, EventLog } from 'ethers'; @@ -19,7 +18,7 @@ describe('ERC7984Freezable', function () { uri, freezer.address, ])) as any as $ERC7984FreezableMock; - const acl = IACL__factory.connect(ACL_ADDRESS, ethers.provider); + const acl = IACL__factory.connect((await fhevm.getRelayerMetadata()).ACLAddress, ethers.provider); return { token, acl, holder, recipient, freezer, operator, anyone }; } for (const withProof of [true, false]) { From 01d54d59565f457e4875ed6ebade882e67851e86 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:41:19 +0400 Subject: [PATCH 04/10] fix tests --- test/token/ERC7984/ERC7984.test.ts | 2 +- test/token/ERC7984/extensions/ERC7984Wrapper.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/token/ERC7984/ERC7984.test.ts b/test/token/ERC7984/ERC7984.test.ts index d28fcbb7..a6f7a810 100644 --- a/test/token/ERC7984/ERC7984.test.ts +++ b/test/token/ERC7984/ERC7984.test.ts @@ -567,7 +567,7 @@ describe('ERC7984', function () { const holderBalanceHandle = await this.token.confidentialBalanceOf(this.holder); await this.token.connect(this.holder).discloseEncryptedAmount(holderBalanceHandle); - await expect(this.token.connect(this.holder).finalizeDiscloseEncryptedAmount(0, 0, [])).to.be.reverted; + await expect(this.token.connect(this.holder).finalizeDiscloseEncryptedAmount(0, '0x', '0x')).to.be.reverted; }); afterEach(async function () { diff --git a/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts b/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts index 1c3014de..37b0ccac 100644 --- a/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts +++ b/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts @@ -240,7 +240,7 @@ describe('ERC7984Wrapper', function () { }); it('finalized with invalid signature', async function () { - await expect(this.wrapper.connect(this.holder).finalizeUnwrap(0, 0, [])).to.be.reverted; + await expect(this.wrapper.connect(this.holder).finalizeUnwrap(0, '0x', '0x')).to.be.reverted; }); }); From e53eaeb6ddec3f5da563c4b2a8dd0bd017f918f5 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:43:24 +0400 Subject: [PATCH 05/10] add changeset --- .changeset/beige-fans-call.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/beige-fans-call.md diff --git a/.changeset/beige-fans-call.md b/.changeset/beige-fans-call.md new file mode 100644 index 00000000..a1ca054c --- /dev/null +++ b/.changeset/beige-fans-call.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-confidential-contracts': minor +--- + +Migrate `@fhevm/solidity` from v0.7.0 to 0.8.0 From 912149a5e71b87d80b37d2be9b79f9937319d6df Mon Sep 17 00:00:00 2001 From: James Toussaint <33313130+james-toussaint@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:47:56 +0200 Subject: [PATCH 06/10] Bump to fhevm 0.8 --- contracts/mocks/docs/SwapERC7984ToERC20.sol | 5 +- .../VestingWalletConfidentialFactoryMock.sol | 1 - contracts/package-lock.json | 93 +++++++++++++++++++ contracts/package.json | 2 +- contracts/token/ERC7984/ERC7984.sol | 8 +- .../extensions/ERC7984ERC20Wrapper.sol | 9 +- package-lock.json | 70 +++++++++----- package.json | 7 +- test/helpers/accounts.ts | 10 +- test/token/ERC7984/ERC7984.test.ts | 2 +- .../extensions/ERC7984Freezable.test.ts | 4 +- .../ERC7984/extensions/ERC7984Omnibus.test.ts | 4 +- .../ERC7984/extensions/ERC7984Wrapper.test.ts | 2 +- 13 files changed, 169 insertions(+), 48 deletions(-) create mode 100644 contracts/package-lock.json diff --git a/contracts/mocks/docs/SwapERC7984ToERC20.sol b/contracts/mocks/docs/SwapERC7984ToERC20.sol index 16b8e7d5..7231e571 100644 --- a/contracts/mocks/docs/SwapERC7984ToERC20.sol +++ b/contracts/mocks/docs/SwapERC7984ToERC20.sol @@ -31,8 +31,9 @@ contract SwapConfidentialToERC20 { _receivers[requestID] = msg.sender; } - function finalizeSwap(uint256 requestID, uint64 amount, bytes[] memory signatures) public virtual { - FHE.checkSignatures(requestID, signatures); + function finalizeSwap(uint256 requestID, bytes calldata cleartexts, bytes calldata decryptionProof) public virtual { + FHE.checkSignatures(requestID, cleartexts, decryptionProof); + uint64 amount = abi.decode(cleartexts, (uint64)); address to = _receivers[requestID]; require(to != address(0), SwapConfidentialToERC20InvalidGatewayRequest(requestID)); delete _receivers[requestID]; diff --git a/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol b/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol index 71bd97f8..f19b7994 100644 --- a/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol +++ b/contracts/mocks/finance/VestingWalletConfidentialFactoryMock.sol @@ -62,6 +62,5 @@ contract VestingWalletCliffExecutorConfidential is VestingWalletCliffConfidentia __ERC7821WithExecutor_init(executor); FHE.setCoprocessor(ZamaConfig.getSepoliaConfig()); - FHE.setDecryptionOracle(ZamaConfig.getSepoliaOracleAddress()); } } diff --git a/contracts/package-lock.json b/contracts/package-lock.json new file mode 100644 index 00000000..90847d02 --- /dev/null +++ b/contracts/package-lock.json @@ -0,0 +1,93 @@ +{ + "name": "@openzeppelin/confidential-contracts", + "version": "0.2.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@openzeppelin/confidential-contracts", + "version": "0.2.0", + "license": "MIT", + "peerDependencies": { + "@fhevm/solidity": "^0.8.0", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0" + } + }, + "node_modules/@fhevm/solidity": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@fhevm/solidity/-/solidity-0.8.0.tgz", + "integrity": "sha512-+jpjPcJbwE+eNRhCn4IwQ2mcH11W9TW0GepwJh0aWm/oN1pmvmapHkj3WiLtG+PorQ8LDMgaq7+LO8hyVYKEzA==", + "license": "BSD-3-Clause-Clear", + "peer": true, + "dependencies": { + "encrypted-types": "^0.0.4" + }, + "engines": { + "node": ">=20.0.0" + }, + "optionalDependencies": { + "solidity-comments-darwin-arm64": "0.1.1", + "solidity-comments-linux-x64-gnu": "0.1.1" + } + }, + "node_modules/@openzeppelin/contracts": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", + "license": "MIT", + "peer": true + }, + "node_modules/@openzeppelin/contracts-upgradeable": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.4.0.tgz", + "integrity": "sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@openzeppelin/contracts": "5.4.0" + } + }, + "node_modules/encrypted-types": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/encrypted-types/-/encrypted-types-0.0.4.tgz", + "integrity": "sha512-f55ccBBUwvqWqr3ymAVOLZ6bzjsSQZlDN0GcKFmzkvTpml4Vm3Y6BCaHhCuW/ctrabTJJ3DFnUsjtFOpokJUaQ==", + "license": "MIT", + "peer": true + }, + "node_modules/solidity-comments-darwin-arm64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.1.1.tgz", + "integrity": "sha512-ze1+YboHm8tRJXCoFEsxtU1gpvQ3rCH55xMtBH6dtyh1/gz4qrKCOUBaAP+IHplbzCacZBn+Pz3UmMDOoGshRw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/solidity-comments-linux-x64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.1.1.tgz", + "integrity": "sha512-oiU4yhh1Q9SeGXQ+/sogfTNoOkU8I8IvlIeotBQziTOonUHrxQk4E63kNiYGPDn5ZbB3BhKFmGHNRNrkufsxcQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + } + } +} diff --git a/contracts/package.json b/contracts/package.json index e16e9917..4c00fb83 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -32,7 +32,7 @@ }, "homepage": "https://openzeppelin.com/contracts/", "peerDependencies": { - "@fhevm/solidity": "0.7.0", + "@fhevm/solidity": "^0.8.0", "@openzeppelin/contracts": "^5.4.0", "@openzeppelin/contracts-upgradeable": "^5.4.0" } diff --git a/contracts/token/ERC7984/ERC7984.sol b/contracts/token/ERC7984/ERC7984.sol index 1d93756f..76e74438 100644 --- a/contracts/token/ERC7984/ERC7984.sol +++ b/contracts/token/ERC7984/ERC7984.sol @@ -219,11 +219,11 @@ abstract contract ERC7984 is IERC7984 { */ function finalizeDiscloseEncryptedAmount( uint256 requestId, - uint64 amount, - bytes[] memory signatures + bytes calldata cleartexts, + bytes calldata decryptionProof ) public virtual { - FHE.checkSignatures(requestId, signatures); - + FHE.checkSignatures(requestId, cleartexts, decryptionProof); + uint64 amount = abi.decode(cleartexts, (uint64)); euint64 requestHandle = euint64.wrap(FHE.loadRequestedHandles(requestId)[0]); emit AmountDisclosed(requestHandle, amount); } diff --git a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol index 3d7609c7..9af25aa7 100644 --- a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol +++ b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol @@ -127,8 +127,13 @@ abstract contract ERC7984ERC20Wrapper is ERC7984, IERC1363Receiver { /** * @dev Fills an unwrap request for a given request id related to a decrypted unwrap amount. */ - function finalizeUnwrap(uint256 requestID, uint64 amount, bytes[] memory signatures) public virtual { - FHE.checkSignatures(requestID, signatures); + function finalizeUnwrap( + uint256 requestID, + bytes calldata cleartexts, + bytes calldata decryptionProof + ) public virtual { + FHE.checkSignatures(requestID, cleartexts, decryptionProof); + uint64 amount = abi.decode(cleartexts, (uint64)); address to = _receivers[requestID]; require(to != address(0), ERC7984InvalidGatewayRequest(requestID)); delete _receivers[requestID]; diff --git a/package-lock.json b/package-lock.json index ed7daf15..8e5c7e7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,8 @@ "@changesets/read": "^0.6.0", "@eslint/compat": "^1.2.8", "@eslint/js": "^9.9.0", - "@fhevm/core-contracts": "0.7.0-12", - "@fhevm/hardhat-plugin": "0.0.1-3", - "@fhevm/solidity": "0.7.0", + "@fhevm/hardhat-plugin": "^0.1.0", + "@fhevm/solidity": "^0.8.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", @@ -34,7 +33,7 @@ "@types/node": "^18.19.59", "@typescript-eslint/eslint-plugin": "^8.0.1", "@typescript-eslint/parser": "^8.0.1", - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0", "chai": "^4.3.7", "cross-env": "^7.0.3", "dotenv": "^16.0.3", @@ -1976,7 +1975,9 @@ } }, "node_modules/@fhevm/core-contracts": { - "version": "0.7.0-12", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@fhevm/core-contracts/-/core-contracts-0.8.0.tgz", + "integrity": "sha512-jQ2gyoTH0DZfOyOCQKLfV11agOVqrwZ7YfpLKdHDVjjXSO9gWIrXrvmUS6eV6zhED+PDHAcX0vfGGfLmsEBMTA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1988,11 +1989,13 @@ } }, "node_modules/@fhevm/hardhat-plugin": { - "version": "0.0.1-3", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@fhevm/hardhat-plugin/-/hardhat-plugin-0.1.0.tgz", + "integrity": "sha512-u8gNJt/K+ggxgaESM7pbUpxu3wbiwtDOF+ONb8XJIlDmqnv/O4zkhide/+TTlF8X831tBd8cLwvJlWOzhgfZnQ==", "dev": true, "license": "BSD-3-Clause-Clear", "dependencies": { - "@fhevm/core-contracts": "0.7.0-12", + "@fhevm/core-contracts": "0.8.0", "debug": "^4.1.1", "dotenv": "^16.5.0", "picocolors": "^1.1.1", @@ -2003,22 +2006,25 @@ "npm": ">=7.0.0" }, "peerDependencies": { - "@fhevm/mock-utils": "0.0.1-3", - "@fhevm/solidity": "^0.7.0", + "@fhevm/mock-utils": "0.1.0", + "@fhevm/solidity": "^0.8.0", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@zama-fhe/oracle-solidity": "^0.1.0", - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0", + "encrypted-types": "^0.0.4", "ethers": "^6.1.0", "hardhat": "^2.0.0" } }, "node_modules/@fhevm/mock-utils": { - "version": "0.0.1-3", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@fhevm/mock-utils/-/mock-utils-0.1.0.tgz", + "integrity": "sha512-MZk+hXNrO4t0kIgoO9nLln9lKCefCe6gCAKeBhwAMmndIdYGIGkNJHVTbqAAMWS7wPTsA5pkR47BWvX0N6XaZQ==", "dev": true, "license": "BSD-3-Clause-Clear", "peer": true, "peerDependencies": { - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0", "ethers": "^6.1.0", "typescript": ">=5.0.4" }, @@ -2029,7 +2035,9 @@ } }, "node_modules/@fhevm/solidity": { - "version": "0.7.0", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@fhevm/solidity/-/solidity-0.8.0.tgz", + "integrity": "sha512-+jpjPcJbwE+eNRhCn4IwQ2mcH11W9TW0GepwJh0aWm/oN1pmvmapHkj3WiLtG+PorQ8LDMgaq7+LO8hyVYKEzA==", "dev": true, "license": "BSD-3-Clause-Clear", "dependencies": { @@ -3662,6 +3670,8 @@ }, "node_modules/@zama-fhe/oracle-solidity": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@zama-fhe/oracle-solidity/-/oracle-solidity-0.1.0.tgz", + "integrity": "sha512-phRego2FW7SWgneQOES/iQ99c97ZCb+KZk5m+lT474dSNrsgEDh96W9T1+Owhc9C6VKtCpMLM43dHXwKHDIw6g==", "dev": true, "license": "BSD-3-Clause", "peer": true, @@ -3670,18 +3680,20 @@ } }, "node_modules/@zama-fhe/relayer-sdk": { - "version": "0.1.0-9", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@zama-fhe/relayer-sdk/-/relayer-sdk-0.2.0.tgz", + "integrity": "sha512-phgpQgqdpIDYKihNdBt3JQtvkKjZpG5a2l+bwh5JJvvUuLG1jkoHbd1LGWvtxd7rF54TIAyupIEIMM0C1Qj1xw==", "dev": true, "license": "BSD-3-Clause-Clear", "dependencies": { "commander": "^14.0.0", - "ethers": "^6.13.4", + "ethers": "^6.15.0", "fetch-retry": "^6.0.0", "keccak": "^3.0.4", - "node-tfhe": "^1.1.3", - "node-tkms": "0.11.0-rc17", - "tfhe": "^1.1.3", - "tkms": "0.11.0-rc17", + "node-tfhe": "1.3.0", + "node-tkms": "^0.11.0", + "tfhe": "1.3.0", + "tkms": "^0.11.0", "wasm-feature-detect": "^1.8.0" }, "bin": { @@ -5836,7 +5848,9 @@ } }, "node_modules/ethers": { - "version": "6.14.4", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.15.0.tgz", + "integrity": "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ==", "dev": true, "funding": [ { @@ -9180,12 +9194,16 @@ } }, "node_modules/node-tfhe": { - "version": "1.2.0", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-tfhe/-/node-tfhe-1.3.0.tgz", + "integrity": "sha512-BhqHFH1sFp9bziPfar2MqtZI1NT+fsqt6w+q6l1bUFn7ENTwGbjZqZIPGuPKxgnWF6iqMhwVG5IYpKpAwil6oA==", "dev": true, "license": "BSD-3-Clause-Clear" }, "node_modules/node-tkms": { - "version": "0.11.0-rc17", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/node-tkms/-/node-tkms-0.11.1.tgz", + "integrity": "sha512-AWciFzfvjEYECHiAJXv1KLz6K28fX/0DDlaktAbslF2XpaIGsc9sCKjYPJHubrJfNrtUWUI5qfqhJOP3BD/mcw==", "dev": true, "license": "BSD-3-Clause-Clear" }, @@ -11756,7 +11774,9 @@ "license": "MIT" }, "node_modules/tfhe": { - "version": "1.2.0", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tfhe/-/tfhe-1.3.0.tgz", + "integrity": "sha512-SYySiMB/hCPJmy3K8RliVYCN4mV/p5+EJozaYfXTS0UEl3aS+1b71XqGfI1KDucYHelVS1iWgF7+uO2wNqQQ/g==", "dev": true, "license": "BSD-3-Clause-Clear" }, @@ -11800,7 +11820,9 @@ } }, "node_modules/tkms": { - "version": "0.11.0-rc17", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/tkms/-/tkms-0.11.1.tgz", + "integrity": "sha512-FNpnwZKsUUMs0q4aAwZatpw7fz1UBG9cdh3LZYgWYN3rvouS+v4zysB642dG8J35KgNF6WCFAzTyRKagdL8x7g==", "dev": true, "license": "BSD-3-Clause-Clear" }, diff --git a/package.json b/package.json index 1687b67e..e501f185 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,8 @@ "@changesets/read": "^0.6.0", "@eslint/compat": "^1.2.8", "@eslint/js": "^9.9.0", - "@fhevm/core-contracts": "0.7.0-12", - "@fhevm/hardhat-plugin": "0.0.1-3", - "@fhevm/solidity": "0.7.0", + "@fhevm/hardhat-plugin": "^0.1.0", + "@fhevm/solidity": "^0.8.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", @@ -63,7 +62,7 @@ "@types/node": "^18.19.59", "@typescript-eslint/eslint-plugin": "^8.0.1", "@typescript-eslint/parser": "^8.0.1", - "@zama-fhe/relayer-sdk": "^0.1.0-5", + "@zama-fhe/relayer-sdk": "^0.2.0", "chai": "^4.3.7", "cross-env": "^7.0.3", "dotenv": "^16.0.3", diff --git a/test/helpers/accounts.ts b/test/helpers/accounts.ts index f63fc36e..f4e2a90f 100644 --- a/test/helpers/accounts.ts +++ b/test/helpers/accounts.ts @@ -1,11 +1,9 @@ -import constants from '../../node_modules/@fhevm/hardhat-plugin/src/constants'; import { impersonateAccount, setBalance } from '@nomicfoundation/hardhat-network-helpers'; import { Addressable, Signer, ethers } from 'ethers'; import fs from 'fs'; +import { fhevm } from 'hardhat'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -export const ACL_ADDRESS = constants.ACL_CONTRACT_ADDRESS; - const DEFAULT_BALANCE: bigint = 10000n * ethers.WeiPerEther; export async function impersonate(hre: HardhatRuntimeEnvironment, account: string, balance: bigint = DEFAULT_BALANCE) { @@ -14,11 +12,15 @@ export async function impersonate(hre: HardhatRuntimeEnvironment, account: strin .then(() => hre.ethers.getSigner(account)); } +export async function getAclAddress() { + return (await fhevm.getRelayerMetadata()).ACLAddress; +} + export async function allowHandle(hre: HardhatRuntimeEnvironment, from: Signer, to: Addressable, handle: string) { const acl_abi = JSON.parse( fs.readFileSync('node_modules/@fhevm/core-contracts/artifacts/contracts/ACL.sol/ACL.json', 'utf8'), ).abi; - const aclContract = await hre.ethers.getContractAt(acl_abi, ACL_ADDRESS); + const aclContract = await hre.ethers.getContractAt(acl_abi, await getAclAddress()); await aclContract.connect(from).allow(handle, to); } diff --git a/test/token/ERC7984/ERC7984.test.ts b/test/token/ERC7984/ERC7984.test.ts index d28fcbb7..a6f7a810 100644 --- a/test/token/ERC7984/ERC7984.test.ts +++ b/test/token/ERC7984/ERC7984.test.ts @@ -567,7 +567,7 @@ describe('ERC7984', function () { const holderBalanceHandle = await this.token.confidentialBalanceOf(this.holder); await this.token.connect(this.holder).discloseEncryptedAmount(holderBalanceHandle); - await expect(this.token.connect(this.holder).finalizeDiscloseEncryptedAmount(0, 0, [])).to.be.reverted; + await expect(this.token.connect(this.holder).finalizeDiscloseEncryptedAmount(0, '0x', '0x')).to.be.reverted; }); afterEach(async function () { diff --git a/test/token/ERC7984/extensions/ERC7984Freezable.test.ts b/test/token/ERC7984/extensions/ERC7984Freezable.test.ts index 995d44ae..48e3f825 100644 --- a/test/token/ERC7984/extensions/ERC7984Freezable.test.ts +++ b/test/token/ERC7984/extensions/ERC7984Freezable.test.ts @@ -1,6 +1,6 @@ import { IACL__factory } from '../../../../types'; import { $ERC7984FreezableMock } from '../../../../types/contracts-exposed/mocks/token/ERC7984FreezableMock.sol/$ERC7984FreezableMock'; -import { ACL_ADDRESS } from '../../../helpers/accounts'; +import { getAclAddress } from '../../../helpers/accounts'; import { FhevmType } from '@fhevm/hardhat-plugin'; import { expect } from 'chai'; import { AddressLike, BytesLike, EventLog } from 'ethers'; @@ -19,7 +19,7 @@ describe('ERC7984Freezable', function () { uri, freezer.address, ])) as any as $ERC7984FreezableMock; - const acl = IACL__factory.connect(ACL_ADDRESS, ethers.provider); + const acl = IACL__factory.connect(await getAclAddress(), ethers.provider); return { token, acl, holder, recipient, freezer, operator, anyone }; } diff --git a/test/token/ERC7984/extensions/ERC7984Omnibus.test.ts b/test/token/ERC7984/extensions/ERC7984Omnibus.test.ts index 3c805550..70863203 100644 --- a/test/token/ERC7984/extensions/ERC7984Omnibus.test.ts +++ b/test/token/ERC7984/extensions/ERC7984Omnibus.test.ts @@ -1,6 +1,6 @@ import { IACL__factory } from '../../../../types'; import { $ERC7984OmnibusMock } from '../../../../types/contracts-exposed/mocks/token/ERC7984OmnibusMock.sol/$ERC7984OmnibusMock'; -import { ACL_ADDRESS } from '../../../helpers/accounts'; +import { getAclAddress } from '../../../helpers/accounts'; import { FhevmType } from '@fhevm/hardhat-plugin'; import { expect } from 'chai'; import { ethers, fhevm } from 'hardhat'; @@ -17,7 +17,7 @@ describe('ERC7984Omnibus', function () { symbol, uri, ])) as any as $ERC7984OmnibusMock; - const acl = IACL__factory.connect(ACL_ADDRESS, ethers.provider); + const acl = IACL__factory.connect(await getAclAddress(), ethers.provider); Object.assign(this, { token, acl, holder, recipient, operator, subaccount }); await this.token['$_mint(address,uint64)'](this.holder.address, 1000); diff --git a/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts b/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts index 1c3014de..37b0ccac 100644 --- a/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts +++ b/test/token/ERC7984/extensions/ERC7984Wrapper.test.ts @@ -240,7 +240,7 @@ describe('ERC7984Wrapper', function () { }); it('finalized with invalid signature', async function () { - await expect(this.wrapper.connect(this.holder).finalizeUnwrap(0, 0, [])).to.be.reverted; + await expect(this.wrapper.connect(this.holder).finalizeUnwrap(0, '0x', '0x')).to.be.reverted; }); }); From e84c2f4803812892bf4f2108a2e8ee3853465d81 Mon Sep 17 00:00:00 2001 From: James Toussaint <33313130+james-toussaint@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:53:06 +0200 Subject: [PATCH 07/10] Remove contracts package lock --- contracts/package-lock.json | 93 ------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 contracts/package-lock.json diff --git a/contracts/package-lock.json b/contracts/package-lock.json deleted file mode 100644 index 90847d02..00000000 --- a/contracts/package-lock.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "@openzeppelin/confidential-contracts", - "version": "0.2.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@openzeppelin/confidential-contracts", - "version": "0.2.0", - "license": "MIT", - "peerDependencies": { - "@fhevm/solidity": "^0.8.0", - "@openzeppelin/contracts": "^5.4.0", - "@openzeppelin/contracts-upgradeable": "^5.4.0" - } - }, - "node_modules/@fhevm/solidity": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@fhevm/solidity/-/solidity-0.8.0.tgz", - "integrity": "sha512-+jpjPcJbwE+eNRhCn4IwQ2mcH11W9TW0GepwJh0aWm/oN1pmvmapHkj3WiLtG+PorQ8LDMgaq7+LO8hyVYKEzA==", - "license": "BSD-3-Clause-Clear", - "peer": true, - "dependencies": { - "encrypted-types": "^0.0.4" - }, - "engines": { - "node": ">=20.0.0" - }, - "optionalDependencies": { - "solidity-comments-darwin-arm64": "0.1.1", - "solidity-comments-linux-x64-gnu": "0.1.1" - } - }, - "node_modules/@openzeppelin/contracts": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", - "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", - "license": "MIT", - "peer": true - }, - "node_modules/@openzeppelin/contracts-upgradeable": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.4.0.tgz", - "integrity": "sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ==", - "license": "MIT", - "peer": true, - "peerDependencies": { - "@openzeppelin/contracts": "5.4.0" - } - }, - "node_modules/encrypted-types": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/encrypted-types/-/encrypted-types-0.0.4.tgz", - "integrity": "sha512-f55ccBBUwvqWqr3ymAVOLZ6bzjsSQZlDN0GcKFmzkvTpml4Vm3Y6BCaHhCuW/ctrabTJJ3DFnUsjtFOpokJUaQ==", - "license": "MIT", - "peer": true - }, - "node_modules/solidity-comments-darwin-arm64": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.1.1.tgz", - "integrity": "sha512-ze1+YboHm8tRJXCoFEsxtU1gpvQ3rCH55xMtBH6dtyh1/gz4qrKCOUBaAP+IHplbzCacZBn+Pz3UmMDOoGshRw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-linux-x64-gnu": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.1.1.tgz", - "integrity": "sha512-oiU4yhh1Q9SeGXQ+/sogfTNoOkU8I8IvlIeotBQziTOonUHrxQk4E63kNiYGPDn5ZbB3BhKFmGHNRNrkufsxcQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - } - } -} From 8fb4e95556c45986934a4368e16269d80c97f147 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 23 Sep 2025 18:38:52 +0400 Subject: [PATCH 08/10] Update contracts/package.json --- contracts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/package.json b/contracts/package.json index 4c00fb83..8aeeffa4 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -32,7 +32,7 @@ }, "homepage": "https://openzeppelin.com/contracts/", "peerDependencies": { - "@fhevm/solidity": "^0.8.0", + "@fhevm/solidity": "0.8.0", "@openzeppelin/contracts": "^5.4.0", "@openzeppelin/contracts-upgradeable": "^5.4.0" } From 145ef2d88116cab4a520cf33838e6a4264be435f Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 23 Sep 2025 18:43:03 +0400 Subject: [PATCH 09/10] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e501f185..2b2d5609 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@eslint/compat": "^1.2.8", "@eslint/js": "^9.9.0", "@fhevm/hardhat-plugin": "^0.1.0", - "@fhevm/solidity": "^0.8.0", + "@fhevm/solidity": "0.8.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", From 38f10bceb3771aad309e79d471266aeb3df9c6be Mon Sep 17 00:00:00 2001 From: James Toussaint <33313130+james-toussaint@users.noreply.github.com> Date: Tue, 23 Sep 2025 16:47:34 +0200 Subject: [PATCH 10/10] Update package lock --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 8e5c7e7c..aa513fe6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@eslint/compat": "^1.2.8", "@eslint/js": "^9.9.0", "@fhevm/hardhat-plugin": "^0.1.0", - "@fhevm/solidity": "^0.8.0", + "@fhevm/solidity": "0.8.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-network-helpers": "^1.0.3",