Skip to content

Dev - #242

Merged
matteoettam09 merged 14 commits into
mainfrom
dev
Jul 18, 2026
Merged

Dev#242
matteoettam09 merged 14 commits into
mainfrom
dev

Conversation

@matteoettam09

@matteoettam09 matteoettam09 commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added BuyingLeg entry-buffer snapshot (buyingLegEntryBuffer) for improved epoch accounting.
  • Updates
    • Renamed token-decimals config getter to tokenDecimals (removed getTokenDecimals), and updated vault adapters/pricing accordingly.
    • Deposit eligibility checks now accept request-specific call data in access-control flows.
  • Bug Fixes
    • Improved epoch-end gating and finalization after vault operations, including minibatch progression edge cases.
  • Tests
    • Added epoch-end transition coverage and updated adapter/decimals validation expectations.

dependabot Bot and others added 13 commits June 22, 2026 01:43
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ectory with 10 updates

Bumps the development-dependencies group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@nomicfoundation/hardhat-verify](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-verify) | `3.0.19` | `3.0.20` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.9.2` | `26.0.0` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.60.1` | `8.61.1` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.60.1` | `8.61.1` |
| [@zama-fhe/relayer-sdk](https://github.com/zama-ai/relayer-sdk) | `0.4.3` | `0.4.4` |
| [eslint](https://github.com/eslint/eslint) | `10.4.1` | `10.5.0` |
| [ethers](https://github.com/ethers-io/ethers.js) | `6.16.0` | `6.17.0` |
| [hardhat](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat) | `3.8.0` | `3.9.0` |
| [prettier](https://github.com/prettier/prettier) | `3.8.3` | `3.8.4` |
| [solhint](https://github.com/protofire/solhint) | `6.2.1` | `6.2.3` |



Updates `@nomicfoundation/hardhat-verify` from 3.0.19 to 3.0.20
- [Release notes](https://github.com/NomicFoundation/hardhat/releases)
- [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-verify/CHANGELOG.md)
- [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-verify@3.0.20/packages/hardhat-verify)

Updates `@types/node` from 25.9.2 to 26.0.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.60.1 to 8.61.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.61.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.60.1 to 8.61.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.61.1/packages/parser)

Updates `@zama-fhe/relayer-sdk` from 0.4.3 to 0.4.4
- [Release notes](https://github.com/zama-ai/relayer-sdk/releases)
- [Commits](zama-ai/relayer-sdk@v0.4.3...v0.4.4)

Updates `eslint` from 10.4.1 to 10.5.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v10.4.1...v10.5.0)

Updates `ethers` from 6.16.0 to 6.17.0
- [Release notes](https://github.com/ethers-io/ethers.js/releases)
- [Changelog](https://github.com/ethers-io/ethers.js/blob/main/CHANGELOG.md)
- [Commits](ethers-io/ethers.js@v6.16.0...v6.17.0)

Updates `hardhat` from 3.8.0 to 3.9.0
- [Release notes](https://github.com/NomicFoundation/hardhat/releases)
- [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat/CHANGELOG.md)
- [Commits](https://github.com/NomicFoundation/hardhat/commits/hardhat@3.9.0/packages/hardhat)

Updates `prettier` from 3.8.3 to 3.8.4
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.8.3...3.8.4)

Updates `solhint` from 6.2.1 to 6.2.3
- [Release notes](https://github.com/protofire/solhint/releases)
- [Changelog](https://github.com/protofire/solhint/blob/develop/CHANGELOG.md)
- [Commits](protofire/solhint@v6.2.1...v6.2.3)

---
updated-dependencies:
- dependency-name: "@nomicfoundation/hardhat-verify"
  dependency-version: 3.0.20
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: "@types/node"
  dependency-version: 26.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.61.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.61.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: "@zama-fhe/relayer-sdk"
  dependency-version: 0.4.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: eslint
  dependency-version: 10.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: ethers
  dependency-version: 6.17.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: hardhat
  dependency-version: 3.9.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: prettier
  dependency-version: 3.8.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: solhint
  dependency-version: 6.2.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
…/dev/actions/checkout-7

chore(deps): bump actions/checkout from 6 to 7
…ev/development-dependencies-8848b43d5e

chore(deps-dev): bump the development-dependencies group across 1 directory with 10 updates
Bumps the development-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.0.0` | `26.0.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.61.1` | `8.62.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.61.1` | `8.62.0` |
| [eslint](https://github.com/eslint/eslint) | `10.5.0` | `10.6.0` |
| [prettier](https://github.com/prettier/prettier) | `3.8.4` | `3.9.1` |


Updates `@types/node` from 26.0.0 to 26.0.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.61.1 to 8.62.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.62.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.61.1 to 8.62.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.62.0/packages/parser)

Updates `eslint` from 10.5.0 to 10.6.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v10.5.0...v10.6.0)

Updates `prettier` from 3.8.4 to 3.9.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.8.4...3.9.1)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.62.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.62.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: eslint
  dependency-version: 10.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: prettier
  dependency-version: 3.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
…ev/development-dependencies-6c9e4a0181

chore(deps-dev): bump the development-dependencies group with 5 updates
Snapshot bufferAmount after sell→buy bufferIncrease apply so proofs can
partition dust against the post-sell buffer. Appended at end of storage
and shrink __gap 46→45 for UUPS upgrade compatibility.
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 082b5bf1-ca03-4cf3-8beb-9dd4463211ac

📥 Commits

Reviewing files that changed from the base of the PR and between d7654ba and efccb99.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The PR updates LiquidityOrchestrator epoch accounting and finalization, renames the token-decimals accessor, passes deposit calldata to access control, adds epoch-end tests, and updates package and CI tooling.

Changes

Protocol behavior

Layer / File(s) Summary
Orchestrator epoch transitions
contracts/LiquidityOrchestrator.sol, contracts/interfaces/ILiquidityOrchestrator.sol, contracts/test/LiquidityOrchestratorHarness.sol, test/LiquidityOrchestratorEpochEnd.test.ts
BuyingLeg buffer accounting is added, epoch finalization is gated on Idle, and tests cover completion, intermediate minibatches, and index wrapping.
Token-decimal accessor migration
contracts/interfaces/IOrionConfig.sol, contracts/OrionConfig.sol, contracts/execution/..., contracts/price/..., contracts/test/..., test/crossAsset/...
The decimals accessor is renamed to tokenDecimals, with adapters, mocks, and cross-asset tests updated.
Deposit access-control context
contracts/interfaces/IOrionAccessControl.sol, contracts/access_controllers/WhitelistAccessControl.sol, contracts/vaults/OrionVault.sol
Deposit authorization accepts request data, and both vault checks pass msg.data.

Tooling updates

Layer / File(s) Summary
Package and workspace configuration
package.json, pnpm-workspace.yaml
Package metadata and development tools are updated, pnpm is pinned, and workspace dependency rules are added.
CI checkout actions
.github/workflows/ci.yml
Checkout is upgraded from v6 to v7 in three jobs, and explicit pnpm action versions are removed.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UpkeepCaller
  participant LiquidityOrchestrator
  participant VaultOperations
  participant EpochState
  participant EventsLib
  UpkeepCaller->>LiquidityOrchestrator: performUpkeep
  LiquidityOrchestrator->>VaultOperations: process vault-operation minibatch
  VaultOperations->>EpochState: advance minibatch and phase
  EpochState-->>LiquidityOrchestrator: transition to Idle
  LiquidityOrchestrator->>EventsLib: emit EpochEnd
Loading

Possibly related PRs

Poem

A bunny tracks the buffer bright,
Through selling’s dusk to buying’s light.
Minibatches hop, then epochs end,
With calldata carried round the bend.
New tools keep CI spry and neat!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is generic and doesn't describe the actual changes in the pull request. Replace it with a concise summary of the main change, such as the key contract, config, or test update.
✅ Passed checks (4 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.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 16: Update all three actions/checkout uses in the CI workflow to
reference the same appropriate full immutable commit SHA instead of the movable
v7 tag, including the checkout steps near lines 16, 71, and 112.

In `@contracts/price/ERC4626PriceAdapter.sol`:
- Line 67: Update the zero-supply return in the ERC4626 price calculation to use
the same immutable underlying-token decimals as the non-empty path, rather than
CONFIG.tokenDecimals(vaultUnderlying). Preserve the existing PRICE_DECIMALS
offset and zero-supply behavior.

In `@contracts/test/LiquidityOrchestratorHarness.sol`:
- Around line 92-96: Do not simulate an impossible uint8 cursor wrap. In
contracts/test/LiquidityOrchestratorHarness.sol lines 92-96, remove the
unchecked increment and either enforce the production batch limit or widen the
cursor consistently with production. In
test/LiquidityOrchestratorEpochEnd.test.ts lines 190-204, replace the wrap
assertion with coverage proving the selected batch-limit or widened-cursor
behavior, while preserving the production behavior implemented around the
LiquidityOrchestrator cursor increment.

In `@package.json`:
- Line 90: Update the pnpm/action-setup configuration in all three jobs within
ci.yml to honor the packageManager pnpm 11.10.0 pin: either remove each explicit
version setting or change all three to the matching pnpm 11.10.0 version,
keeping the repository and CI versions consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d2e54a95-2c7a-45f0-827d-ce292314bf8b

📥 Commits

Reviewing files that changed from the base of the PR and between 0737f0d and d7654ba.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (20)
  • .github/workflows/ci.yml
  • contracts/LiquidityOrchestrator.sol
  • contracts/OrionConfig.sol
  • contracts/access_controllers/WhitelistAccessControl.sol
  • contracts/execution/ERC4626ExecutionAdapter.sol
  • contracts/interfaces/ILiquidityOrchestrator.sol
  • contracts/interfaces/IOrionAccessControl.sol
  • contracts/interfaces/IOrionConfig.sol
  • contracts/price/ERC4626PriceAdapter.sol
  • contracts/test/LiquidityOrchestratorHarness.sol
  • contracts/test/MockERC4626PriceAdapter.sol
  • contracts/test/MockOrionConfig.sol
  • contracts/vaults/OrionVault.sol
  • package.json
  • pnpm-workspace.yaml
  • test/LiquidityOrchestratorEpochEnd.test.ts
  • test/crossAsset/ERC4626ExecutionAdapter.atomic.test.ts
  • test/crossAsset/ERC4626ExecutionAdapter.test.ts
  • test/crossAsset/ERC4626PriceAdapter.test.ts
  • test/crossAsset/MorphoBlueSupplyVault.test.ts
💤 Files with no reviewable changes (2)
  • test/crossAsset/ERC4626ExecutionAdapter.atomic.test.ts
  • contracts/OrionConfig.sol

Comment thread .github/workflows/ci.yml
Comment thread contracts/price/ERC4626PriceAdapter.sol
Comment thread contracts/test/LiquidityOrchestratorHarness.sol
Comment thread package.json
@matteoettam09
matteoettam09 merged commit 1ebeba5 into main Jul 18, 2026
4 checks passed
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