Skip to content
Merged

Dev #154

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions contracts/LiquidityOrchestrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* - Handling slippage and market execution differences from adapter price estimates via liquidity buffer.
* @custom:security-contact security@orionfinance.ai
*/
contract LiquidityOrchestrator is

Check warning on line 34 in contracts/LiquidityOrchestrator.sol

View workflow job for this annotation

GitHub Actions / Build, Lint and Test

Contract has 22 states declarations but allowed no more than 15
Initializable,
Ownable2StepUpgradeable,
ReentrancyGuardUpgradeable,
Expand Down Expand Up @@ -406,10 +406,11 @@
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
Expand Down Expand Up @@ -697,7 +698,7 @@
address token = sellLeg.sellingTokens[i];
if (token == address(underlyingAsset)) continue;
uint256 amount = sellLeg.sellingAmounts[i];
try this._executeSell(token, amount, sellLeg.sellingEstimatedUnderlyingAmounts[i]) {

Check warning on line 701 in contracts/LiquidityOrchestrator.sol

View workflow job for this annotation

GitHub Actions / Build, Lint and Test

Code contains empty blocks
// successful execution, continue.
} catch {
currentPhase = LiquidityUpkeepPhase.StateCommitment;
Expand Down Expand Up @@ -728,7 +729,7 @@
address token = buyLeg.buyingTokens[i];
if (token == address(underlyingAsset)) continue;
uint256 amount = buyLeg.buyingAmounts[i];
try this._executeBuy(token, amount, buyLeg.buyingEstimatedUnderlyingAmounts[i]) {

Check warning on line 732 in contracts/LiquidityOrchestrator.sol

View workflow job for this annotation

GitHub Actions / Build, Lint and Test

Code contains empty blocks
// successful execution, continue.
} catch {
currentPhase = LiquidityUpkeepPhase.StateCommitment;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down
56 changes: 28 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading