Skip to content

Conversation

@supercontracts
Copy link
Collaborator

@supercontracts supercontracts commented Nov 13, 2025

Summary by CodeRabbit

  • Chores
    • Updated internal dependency resolution across library modules to improve maintainability and code organization.

@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Walkthrough

This PR updates IERC20 import paths across five library files, migrating from external OpenZeppelin package locations to local library paths. No logic, control flow, or public interface changes are included.

Changes

Cohort / File(s) Summary
IERC20 Import Path Migration
src/libraries/AaveLib.sol, src/libraries/ApproveLib.sol, src/libraries/CCTPLib.sol, src/libraries/CurveLib.sol, src/libraries/PSMLib.sol
Updated IERC20 import paths from external OpenZeppelin package references to local lib paths. No changes to logic, behavior, or public APIs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • All changes are homogeneous import statement updates across consistently-structured library files
  • No logic modifications, control flow changes, or API alterations require detailed scrutiny
  • Verification needed only that import paths resolve correctly to intended local library location

Possibly related PRs

  • sparkdotfi/spark-alm-controller#162: Directly affects the same library files (AaveLib, ApproveLib, CCTPLib, CurveLib, PSMLib) introduced or modified in that PR, establishing a shared codebase dependency.

Suggested reviewers

  • lucas-manuel

Poem

🐰 Imports reorganized with care,
From distant OpenZeppelin's lair,
To local libs, now tucked up neat,
No logic changed—the dance stays sweet!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows the required format with 'fix:' prefix and clearly describes the main change: updating OpenZeppelin imports to use relative paths in library files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/spark-spell-repo-oz

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 241b131 and dbba150.

📒 Files selected for processing (5)
  • src/libraries/AaveLib.sol (1 hunks)
  • src/libraries/ApproveLib.sol (1 hunks)
  • src/libraries/CCTPLib.sol (1 hunks)
  • src/libraries/CurveLib.sol (1 hunks)
  • src/libraries/PSMLib.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: coverage
  • GitHub Check: test
  • GitHub Check: build
🔇 Additional comments (5)
src/libraries/ApproveLib.sol (1)

4-4: LGTM! Consistent with the other library updates.

The IERC20 import path has been correctly updated to match the local library path used across all other files in this PR.

src/libraries/PSMLib.sol (1)

4-4: LGTM! Import path correctly updated.

The change is consistent with the other library files in this PR.

src/libraries/AaveLib.sol (1)

7-7: LGTM! Import path correctly updated.

The IERC20 import has been updated to use the local library path, consistent with all other library files in this PR.

src/libraries/CCTPLib.sol (1)

4-4: LGTM! All library files now consistently use the local OpenZeppelin path.

This completes the migration of all five library files to use the local OpenZeppelin contracts instead of external package dependencies. The changes are consistent and straightforward.

src/libraries/CurveLib.sol (1)

4-4: LGTM! Import path updated to use local openzeppelin-contracts submodule.

The IERC20 import has been consistently updated across library files to reference the local openzeppelin-contracts git submodule. The relative path ../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol is structurally correct for files in src/libraries/ and aligns with foundry.toml's remappings and existing patterns in the codebase (PSMLib, ApproveLib, AaveLib, etc.).

Verify after a full repository setup with git submodule update --init --recursive to ensure the import resolves correctly and the project builds successfully.


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

@github-actions
Copy link

Coverage after merging fix/spark-spell-repo-oz into dev will be

99.55%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
deploy
   ControllerDeploy.sol100%100%100%100%
   ForeignControllerInit.sol100%100%100%100%
   MainnetControllerInit.sol97.37%93.33%100%100%152, 90
src
   ALMProxy.sol100%100%100%100%
   ALMProxyFreezable.sol100%100%100%100%
   ForeignController.sol98.24%91.67%100%99.16%312–313, 613
   MainnetController.sol99.11%100%98.11%99.18%500–501
   OTCBuffer.sol100%100%100%100%
   RateLimitHelpers.sol100%100%100%100%
   RateLimits.sol100%100%100%100%
src/libraries
   AaveLib.sol100%100%100%100%
   ApproveLib.sol100%100%100%100%
   CCTPLib.sol100%100%100%100%
   CurveLib.sol100%100%100%100%
   ERC4626Lib.sol96%75%100%100%108
   PSMLib.sol100%100%100%100%

@lucas-manuel lucas-manuel merged commit 1754ec8 into dev Nov 13, 2025
4 checks passed
@lucas-manuel lucas-manuel deleted the fix/spark-spell-repo-oz branch November 13, 2025 14:51
lucas-manuel pushed a commit that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants