diff --git a/contracts/LiquidityOrchestrator.sol b/contracts/LiquidityOrchestrator.sol index 0922b6ef..75620d96 100644 --- a/contracts/LiquidityOrchestrator.sol +++ b/contracts/LiquidityOrchestrator.sol @@ -406,10 +406,11 @@ contract LiquidityOrchestrator is function transferRedemptionFunds(address user, uint256 amount) external { // Verify the caller is a registered vault if (!config.isOrionVault(msg.sender)) revert ErrorsLib.NotAuthorized(); - if (amount == 0) revert ErrorsLib.AmountMustBeGreaterThanZero(underlyingAsset); - // Transfer underlying assets to the user - IERC20(underlyingAsset).safeTransfer(user, amount); + if (amount > 0) { + // Transfer underlying assets to the user + IERC20(underlyingAsset).safeTransfer(user, amount); + } } /// @inheritdoc ILiquidityOrchestrator diff --git a/package.json b/package.json index a7634f45..648b6b8a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@orion-finance/protocol", "description": "Orion Finance Protocol", - "version": "2.0.2", + "version": "2.0.3", "engines": { "node": ">=20.0.0" }, @@ -77,7 +77,7 @@ }, "dependencies": { "@chainlink/contracts": "^1.4.0", - "@fhevm/solidity": "^0.10.0", + "@fhevm/solidity": "^0.11.1", "@openzeppelin/contracts": "^5.4.0", "@openzeppelin/contracts-upgradeable": "^5.4.0", "encrypted-types": "^0.0.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a024913f..73c08835 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^1.4.0 version: 1.5.0 '@fhevm/solidity': - specifier: ^0.10.0 - version: 0.10.0 + specifier: ^0.11.1 + version: 0.11.1 '@openzeppelin/contracts': specifier: ^5.4.0 version: 5.4.0 @@ -38,7 +38,7 @@ importers: version: 9.39.2 '@fhevm/hardhat-plugin': specifier: ^0.1.0 - version: 0.1.0(@fhevm/mock-utils@0.1.0(@zama-fhe/relayer-sdk@0.2.0)(ethers@6.16.0)(typescript@5.9.3))(@fhevm/solidity@0.10.0)(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@zama-fhe/oracle-solidity@0.2.0(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@nomicfoundation/hardhat-verify@2.1.3(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@openzeppelin/defender-deploy-client-cli@0.0.1-alpha.10)(@openzeppelin/upgrades-core@1.44.2)(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3))(@zama-fhe/relayer-sdk@0.2.0)(encrypted-types@0.0.4)(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)) + version: 0.1.0(@fhevm/mock-utils@0.1.0(@zama-fhe/relayer-sdk@0.2.0)(ethers@6.16.0)(typescript@5.9.3))(@fhevm/solidity@0.11.1)(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@zama-fhe/oracle-solidity@0.2.0(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@nomicfoundation/hardhat-verify@2.1.3(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@openzeppelin/defender-deploy-client-cli@0.0.1-alpha.10)(@openzeppelin/upgrades-core@1.44.2)(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3))(@zama-fhe/relayer-sdk@0.2.0)(encrypted-types@0.0.4)(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)) '@fhevm/mock-utils': specifier: 0.1.0 version: 0.1.0(@zama-fhe/relayer-sdk@0.2.0)(ethers@6.16.0)(typescript@5.9.3) @@ -497,8 +497,8 @@ packages: typescript: optional: true - '@fhevm/solidity@0.10.0': - resolution: {integrity: sha512-Gq8n0sABinDzIZoV9mf0zOxFiDMRqAnv62VEIt502QKEPVoFw8wUtNrl53SjWSEe7GpoIUKuHOrqhyiWSPlzww==} + '@fhevm/solidity@0.11.1': + resolution: {integrity: sha512-KBHCF0an1sOqoABJ30p5foldSHy14F3jaQmYX+BKogpUJ1OFhNMzYfRkmPkJkwetyDcYg/euXcYQncYgHRT9aQ==} engines: {node: '>=20.0.0'} '@fhevm/solidity@0.8.0': @@ -525,6 +525,14 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} + '@isaacs/balanced-match@4.0.1': + resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} + engines: {node: 20 || >=22} + + '@isaacs/brace-expansion@5.0.1': + resolution: {integrity: sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==} + engines: {node: 20 || >=22} + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -1377,10 +1385,6 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - balanced-match@4.0.3: - resolution: {integrity: sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==} - engines: {node: 20 || >=22} - base-x@3.0.11: resolution: {integrity: sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==} @@ -1428,10 +1432,6 @@ packages: brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} - brace-expansion@5.0.2: - resolution: {integrity: sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==} - engines: {node: 20 || >=22} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -2517,8 +2517,8 @@ packages: minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - minimatch@10.2.1: - resolution: {integrity: sha512-MClCe8IL5nRRmawL6ib/eT4oLyeKMGCghibcDWK+J0hh0Q8kqSdia6BvbRMVk6mPa6WqUa5uR2oxt6C5jd533A==} + minimatch@10.1.2: + resolution: {integrity: sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==} engines: {node: 20 || >=22} minimatch@3.1.2: @@ -4303,11 +4303,11 @@ snapshots: solidity-comments-darwin-arm64: 0.1.1 solidity-comments-linux-x64-gnu: 0.1.1 - '@fhevm/hardhat-plugin@0.1.0(@fhevm/mock-utils@0.1.0(@zama-fhe/relayer-sdk@0.2.0)(ethers@6.16.0)(typescript@5.9.3))(@fhevm/solidity@0.10.0)(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@zama-fhe/oracle-solidity@0.2.0(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@nomicfoundation/hardhat-verify@2.1.3(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@openzeppelin/defender-deploy-client-cli@0.0.1-alpha.10)(@openzeppelin/upgrades-core@1.44.2)(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3))(@zama-fhe/relayer-sdk@0.2.0)(encrypted-types@0.0.4)(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3))': + '@fhevm/hardhat-plugin@0.1.0(@fhevm/mock-utils@0.1.0(@zama-fhe/relayer-sdk@0.2.0)(ethers@6.16.0)(typescript@5.9.3))(@fhevm/solidity@0.11.1)(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@zama-fhe/oracle-solidity@0.2.0(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@nomicfoundation/hardhat-verify@2.1.3(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@openzeppelin/defender-deploy-client-cli@0.0.1-alpha.10)(@openzeppelin/upgrades-core@1.44.2)(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3))(@zama-fhe/relayer-sdk@0.2.0)(encrypted-types@0.0.4)(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3))': dependencies: '@fhevm/core-contracts': 0.8.0 '@fhevm/mock-utils': 0.1.0(@zama-fhe/relayer-sdk@0.2.0)(ethers@6.16.0)(typescript@5.9.3) - '@fhevm/solidity': 0.10.0 + '@fhevm/solidity': 0.11.1 '@nomicfoundation/hardhat-ethers': 3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)) '@zama-fhe/oracle-solidity': 0.2.0(@nomicfoundation/hardhat-ethers@3.1.3(ethers@6.16.0)(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@nomicfoundation/hardhat-verify@2.1.3(hardhat@2.28.4(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3)))(@openzeppelin/defender-deploy-client-cli@0.0.1-alpha.10)(@openzeppelin/upgrades-core@1.44.2)(ts-node@10.9.2(@types/node@25.2.2)(typescript@5.9.3))(typescript@5.9.3) '@zama-fhe/relayer-sdk': 0.2.0 @@ -4328,7 +4328,7 @@ snapshots: optionalDependencies: typescript: 5.9.3 - '@fhevm/solidity@0.10.0': + '@fhevm/solidity@0.11.1': dependencies: encrypted-types: 0.0.4 optionalDependencies: @@ -4355,6 +4355,12 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} + '@isaacs/balanced-match@4.0.1': {} + + '@isaacs/brace-expansion@5.0.1': + dependencies: + '@isaacs/balanced-match': 4.0.1 + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -5189,7 +5195,7 @@ snapshots: '@types/minimatch@6.0.0': dependencies: - minimatch: 10.2.1 + minimatch: 10.1.2 '@types/mkdirp@0.5.2': dependencies: @@ -5491,8 +5497,6 @@ snapshots: balanced-match@1.0.2: {} - balanced-match@4.0.3: {} - base-x@3.0.11: dependencies: safe-buffer: 5.2.1 @@ -5544,10 +5548,6 @@ snapshots: dependencies: balanced-match: 1.0.2 - brace-expansion@5.0.2: - dependencies: - balanced-match: 4.0.3 - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -6285,7 +6285,7 @@ snapshots: glob@13.0.1: dependencies: - minimatch: 10.2.1 + minimatch: 10.1.2 minipass: 7.1.2 path-scurry: 2.0.1 @@ -6806,9 +6806,9 @@ snapshots: minimalistic-crypto-utils@1.0.1: {} - minimatch@10.2.1: + minimatch@10.1.2: dependencies: - brace-expansion: 5.0.2 + '@isaacs/brace-expansion': 5.0.1 minimatch@3.1.2: dependencies: