@openzeppelin/confidential-contracts 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Confidential Contracts (last updated v0.5.0) (finance/BatcherConfidential.sol)
2
+ // OpenZeppelin Confidential Contracts (last updated v0.5.1) (finance/BatcherConfidential.sol)
3
3
 
4
4
  pragma solidity ^0.8.27;
5
5
 
@@ -189,6 +189,8 @@ abstract contract BatcherConfidential is ReentrancyGuardTransient, IERC7984Recei
189
189
  uint256 batchId = _getAndIncreaseBatchId();
190
190
 
191
191
  euint64 amountToUnwrap = totalDeposits(batchId);
192
+ if (!FHE.isInitialized(amountToUnwrap)) amountToUnwrap = FHE.asEuint64(0);
193
+
192
194
  FHE.allowTransient(amountToUnwrap, address(fromToken()));
193
195
  _batches[batchId].unwrapRequestId = fromToken().unwrap(
194
196
  address(this),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openzeppelin/confidential-contracts",
3
3
  "description": "Smart Contract library for use with confidential coprocessors",
4
- "version": "0.5.0",
4
+ "version": "0.5.1",
5
5
  "files": [
6
6
  "**/*.sol",
7
7
  "/build/contracts/*.json",