diff --git a/.changeset/pre.json b/.changeset/pre.json index 51a0bbe7..79918249 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -4,5 +4,17 @@ "initialVersions": { "openzeppelin-confidential-contracts": "0.3.1" }, - "changesets": [] + "changesets": [ + "fast-humans-run", + "five-insects-burn", + "full-worlds-rescue", + "good-flies-win", + "happy-hands-find", + "long-items-appear", + "modern-snakes-return", + "nasty-walls-taste", + "pink-areas-double", + "shaky-pugs-return", + "sour-dodos-sniff" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index fe958c12..fbff0843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,28 @@ # openzeppelin-confidential-contracts +## 0.4.0-rc.0 (2026-03-12) + +- Migrate `@fhevm/solidity` dependency to `0.11.1` ([#311](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/311)) +- Upgrade openzeppelin/contracts and openzeppelin/contracts-upgradeable to v5.6.1 ([#314](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/314)) + +### Token + +- `ERC7984ERC20Wrapper`: use a bytes32 unwrap request identifier instead of identifying batches by the euint64 unwrap amount. ([#326](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/326)) +- `ERC7984ERC20Wrapper`: Support ERC-165 interface detection on `ERC7984ERC20Wrapper`. ([#267](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/267)) +- `ERC7984ERC20Wrapper`: return the amount of wrapped token sent on wrap calls. ([#307](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/307)) +- `ERC7984ERC20Wrapper`: return unwrapped amount on `unwrap` calls ([#288](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/288)) +- `ERC7984Restricted`, `ERC7984Rwa`: Rename `isUserAllowed` to `canTransact` ([#291](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/291)) +- `ERC7984ERC20Wrapper`: revert on wrap if there is a chance of total supply overflow. ([#268](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/268)) + +### Finance + +- `BatcherConfidential`: A batching primitive that enables routing between two `ERC7984ERC20Wrapper` contracts via a non-confidential route. ([#293](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/293)) + +### Utils + +- `HandleAccessManager`: change `_validateHandleAllowance` to return a boolean and validate it. ([#303](https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/303)) + ## 0.3.1 (2026-01-06) ### Bug fixes diff --git a/contracts/finance/BatcherConfidential.sol b/contracts/finance/BatcherConfidential.sol index 55bcdd8c..4eff3942 100644 --- a/contracts/finance/BatcherConfidential.sol +++ b/contracts/finance/BatcherConfidential.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (finance/BatcherConfidential.sol) pragma solidity ^0.8.27; diff --git a/contracts/finance/VestingWalletConfidential.sol b/contracts/finance/VestingWalletConfidential.sol index cbc6b228..0393dce6 100644 --- a/contracts/finance/VestingWalletConfidential.sol +++ b/contracts/finance/VestingWalletConfidential.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (finance/VestingWalletConfidential.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (finance/VestingWalletConfidential.sol) pragma solidity ^0.8.24; import {FHE, ebool, euint64, euint128} from "@fhevm/solidity/lib/FHE.sol"; diff --git a/contracts/governance/utils/VotesConfidential.sol b/contracts/governance/utils/VotesConfidential.sol index da6da73c..7dcaa46c 100644 --- a/contracts/governance/utils/VotesConfidential.sol +++ b/contracts/governance/utils/VotesConfidential.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.2.0) (governance/utils/VotesConfidential.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (governance/utils/VotesConfidential.sol) pragma solidity ^0.8.26; diff --git a/contracts/interfaces/IERC7984ERC20Wrapper.sol b/contracts/interfaces/IERC7984ERC20Wrapper.sol index 9e3a91db..c87186b2 100644 --- a/contracts/interfaces/IERC7984ERC20Wrapper.sol +++ b/contracts/interfaces/IERC7984ERC20Wrapper.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (interfaces/IERC7984ERC20Wrapper.sol) pragma solidity ^0.8.24; diff --git a/contracts/interfaces/IERC7984Receiver.sol b/contracts/interfaces/IERC7984Receiver.sol index a4d5d24d..dbde0116 100644 --- a/contracts/interfaces/IERC7984Receiver.sol +++ b/contracts/interfaces/IERC7984Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (interfaces/IERC7984Receiver.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (interfaces/IERC7984Receiver.sol) pragma solidity ^0.8.24; import {ebool, euint64} from "@fhevm/solidity/lib/FHE.sol"; diff --git a/contracts/interfaces/IERC7984Rwa.sol b/contracts/interfaces/IERC7984Rwa.sol index ec34ddfc..712b9c7a 100644 --- a/contracts/interfaces/IERC7984Rwa.sol +++ b/contracts/interfaces/IERC7984Rwa.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (interfaces/IERC7984Rwa.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (interfaces/IERC7984Rwa.sol) pragma solidity ^0.8.24; import {externalEuint64, euint64} from "@fhevm/solidity/lib/FHE.sol"; diff --git a/contracts/package.json b/contracts/package.json index ac1edeee..0c1b0d2b 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,7 +1,7 @@ { "name": "@openzeppelin/confidential-contracts", "description": "Smart Contract library for use with confidential coprocessors", - "version": "0.3.1", + "version": "0.4.0-rc.0", "files": [ "**/*.sol", "/build/contracts/*.json", diff --git a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol index c04112a7..53795de6 100644 --- a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol +++ b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.1) (token/ERC7984/extensions/ERC7984ERC20Wrapper.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (token/ERC7984/extensions/ERC7984ERC20Wrapper.sol) pragma solidity ^0.8.27; diff --git a/contracts/token/ERC7984/extensions/ERC7984Freezable.sol b/contracts/token/ERC7984/extensions/ERC7984Freezable.sol index a7d38873..b8c81dce 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Freezable.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Freezable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (token/ERC7984/extensions/ERC7984Freezable.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (token/ERC7984/extensions/ERC7984Freezable.sol) pragma solidity ^0.8.27; diff --git a/contracts/token/ERC7984/extensions/ERC7984ObserverAccess.sol b/contracts/token/ERC7984/extensions/ERC7984ObserverAccess.sol index 088fb8ef..bb21d1ca 100644 --- a/contracts/token/ERC7984/extensions/ERC7984ObserverAccess.sol +++ b/contracts/token/ERC7984/extensions/ERC7984ObserverAccess.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (token/ERC7984/extensions/ERC7984ObserverAccess.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (token/ERC7984/extensions/ERC7984ObserverAccess.sol) pragma solidity ^0.8.27; diff --git a/contracts/token/ERC7984/extensions/ERC7984Restricted.sol b/contracts/token/ERC7984/extensions/ERC7984Restricted.sol index 4d487ba2..08aff417 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Restricted.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Restricted.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (token/ERC7984/extensions/ERC7984Restricted.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (token/ERC7984/extensions/ERC7984Restricted.sol) pragma solidity ^0.8.27; diff --git a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol index 84f1b57b..788f7653 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (token/ERC7984/extensions/ERC7984Rwa.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (token/ERC7984/extensions/ERC7984Rwa.sol) pragma solidity ^0.8.27; diff --git a/contracts/token/ERC7984/extensions/ERC7984Votes.sol b/contracts/token/ERC7984/extensions/ERC7984Votes.sol index 67b5d3d5..b14f614b 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Votes.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Votes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (token/ERC7984/extensions/ERC7984Votes.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (token/ERC7984/extensions/ERC7984Votes.sol) pragma solidity ^0.8.27; import {euint64} from "@fhevm/solidity/lib/FHE.sol"; diff --git a/contracts/utils/FHESafeMath.sol b/contracts/utils/FHESafeMath.sol index 21a92dff..dd42c9e0 100644 --- a/contracts/utils/FHESafeMath.sol +++ b/contracts/utils/FHESafeMath.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.3.0) (utils/FHESafeMath.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (utils/FHESafeMath.sol) pragma solidity ^0.8.24; import {FHE, ebool, euint64} from "@fhevm/solidity/lib/FHE.sol"; diff --git a/contracts/utils/HandleAccessManager.sol b/contracts/utils/HandleAccessManager.sol index 5bccbdf2..21509387 100644 --- a/contracts/utils/HandleAccessManager.sol +++ b/contracts/utils/HandleAccessManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.2.0) (utils/HandleAccessManager.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (utils/HandleAccessManager.sol) pragma solidity ^0.8.26; import {Impl} from "@fhevm/solidity/lib/Impl.sol"; diff --git a/contracts/utils/structs/CheckpointsConfidential.sol b/contracts/utils/structs/CheckpointsConfidential.sol index ffe75575..ff798616 100644 --- a/contracts/utils/structs/CheckpointsConfidential.sol +++ b/contracts/utils/structs/CheckpointsConfidential.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Confidential Contracts (last updated v0.2.0) (utils/structs/CheckpointsConfidential.sol) +// OpenZeppelin Confidential Contracts (last updated v0.4.0-rc.0) (utils/structs/CheckpointsConfidential.sol) // This file was procedurally generated from scripts/generate/templates/CheckpointsConfidential.js. pragma solidity ^0.8.24; diff --git a/docs/antora.yml b/docs/antora.yml index 0fffc2aa..5b677b87 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,7 +1,7 @@ name: confidential-contracts title: Confidential Contracts -version: '0.3' -prerelease: false +version: 0.4-rc +prerelease: true nav: - modules/ROOT/nav.adoc - modules/api/nav.adoc diff --git a/package.json b/package.json index 5dcf4a38..c6f3c5ef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openzeppelin-confidential-contracts", "description": "", - "version": "0.3.1", + "version": "0.4.0-rc.0", "author": "OpenZeppelin Community ", "license": "MIT", "files": [