Skip to content

Update dependencies#21

Open
tsudmi wants to merge 3 commits intomainfrom
update-dependencies
Open

Update dependencies#21
tsudmi wants to merge 3 commits intomainfrom
update-dependencies

Conversation

@tsudmi
Copy link
Member

@tsudmi tsudmi commented Feb 10, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 10, 2026 09:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates repository dependencies and remappings, and applies formatting/refactors to align with the new dependency setup.

Changes:

  • Moved Forge remappings from remappings.txt into foundry.toml and updated submodule pins/branches.
  • Relocated helper contracts under src/helpers/ and updated imports in tests and deployment scripts.
  • Replaced some upgradeable OZ utilities with non-upgradeable/transient variants and reformatted many function signatures/calls.

Reviewed changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/VaultUserLtvTracker.t.sol Updates import path to the helper location.
test/StakeHelpers.t.sol Updates import path; formatting changes to literals/struct inits.
test/EthAaveLeverageStrategy.t.sol Formatting-only changes to call/struct formatting.
test/BoostHelpers.t.sol Updates import path; formatting changes to struct inits.
src/mocks/ComposableCowMock.sol Formatting-only changes to function/constructor signatures.
src/mocks/BalancerVaultMock.sol Formatting-only changes to constructor signature.
src/mocks/AaveMock.sol Formatting-only changes to signatures.
src/leverage/interfaces/ILeverageStrategy.sol Formatting-only changes to interface signatures.
src/leverage/LeverageStrategy.sol Formatting-only changes to signatures/call layout (incl. try/catch formatting).
src/leverage/GnoAaveLeverageStrategy.sol Formatting-only changes to proxy execute calls and function signature layout.
src/leverage/EthAaveLeverageStrategy.sol Formatting-only changes to proxy execute calls and function signature layout.
src/leverage/AaveLeverageStrategy.sol Formatting-only changes to signatures and proxy execute call layout.
src/interfaces/IStrategyProxy.sol Formatting-only changes to interface signatures.
src/interfaces/IStrategiesRegistry.sol Formatting-only changes to interface signatures.
src/interfaces/IMerkleDistributor.sol Formatting-only changes to interface signatures.
src/helpers/interfaces/IBoostHelpers.sol Fixes relative import path and formats signature.
src/helpers/VaultUserLtvTracker.sol Formatting-only changes to constructor signature.
src/helpers/StakeHelpers.sol Formatting-only changes to constructor signature.
src/helpers/BoostHelpers.sol Fixes relative import paths after helpers move; minor formatting.
src/converters/interfaces/IComposableCow.sol Formatting-only changes to interface signature.
src/converters/interfaces/IBaseTokensConverter.sol Formatting-only changes to interface signature.
src/converters/BaseTokensConverter.sol Switches reentrancy guard implementation and removes reentrancy init; formatting.
src/StrategyProxy.sol Switches OZ imports and reentrancy guard implementation; formats signatures.
src/StrategiesRegistry.sol Formatting-only changes to function signatures.
src/OsTokenVaultEscrowAuth.sol Formatting-only changes to constructor/function signature.
src/MerkleDistributor.sol Formats function signature and proof verification if-statement layout.
snapshots/StrategiesRegistryTest.json Updates gas snapshot values.
snapshots/MerkleDistributorTest.json Updates gas snapshot values.
snapshots/EthAaveLeverageStrategyTest.json Updates gas snapshot values.
script/DeployVaultUserLtvTracker.s.sol Updates import path to the helper location.
script/DeployStakeHelpers.s.sol Updates import path and formats constructor invocation.
script/DeployAaveBoostHelpers.s.sol Updates import path to the helper location.
remappings.txt Removed in favor of foundry.toml remappings.
lib/v3-core Updates submodule commit pin.
lib/openzeppelin-contracts-upgradeable Updates submodule commit pin.
lib/forge-std Updates submodule commit pin.
lib/composable-cow Updates submodule commit pin.
lib/aave-v3-origin Updates submodule commit pin.
foundry.toml Adds explicit remappings array.
CLAUDE.md Adds repo guidance documentation for Claude tooling.
.gitmodules Updates submodule branch tracking metadata.
.claude/settings.json Adds Claude hook to auto-run forge fmt on edits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* @notice Defines common functionality for converting tokens to asset token (e.g. ETH/GNO) and returning them to the Vault
*/
abstract contract BaseTokensConverter is Initializable, ReentrancyGuardUpgradeable, Multicall, IBaseTokensConverter {
abstract contract BaseTokensConverter is Initializable, ReentrancyGuardTransient, Multicall, IBaseTokensConverter {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Replacing ReentrancyGuardUpgradeable with ReentrancyGuardTransient changes inherited storage layout (upgradeable guard has storage; transient guard typically does not). If any concrete converter inheriting BaseTokensConverter is deployed behind a proxy and upgraded in-place, this can cause storage collisions and corrupt state. Safer options: keep ReentrancyGuardUpgradeable for upgradeable deployments, or only use ReentrancyGuardTransient in contracts that are never upgraded / always freshly deployed, and explicitly preserve layout (e.g., reserve the old storage slot(s)) in an upgrade-safe way.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +47
constructor(
address composableCoW,
address swapOrderHandler,
address assetToken,
address relayer
) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Replacing ReentrancyGuardUpgradeable with ReentrancyGuardTransient changes inherited storage layout (upgradeable guard has storage; transient guard typically does not). If any concrete converter inheriting BaseTokensConverter is deployed behind a proxy and upgraded in-place, this can cause storage collisions and corrupt state. Safer options: keep ReentrancyGuardUpgradeable for upgradeable deployments, or only use ReentrancyGuardTransient in contracts that are never upgraded / always freshly deployed, and explicitly preserve layout (e.g., reserve the old storage slot(s)) in an upgrade-safe way.

Copilot uses AI. Check for mistakes.
Comment on lines +113 to +116
function isValidSignature(
bytes32 _hash,
bytes memory signature
) public view returns (bytes4) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Replacing ReentrancyGuardUpgradeable with ReentrancyGuardTransient changes inherited storage layout (upgradeable guard has storage; transient guard typically does not). If any concrete converter inheriting BaseTokensConverter is deployed behind a proxy and upgraded in-place, this can cause storage collisions and corrupt state. Safer options: keep ReentrancyGuardUpgradeable for upgradeable deployments, or only use ReentrancyGuardTransient in contracts that are never upgraded / always freshly deployed, and explicitly preserve layout (e.g., reserve the old storage slot(s)) in an upgrade-safe way.

Copilot uses AI. Check for mistakes.
Comment on lines 139 to 142
function __BaseTokensConverter_init(
address _vault
) internal onlyInitializing {
__ReentrancyGuard_init();
if (IVaultVersion(_vault).version() < _supportedVaultVersion()) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Replacing ReentrancyGuardUpgradeable with ReentrancyGuardTransient changes inherited storage layout (upgradeable guard has storage; transient guard typically does not). If any concrete converter inheriting BaseTokensConverter is deployed behind a proxy and upgraded in-place, this can cause storage collisions and corrupt state. Safer options: keep ReentrancyGuardUpgradeable for upgradeable deployments, or only use ReentrancyGuardTransient in contracts that are never upgraded / always freshly deployed, and explicitly preserve layout (e.g., reserve the old storage slot(s)) in an upgrade-safe way.

Copilot uses AI. Check for mistakes.

import {Initializable} from '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import {ReentrancyGuardUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';
import {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This mixes non-upgradeable Initializable (from @openzeppelin/contracts/...) with OwnableUpgradeable (from @openzeppelin/contracts-upgradeable/...). In most setups this introduces a duplicate Initializable contract definition in the compilation unit (both packages define Initializable), which can fail compilation and/or create inconsistent initialization semantics. Prefer using the upgradeable Initializable import here (to match OwnableUpgradeable), or switch fully to non-upgradeable patterns (Ownable + non-upgradeable Initializable) to avoid duplicate symbols and inconsistent upgradeability assumptions.

Suggested change
import {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';
import {Initializable} from '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';

Copilot uses AI. Check for mistakes.
* @notice Proxy contract for executing transactions on behalf of the Strategy.
*/
contract StrategyProxy is Initializable, ReentrancyGuardUpgradeable, OwnableUpgradeable, IStrategyProxy {
contract StrategyProxy is Initializable, ReentrancyGuardTransient, OwnableUpgradeable, IStrategyProxy {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This mixes non-upgradeable Initializable (from @openzeppelin/contracts/...) with OwnableUpgradeable (from @openzeppelin/contracts-upgradeable/...). In most setups this introduces a duplicate Initializable contract definition in the compilation unit (both packages define Initializable), which can fail compilation and/or create inconsistent initialization semantics. Prefer using the upgradeable Initializable import here (to match OwnableUpgradeable), or switch fully to non-upgradeable patterns (Ownable + non-upgradeable Initializable) to avoid duplicate symbols and inconsistent upgradeability assumptions.

Copilot uses AI. Check for mistakes.
Comment on lines 25 to 29
function initialize(
address initialOwner
) external initializer {
__ReentrancyGuard_init();
__Ownable_init(initialOwner);
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This mixes non-upgradeable Initializable (from @openzeppelin/contracts/...) with OwnableUpgradeable (from @openzeppelin/contracts-upgradeable/...). In most setups this introduces a duplicate Initializable contract definition in the compilation unit (both packages define Initializable), which can fail compilation and/or create inconsistent initialization semantics. Prefer using the upgradeable Initializable import here (to match OwnableUpgradeable), or switch fully to non-upgradeable patterns (Ownable + non-upgradeable Initializable) to avoid duplicate symbols and inconsistent upgradeability assumptions.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Forge code coverage:

File % Lines % Statements % Branches % Funcs
src/MerkleDistributor.sol 98.75% (79/80) 95.74% (90/94) 80.00% (12/15) 100.00% (11/11)
src/OsTokenVaultEscrowAuth.sol 0.00% (0/6) 0.00% (0/9) 100.00% (0/0) 0.00% (0/2)
src/StrategiesRegistry.sol 91.67% (22/24) 96.15% (25/26) 100.00% (8/8) 80.00% (4/5)
src/StrategyProxy.sol 0.00% (0/12) 0.00% (0/10) 0.00% (0/2) 0.00% (0/5)
src/converters/BaseTokensConverter.sol 79.49% (31/39) 77.27% (34/44) 80.00% (4/5) 75.00% (3/4)
src/converters/EthTokensConverter.sol 100.00% (11/11) 100.00% (9/9) 100.00% (2/2) 100.00% (3/3)
src/converters/GnoTokensConverter.sol 100.00% (20/20) 100.00% (17/17) 100.00% (2/2) 100.00% (5/5)
src/converters/SwapOrderHandler.sol 0.00% (0/6) 0.00% (0/7) 0.00% (0/1) 0.00% (0/1)
src/converters/TokensConverterFactory.sol 100.00% (13/13) 100.00% (10/10) 100.00% (2/2) 100.00% (3/3)
src/helpers/BoostHelpers.sol 93.42% (71/76) 94.90% (93/98) 68.75% (11/16) 100.00% (7/7)
src/helpers/StakeHelpers.sol 70.27% (52/74) 71.72% (71/99) 36.36% (4/11) 85.71% (6/7)
src/helpers/VaultUserLtvTracker.sol 92.86% (26/28) 93.75% (30/32) 66.67% (4/6) 100.00% (4/4)
src/leverage/AaveLeverageStrategy.sol 97.14% (34/35) 96.77% (30/31) 75.00% (3/4) 100.00% (8/8)
src/leverage/EthAaveLeverageStrategy.sol 100.00% (14/14) 93.33% (14/15) 0.00% (0/1) 100.00% (4/4)
src/leverage/GnoAaveLeverageStrategy.sol 0.00% (0/14) 0.00% (0/14) 0.00% (0/1) 0.00% (0/4)
src/leverage/LeverageStrategy.sol 95.22% (239/251) 95.81% (297/310) 76.92% (40/52) 100.00% (25/25)
Total 87.06% (612/703) 87.27% (720/825) 71.88% (92/128) 84.69% (83/98)

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

Comments