Dev#228
Conversation
Bumps the development-dependencies group with 6 updates: | Package | From | To | | --- | --- | --- | | [@nomicfoundation/hardhat-keystore](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-keystore) | `3.0.10` | `3.0.11` | | [@nomicfoundation/hardhat-typechain](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat-typechain) | `3.0.9` | `3.1.0` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.59.4` | `8.60.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.59.4` | `8.60.0` | | [eslint](https://github.com/eslint/eslint) | `10.4.0` | `10.4.1` | | [hardhat](https://github.com/NomicFoundation/hardhat/tree/HEAD/packages/hardhat) | `3.5.1` | `3.7.0` | Updates `@nomicfoundation/hardhat-keystore` from 3.0.10 to 3.0.11 - [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.11/packages/hardhat-keystore) Updates `@nomicfoundation/hardhat-typechain` from 3.0.9 to 3.1.0 - [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.0/packages/hardhat-typechain) Updates `@typescript-eslint/eslint-plugin` from 8.59.4 to 8.60.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.60.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.59.4 to 8.60.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.60.0/packages/parser) Updates `eslint` from 10.4.0 to 10.4.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v10.4.0...v10.4.1) Updates `hardhat` from 3.5.1 to 3.7.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.7.0/packages/hardhat) --- updated-dependencies: - dependency-name: "@nomicfoundation/hardhat-keystore" dependency-version: 3.0.11 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@nomicfoundation/hardhat-typechain" dependency-version: 3.1.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.60.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: "@typescript-eslint/parser" dependency-version: 8.60.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: eslint dependency-version: 10.4.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: hardhat dependency-version: 3.7.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-481020b8cb chore(deps-dev): bump the development-dependencies group with 6 updates
|
Too much diff to scan? Review this PR in Change Stack to start with the highest-impact changes. 📝 WalkthroughWalkthroughConsolidates UUPS contract storage layout and upgrade-timelock placement, removes the deferred redemption-claim queue and related interface items, replaces ERC4626 price calculation with totalAssets/totalSupply precision logic (plus helpers), and adds tests; tooling and CI config bump to v2.4.0. ChangesStorage Layout Consolidation and Redemption Simplification
ERC4626 Price Adapter and Test Coverage
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
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: 5
🤖 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/LiquidityOrchestrator.sol`:
- Around line 122-124: The contract adds/positions variables
(initialEpochBufferAmount, upgradeTimelock, commitmentMinibatchSize,
_partialVaultsHash, _commitmentBatchIndex, and the uint256[47] __gap) that must
preserve exact storage slots from the deployed LiquidityOrchestrator; run a
storage-layout validation (e.g., OpenZeppelin prepareUpgrade/validateUpgrade or
hardhat-storage-layout) comparing the old and new LiquidityOrchestrator
implementations, do not reorder or rename existing state vars, and only reduce
__gap to account for truly new variables; if your repo lacks the validation
wiring, add a scripts/check-storage-layout.ts that performs the diff and enable
the `@openzeppelin/hardhat-upgrades` or hardhat-storage-layout plugin in
hardhat.config.ts so CI/run ensures the slot layout matches before upgrading.
In `@contracts/price/ERC4626PriceAdapter.sol`:
- Around line 94-127: The _effectiveShareDecimals function contains an
unreachable defensive branch checking totalSupply == 0; remove that check and
its early return (the if (totalSupply == 0) { return vaultAssetDecimals; }
block) from ERC4626PriceAdapter/_effectiveShareDecimals since totalSupply is
already validated by the caller, leaving the rest of the logic intact; ensure no
other callers rely on that early return and run tests to confirm behavior
unchanged.
- Around line 132-146: The function _decimalDigits currently shadows the named
return variable `uint8 digits` by redeclaring `uint8 digits = 1;`; fix this by
removing the local declaration and assigning to the named return (i.e., change
the local `uint8 digits = 1;` to `digits = 1;`) so the function uses a single
`digits` identifier throughout and eliminates the shadowing warning.
In `@contracts/test/TestFixedRatioERC4626.sol`:
- Around line 39-41: convertToAssets uses unchecked multiplication which can
overflow; change it to use OpenZeppelin's Math.mulDiv for safe mul-div
arithmetic: import OpenZeppelin's Math library and replace the body of function
convertToAssets(uint256 shares) in TestFixedRatioERC4626 with a call to
Math.mulDiv(shares, _fixedTotalAssets, _fixedTotalSupply) (ensuring the Math
import is added at the top of the file).
In `@contracts/vaults/OrionVault.sol`:
- Around line 657-658: fulfillRedeem currently pays each user inline via
liquidityOrchestrator.transferRedemptionFunds which calls
IERC20(underlyingAsset).safeTransfer and will revert the entire batch if any
single transfer fails; change the flow so failures are isolated: update
LiquidityOrchestrator.transferRedemptionFunds (or add a new
safeTransferWithoutRevert method) to perform a low-level transfer call that
returns a success boolean instead of using safeTransfer, and have fulfillRedeem
handle a failed transfer by recording a retryable pending claim (e.g., push into
a _pendingRedemptions or emit a RedeemFailed event with user and amount) while
continuing to process the rest of the users from _redeemRequests; keep the
existing emit Redeem for successful payments and ensure any new pending storage
or event uses clear identifiers so pending claims can be retried later.
🪄 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: abea20f3-9955-4380-b7d3-46b6d885dd40
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (12)
contracts/LiquidityOrchestrator.solcontracts/OrionConfig.solcontracts/factories/TransparentVaultFactory.solcontracts/interfaces/IOrionVault.solcontracts/price/ERC4626PriceAdapter.solcontracts/price/PriceAdapterRegistry.solcontracts/test/TestFixedRatioERC4626.solcontracts/vaults/OrionVault.solpackage.jsontest/PriceAdapterTruncation.test.tstest/crossAsset/ERC4626PriceAdapter.test.tstest/crossAsset/ERC4626PriceAdapterHighSupply.test.ts
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
package.json (1)
100-100: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winRemove obsolete
ignoreMissingentry if@nomicfoundation/hardhat-verifyis removed.If
@nomicfoundation/hardhat-verifyis removed fromdevDependencies(as indicated by the AI summary), this entry inpeerDependencyRules.ignoreMissingshould also be removed to avoid stale configuration.♻️ Proposed fix
"peerDependencyRules": { "ignoreMissing": [ "`@nomicfoundation/hardhat-ethers`", - "`@nomicfoundation/hardhat-verify`", "`@nomicfoundation/hardhat-network-helpers`" ],🤖 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 `@package.json` at line 100, Remove the stale peerDependencyRules.ignoreMissing entry that references "`@nomicfoundation/hardhat-verify`" from package.json: locate the peerDependencyRules.ignoreMissing array and delete the string "`@nomicfoundation/hardhat-verify`" (or remove the entire ignoreMissing property if it becomes empty) so the configuration no longer references the removed devDependency.contracts/price/ERC4626PriceAdapter.sol (1)
70-84:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winReturn the added share precision in
priceDecimals.Line 71 bakes
effectiveShareDecimals - vaultAssetDecimalsextra digits intovaultUnderlyingAssetAmount, but Lines 75 and 84 still return the old decimal count.PriceAdapterRegistry.getPricenormalizes only frompriceDecimals, so any vault that takes the high-precision branch is overpriced downstream by that same factor. A vfUSDC-like+6adjustment becomes a1e6price inflation at the registry boundary.♻️ Minimal fix
uint8 effectiveShareDecimals = _effectiveShareDecimals(totalAssets, totalSupply, vaultAssetDecimals); + uint8 scaleAdjustment = effectiveShareDecimals - vaultAssetDecimals; uint256 precisionAmount = 10 ** (PRICE_DECIMALS + effectiveShareDecimals); uint256 vaultUnderlyingAssetAmount = Math.mulDiv(totalAssets, precisionAmount, totalSupply); if (vaultUnderlying == address(UNDERLYING_ASSET)) { - return (vaultUnderlyingAssetAmount, PRICE_DECIMALS + UNDERLYING_ASSET_DECIMALS); + return (vaultUnderlyingAssetAmount, PRICE_DECIMALS + UNDERLYING_ASSET_DECIMALS + scaleAdjustment); } @@ - return (vaultPrice, PRICE_DECIMALS + CONFIG.getTokenDecimals(vaultUnderlying)); + return (vaultPrice, PRICE_DECIMALS + CONFIG.getTokenDecimals(vaultUnderlying) + scaleAdjustment);🤖 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/price/ERC4626PriceAdapter.sol` around lines 70 - 84, The function multiplies totalAssets by precisionAmount that includes effectiveShareDecimals, but the returned priceDecimals still use the old vaultAssetDecimals; update both return paths to include the extra share precision: for the short-circuit (vaultUnderlying == UNDERLYING_ASSET) return PRICE_DECIMALS + effectiveShareDecimals (not PRICE_DECIMALS + UNDERLYING_ASSET_DECIMALS), and for the other branch add the delta (effectiveShareDecimals - vaultAssetDecimals) to the returned decimals (i.e. return PRICE_DECIMALS + CONFIG.getTokenDecimals(vaultUnderlying) + (effectiveShareDecimals - vaultAssetDecimals)); keep using the computed vaultUnderlyingAssetAmount and vaultPrice as-is.
🤖 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 `@package.json`:
- Line 49: The package.json still lists the `@nomicfoundation/hardhat-verify`
entry in devDependencies and inside pnpm.peerDependencyRules.ignoreMissing even
though hardhat.config.ts no longer uses the plugin; either remove the
"`@nomicfoundation/hardhat-verify`" entry from devDependencies and delete it from
the pnpm.peerDependencyRules.ignoreMissing array, or if you intend to keep the
dependency, update the PR description to state that the plugin remains; search
for the literal "`@nomicfoundation/hardhat-verify`" in the package.json to locate
and update both occurrences.
---
Outside diff comments:
In `@contracts/price/ERC4626PriceAdapter.sol`:
- Around line 70-84: The function multiplies totalAssets by precisionAmount that
includes effectiveShareDecimals, but the returned priceDecimals still use the
old vaultAssetDecimals; update both return paths to include the extra share
precision: for the short-circuit (vaultUnderlying == UNDERLYING_ASSET) return
PRICE_DECIMALS + effectiveShareDecimals (not PRICE_DECIMALS +
UNDERLYING_ASSET_DECIMALS), and for the other branch add the delta
(effectiveShareDecimals - vaultAssetDecimals) to the returned decimals (i.e.
return PRICE_DECIMALS + CONFIG.getTokenDecimals(vaultUnderlying) +
(effectiveShareDecimals - vaultAssetDecimals)); keep using the computed
vaultUnderlyingAssetAmount and vaultPrice as-is.
In `@package.json`:
- Line 100: Remove the stale peerDependencyRules.ignoreMissing entry that
references "`@nomicfoundation/hardhat-verify`" from package.json: locate the
peerDependencyRules.ignoreMissing array and delete the string
"`@nomicfoundation/hardhat-verify`" (or remove the entire ignoreMissing property
if it becomes empty) so the configuration no longer references the removed
devDependency.
🪄 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: 1e6df322-2afc-45d2-be06-8a08a05553d0
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
contracts/price/ERC4626PriceAdapter.solcontracts/test/TestFixedRatioERC4626.solpackage.json
There was a problem hiding this comment.
♻️ Duplicate comments (1)
package.json (1)
49-49:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove leftover
hardhat-verifymetadata to match the verify-tooling removal.
@nomicfoundation/hardhat-verifyis still retained indevDependencies,pnpm.overrides, andpeerDependencyRules.ignoreMissingeven though verification wiring is removed from CI and Hardhat config. This leaves stale tooling and unnecessary dependency surface.Suggested minimal cleanup
"devDependencies": { @@ - "`@nomicfoundation/hardhat-verify`": "3.0.18", @@ "pnpm": { "overrides": { - "`@nomicfoundation/hardhat-verify`": "3.0.18", "`@openzeppelin/contracts-upgradeable`@>=4.3.0 <4.8.3": "^4.9.6", @@ "peerDependencyRules": { "ignoreMissing": [ "`@nomicfoundation/hardhat-ethers`", - "`@nomicfoundation/hardhat-verify`", "`@nomicfoundation/hardhat-network-helpers`" ],Also applies to: 92-92, 101-101
🤖 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 `@package.json` at line 49, Remove all leftover references to the removed verify tooling by deleting the `@nomicfoundation/hardhat-verify` entry from devDependencies and removing any matching keys from pnpm.overrides and the peerDependencyRules.ignoreMissing array in package.json; search for the string "`@nomicfoundation/hardhat-verify`" and remove each occurrence so package.json no longer lists that package or ignores it as missing, then run the package manager's install/lock update to regenerate lockfiles.
🤖 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.
Duplicate comments:
In `@package.json`:
- Line 49: Remove all leftover references to the removed verify tooling by
deleting the `@nomicfoundation/hardhat-verify` entry from devDependencies and
removing any matching keys from pnpm.overrides and the
peerDependencyRules.ignoreMissing array in package.json; search for the string
"`@nomicfoundation/hardhat-verify`" and remove each occurrence so package.json no
longer lists that package or ignores it as missing, then run the package
manager's install/lock update to regenerate lockfiles.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2409faf3-e2ae-4404-9d1c-22cb134ab14f
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
package.json
Summary by CodeRabbit
Bug Fixes
Breaking Changes
Chores
Tests