Dev#231
Conversation
Bumps the development-dependencies group with 15 updates: | Package | From | To | | --- | --- | --- | | [@nomicfoundation/hardhat-ethers](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-ethers) | `4.0.12` | `4.0.13` | | [@nomicfoundation/hardhat-ethers-chai-matchers](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-ethers-chai-matchers) | `3.0.9` | `3.0.10` | | [@nomicfoundation/hardhat-ignition](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-ignition) | `3.1.6` | `3.1.7` | | [@nomicfoundation/hardhat-ignition-ethers](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-ignition-ethers) | `3.1.5` | `3.1.6` | | [@nomicfoundation/hardhat-keystore](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-keystore) | `3.0.11` | `3.0.12` | | [@nomicfoundation/hardhat-mocha](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-mocha) | `3.0.20` | `3.0.21` | | [@nomicfoundation/hardhat-network-helpers](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-network-helpers) | `3.0.9` | `3.0.10` | | [@nomicfoundation/hardhat-toolbox-mocha-ethers](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-toolbox-mocha-ethers) | `3.0.6` | `3.0.7` | | [@nomicfoundation/hardhat-typechain](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-typechain) | `3.1.0` | `3.1.1` | | [@nomicfoundation/hardhat-verify](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-verify) | `3.0.18` | `3.0.19` | | [@nomicfoundation/ignition-core](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/ignition-core) | `3.1.6` | `3.1.7` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.9.1` | `25.9.2` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.60.0` | `8.60.1` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.60.0` | `8.60.1` | | [hardhat](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat) | `3.7.0` | `3.8.0` | Updates `@nomicfoundation/hardhat-ethers` from 4.0.12 to 4.0.13 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-ethers/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-ethers@4.0.13/packages/hardhat-ethers) Updates `@nomicfoundation/hardhat-ethers-chai-matchers` from 3.0.9 to 3.0.10 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-ethers-chai-matchers/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-ethers-chai-matchers@3.0.10/packages/hardhat-ethers-chai-matchers) Updates `@nomicfoundation/hardhat-ignition` from 3.1.6 to 3.1.7 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-ignition/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-ignition@3.1.7/packages/hardhat-ignition) Updates `@nomicfoundation/hardhat-ignition-ethers` from 3.1.5 to 3.1.6 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-ignition-ethers/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-ignition-ethers@3.1.6/packages/hardhat-ignition-ethers) Updates `@nomicfoundation/hardhat-keystore` from 3.0.11 to 3.0.12 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-keystore/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-keystore@3.0.12/packages/hardhat-keystore) Updates `@nomicfoundation/hardhat-mocha` from 3.0.20 to 3.0.21 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-mocha/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-mocha@3.0.21/packages/hardhat-mocha) Updates `@nomicfoundation/hardhat-network-helpers` from 3.0.9 to 3.0.10 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-network-helpers/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-network-helpers@3.0.10/packages/hardhat-network-helpers) Updates `@nomicfoundation/hardhat-toolbox-mocha-ethers` from 3.0.6 to 3.0.7 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-toolbox-mocha-ethers/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-toolbox-mocha-ethers@3.0.7/packages/hardhat-toolbox-mocha-ethers) Updates `@nomicfoundation/hardhat-typechain` from 3.1.0 to 3.1.1 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-typechain/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/hardhat-typechain@3.1.1/packages/hardhat-typechain) Updates `@nomicfoundation/hardhat-verify` from 3.0.18 to 3.0.19 - [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.19/packages/hardhat-verify) Updates `@nomicfoundation/ignition-core` from 3.1.6 to 3.1.7 - [Release notes](https://github.com/NomicFoundation/hardhat/releases) - [Changelog](https://github.com/NomicFoundation/hardhat/blob/main/packages/ignition-core/CHANGELOG.md) - [Commits](https://github.com/NomicFoundation/hardhat/commits/@nomicfoundation/ignition-core@3.1.7/packages/ignition-core) Updates `@types/node` from 25.9.1 to 25.9.2 - [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.0 to 8.60.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.60.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.60.0 to 8.60.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.60.1/packages/parser) Updates `hardhat` from 3.7.0 to 3.8.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.8.0/packages/hardhat) --- updated-dependencies: - dependency-name: "@nomicfoundation/hardhat-ethers" dependency-version: 4.0.13 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-ethers-chai-matchers" dependency-version: 3.0.10 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-ignition" dependency-version: 3.1.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-ignition-ethers" dependency-version: 3.1.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-keystore" dependency-version: 3.0.12 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-mocha" dependency-version: 3.0.21 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-network-helpers" dependency-version: 3.0.10 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-toolbox-mocha-ethers" dependency-version: 3.0.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-typechain" dependency-version: 3.1.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-verify" dependency-version: 3.0.19 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/ignition-core" dependency-version: 3.1.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@types/node" dependency-version: 25.9.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.60.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@typescript-eslint/parser" dependency-version: 8.60.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: hardhat dependency-version: 3.8.0 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-7a84da9158 chore(deps-dev): bump the development-dependencies group with 15 updates
…d overwrite in zkVM with brittle no-op entries definition.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughLiquidityOrchestrator adds a resume cursor to track progress within sell/buy minibatch windows, refactors minibatch execution into a unified resumable handler with failure recording, extends VaultState with a processRedeem flag to conditionally gate redeem fulfillment per vault, relaxes configuration constraints for mid-epoch maintenance, removes test mock contracts, and bumps package version to 2.5.0 with updated dependencies. ChangesResume Cursor & Conditional Redeem Fulfillment
Configuration, Maintenance, & Cleanup
Sequence DiagramsequenceDiagram
participant Caller as Upkeep Caller
participant Orchestrator as LiquidityOrchestrator
participant MinibatchLeg as _processMinibatchLeg
participant Finalize as _finalizeMinibatchLeg
participant VaultOps as _processSingleVaultOperations
Caller->>Orchestrator: continueUpkeepEpoch()
Orchestrator->>MinibatchLeg: _processMinibatchSell/Buy(leg)
MinibatchLeg->>MinibatchLeg: compute window [currentIndex + completedInCurrentMinibatch, endIndex]
loop for each token in window
MinibatchLeg->>MinibatchLeg: execute swap/transfer
alt success
MinibatchLeg->>MinibatchLeg: completedInCurrentMinibatch++
else failure
MinibatchLeg->>MinibatchLeg: record failed token, refresh commitment
end
end
alt leg complete
Orchestrator->>Finalize: _finalizeMinibatchLeg()
Finalize->>Orchestrator: advance phase, accrue buy fees
end
Orchestrator->>VaultOps: _processSingleVaultOperations(vault, processRedeem=true/false, ...)
alt processRedeem && pendingRedeem > 0
VaultOps->>VaultOps: fulfill redemptions
else
VaultOps->>VaultOps: skip redeem (deposit unaffected)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
contracts/LiquidityOrchestrator.sol (1)
477-480:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winSeed
bufferAmountonly on the first entry into the sell leg.If minibatch 0 partially succeeds and a later slot fails,
completedInCurrentMinibatchpreserves the resume point, but this block overwritesbufferAmountagain on the retry. That drops the realized execution delta from the already-filled slots and leaves the persisted buffer accounting behind the actual balances.Suggested fix
- if (currentMinibatchIndex == 0) { + if (currentMinibatchIndex == 0 && completedInCurrentMinibatch == 0) { bufferAmount = states.bufferAmount; _pendingEpochProtocolFees = states.epochProtocolFees; }🤖 Prompt for 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. In `@contracts/LiquidityOrchestrator.sol` around lines 477 - 480, The code currently re-seeds bufferAmount (and _pendingEpochProtocolFees) whenever currentMinibatchIndex == 0, which can overwrite already-realized execution deltas on retry; change the guard so these values are initialized only when entering the sell leg for the first time by requiring completedInCurrentMinibatch == 0 as well (i.e., use if (currentMinibatchIndex == 0 && completedInCurrentMinibatch == 0) before assigning bufferAmount = states.bufferAmount and _pendingEpochProtocolFees = states.epochProtocolFees) so resumed retries do not reset persisted buffer accounting.
🤖 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 `@contracts/test/ConfigurableExecutionAdapter.sol`:
- Around line 49-60: The buy function currently only pulls UNDERLYING from the
caller and returns buyReturnAmount but never sends the purchased asset back;
update the buy implementation (function buy, variables UNDERLYING,
buyReturnAmount, buyCallCount, buyShouldRevert) to transfer the purchased asset
to the caller before returning — e.g., after taking allowance but before
returning executionUnderlyingAmount, call the token transfer for the purchased
asset (use the same SafeERC20 helpers used elsewhere, e.g.
IERC20(asset).safeTransfer(msg.sender, buyReturnAmount)) and ensure the contract
holds enough of the asset to cover the transfer.
In `@package.json`:
- Around line 40-50: The project is pulling Hardhat v2 via the
`@openzeppelin/hardhat-upgrades` package; update or replace that package so the
dependency graph resolves only Hardhat v3. Specifically, either upgrade
"`@openzeppelin/hardhat-upgrades`" to a Hardhat-3-compatible release (or switch to
an alternative upgrades plugin that supports Hardhat 3) in package.json, remove
any pinned/override entries that force hardhat@2, then regenerate the lockfile
(pnpm install) and confirm via the lockfile that no package (e.g.,
"`@openzeppelin/hardhat-upgrades`") still resolves hardhat@2.28.6; run the repo's
test/CI to ensure everything works with hardhat@3.x.
In `@test/StatesStruct.test.ts`:
- Line 18: The tests import STATES_STRUCT_TYPE from
../scripts/decode-states-struct but that module/file doesn't exist; create a
module that exports STATES_STRUCT_TYPE (or update the import to point to the
correct existing module). Locate the failing import in test/StatesStruct.test.ts
referencing STATES_STRUCT_TYPE and either (a) add a new
scripts/decode-states-struct.ts that exports the expected constant/type
(matching the shape used by the tests), or (b) change the import to the actual
module that defines the states struct; ensure the exported identifier name is
exactly STATES_STRUCT_TYPE so the test import resolves.
---
Outside diff comments:
In `@contracts/LiquidityOrchestrator.sol`:
- Around line 477-480: The code currently re-seeds bufferAmount (and
_pendingEpochProtocolFees) whenever currentMinibatchIndex == 0, which can
overwrite already-realized execution deltas on retry; change the guard so these
values are initialized only when entering the sell leg for the first time by
requiring completedInCurrentMinibatch == 0 as well (i.e., use if
(currentMinibatchIndex == 0 && completedInCurrentMinibatch == 0) before
assigning bufferAmount = states.bufferAmount and _pendingEpochProtocolFees =
states.epochProtocolFees) so resumed retries do not reset persisted buffer
accounting.
🪄 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: 4671ed97-bc0c-424d-9e67-e3d469629fc8
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
contracts/LiquidityOrchestrator.solcontracts/interfaces/ILiquidityOrchestrator.solcontracts/test/ConfigurableExecutionAdapter.solcontracts/test/LiquidityOrchestratorHarness.solpackage.jsontest/StatesStruct.test.tstest/VaultDecommissioning.test.ts
Summary by CodeRabbit
New Features
Chores