Skip to content

Dev#154

Merged
matteoettam09 merged 6 commits intomainfrom
dev
Feb 26, 2026
Merged

Dev#154
matteoettam09 merged 6 commits intomainfrom
dev

Conversation

@matteoettam09
Copy link
Member

@matteoettam09 matteoettam09 commented Feb 26, 2026

Summary by Sourcery

Relax redemption transfer validation and update package metadata and dependencies.

Bug Fixes:

  • Allow zero-amount redemption transfers from authorized vaults to no-op instead of reverting.

Build:

  • Bump protocol package version to 2.0.3 and update @fhevm/solidity dependency to ^0.11.1.

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling in redemption fund transfers by allowing zero-amount operations to complete gracefully instead of raising exceptions.
  • Chores

    • Version bumped from 2.0.2 to 2.0.3.
    • Updated "@fhevm/solidity" dependency from ^0.10.0 to ^0.11.1 for enhanced compatibility and protocol support.

dependabot bot and others added 6 commits February 16, 2026 01:48
Bumps the production-dependencies group with 1 update: [@fhevm/solidity](https://github.com/zama-ai/fhevm).


Updates `@fhevm/solidity` from 0.10.0 to 0.11.0
- [Release notes](https://github.com/zama-ai/fhevm/releases)
- [Commits](zama-ai/fhevm@v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: "@fhevm/solidity"
  dependency-version: 0.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
…ev/production-dependencies-53321bd464

chore(deps): bump @fhevm/solidity from 0.10.0 to 0.11.0 in the production-dependencies group
Bumps the production-dependencies group with 1 update: [@fhevm/solidity](https://github.com/zama-ai/fhevm).


Updates `@fhevm/solidity` from 0.11.0 to 0.11.1
- [Release notes](https://github.com/zama-ai/fhevm/releases)
- [Commits](https://github.com/zama-ai/fhevm/commits)

---
updated-dependencies:
- dependency-name: "@fhevm/solidity"
  dependency-version: 0.11.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
…ev/production-dependencies-1917e71b4e

chore(deps): bump @fhevm/solidity from 0.11.0 to 0.11.1 in the production-dependencies group
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

The pull request updates the package version to 2.0.3 and bumps the "@fhevm/solidity" dependency to ^0.11.1. Additionally, the transferRedemptionFunds function in LiquidityOrchestrator is modified to permit zero-amount transfers as a no-op instead of reverting.

Changes

Cohort / File(s) Summary
Smart Contract Logic
contracts/LiquidityOrchestrator.sol
Modified transferRedemptionFunds to skip zero-amount transfers silently instead of reverting. Authorization check unchanged.
Package Configuration
package.json
Version bump to 2.0.3 and "@fhevm/solidity" dependency upgraded from ^0.10.0 to ^0.11.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A zero slips through without a sound,
No revert, just silence around,
Dependencies leap to heights anew,
Version bumps—the rabbit's mark of true! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Dev' is vague and generic, providing no meaningful information about the actual changes (removal of zero-amount check in transferRedemptionFunds and dependency updates). Replace the title with a descriptive summary of the main changes, such as 'Remove zero-amount check in transferRedemptionFunds and update @fhevm/solidity dependency' or focus on the primary change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contracts/LiquidityOrchestrator.sol`:
- Around line 410-413: Add a unit test for
LiquidityOrchestrator.transferRedemptionFunds that covers the zero-amount no-op
path: from an authorized vault address call transferRedemptionFunds(user, 0) and
assert the call does not revert, the underlyingAsset ERC20 balance of the user
and the orchestrator remain unchanged, and no Transfer (or related) event is
emitted; use the existing authorized vault setup and the contract's
transferRedemptionFunds function name to locate where to call and assert
behavior.

In `@package.json`:
- Line 80: The package.json declares `@fhevm/solidity` at ^0.11.1 which violates
the peer dependency required by `@fhevm/hardhat-plugin`@0.1.0 (which expects
`@fhevm/solidity`@^0.8.0); fix by either downgrading `@fhevm/solidity` to a ^0.8.x
version in package.json or upgrade `@fhevm/hardhat-plugin` to a release that
officially supports ^0.11.1, then update the lockfile (run npm/yarn/pnpm
install) and verify no peer dependency warnings remain for `@fhevm/solidity` and
`@fhevm/hardhat-plugin`.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a92f412 and a4f650d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • contracts/LiquidityOrchestrator.sol
  • package.json

@matteoettam09 matteoettam09 merged commit ebcc096 into main Feb 26, 2026
4 checks passed
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 26, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Allows zero-amount redemption fund transfers without reverting, and updates package metadata and fhevm dependency versions.

Sequence diagram for redemption fund transfer with zero-amount handling

sequenceDiagram
    actor Vault
    participant LiquidityOrchestrator
    participant ERC20Token

    Vault->>LiquidityOrchestrator: transferRedemptionFunds(user, amount)
    LiquidityOrchestrator->>LiquidityOrchestrator: config.isOrionVault(msg.sender)
    alt Caller is not registered vault
        LiquidityOrchestrator-->>Vault: revert ErrorsLib.NotAuthorized
    else Caller is registered vault
        alt amount > 0
            LiquidityOrchestrator->>ERC20Token: safeTransfer(user, amount)
            ERC20Token-->>LiquidityOrchestrator: transfer result
            LiquidityOrchestrator-->>Vault: success
        else amount == 0
            LiquidityOrchestrator-->>Vault: success (no transfer)
        end
    end
Loading

Class diagram for LiquidityOrchestrator transferRedemptionFunds logic

classDiagram
    class LiquidityOrchestrator {
        address underlyingAsset
        Config config
        +transferRedemptionFunds(address user, uint256 amount) external
    }

    class Config {
        +isOrionVault(address caller) bool
    }

    class ErrorsLib {
        +NotAuthorized() error
    }

    class IERC20 {
        +safeTransfer(address to, uint256 amount)
    }

    LiquidityOrchestrator --> Config : uses
    LiquidityOrchestrator --> ErrorsLib : reverts_with
    LiquidityOrchestrator --> IERC20 : transfers_underlyingAsset

    note for LiquidityOrchestrator "transferRedemptionFunds now allows amount == 0 without reverting and only calls IERC20.safeTransfer when amount > 0"
Loading

File-Level Changes

Change Details Files
Adjust redemption fund transfer logic to allow zero-amount operations without reverting.
  • Remove explicit revert on zero transfer amount in redemption flow.
  • Guard token transfer so it only executes when the transfer amount is greater than zero.
contracts/LiquidityOrchestrator.sol
Update package version and fhevm dependency.
  • Bump npm package version from 2.0.2 to 2.0.3.
  • Upgrade @fhevm/solidity dependency from ^0.10.0 to ^0.11.1 and refresh lockfile.
package.json
pnpm-lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Now that transferRedemptionFunds allows amount == 0, consider documenting this behavioral change at the call sites or in the interface to make it clear that zero-amount calls are treated as no-ops rather than input validation errors.
  • With the removal of the AmountMustBeGreaterThanZero revert in transferRedemptionFunds, check whether this custom error is still used elsewhere and remove it if it has become dead code.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Now that `transferRedemptionFunds` allows `amount == 0`, consider documenting this behavioral change at the call sites or in the interface to make it clear that zero-amount calls are treated as no-ops rather than input validation errors.
- With the removal of the `AmountMustBeGreaterThanZero` revert in `transferRedemptionFunds`, check whether this custom error is still used elsewhere and remove it if it has become dead code.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant